From: Roy Marples Date: Mon, 2 Apr 2007 12:28:30 +0000 (+0000) Subject: Remove some bashisms and support baselayout-2 restart option. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a0fefa89daef;p=gentoo.git Remove some bashisms and support baselayout-2 restart option. Package-Manager: portage-2.1.2.3 --- diff --git a/net-fs/nfs-utils/ChangeLog b/net-fs/nfs-utils/ChangeLog index 5ed83e9bf0b2..2edab00533e3 100644 --- a/net-fs/nfs-utils/ChangeLog +++ b/net-fs/nfs-utils/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-fs/nfs-utils # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.98 2007/03/27 18:42:11 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.99 2007/04/02 12:28:30 uberlord Exp $ + +*nfs-utils-1.0.12-r3 (02 Apr 2007) + + 02 Apr 2007; Roy Marples files/nfs.initd, + files/rpc.gssd.initd, files/rpc.idmapd.initd, files/rpc.statd.initd, + +nfs-utils-1.0.12-r3.ebuild: + Remove some bashisms and support baselayout-2 restart option. 27 Mar 2007; Chris Gianelloni nfs-utils-1.0.12.ebuild: diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest index f194a429a81d..9799eea35923 100644 --- a/net-fs/nfs-utils/Manifest +++ b/net-fs/nfs-utils/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX exports 66 RMD160 0a61ad40dc321be39fb54d5b9fe717caa714e878 SHA1 52ed6b74643e084cfc17ff4638c2e06c86602034 SHA256 5d6356df546682e2f1a87131d1bb67de9b1f9a34d3a5742343dc64e890cf71d5 MD5 a02eed87e5d581e56feb0f6dfd18e6df files/exports 66 RMD160 0a61ad40dc321be39fb54d5b9fe717caa714e878 files/exports 66 @@ -49,10 +46,10 @@ AUX nfs.confd.old 533 RMD160 bad552a256a86bc374cd7ff3d685afa4ff5d816e SHA1 43fbd MD5 fc332370f9517304bc251f505b17abf2 files/nfs.confd.old 533 RMD160 bad552a256a86bc374cd7ff3d685afa4ff5d816e files/nfs.confd.old 533 SHA256 a9b8395590b8d15b52eee8cb637fdc23afce007de42442ef4448e76f2ac899fd files/nfs.confd.old 533 -AUX nfs.initd 4121 RMD160 85ae5e2211d86c0ec39ca0a6e161e935b51d5d32 SHA1 20377b62a56d785e1049092cbef173f3e06d82db SHA256 7e270a3f0a550c8fd2aad622f2255ce8f78281ba47a1d935c8ff8f503a42aaeb -MD5 2ea7d228856de02adcab24be83fe69a2 files/nfs.initd 4121 -RMD160 85ae5e2211d86c0ec39ca0a6e161e935b51d5d32 files/nfs.initd 4121 -SHA256 7e270a3f0a550c8fd2aad622f2255ce8f78281ba47a1d935c8ff8f503a42aaeb files/nfs.initd 4121 +AUX nfs.initd 4177 RMD160 c1ea95fad34c3b357db7dfa63e27ef1ee64942c2 SHA1 9685870412acfff088bb7b4bed4e27bbc1ed67cb SHA256 23f7ffe16f5c37a19bfdcf4466cb91d2205901687af652fb19ea9348c206ee2b +MD5 9dc08715a00996c72bc1518963c5366b files/nfs.initd 4177 +RMD160 c1ea95fad34c3b357db7dfa63e27ef1ee64942c2 files/nfs.initd 4177 +SHA256 23f7ffe16f5c37a19bfdcf4466cb91d2205901687af652fb19ea9348c206ee2b files/nfs.initd 4177 AUX nfsmount 1131 RMD160 f67431f36e702c50c67ff799d96c8bd37fbe847f SHA1 c88b592db4304f4d19798c1c2346ea688c9acde2 SHA256 8c1b12047327d707743bc579151ff7e3800696cc46cfcaea1c58a93fbc11f9e7 MD5 2af8106db3fdcb3d5ddf22ea5fffb105 files/nfsmount 1131 RMD160 f67431f36e702c50c67ff799d96c8bd37fbe847f files/nfsmount 1131 @@ -61,18 +58,18 @@ AUX nfsmount.initd 684 RMD160 740cb9c620536ed74bab9d4ab622d5cc34a4c582 SHA1 678c MD5 e189a105d38d4bd2c25d825914ee8e49 files/nfsmount.initd 684 RMD160 740cb9c620536ed74bab9d4ab622d5cc34a4c582 files/nfsmount.initd 684 SHA256 c4ba3c8f102b68d69de26e9856652de3ce80ee80f2e1b93431d29bb100c34605 files/nfsmount.initd 684 -AUX rpc.gssd.initd 796 RMD160 cf40be5b93e986ff0e22b17419705d6ca52ff250 SHA1 4d008875e0933e3e7aab07c28c6efef730474f54 SHA256 fb94798b1d7d3c1dcc8a62b182f04d323214da9f16122eb878038935f61f8d40 -MD5 29ae05ffad9e09a34afccb2c614e5952 files/rpc.gssd.initd 796 -RMD160 cf40be5b93e986ff0e22b17419705d6ca52ff250 files/rpc.gssd.initd 796 -SHA256 fb94798b1d7d3c1dcc8a62b182f04d323214da9f16122eb878038935f61f8d40 files/rpc.gssd.initd 796 -AUX rpc.idmapd.initd 1338 RMD160 e282d29b3bdafeb204c49460114b26af32e659d1 SHA1 4a0dc33d23c625d51abf91764efbedcb242b51df SHA256 dd9fe539ac4fa2463d71427e2667ddcea76b4d5b17103124ef0b08ab8f4dfd4e -MD5 4bb34adccc0c96d7feadc4e72f20bfbc files/rpc.idmapd.initd 1338 -RMD160 e282d29b3bdafeb204c49460114b26af32e659d1 files/rpc.idmapd.initd 1338 -SHA256 dd9fe539ac4fa2463d71427e2667ddcea76b4d5b17103124ef0b08ab8f4dfd4e files/rpc.idmapd.initd 1338 -AUX rpc.statd.initd 875 RMD160 aa4f6629fd2850265b3c7ad5b76e050a1d7008cc SHA1 25c5f7b732734ea6d58bef465854b4f0786cb1d0 SHA256 75e87bdb364321be73cd941fac2abb360118128bef1989972f999536122bfe41 -MD5 248147cf175c8025db88702d1fac1f9f files/rpc.statd.initd 875 -RMD160 aa4f6629fd2850265b3c7ad5b76e050a1d7008cc files/rpc.statd.initd 875 -SHA256 75e87bdb364321be73cd941fac2abb360118128bef1989972f999536122bfe41 files/rpc.statd.initd 875 +AUX rpc.gssd.initd 811 RMD160 0193a04abf22bb90b0d55e64a4a82beb052e82a1 SHA1 6035dfffba5ea96b44a401e990d471de554ff6dd SHA256 67e31d058a7082808c0d269b5451ee4ed8a50e301e8b1585cf9ddb64fc39a7d3 +MD5 a1d2b48ce734c13c34c61b52ebebb663 files/rpc.gssd.initd 811 +RMD160 0193a04abf22bb90b0d55e64a4a82beb052e82a1 files/rpc.gssd.initd 811 +SHA256 67e31d058a7082808c0d269b5451ee4ed8a50e301e8b1585cf9ddb64fc39a7d3 files/rpc.gssd.initd 811 +AUX rpc.idmapd.initd 1362 RMD160 f640b95be88cf5f5cd865002355910de380d511e SHA1 365783964616f816dc29aa9fe153f794a007ed6a SHA256 a441efeab81b4c83767ab7cf85cb5e98d2a4e50f1c9253b869f6d07086c9fec7 +MD5 60382fcd7e3d9dcdf43013a7127a2c2d files/rpc.idmapd.initd 1362 +RMD160 f640b95be88cf5f5cd865002355910de380d511e files/rpc.idmapd.initd 1362 +SHA256 a441efeab81b4c83767ab7cf85cb5e98d2a4e50f1c9253b869f6d07086c9fec7 files/rpc.idmapd.initd 1362 +AUX rpc.statd.initd 872 RMD160 d0571a998401da58c8195cf8c318092aa2ac5df6 SHA1 425e8d0a8f0a1083f44913120dd4b394ca701ec2 SHA256 8bc9f7a893cf131ab14f6ccbfff5dd15169e8fc8f38fe6b6c19503eadd55516f +MD5 ecbe3f6bd73f290f76ec525f46d9c91b files/rpc.statd.initd 872 +RMD160 d0571a998401da58c8195cf8c318092aa2ac5df6 files/rpc.statd.initd 872 +SHA256 8bc9f7a893cf131ab14f6ccbfff5dd15169e8fc8f38fe6b6c19503eadd55516f files/rpc.statd.initd 872 DIST nfs-utils-1.0.10-CITI_NFS4_ALL-1.dif 77589 RMD160 6615b6dd086d57af7684687ae566ebb6cf9fc96c SHA1 aa290131833046e63262f2d91579fe6c2f6fb7fc SHA256 6dd9b5b61e2b0d25f090ac031d75c41fba485014cb09069d2ae20d15648a14bb DIST nfs-utils-1.0.10.tar.gz 782161 RMD160 f8fc404e008af09066f8a4937ee1b0431def4bac SHA1 4950150df3f5049950b18345fc3f61532d1077ce SHA256 d5b15a95de6ec572757fda2ba03d069c712b3446fddb2dbe9b1b28f1ddf59d0a DIST nfs-utils-1.0.12.tar.gz 778576 RMD160 a00dbdae386acf3f969714a1571749182c5a19a8 SHA1 477e3eb387b0ccde2eaeb8e67c6437cc0d2668e3 SHA256 67d81a53d84777c733ff8a5cf5f3eed9ecda17fb9f949bc65727c1a3427af8ac @@ -92,6 +89,10 @@ EBUILD nfs-utils-1.0.12-r2.ebuild 2996 RMD160 74ebd8540cb8a50966254ab23eb6d46300 MD5 c961e96f5735278578c78a650d874ea9 nfs-utils-1.0.12-r2.ebuild 2996 RMD160 74ebd8540cb8a50966254ab23eb6d463003d651f nfs-utils-1.0.12-r2.ebuild 2996 SHA256 884a94a1046f09b742d30555e1b9833e0fcb6c0d55ef985ccd1363f6088de474 nfs-utils-1.0.12-r2.ebuild 2996 +EBUILD nfs-utils-1.0.12-r3.ebuild 2997 RMD160 908acbc833ad341a8d5ad8267aa12c181f68a4e5 SHA1 3916ce9b34fb2b226b8d4993bb0423bf1344501e SHA256 db30e6839b2e0f8a54170cf6311fd147e7a00db38869b32bc5880086ed9ea58c +MD5 61166ab9921ac86c8859633617607525 nfs-utils-1.0.12-r3.ebuild 2997 +RMD160 908acbc833ad341a8d5ad8267aa12c181f68a4e5 nfs-utils-1.0.12-r3.ebuild 2997 +SHA256 db30e6839b2e0f8a54170cf6311fd147e7a00db38869b32bc5880086ed9ea58c nfs-utils-1.0.12-r3.ebuild 2997 EBUILD nfs-utils-1.0.12.ebuild 2724 RMD160 b4a0e330c078d4bf91186a69b6d8ac83a0ae655d SHA1 b7aa89cc6f3c7b43bf1da216b7f3479903873b0d SHA256 057f5e7a191ecf3778f2124250d952d2231aaf39aad4c5c09ffb8566409c0b55 MD5 5fe6805d3cb43e26a94980c6f577b809 nfs-utils-1.0.12.ebuild 2724 RMD160 b4a0e330c078d4bf91186a69b6d8ac83a0ae655d nfs-utils-1.0.12.ebuild 2724 @@ -108,10 +109,10 @@ EBUILD nfs-utils-1.0.9.ebuild 2907 RMD160 9baa749c092aa8ca307986725e3ffd91ba78fc MD5 e81d18c985710d5f2c795fcdca91f167 nfs-utils-1.0.9.ebuild 2907 RMD160 9baa749c092aa8ca307986725e3ffd91ba78fcf2 nfs-utils-1.0.9.ebuild 2907 SHA256 4fee64fa626fc2ed003fb0428bd74a26a8666cc75ed6d338675c2ae95b2f7927 nfs-utils-1.0.9.ebuild 2907 -MISC ChangeLog 14348 RMD160 7d9f83b03f62646b942cfc4aa54f4fb1562447f7 SHA1 b6981094ec1842109e7b1b12d85e6cdb5d2cf083 SHA256 5a4ce289d841f926da5c0f2ae089bd9c2a57c1778bcfebffb8efe6404f4e4410 -MD5 a02d2bc0aec72f6e6cd3bfbcaa0fdf9a ChangeLog 14348 -RMD160 7d9f83b03f62646b942cfc4aa54f4fb1562447f7 ChangeLog 14348 -SHA256 5a4ce289d841f926da5c0f2ae089bd9c2a57c1778bcfebffb8efe6404f4e4410 ChangeLog 14348 +MISC ChangeLog 14617 RMD160 69e0a68deddb7b93e9e839bdea08ad295f173418 SHA1 07dbbefcf0634b3d5ac75aa65ddde5827940047f SHA256 065371e632246677d5b6abd8982d6e155287d19dee0bc46a114c9122dbf49d39 +MD5 cd66cf575115529b0465823735bf4847 ChangeLog 14617 +RMD160 69e0a68deddb7b93e9e839bdea08ad295f173418 ChangeLog 14617 +SHA256 065371e632246677d5b6abd8982d6e155287d19dee0bc46a114c9122dbf49d39 ChangeLog 14617 MISC metadata.xml 225 RMD160 477581252d7edf18d7b8a274766e2ed04c61935a SHA1 02c4f79d48d465ad7bca76f706d0f7cb7dd039df SHA256 42f511d0cc6e82e29b011c686ba8bb7965f4d92eb6e47ba3e63d4c7edfe9883a MD5 9cee4adcef8a47ea4ee35090f7f89b0a metadata.xml 225 RMD160 477581252d7edf18d7b8a274766e2ed04c61935a metadata.xml 225 @@ -128,6 +129,9 @@ SHA256 e7414116811bdf30fbef9735564ea69ed25aee0da8e28059d8913b2f9fbeeebd files/di MD5 981939bd25f589531226fcbaebda689b files/digest-nfs-utils-1.0.12-r2 250 RMD160 4de93194725690c970901e58696d0e8ae9c999f3 files/digest-nfs-utils-1.0.12-r2 250 SHA256 e7414116811bdf30fbef9735564ea69ed25aee0da8e28059d8913b2f9fbeeebd files/digest-nfs-utils-1.0.12-r2 250 +MD5 981939bd25f589531226fcbaebda689b files/digest-nfs-utils-1.0.12-r3 250 +RMD160 4de93194725690c970901e58696d0e8ae9c999f3 files/digest-nfs-utils-1.0.12-r3 250 +SHA256 e7414116811bdf30fbef9735564ea69ed25aee0da8e28059d8913b2f9fbeeebd files/digest-nfs-utils-1.0.12-r3 250 MD5 95a4b11413b1dc6075035f3866bb6905 files/digest-nfs-utils-1.0.6-r6 247 RMD160 f158affede021931bb0c52a8fd87e257db93585a files/digest-nfs-utils-1.0.6-r6 247 SHA256 9cd40166a6bfcf14d67d43980595fc0e2c60c44533c253a64241b250bc3ea730 files/digest-nfs-utils-1.0.6-r6 247 @@ -137,10 +141,3 @@ SHA256 9d807f4b615b487743d5033700a4099eb0bf115e35e483d2a22d98723399a93f files/di MD5 628c669b2f17af1cff539b4a40c8b4dc files/digest-nfs-utils-1.0.9 530 RMD160 747a6728b8c33481152750c09acfc85615850bdb files/digest-nfs-utils-1.0.9 530 SHA256 45ce27b77bf35f168dee66b458d6ecd57242510bfb9fedf1a637b9b795dea73f files/digest-nfs-utils-1.0.9 530 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.3 (GNU/Linux) - -iD8DBQFGCWWJkT4lNIS36YERAmaeAKCVt+/MCsxFDW0/26+K75TauDWEMACePF6B -cRehwiQYCcXzvi7W3yIH9Bc= -=wPNZ ------END PGP SIGNATURE----- diff --git a/net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r3 b/net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r3 new file mode 100644 index 000000000000..bdb8c3cf47a5 --- /dev/null +++ b/net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r3 @@ -0,0 +1,3 @@ +MD5 acf3656cec3872deb597aa7ac13f3c3a nfs-utils-1.0.12.tar.gz 778576 +RMD160 a00dbdae386acf3f969714a1571749182c5a19a8 nfs-utils-1.0.12.tar.gz 778576 +SHA256 67d81a53d84777c733ff8a5cf5f3eed9ecda17fb9f949bc65727c1a3427af8ac nfs-utils-1.0.12.tar.gz 778576 diff --git a/net-fs/nfs-utils/files/nfs.initd b/net-fs/nfs-utils/files/nfs.initd index bb9ea0650440..50fc505d3b9f 100755 --- a/net-fs/nfs-utils/files/nfs.initd +++ b/net-fs/nfs-utils/files/nfs.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.1 2007/03/25 12:30:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.2 2007/04/02 12:28:30 uberlord Exp $ #--------------------------------------------------------------------------- # This script starts/stops the following @@ -44,7 +44,7 @@ mkdir_nfsdirs() { waitfor_exportfs() { local pid=$1 - ( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 $pid &>/dev/null ) & + ( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 $pid 2>/dev/null ) & wait $1 } @@ -53,7 +53,7 @@ start_it() { shift "$@" eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) } start() { # Make sure nfs support is loaded in the kernel #64709 @@ -97,13 +97,13 @@ stop() { ebegin "Stopping NFS mountd" start-stop-daemon --stop --quiet --oknodo --exec ${mountd} eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) # nfsd sets its process name to [nfsd] so don't look for $nfsd ebegin "Stopping NFS daemon" start-stop-daemon --stop --quiet --oknodo --name nfsd --user root --signal 2 eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) # When restarting the NFS server, running "exportfs -ua" probably # isn't what the user wants. Running it causes all entries listed @@ -118,7 +118,7 @@ stop() { # then "exportfs -r" will reread the xtab, and all the current # clients will be able to resume NFS activity, *without* needing # to umount/(re)mount the filesystem. - if [ "${restarting}" = no ] ; then + if [ "${restarting}" = no -o "${RC_CMD}" = "restart" ] ; then ebegin "Unexporting NFS directories" # Exportfs likes to hang if networking isn't working. # If that's the case, then try to kill it so the diff --git a/net-fs/nfs-utils/files/rpc.gssd.initd b/net-fs/nfs-utils/files/rpc.gssd.initd index bafe1bc773c3..c9cfa5219b36 100755 --- a/net-fs/nfs-utils/files/rpc.gssd.initd +++ b/net-fs/nfs-utils/files/rpc.gssd.initd @@ -1,9 +1,9 @@ #!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.gssd.initd,v 1.1 2007/03/25 12:30:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.gssd.initd,v 1.2 2007/04/02 12:28:30 uberlord Exp $ -[ -e /etc/conf.d/nfs ] && source /etc/conf.d/nfs +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs gssd=/usr/sbin/rpc.gssd svcgssd=/usr/sbin/rpc.svcgssd @@ -19,7 +19,7 @@ start_it() { shift "$@" eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) } start() { local ret=0 @@ -32,7 +32,7 @@ stop_it() { ebegin "Stopping $1" start-stop-daemon --stop --quiet --exec $2 eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) } stop() { local ret=0 diff --git a/net-fs/nfs-utils/files/rpc.idmapd.initd b/net-fs/nfs-utils/files/rpc.idmapd.initd index 2f8a92bf32b1..49a323aa981e 100755 --- a/net-fs/nfs-utils/files/rpc.idmapd.initd +++ b/net-fs/nfs-utils/files/rpc.idmapd.initd @@ -1,9 +1,9 @@ #!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.idmapd.initd,v 1.1 2007/03/25 12:30:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.idmapd.initd,v 1.2 2007/04/02 12:28:30 uberlord Exp $ -[ -e /etc/conf.d/nfs ] && source /etc/conf.d/nfs +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs rpc_bin=/usr/sbin/rpc.idmapd @@ -29,7 +29,7 @@ mount_pipefs() { } umount_pipefs() { - [ "${restarting}" = "yes" ] && return 0 + [ "${restarting}" = "yes" -o "${RC_CMD}" = "restart" ] && return 0 if grep -qs "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then ebegin "Unmounting RPC pipefs" umount /var/lib/nfs/rpc_pipefs diff --git a/net-fs/nfs-utils/files/rpc.statd.initd b/net-fs/nfs-utils/files/rpc.statd.initd index 0dac37b80478..59ba10055958 100755 --- a/net-fs/nfs-utils/files/rpc.statd.initd +++ b/net-fs/nfs-utils/files/rpc.statd.initd @@ -1,9 +1,9 @@ #!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.statd.initd,v 1.1 2007/03/25 12:30:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.statd.initd,v 1.2 2007/04/02 12:28:30 uberlord Exp $ -[ -e /etc/conf.d/nfs ] && source /etc/conf.d/nfs +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs rpc_bin=/sbin/rpc.statd rpc_pid=/var/run/rpc.statd.pid diff --git a/net-fs/nfs-utils/nfs-utils-1.0.12-r3.ebuild b/net-fs/nfs-utils/nfs-utils-1.0.12-r3.ebuild new file mode 100644 index 000000000000..35063b08a683 --- /dev/null +++ b/net-fs/nfs-utils/nfs-utils-1.0.12-r3.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/nfs-utils-1.0.12-r3.ebuild,v 1.1 2007/04/02 12:28:30 uberlord Exp $ + +inherit eutils flag-o-matic multilib + +DESCRIPTION="NFS client and server daemons" +HOMEPAGE="http://nfs.sourceforge.net/" +SRC_URI="mirror://sourceforge/nfs/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="nonfsv4 tcpd kerberos" + +# kth-krb doesn't provide the right include +# files, and nfs-utils doesn't build against heimdal either, +# so don't depend on virtual/krb. +# (04 Feb 2005 agriffis) +RDEPEND="tcpd? ( sys-apps/tcp-wrappers ) + >=net-nds/portmap-5b-r6 + !nonfsv4? ( + >=dev-libs/libevent-1.0b + >=net-libs/libnfsidmap-0.16 + ) + kerberos? ( + net-libs/librpcsecgss + app-crypt/mit-krb5 + )" +DEPEND="${RDEPEND}" + +src_unpack() { + unpack ${P}.tar.gz + cd "${S}" + epatch "${FILESDIR}"/${P}-mountd-memleak.patch #172014 + #epatch "${DISTDIR}"/nfs-utils-${PV}-CITI_NFS4_ALL-1.dif +} + +src_compile() { + econf \ + --mandir=/usr/share/man \ + --with-statedir=/var/lib/nfs \ + --disable-rquotad \ + --enable-nfsv3 \ + --enable-secure-statd \ + $(use_with tcpd tcp-wrappers) \ + $(use_enable !nonfsv4 nfsv4) \ + $(use_enable kerberos gss) \ + || die "Configure failed" + + emake || die "Failed to compile" +} + +src_install() { + emake DESTDIR="${D}" install || die + + # Don't overwrite existing xtab/etab, install the original + # versions somewhere safe... more info in pkg_postinst + dodir /usr/lib/nfs + keepdir /var/lib/nfs/{sm,sm.bak} + mv "${D}"/var/lib/nfs/* "${D}"/usr/lib/nfs + keepdir /var/lib/nfs + + # Install some client-side binaries in /sbin + dodir /sbin + mv "${D}"/usr/sbin/rpc.{lockd,statd} "${D}"/sbin/ || die + + dodoc ChangeLog README + docinto linux-nfs ; dodoc linux-nfs/* + + insinto /etc + doins "${FILESDIR}"/exports + + local f + for f in nfs nfsmount rpc.{gssd,idmapd,statd} ; do + newinitd "${FILESDIR}"/${f}.initd ${f} || die "doinitd ${f}" + done + newconfd "${FILESDIR}"/nfs.confd nfs + + if use !nonfsv4 ; then + doins utils/idmapd/idmapd.conf + for f in rpc.gssd rpc.idmapd ; do + newinitd "${FILESDIR}"/${f}.initd ${f} || die "doinitd ${f}" + done + fi + + # uClibc doesn't provide rpcgen like glibc, so lets steal it from nfs-utils + if ! use elibc_glibc ; then + dobin tools/rpcgen/rpcgen || die "rpcgen" + newdoc tools/rpcgen/README README.rpcgen + fi +} + +pkg_preinst() { + [[ -s ${ROOT}/etc/exports ]] && rm -f "${D}"/etc/exports +} + +pkg_postinst() { + # Install default xtab and friends if there's none existing. + # In src_install we put them in /usr/lib/nfs for safe-keeping, but + # the daemons actually use the files in /var/lib/nfs. This fixes + # bug 30486 + local f + for f in "${ROOT}"/usr/$(get_libdir)/nfs/*; do + [[ -e ${ROOT}/var/lib/nfs/${f##*/} ]] && continue + einfo "Copying default ${f##*/} from /usr/$(get_libdir)/nfs to /var/lib/nfs" + cp -pPR "${f}" "${ROOT}"/var/lib/nfs/ + done +}