From bcd011e30a4e027dde2ffc5f48c837a78b0649dd Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Wed, 17 Apr 2013 08:48:39 +0200 Subject: [PATCH] Cleanup --- app-admin/opsi-configed/Manifest | 3 +- .../opsi-configed-4.0.3.2.1.ebuild | 14 +- net-ftp/opsi-atftp/ChangeLog | 159 ++++++++++++++++++ net-ftp/opsi-atftp/Manifest | 15 ++ .../opsi-atftp/files/atftp-0.7-blockno.patch | 136 +++++++++++++++ .../opsi-atftp/files/atftp-0.7-filecase.patch | 141 ++++++++++++++++ net-ftp/opsi-atftp/files/atftp-0.7-gcc.patch | 20 +++ .../opsi-atftp/files/atftp-0.7-glibc24.patch | 22 +++ .../opsi-atftp/files/atftp-0.7-illreply.patch | 12 ++ .../opsi-atftp/files/atftp-0.7-password.patch | 94 +++++++++++ net-ftp/opsi-atftp/files/atftp-0.7-pcre.patch | 14 ++ .../files/atftp-0.7-spaced_filename.patch | 96 +++++++++++ .../opsi-atftp/files/atftp-0.7-tests.patch | 23 +++ net-ftp/opsi-atftp/files/atftp.confd | 4 + net-ftp/opsi-atftp/files/atftp.init | 28 +++ net-ftp/opsi-atftp/metadata.xml | 7 + net-ftp/opsi-atftp/opsi-atftp-0.7.10.1.ebuild | 71 ++++++++ net-ftp/opsi-atftp/opsi-atftp.spec | 108 ++++++++++++ 18 files changed, 963 insertions(+), 4 deletions(-) create mode 100644 net-ftp/opsi-atftp/ChangeLog create mode 100644 net-ftp/opsi-atftp/Manifest create mode 100644 net-ftp/opsi-atftp/files/atftp-0.7-blockno.patch create mode 100644 net-ftp/opsi-atftp/files/atftp-0.7-filecase.patch create mode 100644 net-ftp/opsi-atftp/files/atftp-0.7-gcc.patch create mode 100644 net-ftp/opsi-atftp/files/atftp-0.7-glibc24.patch create mode 100644 net-ftp/opsi-atftp/files/atftp-0.7-illreply.patch create mode 100644 net-ftp/opsi-atftp/files/atftp-0.7-password.patch create mode 100644 net-ftp/opsi-atftp/files/atftp-0.7-pcre.patch create mode 100644 net-ftp/opsi-atftp/files/atftp-0.7-spaced_filename.patch create mode 100644 net-ftp/opsi-atftp/files/atftp-0.7-tests.patch create mode 100644 net-ftp/opsi-atftp/files/atftp.confd create mode 100755 net-ftp/opsi-atftp/files/atftp.init create mode 100644 net-ftp/opsi-atftp/metadata.xml create mode 100644 net-ftp/opsi-atftp/opsi-atftp-0.7.10.1.ebuild create mode 100644 net-ftp/opsi-atftp/opsi-atftp.spec diff --git a/app-admin/opsi-configed/Manifest b/app-admin/opsi-configed/Manifest index 3aa6c99..09f26d6 100644 --- a/app-admin/opsi-configed/Manifest +++ b/app-admin/opsi-configed/Manifest @@ -1,4 +1,5 @@ DIST opsi-configed-4.0.3.2.1-1.1.src.rpm 1909949 SHA256 a0a3adc6dba07d51263b43ac1af4b870b73d0e3c980f8b97d81aa5bd914883f5 SHA512 804d2a3e5a422a3f6f133658953e2737e6d5f3cee5a8ea3695911d2ac4f7740d556b0228b640db045f8ed4ae0b08dc7448b17f74618ec76d317c82bb4dbe28b2 WHIRLPOOL 05e082844b43b9b28d134b92521dfff408a1dc8e0942c67a159031f9e2a1a90114e15b0a8fb777dae33eeb1afdd44533910c7b15440424aee06f5516ed402475 -EBUILD opsi-configed-4.0.3.2.1.ebuild 1543 SHA256 dc243a4ca9cd1fd40b185faa8257c92d84d9470c7432490ddc4189a20b3a08da SHA512 c51b8a2ce0403a03cdf0e056a611ccda39773dc4c82fd6610178e8e0815fee0e42e3f8934834bf77265ae8a31bca987e58cc66d6b3e373c0683c3d1da2060b89 WHIRLPOOL 77bd6fdca0851d028c3ecbff5874b3b1259b1ea2a79b713e813090963c4a776a9f1a670dc0639630f71ab41281dfb2ff75aba9a402fd7f5151f90ee3f2089af2 +EBUILD opsi-configed-4.0.3.2.1.ebuild 1923 SHA256 ce7524bcb8f1272f5c87530b2da2777b0b04380a111871971f94ae99de00abec SHA512 5c1b901e171ac92a57c4bb5b3f1158af32d128f63e5760712666476267c46636e7eee2643dc21d820b345c64c45ee7f367395e6e0a61d63d1d991342e136553b WHIRLPOOL 3e3c71223a64927e32bff931b44bc328422205f6625a110537c989e275ada20201c50cb245b44e35bcf094ee1eb952cf2b30d98fdb4a6681d9b64922389e8867 MISC ChangeLog 1388 SHA256 170dab181c40ebbb1c8162248808bf252d7df14af30d7a8347bac307764777e6 SHA512 7c2c2017e3a961a38814513d70022245dacbfb7f959815bfef2c075192e012aac6aa52922357b1a68ee45af288e2db0f612f08aa2f2222c0b4a2a9d115b3da6e WHIRLPOOL ecb904d0e0f3311091491a80f244c82cd34b6c93452986f2abdceb4f876a04ad4b6cab00f3219412b4166bf3dcd9e24fbff8ceba4d4a496f0691fa5d7354f31b MISC metadata.xml 226 SHA256 a9d3f7df2362a9a7ddcbe05c5d97d726eeb4bab135b21643508149a08bf6a2b2 SHA512 5912920d8f6e9ee5126fb0aaa5717a562feb009cc59b759c6a6eaa909900b19e95e51e3aa7f32fdf2e77073b19878830b97947148e3adeff3b49e7555cfe29e9 WHIRLPOOL c07e2ddb648893f1e9c422e07b0b73a6d0f7e1c9501200b6fcc9d25fe68c3b05fe4f3523e6844067eeca6969973a44004e1ba8a6fa725591a1916648bd2d4834 +MISC opsi-configed.spec 4165 SHA256 3f0b295a8205126d469d7b7677839147884e0af384db25f7b7e895d9c6a1a047 SHA512 ddd64b6792f67824b619fdbc6def975cb72c0efb68ea53227eaa2e0e741a5b77e6282d88a20f0ecc83ca8ced2a029dad6eb9c7a0c6eaf8426da89fdcea0e2e09 WHIRLPOOL e0522986f56390f234c96eebc6031195152a2467d826d8c1aa61e74dfbd49255861c66d3066ea471a7f4a0b7fa71218164df2c49ce7a4b43ccbc614ee69882ad diff --git a/app-admin/opsi-configed/opsi-configed-4.0.3.2.1.ebuild b/app-admin/opsi-configed/opsi-configed-4.0.3.2.1.ebuild index 7315891..7e52ec8 100644 --- a/app-admin/opsi-configed/opsi-configed-4.0.3.2.1.ebuild +++ b/app-admin/opsi-configed/opsi-configed-4.0.3.2.1.ebuild @@ -36,15 +36,23 @@ src_compile() { ejavac -encoding UTF-8 -sourcepath src -classpath $(java-pkg_getjars swingx-1.6) -d build src/de/uib/configed/configedApplet.java ejavac -encoding UTF-8 javainfo.java jar -cvfm configed.jar MANIFEST.MF -C build/ . + + # get the swingx.jar for the java webstart into the right place + cp "${ROOT}"/usr/share/swingx-1.6/lib/swingx.jar . + + rm -rf keystore + cat /dev/urandom | tr -dc A-Za-z0-9 | head -c12 > pass + keytool -genkeypair -dname "cn=opsi.org" -alias opsi.org -keypass $(cat pass) -keystore keystore -storepass $(cat pass) -validity 1000 + jarsigner -keystore keystore -storepass $(cat pass) configed.jar opsi.org + jarsigner -keystore keystore -storepass $(cat pass) swingx.jar opsi.org + rm -rf pass } src_install() { java-pkg_jarinto /usr/lib/configed insinto /usr/lib/configed doins index.html javainfo.class - java-pkg_dojar "${S}"/configed.jar - # get the swingx.jar for the java webstart into the right place - java-pkg_dojar "${ROOT}"/usr/share/swingx-1.6/lib/swingx.jar + java-pkg_dojar "${S}"/configed.jar "${S}"/swingx.jar java-pkg_dolauncher ${PN} --main de.uib.configed.configed insinto /usr/share/configed diff --git a/net-ftp/opsi-atftp/ChangeLog b/net-ftp/opsi-atftp/ChangeLog new file mode 100644 index 0000000..29fce8c --- /dev/null +++ b/net-ftp/opsi-atftp/ChangeLog @@ -0,0 +1,159 @@ +# ChangeLog for net-ftp/atftp +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-ftp/atftp/ChangeLog,v 1.30 2012/05/13 11:13:32 swift Exp $ + + 13 May 2012; atftp-0.7-r1.ebuild, atftp-0.7-r2.ebuild: + SELinux policy module for TFTP is provided by selinux-tftp + + 21 Dec 2011; Pawel Hajdan jr atftp-0.7-r2.ebuild: + x86 stable wrt bug #393883 + + 16 Dec 2011; Agostino Sarubbo atftp-0.7-r2.ebuild: + Stable for AMD64, wrt bug #393883 + + 09 Apr 2011; Tobias Klausmann atftp-0.7-r2.ebuild: + Revert stupid revert of old-style virtual (cf. bug 323883) + + 03 Apr 2011; Tobias Klausmann atftp-0.7-r2.ebuild, + metadata.xml: + Make myself maintainer, re-add virtual + +*atftp-0.7-r2 (26 Mar 2011) + + 26 Mar 2011; Tobias Klausmann +atftp-0.7-r2.ebuild, + +files/atftp-0.7-blockno.patch, +files/atftp-0.7-illreply.patch, + +files/atftp-0.7-spaced_filename.patch: + Integrate patches from bugs 321705, 322601 and 323883 + + 22 Mar 2011; Ulrich Mueller atftp-0.7-r1.ebuild: + Drop PROVIDE=virtual/tftp and update blocker, bug 359125. + + 26 Aug 2009; Víctor Ostorga + -files/atftp-0.6-security.patch, -files/atftp-0.7-gcc.patch: + Cleaning out unused patches + + 26 Nov 2008; Diego E. Pettenò atftp-0.7-r1.ebuild: + Use mirror://debian/. + + 15 May 2007; Thilo Bangert metadata.xml: + add no-herd + + 08 Apr 2007; atftp-0.7-r1.ebuild: + - added ~s390 + + 08 Jan 2007; Danny van Dyk -atftp-0.6.2.ebuild, + -atftp-0.7.ebuild: + QA: Removed unused versions. + + 19 Aug 2006; Torsten Veller atftp-0.7-r1.ebuild: + Stable on x86 (#144324). + + 19 Aug 2006; Jason Wever atftp-0.7-r1.ebuild: + Stable on SPARC. + + 19 Aug 2006; Tobias Scherbaum atftp-0.7-r1.ebuild: + ppc stable, bug #144324 + + 18 Aug 2006; Thomas Cort atftp-0.7-r1.ebuild: + Stable on amd64 wrt Bug #144324. + + 18 Aug 2006; Markus Rothe atftp-0.7-r1.ebuild: + Stable on ppc64 + +*atftp-0.7-r1 (26 May 2006) + + 26 May 2006; Robin H. Johnson + +files/atftp-0.7-glibc24.patch, +files/atftp-0.7-password.patch, + +files/atftp-0.7-pcre.patch, +files/atftp-0.7-tests.patch, + +atftp-0.7-r1.ebuild: + Major fixups, bugs: #104218 - password extension for linksys gear, #109638 - + pcre fix and more features, #109912 - 64bit fixes, #110591 - test fixes, + #126520 - glibc 2.4 support. + + 21 Jan 2006; Lars Weiler atftp-0.7.ebuild: + Stable on ppc. + + 21 Jul 2005; Markus Rothe atftp-0.7.ebuild: + Stable on ppc64 + + 14 Jun 2005; Markus Rothe atftp-0.7.ebuild: + added ~ppc64 + + 21 Feb 2005; Simon Stelling : + added ~amd64 + + 07 Feb 2005; Mike Frysinger + +files/atftp-0.7-gcc.patch, atftp-0.7.ebuild: + Added patch to fix building #71090. + + 07 Feb 2005; Jan Brinkmann atftp-0.6.2.ebuild: + added ~amd64 to 0.6.2, fixes #81083 + + 31 Jul 2004; atftp-0.7.ebuild: + ~amd64 - closes bug #57702 + + 22 Apr 2004; Chuck Short atftp-0.6.2.ebuild: + Fixes typo. Closes #48660. + + 22 Mar 2004; David Holm atftp-0.7.ebuild: + Added to ~ppc. + +*atftp-0.7 (22 Mar 2004) + + 22 Mar 2004; Chuck Short atftp-0.6.2.ebuild, + atftp-0.7.ebuild: + Version bump, closes #45210. + + 22 Mar 2004; Chuck Short atftp-0.6.2.ebuild: + Marked stable for x86. + + 26 Jan 2004; Chuck Short atftp-0.6-r3.ebuild, + atftp-0.6.2.ebuild: + Fix typo in ebuild. closes #38946. + + 30 Dec 2003; Chuck Short atftp-0.6.2.ebuild, + files/atftp.confd, files/atftp.init: + Added init scripts. Closes #36051. + + 14 Dec 2003; Joshua Kinard atftp-0.6.2.ebuild: + forgot to mark keywords as unstable + +*atftp-0.6.2 (14 Dec 2003) + + 14 Dec 2003; Joshua Kinard atftp-0.6.2.ebuild: + Version bump + +*atftp-0.6-r3 (31 Oct 2003) + + 31 Oct 2003; Heinrich Wendel atftp-0.6-r2.ebuild, + atftp-0.6-r3.ebuild: + stable, it's just a virtual ;D + + 30 Oct 2003; Heinrich Wendel atftp-0.6-r1.ebuild, + atftp-0.6.ebuild: + added virtual/tftp + +*atftp-0.6-r1 (29 Aug 2003) + + 29 Aug 2003; Martin Holzer atftp-0.6-r1.ebuild, + atftp-0.6-r2.ebuild, atftp-0.6.ebuild, files/atftp-0.6-security.patch: + move net-ftp/atftp net-misc + + 18 Jun 2003; Daniel Ahlberg files/atftp-0.6-security.patch : + Updated patch to a more proper one. + +*atftp-0.6-r2 (08 Jun 2003) + + 08 Jun 2003; Daniel Ahlberg : + Security update. + +*atftp-0.6-r1 (29 Oct 2002) + + 29 Oct 2002; Daniel Ahlberg : + Updated ebuild with tcpd support. Ebuild contributed by Cory Visi in #9797. + +*atftp-0.6 (16 Aug 2002) + + 16 Aug 2002; Daniel Ahlberg atftp-0.6.ebuild: + Initial import. Ebuild submitted by Francisco Gimeno + . diff --git a/net-ftp/opsi-atftp/Manifest b/net-ftp/opsi-atftp/Manifest new file mode 100644 index 0000000..ad9c2e3 --- /dev/null +++ b/net-ftp/opsi-atftp/Manifest @@ -0,0 +1,15 @@ +AUX atftp-0.7-blockno.patch 5686 SHA256 f77661c92a66b95773a81f895e982ae65acbbef84c75b1ab8021e4dfb1bb64d1 SHA512 f91e7a7811a1a08268f2ca378eb4e473838e0c07c3cb8c6e6fec1e0e4e9068705451d8d0ae5f3d184a9455d5035bb656176fa3ed09b50fecb6c2d42e8dc73e1d WHIRLPOOL 99e2af2b35263131f0bc3d2a795e99ade0bd20000107931a512c84ea0029f98deb62f08392039c8d24cad88603a15bd55959883e189011248ee1c8092152a5c5 +AUX atftp-0.7-filecase.patch 4518 SHA256 718df4f6f168ac0b5b02fe4a20c92274210fec1b96974b6ec28e5ec5bd219e59 SHA512 564f9205c13d707158f6a2efb96e1a3e344c0886d87058ae388c87fe4e53efaa1edce4e1a9bd1742d18248c5e78b8725223d4e4d93f706dceef272024f0b6ed3 WHIRLPOOL ced62cd62aedf7529e5c2298d0007d1cc130c4e917328ab3d935e56ea00922565ed0832fb46fc844dbfefd5fc3554eeb36c8110545d8dc8c9a2ab9892d76fafa +AUX atftp-0.7-gcc.patch 540 SHA256 c1ea9eb2f42fbd151e1c82bb2cd431c85bddbaa2413f297a4d285269d1d080d6 SHA512 8dc63226ce8d8bdc7ca7ebb8aebca09572dd837a491de6a755d6966bad21bc5c4bb8acff87f50c2036f436a00266695db4a54b60be3f19bc9b998481576d8e9b WHIRLPOOL 9677f6e9c4a2bfcf5fb0b7cc41305d753e0d31756025f3c963dac450db0fc909ebfd5462de4fa2432bb3e82ef808f6217b6d8b02a6dcedf090ddf7e58a79a59e +AUX atftp-0.7-glibc24.patch 778 SHA256 d2bec90943b330db84cd6af089a67e476f45271d9f33095ef3fc281c83eb7ed5 SHA512 1000972a84d3462a0924a4189b240160a9ae5e1429365b329e0be582fdd6593611a59d3f7f955956269144f4c764bb378e04aecc5c18405d340f7cd60efb4e5a WHIRLPOOL cb0a9f32ca7a061683ad7d92dc4ee14d6aaed260b0071942bc6fb932640b8c2e8b5f04dccf9f8b7c87e26458da2980523db5be1eda9fe1d894548170e48f1bde +AUX atftp-0.7-illreply.patch 362 SHA256 db1bbc6c40ccfa12ea6e283f35368cfdb47c05c5ad54dd26a9ff9693807e78d5 SHA512 56a99a23fe928e89d6064ddba2e63c9065215c13ecf1f5228e447eeebeb98c521dc541ca7fda3d95f91ed8f9d13dec32eac1da42f8d37e326ee100c57b15316b WHIRLPOOL 68a368444232756af2e409e2b9bce28bf3a972865aca286d931c2522c51e573317236fc11a895776ee63d05f0e4dcdb048ccf032b001e9f16c126381efb8f09b +AUX atftp-0.7-password.patch 3906 SHA256 e56637318c9baa9e85525dc92c6be170713529af834a5bb6871238d374c0a365 SHA512 5f04d4d54aaf5f459e1aa87f56b3920fc039303f6c1c6d0f205bc1937b9c5263e5a51224838ee7aab1b73e0df6c312620caeba9dd2388e1b5b7bdf8253a56fc0 WHIRLPOOL b3d34b6168f381121e49dc918258695fa1e36c10fb82f495fb9d6f57e2659a71eccc42481deaf0cb9c1e5ef236d367d6a79676fa5251533b283a79e8073c4710 +AUX atftp-0.7-pcre.patch 661 SHA256 53cb989038e1c5520104c837cb086ffbb20afb6555f42782f78fd05bcea9f304 SHA512 773ecc9aa63a9ffb2774ca5454daf573813f988defa6e6f8e9f99cfcc88c7984632b6d1944994c2dd6426200057a552743b9c30d5c158f469a9a74b3cd0c5dff WHIRLPOOL c2a7a02db827070c98c013e7d380b6cb08a7ce87a4549bc8989e75dfc225dae054665354158eaca7ead1eecf9a3e12dcf55527bd185ead32f35732414945e6fb +AUX atftp-0.7-spaced_filename.patch 2395 SHA256 0d93d85295d5e5ad79783b7e45e8c7f5ee061956adf1f160f5647fcb418bdac7 SHA512 f6b352105d40fd4de2b079e847c7e6230ebeef3d2c5568aa260f7c74b22962c168928b38a244e3784e6ba282b47ae09d28b572c36944360f5bf8d880d16aeb64 WHIRLPOOL e5726c0aaae31085099bf7bc33597732100d02e9bff390de2a1b51d7d2b8b6c4dff179ed1352199be4b748edfe08bd3dacbdc068ab34b68c82e21b22cb5832f6 +AUX atftp-0.7-tests.patch 582 SHA256 00e04546214265b0e9d03a0f8182837909825fef111e53a7b23d9e6a382a9d54 SHA512 93863aed523c9787f37b671caa894a92e864b009dd5c028066f7e10e50cefce955f3cf9a24ecc702c3ce572bd88fa6a47d524af08ecbaa6ff116487a68393ea8 WHIRLPOOL 001b1d907dc6d0a03a70d6e4c0a0f4f698098a02cc441bde1c7a18d13eae59bbce76727b5dffbe83222611636fe7d7fd550c0c98107717c441afc540c278dde5 +AUX atftp.confd 105 SHA256 a2dc012a0ecd94f27950901b18a54ecc744630da4c7cd8939b3f11be07685645 SHA512 cdbd63df16c2cee7491209de8ec44e05e10beccc6286cf7cb1c5dc7731c616d41bc94ce4d6c020b4ac8bb77b27956e9ee36d9b5703dcd3477e8b14927d154b91 WHIRLPOOL 85ea4d5e802b503740c6220c57dcc4c104d9015818f2a487e0e02338c634a3132134243273911615d3c7583a7bae3d2d24a77b866b1ee6ad0f34dd2e3d9b7db3 +AUX atftp.init 437 SHA256 4970eb720ab838c1855b33b2437e0f8f44356e9b6f5a7225c99e2a29d6311b34 SHA512 418c81e6616cfa9283cf0de87fa62c8947576f257473c6385ebcad4ba0c6fa0def15320180f28899e56595b46790aff296c396dc3229ba43d0ac50b0b3854ccd WHIRLPOOL 13cdec052bae0fbfd61f3543e408391d80435d6463fdf5b231d4584ff2e6fdb22714798d1572227d6d53d1c9a5e895136fe5041b5cf6f6b45d49229f26b09d2c +DIST opsi-atftp-0.7.dfsg-10.1.src.rpm 222090 SHA256 3da0568f18cf5bb02a71e57f54068262f651aa4e64f679cc2a7919f5b0d6c77f SHA512 022112c68ce1971e27d942352738250a8c40a0fd6d539cf153736cf8b7402c84a05a43544ee69a78ce37c987e64de7f662368f4c72a5c8dcedcde19ab360f614 WHIRLPOOL 5b93c9802a326b363581c7099409968b39883236314e3b907371a7d3aae21d239792fbf80e9d497e87b3acf9eaef492dcdf2714581ff593e8784a8a7c1858a6a +EBUILD opsi-atftp-0.7.10.1.ebuild 2212 SHA256 2add14236661b8c72272100f85ddd8c5fd2b0ebddab57d3649880166043b76a5 SHA512 2f85fcdcc5b3d51ba0606c80332bf7a6fe85903c401abd81dc609d760530adf726e952107c5d86bab4d7c26a95f1301251b0afe15bcb4663a2bf7c366445413c WHIRLPOOL 7a7f55e03f65d92f030a9a299d27a40b87cfe786d8201cd866ed64497510985cc46ede2fb6649ab5ca50fcc58c57666fa4d0076ffef151dfbf2b355d6aa955e3 +MISC ChangeLog 5242 SHA256 24ec1bdb63aafeb7bbaa06d416a7a52c0421252dbf1b24eca6fadee75fd4fb1e SHA512 93c84ac26ed386a355ae0ac296785406082c1e13c7e17c098f2fede1bcdf4e13db84b5b1480dd1e295ea9eeb29d2527ea09dd9ad943984aacbbf311de9a35ca2 WHIRLPOOL c4e181731590107ff725d5ffbfbfa0e209198c571dc89486387a8d3f3539b82d8184725b7eb585657599e83ed4afd786783cb6834bdd3167aea445704196ce81 +MISC metadata.xml 201 SHA256 8f40014a5a33302eb2f72fa5e8a7493829fedfc9801fb6366b13066d9b4e51b6 SHA512 b17338d3905aed8473593db886d7f6eaa9b1a4447268ae003980aa54586d5507befe01db504140e760ba3b36fb0fc3ebd246b234f3e33dd964bdf121aa525d2d WHIRLPOOL 5d2ea7d5b0350de6243f6039cc5036580f25b98f27967f11337c9d3c6506c0e23e1aea4dae82bbdb5b5c2bc32b240b2836f49f2fea8aef0b900b6c30ba183e15 diff --git a/net-ftp/opsi-atftp/files/atftp-0.7-blockno.patch b/net-ftp/opsi-atftp/files/atftp-0.7-blockno.patch new file mode 100644 index 0000000..6a3184f --- /dev/null +++ b/net-ftp/opsi-atftp/files/atftp-0.7-blockno.patch @@ -0,0 +1,136 @@ +--- atftp-0.7/tftp_file.c~ 2010-05-27 13:05:12.000000000 -0500 ++++ atftp-0.7/tftp_file.c 2010-05-27 12:50:05.000000000 -0500 +@@ -133,19 +133,21 @@ + int mcast_sockfd = 0; + struct sockaddr_in sa_mcast; + struct ip_mreq mreq; + struct hostent *host; + int master_client = 0; + unsigned int file_bitmap[NB_BLOCK]; + int prev_bitmap_hole = -1; /* the previous hole found in the bitmap */ + char string[MAXLEN]; ++ int rx_block_number; + + int prev_block_number = 0; /* needed to support netascii convertion */ + int temp = 0; ++ size_t ignore; + + data->file_size = 0; + tftp_cancel = 0; + from.sin_addr.s_addr = 0; + + memset(&sa_mcast, 0, sizeof(struct sockaddr_in)); + memset(&file_bitmap, 0, sizeof(file_bitmap)); + +@@ -300,17 +302,17 @@ + { + connect(sockfd, (struct sockaddr *)&sa, sizeof(sa)); + connected = 1; + } + state = S_OACK_RECEIVED; + break; + case GET_ERROR: + fprintf(stderr, "tftp: error received from server <"); +- fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr); ++ ignore = fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr); + fprintf(stderr, ">\n"); + state = S_ABORT; + break; + case GET_DATA: + number_of_timeout = 0; + /* if the socket if not connected, connect it */ + if (!connected) + { +@@ -513,21 +515,24 @@ + state = S_WAIT_PACKET; + break; + case S_DATA_RECEIVED: + if ((multicast && master_client) || (!multicast)) + timeout_state = S_SEND_ACK; + else + timeout_state = S_WAIT_PACKET; + +- block_number = ntohs(tftphdr->th_block); ++ rx_block_number = ntohs(tftphdr->th_block); + if (data->trace) + fprintf(stderr, "received DATA \n", + ntohs(tftphdr->th_block), data_size - 4); + ++ if ((uint16_t)rx_block_number == (uint16_t)(block_number+1)) ++ ++block_number; ++ + if (tftp_file_write(fp, tftphdr->th_data, data->data_buffer_size - 4, block_number, + data_size - 4, convert, &prev_block_number, &temp) + != data_size - 4) + { + + fprintf(stderr, "tftp: error writing to file %s\n", + data->local_file); + tftp_send_error(sockfd, &sa, ENOSPACE, data->data_buffer, +@@ -613,19 +618,21 @@ + int connected; /* 1 when sockfd is connected */ + struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer; + FILE *fp; /* the local file pointer */ + int number_of_timeout = 0; + struct stat file_stat; + int convert = 0; /* if true, do netascii convertion */ + char string[MAXLEN]; + ++ int ack_block_number; + int prev_block_number = 0; /* needed to support netascii convertion */ + int prev_file_pos = 0; + int temp = 0; ++ size_t ignore; + + data->file_size = 0; + tftp_cancel = 0; + from.sin_addr.s_addr = 0; + + /* make sure the socket is not connected */ + sa.sin_family = AF_UNSPEC; + connect(sockfd, (struct sockaddr *)&sa, sizeof(sa)); +@@ -759,20 +766,23 @@ + case GET_ACK: + number_of_timeout = 0; + /* if the socket if not connected, connect it */ + if (!connected) + { + //connect(sockfd, (struct sockaddr *)&sa, sizeof(sa)); + connected = 1; + } +- block_number = ntohs(tftphdr->th_block); ++ ack_block_number = ntohs(tftphdr->th_block); ++ if ((uint16_t)(block_number+1) == ack_block_number) ++ ++block_number; + if (data->trace) + fprintf(stderr, "received ACK \n", +- block_number); ++ ack_block_number); ++ + if ((last_block != -1) && (block_number > last_block)) + { + state = S_END; + break; + } + state = S_SEND_DATA; + break; + case GET_OACK: +@@ -782,17 +792,17 @@ + { + //connect(sockfd, (struct sockaddr *)&sa, sizeof(sa)); + connected = 1; + } + state = S_OACK_RECEIVED; + break; + case GET_ERROR: + fprintf(stderr, "tftp: error received from server <"); +- fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr); ++ ignore = fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr); + fprintf(stderr, ">\n"); + state = S_ABORT; + break; + case GET_DISCARD: + /* consider discarded packet as timeout to make sure when don't lock up + if routing is broken */ + number_of_timeout++; + fprintf(stderr, "tftp: packet discard <%s:%d>.\n", diff --git a/net-ftp/opsi-atftp/files/atftp-0.7-filecase.patch b/net-ftp/opsi-atftp/files/atftp-0.7-filecase.patch new file mode 100644 index 0000000..47e6f42 --- /dev/null +++ b/net-ftp/opsi-atftp/files/atftp-0.7-filecase.patch @@ -0,0 +1,141 @@ +* Case insensitive lookup patch for atftpd +* +* Copyright (c) 2006-2007 Gianluigi Tiesi +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU Library General Public +* License as published by the Free Software Foundation; either +* version 2 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Library General Public License for more details. +* +* You should have received a copy of the GNU Library General Public +* License along with this software; if not, write to the +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +diff -Nur atftp-0.7.dfsg.orig/tftpd.c atftp-0.7.dfsg/tftpd.c +--- atftp-0.7.dfsg.orig/tftpd.c 2007-12-09 06:06:20.000000000 +0100 ++++ atftp-0.7.dfsg/tftpd.c 2007-12-09 06:08:51.229707272 +0100 +@@ -667,6 +667,15 @@ + switch (retval) + { + case GET_RRQ: ++ if (data->tftp_options[OPT_FILENAME].value[0] == '\\') ++ if (!tftpd_lookup_file(directory, data->tftp_options[OPT_FILENAME].value)) ++ { ++ /* Short circuit */ ++ tftp_send_error(data->sockfd, &data->client_info->client, ++ ENOTFOUND, data->data_buffer, data->data_buffer_size); ++ stats_err_locked(); ++ break; ++ } + logger(LOG_NOTICE, "Serving %s to %s:%d", + data->tftp_options[OPT_FILENAME].value, + inet_ntoa(data->client_info->client.sin_addr), +diff -Nur atftp-0.7.dfsg.orig/tftpd.h atftp-0.7.dfsg/tftpd.h +--- atftp-0.7.dfsg.orig/tftpd.h 2004-02-27 03:05:26.000000000 +0100 ++++ atftp-0.7.dfsg/tftpd.h 2007-12-09 06:06:35.319368784 +0100 +@@ -77,6 +77,7 @@ + /* + * Functions defined in tftpd_file.c + */ ++int tftpd_lookup_file(const char *directory, char *filename); + int tftpd_rules_check(char *filename); + int tftpd_receive_file(struct thread_data *data); + int tftpd_send_file(struct thread_data *data); +diff -Nur atftp-0.7.dfsg.orig/tftpd_file.c atftp-0.7.dfsg/tftpd_file.c +--- atftp-0.7.dfsg.orig/tftpd_file.c 2004-02-18 03:21:47.000000000 +0100 ++++ atftp-0.7.dfsg/tftpd_file.c 2007-12-09 06:09:23.683773504 +0100 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include "tftpd.h" + #include "tftp_io.h" +@@ -60,6 +61,81 @@ + extern tftpd_pcre_self_t *pcre_top; + #endif + ++/* ++ * Case insensitive file lookup, for windows clients ++ */ ++ ++int tftpd_lookup_entry(const char *comp, char *dest) ++{ ++ DIR *dirp; ++ struct dirent *dptr; ++ dirp = opendir(dest); ++ if (!dirp) return 0; ++ while ((dptr = readdir(dirp))) ++ { ++ if (!strcasecmp(dptr->d_name, comp)) ++ { ++ strcat(dest, "/"); ++ strcat(dest, dptr->d_name); ++ closedir(dirp); ++ return 1; ++ } ++ } ++ closedir(dirp); ++ return 0; ++} ++ ++int tftpd_lookup_file(const char *directory, char *filename) ++{ ++ int found = 0; ++ int len = 0; ++ char dest[MAXLEN]; ++ char comp[MAXLEN]; ++ char *check = filename; ++ char *seek = NULL; ++ ++ dest[0] = 0; ++ strcat(dest, directory); ++ len = strlen(dest); ++ if (dest[len-1] == '/') ++ dest[len-1] = 0; ++ check++; ++ while (*check) ++ { ++ seek = strchr(check, '\\'); ++ if (!seek) ++ { ++ if ((*check) && (tftpd_lookup_entry(check, dest))) ++ found = 1; ++ break; ++ } ++ len = seek - check; ++ memcpy(comp, check, len); ++ comp[len]=0; ++ if (!tftpd_lookup_entry(comp, dest)) ++ break; ++ check += len + 1; ++ } ++ ++ if (found) ++ { ++ filename[0] = 0; ++ strcat(filename, dest + strlen(directory)); ++ } ++ else ++ { ++ seek = filename; ++ while (*seek) ++ { ++ if (*seek == '\\') *seek = '/'; ++ seek++; ++ } ++ filename++; ++ } ++ ++ logger(LOG_DEBUG, "Filecase lookup file: %s (found %s)", filename, (found ? "yes" : "no")); ++ return found; ++} + + /* + * Rules for filenames. This is common to both tftpd_recieve_file diff --git a/net-ftp/opsi-atftp/files/atftp-0.7-gcc.patch b/net-ftp/opsi-atftp/files/atftp-0.7-gcc.patch new file mode 100644 index 0000000..374dbdb --- /dev/null +++ b/net-ftp/opsi-atftp/files/atftp-0.7-gcc.patch @@ -0,0 +1,20 @@ +--- argz.h.orig 2005-02-07 16:04:41.000000000 -0500 ++++ argz.h 2005-02-07 16:05:01.000000000 -0500 +@@ -180,7 +180,7 @@ + #ifdef __USE_EXTERN_INLINES + extern inline char * + __argz_next (__const char *__argz, size_t __argz_len, +- __const char *__entry) __THROW ++ __const char *__entry) + { + if (__entry) + { +@@ -194,7 +194,7 @@ + } + extern inline char * + argz_next (__const char *__argz, size_t __argz_len, +- __const char *__entry) __THROW ++ __const char *__entry) + { + return __argz_next (__argz, __argz_len, __entry); + } diff --git a/net-ftp/opsi-atftp/files/atftp-0.7-glibc24.patch b/net-ftp/opsi-atftp/files/atftp-0.7-glibc24.patch new file mode 100644 index 0000000..195aec6 --- /dev/null +++ b/net-ftp/opsi-atftp/files/atftp-0.7-glibc24.patch @@ -0,0 +1,22 @@ +--- atftp-0.7/stats.c.org ++++ atftp-0.7/stats.c +@@ -18,6 +18,7 @@ + + #include + #include ++#include + #include "tftp_def.h" + #include "stats.h" + #include "logger.h" +@@ -157,8 +158,9 @@ + + logger(LOG_INFO, " Load measurements:"); ++ long sc_clk_tck = sysconf(_SC_CLK_TCK); + logger(LOG_INFO, " User: %8.3fs Sys:%8.3fs", +- (double)(s_stats.tms.tms_utime) / CLK_TCK, +- (double)(s_stats.tms.tms_stime) / CLK_TCK); ++ (double)(s_stats.tms.tms_utime) / sc_clk_tck, ++ (double)(s_stats.tms.tms_stime) / sc_clk_tck); + logger(LOG_INFO, " Total:%8.3fs CPU:%8.3f%%", + (double)(tmp.tv_sec + tmp.tv_usec * 1e-6), + (double)(s_stats.tms.tms_utime + s_stats.tms.tms_stime) / diff --git a/net-ftp/opsi-atftp/files/atftp-0.7-illreply.patch b/net-ftp/opsi-atftp/files/atftp-0.7-illreply.patch new file mode 100644 index 0000000..e18bbd9 --- /dev/null +++ b/net-ftp/opsi-atftp/files/atftp-0.7-illreply.patch @@ -0,0 +1,12 @@ +*** tftp_def.old.c 2009-02-28 17:56:12.000000000 +0100 +--- tftp_def.c 2009-02-28 17:57:02.000000000 +0100 +*************** +*** 141,146 **** +--- 141,147 ---- + */ + inline char *Strncpy(char *to, const char *from, size_t size) + { ++ if (size <= 0) { *to = '\000'; return to; } + to[size-1] = '\000'; + return strncpy(to, from, size - 1); + } diff --git a/net-ftp/opsi-atftp/files/atftp-0.7-password.patch b/net-ftp/opsi-atftp/files/atftp-0.7-password.patch new file mode 100644 index 0000000..26b5908 --- /dev/null +++ b/net-ftp/opsi-atftp/files/atftp-0.7-password.patch @@ -0,0 +1,94 @@ +diff -Naur atftp-0.7.orig/tftp.c atftp-0.7/tftp.c +--- atftp-0.7.orig/tftp.c 2004-03-15 18:55:56.000000000 -0500 ++++ atftp-0.7/tftp.c 2005-08-29 21:40:06.000000000 -0400 +@@ -525,6 +525,10 @@ + fprintf(stderr, " multicast: enabled\n"); + else + fprintf(stderr, " multicast: disabled\n"); ++ if (data.tftp_options[OPT_PASSWORD].specified) ++ fprintf(stderr, " password: enabled\n"); ++ else ++ fprintf(stderr, " password: disabled\n"); + return ERR; + } + /* if disabling an option */ +@@ -971,6 +975,7 @@ + { "put", 0, NULL, 'p'}, + { "local-file", 1, NULL, 'l'}, + { "remote-file", 1, NULL, 'r'}, ++ { "password", 1, NULL, 'P'}, + { "tftp-timeout", 1, NULL, 'T'}, + { "mode", 1, NULL, 'M'}, + { "option", 1, NULL, 'O'}, +@@ -993,7 +998,7 @@ + }; + + /* Support old argument until 0.8 */ +- while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:sm", ++ while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:smP:", + options, &option_index)) != EOF) + { + switch (c) +@@ -1028,6 +1033,11 @@ + else + action = PUT; + break; ++ case 'P': ++ snprintf(string, sizeof(string), "option password %s", optarg); ++ make_arg(string, &ac, &av); ++ process_cmd(ac, av); ++ break; + case 'l': + interactive = 0; + Strncpy(local_file, optarg, MAXLEN); +@@ -1169,6 +1179,7 @@ + " -p, --put : put file\n" + " -l, --local-file : local file name\n" + " -r, --remote-file : remote file name\n" ++ " -P, --password : specify password (Linksys ext.)\n" + " --tftp-timeout : delay before retransmission, client side\n" + #if 0 + " t, --timeout : delay before retransmission, " +diff -Naur atftp-0.7.orig/tftp_def.c atftp-0.7/tftp_def.c +--- atftp-0.7.orig/tftp_def.c 2004-02-12 22:16:09.000000000 -0500 ++++ atftp-0.7/tftp_def.c 2005-08-29 21:36:57.000000000 -0400 +@@ -37,6 +37,7 @@ + { "timeout", "5", 0, 1 }, /* 2348, 2349, 2090. */ + { "blksize", "512", 0, 1 }, /* This is the default option */ + { "multicast", "", 0, 1 }, /* structure */ ++ { "password", "", 0, 1}, /* password */ + { "", "", 0, 0} + }; + +diff -Naur atftp-0.7.orig/tftp_def.h atftp-0.7/tftp_def.h +--- atftp-0.7.orig/tftp_def.h 2004-02-12 22:16:09.000000000 -0500 ++++ atftp-0.7/tftp_def.h 2005-08-29 20:16:27.000000000 -0400 +@@ -40,6 +40,7 @@ + #define OPT_TIMEOUT 3 + #define OPT_BLKSIZE 4 + #define OPT_MULTICAST 5 ++#define OPT_PASSWORD 6 + #define OPT_NUMBER 7 + + #define OPT_SIZE 12 +diff -Naur atftp-0.7.orig/tftp_io.c atftp-0.7/tftp_io.c +--- atftp-0.7.orig/tftp_io.c 2004-02-18 20:30:00.000000000 -0500 ++++ atftp-0.7/tftp_io.c 2005-08-29 22:05:11.000000000 -0400 +@@ -70,10 +70,13 @@ + break; + if (tftp_options[i].enabled && tftp_options[i].specified) + { +- Strncpy(data_buffer + buf_index, tftp_options[i].option, +- data_buffer_size - buf_index); +- buf_index += strlen(tftp_options[i].option); +- buf_index++; ++ if (i != OPT_PASSWORD) ++ { ++ Strncpy(data_buffer + buf_index, tftp_options[i].option, ++ data_buffer_size - buf_index); ++ buf_index += strlen(tftp_options[i].option); ++ buf_index++; ++ } + Strncpy(data_buffer + buf_index, tftp_options[i].value, + data_buffer_size - buf_index); + buf_index += strlen(tftp_options[i].value); diff --git a/net-ftp/opsi-atftp/files/atftp-0.7-pcre.patch b/net-ftp/opsi-atftp/files/atftp-0.7-pcre.patch new file mode 100644 index 0000000..1f24b67 --- /dev/null +++ b/net-ftp/opsi-atftp/files/atftp-0.7-pcre.patch @@ -0,0 +1,14 @@ +--- atftp-0.7/tftpd_pcre.c~ 2005-10-17 23:14:52.000000000 +0200 ++++ atftp-0.7/tftpd_pcre.c 2005-10-17 23:14:52.000000000 +0200 +@@ -211,9 +211,9 @@ + chp++; /* point to value indicating substring */ + rc = pcre_get_substring(str, ovector, matches, *chp - 0x30, &tmpstr); + /* found string */ +- if (rc > 0) ++ if (rc > 0 && outchp - outstr + rc+1 < outsize) + { +- Strncpy(outchp, tmpstr, rc); ++ Strncpy(outchp, tmpstr, rc+1); + outchp += rc; + pcre_free_substring(tmpstr); + continue; diff --git a/net-ftp/opsi-atftp/files/atftp-0.7-spaced_filename.patch b/net-ftp/opsi-atftp/files/atftp-0.7-spaced_filename.patch new file mode 100644 index 0000000..da96d9f --- /dev/null +++ b/net-ftp/opsi-atftp/files/atftp-0.7-spaced_filename.patch @@ -0,0 +1,96 @@ +--- atftp-0.7/tftp.c~ 2010-06-03 08:51:14.000000000 -0500 ++++ atftp-0.7/tftp.c 2010-06-03 09:40:56.000000000 -0500 +@@ -18,16 +18,17 @@ + #include "config.h" + + #include + #include + #include + #include + #include + #include ++#include + + #include + #include + #include + #include + #include + + #include +@@ -344,16 +345,41 @@ + + /* If no names matched, then return NULL. */ + return NULL; + } + # endif + #endif + + /* ++ * set argc/argv from variadic string arguments ++*/ ++void make_arg_vector(int *argc, char***argv, ...) ++{ ++ char **p; ++ char *s; ++ va_list argp; ++ ++ // how many args? ++ *argc = 0; ++ va_start(argp, argv); ++ while ( (s=va_arg(argp, char*)) ) ++ ++*argc; ++ ++ // allocate storage ++ *argv = malloc(*argc * sizeof (char*)); ++ ++ // store args ++ p = *argv; ++ va_start(argp, argv); ++ while ( (s=va_arg(argp, char*)) ) ++ *p++ = s; ++} ++ ++/* + * Split a string into args. + */ + void make_arg(char *string, int *argc, char ***argv) + { + static char *tmp = NULL; + size_t argz_len; + + /* split the string to an argz vector */ +@@ -1142,30 +1168,26 @@ + argv[optind+1]); + make_arg(string, &ac, &av); + process_cmd(ac, av); + } + + if (!interactive) + { + if (action == PUT) +- snprintf(string, sizeof(string), "put %s %s", local_file, +- remote_file); ++ make_arg_vector(&ac,&av,"put",local_file,remote_file,NULL); + else if (action == GET) +- snprintf(string, sizeof(string), "get %s %s", remote_file, +- local_file); ++ make_arg_vector(&ac,&av,"get",remote_file,local_file,NULL); + else if (action == MGET) +- snprintf(string, sizeof(string), "mget %s %s", remote_file, +- local_file); ++ make_arg_vector(&ac,&av,"mget",remote_file,local_file,NULL); + else + { + fprintf(stderr, "No action specified in batch mode!\n"); + exit(ERR); + } +- make_arg(string, &ac, &av); + if (process_cmd(ac, av) == ERR) + exit(ERR); + } + return OK; + } + + void tftp_usage(void) + { diff --git a/net-ftp/opsi-atftp/files/atftp-0.7-tests.patch b/net-ftp/opsi-atftp/files/atftp-0.7-tests.patch new file mode 100644 index 0000000..9e08795 --- /dev/null +++ b/net-ftp/opsi-atftp/files/atftp-0.7-tests.patch @@ -0,0 +1,23 @@ +diff -Naur atftp-0.7.orig/test/test.sh atftp-0.7/test/test.sh +--- atftp-0.7.orig/test/test.sh 2003-04-28 21:59:51.000000000 -0400 ++++ atftp-0.7/test/test.sh 2005-10-26 22:42:15.000000000 -0400 +@@ -151,7 +151,7 @@ + test_blocksize 1428 + test_blocksize 16000 + test_blocksize 64000 +-test_blocksize 65465 ++test_blocksize 65464 + + # + # testing fot tsize +@@ -162,9 +162,9 @@ + TSIZE=`grep "OACK + + + +klausman@gentoo.org + + diff --git a/net-ftp/opsi-atftp/opsi-atftp-0.7.10.1.ebuild b/net-ftp/opsi-atftp/opsi-atftp-0.7.10.1.ebuild new file mode 100644 index 0000000..5343bf5 --- /dev/null +++ b/net-ftp/opsi-atftp/opsi-atftp-0.7.10.1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-ftp/atftp/atftp-0.7-r2.ebuild,v 1.6 2012/05/13 11:13:32 swift Exp $ + +EAPI=4 +inherit eutils flag-o-matic versionator rpm + +MY_PV=$(replace_version_separator 2 '.dfsg-' ) +MY_PVV=$(replace_version_separator 3 'beta' $MY_PV ) +MY_PVM=$(get_version_component_range 1-2 ) +MY_PVR=$(get_version_component_range 1-3 ) + + +DESCRIPTION="Advanced TFTP implementation client/server" +HOMEPAGE="ftp://ftp.mamalinux.com/pub/atftp/" +SRC_URI="http://download.opensuse.org/repositories/home:/uibmz:/opsi:/opsi40/openSUSE_12.2/src/opsi-atftp-${MY_PV}.src.rpm" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~ppc ~ppc64 ~s390 ~sparc x86" +IUSE="selinux tcpd readline pcre" + +DEPEND="tcpd? ( sys-apps/tcp-wrappers ) + selinux? ( sec-policy/selinux-tftp ) + readline? ( sys-libs/readline ) + pcre? ( dev-libs/libpcre )" +RDEPEND="${DEPEND} + !net-ftp/netkit-tftp + !net-ftp/tftp-hpa + !net-ftp/atftp" + +S=${WORKDIR}/opsi-atftp-${MY_PVM}.dfsg + +src_prepare() { + # epatch "${FILESDIR}"/atftp-${MY_PVM}-pcre.patch + epatch "${FILESDIR}"/atftp-${MY_PVM}-password.patch + epatch "${FILESDIR}"/atftp-${MY_PVM}-tests.patch + # epatch "${FILESDIR}"/atftp-${MY_PVM}-glibc24.patch + epatch "${FILESDIR}"/atftp-${MY_PVM}-blockno.patch + epatch "${FILESDIR}"/atftp-${MY_PVM}-spaced_filename.patch + epatch "${FILESDIR}"/atftp-${MY_PVM}-illreply.patch + epatch "${FILESDIR}"/atftp-${MY_PVM}-filecase.patch + # remove upstream's broken CFLAGS + sed -i.orig -e \ + '/^CFLAGS="-g -Wall -D_REENTRANT"/s,".*","",g' \ + "${S}"/configure +} + +src_compile() { + append-flags -D_REENTRANT -DRATE_CONTROL + econf \ + $(use_enable tcpd libwrap) \ + $(use_enable readline libreadline) \ + $(use_enable pcre libpcre) \ + --enable-mtftp \ + || die "./configure failed" + emake CFLAGS="${CFLAGS}" || die +} + +src_install() { + emake install DESTDIR="${D}" || die "Installation failed" + newinitd "${FILESDIR}"/atftp.init opsi-atftp + newconfd "${FILESDIR}"/atftp.confd opsi-atftp + + dodoc README* BUGS FAQ Changelog INSTALL TODO + dodoc "${S}"/docs/* + + docinto test + cd "${S}"/test + dodoc load.sh mtftp.conf pcre_pattern.txt test.sh test_suite.txt +} diff --git a/net-ftp/opsi-atftp/opsi-atftp.spec b/net-ftp/opsi-atftp/opsi-atftp.spec new file mode 100644 index 0000000..1651f34 --- /dev/null +++ b/net-ftp/opsi-atftp/opsi-atftp.spec @@ -0,0 +1,108 @@ +# +# spec file for package opsi-atftp +# +# Copyright (c) 2010 uib GmbH. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# + +Name: opsi-atftp +Requires: xinetd +License: GPL v2 or later +Group: Productivity/Networking/Opsi +AutoReqProv: on +Version: 0.7.dfsg +Release: 10.1 +Conflicts: atftp +Provides: tftp-server +Summary: advanced TFTP server - opsi version with pcre, fifo and max-blksize patches +Source: opsi-atftp_0.7.dfsg-2.1.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%define tftpboot /tftpboot +%if 0%{?sles_version} +%define tftpboot /var/lib/tftpboot +%endif + +%define toplevel_dir %{name}-%{version} + +# ===[ description ]================================ +%description +Multi-threaded TFTP server implementing all options (option extension and +multicast) as specified in RFC1350, RFC2090, RFC2347, RFC2348 and RFC2349. +Atftpd also supports multicast protocol known as mtftp, defined in the PXE +specification. The server is started from xinetd(8). +This version of atftpd is patched to support reading from named pipes and +blksize limits. + +%package client +Summary: Advanced Trivial File Transfer Protocol (ATFTP) - TFTP client +Group: Applications/Internet + +%description client +Advanced Trivial File Transfer Protocol client program for requesting +files using the TFTP protocol. + +# ===[ prep ]======================================= +%prep + +# ===[ setup ]====================================== +%setup + +# ===[ build ]====================================== +%build +%configure +make + +# ===[ install ]==================================== +%install +[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf $RPM_BUILD_ROOT +%makeinstall +mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d +cat <$RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d/tftp +service tftp +{ + disable = no + socket_type = dgram + protocol = udp + wait = yes + user = root + server = %{_sbindir}/in.tftpd + server_args = %{tftpboot} + per_source = 11 + cps = 100 2 + flags = IPv4 +} +EOF + +# ===[ clean ]====================================== +%clean +[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf $RPM_BUILD_ROOT + +# ===[ post ]======================================= +%post +#fix for runlevel 4 (not used on rpm-based machines) +if [ -e "/etc/init.di/opsi-atftpd" ]; then + sed -i "s/2 3 4 5/2 3 5/g; s/2345/235/g" /etc/init.di/opsi-atftpd +fi +# ===[ preun ]====================================== +%preun + +# ===[ postun ]===================================== +%postun + +# ===[ files ]====================================== +%files +%defattr(-,root,root) +%doc %{_mandir}/man8/atftpd.8.gz +%doc %{_mandir}/man8/in.tftpd.8.gz +%{_sbindir}/atftpd +%{_sbindir}/in.tftpd +%config(noreplace) %{_sysconfdir}/xinetd.d/tftp + +%files client +%defattr(-,root,root) +%doc %{_mandir}/man1/atftp.1.gz +%{_bindir}/atftp + +# ===[ changelog ]================================== +%changelog