diff options
author | William Hubbs <williamh@gentoo.org> | 2015-02-03 19:28:45 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2015-02-03 19:28:45 +0000 |
commit | 414194e519320544c2eb17a840766d78ea7c5c56 (patch) | |
tree | 8f83b56850db9b60935b35e36ff7df9fc9465f37 /net-fs | |
parent | Version bump, drop old (diff) | |
download | historical-414194e519320544c2eb17a840766d78ea7c5c56.tar.gz historical-414194e519320544c2eb17a840766d78ea7c5c56.tar.bz2 historical-414194e519320544c2eb17a840766d78ea7c5c56.zip |
drop the provide nfsmount from nfsclient since there is now a migration script.
Package-Manager: portage-2.2.15/cvs/Linux x86_64
RepoMan-Options: --force
Manifest-Sign-Key: 0x30C46538
Diffstat (limited to 'net-fs')
-rw-r--r-- | net-fs/nfs-utils/ChangeLog | 10 | ||||
-rw-r--r-- | net-fs/nfs-utils/Manifest | 16 | ||||
-rw-r--r-- | net-fs/nfs-utils/files/nfsclient.initd | 5 | ||||
-rw-r--r-- | net-fs/nfs-utils/nfs-utils-1.3.1-r4.ebuild | 172 | ||||
-rw-r--r-- | net-fs/nfs-utils/nfs-utils-1.3.2-r5.ebuild | 177 |
5 files changed, 367 insertions, 13 deletions
diff --git a/net-fs/nfs-utils/ChangeLog b/net-fs/nfs-utils/ChangeLog index 9c3f0b0b848a..f4e0130b3414 100644 --- a/net-fs/nfs-utils/ChangeLog +++ b/net-fs/nfs-utils/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-fs/nfs-utils # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.272 2015/02/03 09:28:55 pinkbyte Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.273 2015/02/03 19:28:36 williamh Exp $ + +*nfs-utils-1.3.2-r5 (03 Feb 2015) +*nfs-utils-1.3.1-r4 (03 Feb 2015) + + 03 Feb 2015; William Hubbs <williamh@gentoo.org> +nfs-utils-1.3.1-r4.ebuild, + +nfs-utils-1.3.2-r5.ebuild, files/nfsclient.initd: + drop the provide nfsmount from nfsclient since there is now a migration + script. *nfs-utils-1.3.2-r4 (03 Feb 2015) *nfs-utils-1.3.1-r3 (03 Feb 2015) diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest index cd9dad035022..842c004aa7b1 100644 --- a/net-fs/nfs-utils/Manifest +++ b/net-fs/nfs-utils/Manifest @@ -10,7 +10,7 @@ AUX nfs-utils.conf 74 SHA256 a09f97a40b5c75a3fb65bd60feb4c4b7d2b569ced004464eef4 AUX nfs.confd 948 SHA256 22bba4ee5d58bae422650875c7c8a797a52fc121ddd02d48297c075b8a35401e SHA512 0981f9ea34d5aaf25b558aa1f4c32f6750b657b450d5d22b999e1556b583207c8d88b83f6f803747c56cc70531556f5a8741589125429f93d0bbc73ae31c137e WHIRLPOOL ff6db7d613126c4fd76a6b99dc432a44f086ea22c78a42e3bcb2df04b95c31e9552cb2c080345b71027c71f97b0b7470fd53ffb81502b3f77bc9bb80a38fe9cc AUX nfs.initd 4351 SHA256 1e77bc6fb2ceb266f724818898bd42bec47512a5a7ede6660e0565ea1c58d619 SHA512 32a231fd04a2bb68b235b6d8294eefea4fd3e5eac2d84f3a8a8ec929b21b85788c5548338556f2246180261f82435cc2141c60f8b9c164c1e5ec1897fa18bce6 WHIRLPOOL 72324e4b73be6532d849f24a8d2e97ec43d70231e6cbdf73a5f8b0ae15b9dd9c48df8d3c67628a4445f1379c2201ec662fbcebc41385f90c2b1a6c180995be1e AUX nfsclient.confd 327 SHA256 a1ecfb9441052d374b6bc2b77554a3253a4e4c231c76114b3313d2cc68e561b8 SHA512 e9d9b38397b7c0cafa1154e466317884480b804f08793aa2337257ecb9862f6b5f5c7fc3eeb63353104abe47c899194d670d6dcd8680f142a47164d8a296dec6 WHIRLPOOL db3616d469c17c7c6569d2f897392244718b16c2315f21df38cb9a9158e0cc2b7decc76b7340cd1444b02b32a755f70fd8b33dd72e596908842533c932dccb4d -AUX nfsclient.initd 988 SHA256 426996fc12758565d4c827762df76634f40cc8915988ab89ba5e81aeb561cf46 SHA512 d7575f3ef2aaefe5d172ba7a33a53c9468c62b12d5fea242c802d5e655c2dd4007aeb33410172eb6ffed86590c8713625ecc4dd11142eb2f1b2f96f46ea6ead7 WHIRLPOOL bfb603137ae07bf23680c22b4038749a9ffff098ba4cf37da88c7d5496a05a1224f6558096a3b69dfc5cde4b83f96ce2b4af4864b43cff94767e43d8eed64f16 +AUX nfsclient.initd 969 SHA256 99ffd59c64b3468bfcf22daa24ef567d20e2d03d5c0cc376566f9433423dfd5d SHA512 220782660c0e6f9530ee903b39df8123c4eabf53180ee40a8cf9393f8107991ab3f301acb8e50be81bd579156e6519146f37ec4e5de8f296b18057ecca993d29 WHIRLPOOL 0e7fb48e87fc90cadd47740472e948218413c65fa8373ccad96156372694893829c9268474baa1d2b462e8274fb3819ba903b2387e2b3b42b011308b4a3b3d25 AUX nfsd.service-r1 294 SHA256 b98575ae9803d0e75159a32f8bed61f6666f8ae130bb93069de13e76943f2577 SHA512 256c78317e5af15cca7f10e247d086d1a0b04ca34d93e8afe4f940d841c93a95ddc119c80aba287d777fe87830dfc8b52f9b558a3663de0ee5e05aa64fbbadbb WHIRLPOOL 8f492d40a44658ab8bbee760c29f738c531ea361081cb18ab7ed85d28d3e9736c2d8e040fe91554a19e8f49e1d26d064d73370f2b6e3ad2cd0927597ab09618d AUX nfsmount.confd 326 SHA256 b9389e143c2c4f95c11f97a8a379e007f140559016f60011c9d2ff0935758bcb SHA512 6e23897885cc33c49d9c7353b456585a1e0c7300822edba81bc48ba4ccc18297adce137260cc0aa9487aa5ef0aab3eecf931532cfa5bd40fd03bc9e0ddacfb28 WHIRLPOOL 97939b074a9b5717184512088388c9c22a31f37009996b69137023a0f8a97ce6eb41f7cb0a25843ea088f00d37cb45f6b3bd1ba0f801de7cb8f6dc2e5d374dfb AUX nfsmount.initd 1126 SHA256 b57637c7eb8e40b5cc1655e8afa69dc0aaecbd3186bdca3301586d1e9b797357 SHA512 e2c4d2bf9690b092d7062d95f4242e2591e3ed0aa8b9b36eae977d5d0350b0d90d339f7e75bdcc794abef27cf1541642a8a6dbbaed90e58cc823db4c92af9336 WHIRLPOOL 54a2bdb24015a6d8184fdde3351b152c5625cb6e4ff17876d592a1600fedec1724081b4ff233711ad9d290ea761827067c40ba8ae21121fc6066ba7ed230e483 @@ -35,18 +35,16 @@ EBUILD nfs-utils-1.2.9-r3.ebuild 4446 SHA256 bfdf40524e42edb4714b33e7edc21c77a31 EBUILD nfs-utils-1.3.0-r1.ebuild 4849 SHA256 1793141abbe923bfbf6077d90b5da3ac84347c0eed82209f3f71c133b67423e0 SHA512 486e1e0eb287755606ce47595eb2d427f0d24f40abdb5723cd55404e7de6b11fc74c8e7592bd76afd068cb9a0339b4cc9fefec1a8b17b0b30e7fd5bc3654876c WHIRLPOOL 418b1a3d5372198008f94874becc2e92ee4d19d2226e4c94f011cead89acbfe274d4cb71340bcd9006d8116ee86400ea69f2aae1f3e9e6d6dc1283690ca860bf EBUILD nfs-utils-1.3.1-r1.ebuild 5031 SHA256 98f9598d85a9689ac15ea8a422ee3f58d747b664388c2abbb80ad10c303794c7 SHA512 a590b2934e214461aacf15087f424e3208ad88ffb6f513a08bf0746f7f41ebbfbd16a91f4166197ede426562bc93ab72c2050c96ab84f2b120d4065daad98634 WHIRLPOOL 72cdc0168b4a9fba3a856e2a98e579e84647d031882e4e452c245b80221f010c0b3c9fbf08675c9701539ed1b7420edad0ed081cc3a1fd215b627c2ecd62f8e6 EBUILD nfs-utils-1.3.1-r3.ebuild 5109 SHA256 c757e113a0c71ed61819d99af58e535f1439571d79e262f100a4b0ccb01ec3e3 SHA512 8f7fd794c8a7cea66d2561800876b65e38b739493341f36c7142affe3932da15b6ef689a00bfeed12a07372c3050704f91749190a0b19b5173429066dfc9f025 WHIRLPOOL b4ae54fb65c24764ea8e29ff012d64d761f7e63f886eb600b14a9f7efbc25f39f6069fc6e93da5f838c9bccc548bdbf54332de821045f061b614a810581717bd +EBUILD nfs-utils-1.3.1-r4.ebuild 5109 SHA256 974b89d08cbaa9dedf6fbc71671149ab0568d46f7761033a720f84dbe8cb9905 SHA512 8bcf9d1de4dd29da59e8c62bcce81ab2d081d189718bb3b1ef8064d83b37d17edae3e65659ff4f5b896f475c658183208308715659afe868d3c08097a30c25bc WHIRLPOOL 014d25cbd27dd74a4b02da90db0f77161602720d63ddf1416c07ec5e3fee4795f4a9aaf8a949ff719d9002bf8dc2041e1938819dc56d55c8f371e26c514dc84e EBUILD nfs-utils-1.3.2-r2.ebuild 5184 SHA256 299e50fb820d0de7d66131993238e597977974915fc3f449bd069f79ab32a88b SHA512 2ca1ac59362120b8ce86c7108c200e97ba251b5ce18a125dbe16a8d46fbe3b230d42d22d6ea613ec9e85aca847239192f649742245b4bba2e73d85bf1583b713 WHIRLPOOL 199cb7b2f05757fd3952040a139aabb25bd46335620687b11d3624962aa718967dcb31385293e81e08426295eacb17694d36f9058add46c5a5580a3cd3fc472c EBUILD nfs-utils-1.3.2-r4.ebuild 5261 SHA256 a2aaf15507f10d289e0d80e8edbae39c1b646c3c5d7cf69f17a0e76fade97824 SHA512 e5402c3bd8b42f2dfb71644010a01b87e9a9ee6bc11c951b7953b3cb50e72aad84760bb1704486dafb18fccc4616395f59916c5ee920cdfe4bec9e95e7bcfe3f WHIRLPOOL 47e2c099fbab623e2dfd4f08f2b870eb85e0554079dba3f77c5cae32655cf1de76b1dafa16bb3833ef616aae7f431f2df95fda2e618a6b6835a0db014e46d484 -MISC ChangeLog 44686 SHA256 0cbc90b1fdac39c143f1312e0d27d7188581f54ba27250ab54070d2a6b81831a SHA512 2bfeddd0669fd8352c8b459d2eeaa08c1fb2246e1501472d81d525da0c263230a3dc1e17d2d947c2f9519670706ab01d8dbd95d03fd3371d5b94d45360396f37 WHIRLPOOL d74c10276b20587dac6d5bd8a31b72d3b1bba6c3e0c5073ba38b66d8a6a07b10b8e233b3af3bcfded04b0add03f5166739559166a9e2dac841052ed2a5b24105 +EBUILD nfs-utils-1.3.2-r5.ebuild 5261 SHA256 36595b0dfcfcebc78ab80584168fb340dac9c0329f7f5124c042e1f12f3bf0fc SHA512 1d0d742ae76eea3f5a75f00053760fb56f3bdb88e44e1a83048cca837d850f6704ddd8f485ffce05c2d561ab8c472ba3325179a30abbd0879fec22a4205f8438 WHIRLPOOL b19b1df314a5a1a121e5110bf35a4593ffb48337bb8e9177e4de57d9f5d18beed62446392b46eaf73580092f0e587c8f58b4b40f245610e99aef7d0cdc9191c2 +MISC ChangeLog 44972 SHA256 d66ff1343c404b2c0a7c1085b98e10d4ca9a9f83f809a05c766d9b94854fc971 SHA512 f67d1bad13b72e6e438761e7edd3618ac83e4b2b8bcbaf1b45132674cd6a83efebc189891c75e8f35bb038640221b1b88132617aeb59dddeca825b0c2788f6b7 WHIRLPOOL 8b6bc905cdd40e12ee8c940b797b714a63b78c6d4ab62708ee115e6c959da9a5b21bd3e9d19b85503883235829a6cf9e2e0a8fb3b427088583cd18969bf2e3f4 MISC metadata.xml 636 SHA256 ff4402edfb8a218effdadb00641459f21335e52d055a0f12d084934f3d1b76cd SHA512 090c74991f655df4c08fd062993a15ea9ce4721622d55325539d415e7b89e0920cd9ac6d5cc29a57e56e68998f03384386751bbd56c999897d1c84d4983ae2cb WHIRLPOOL 5f2e62843e843c615c5b0621740d55bcf37453399ca9727f1b70ce53f899157bece44801320558cf769ac4388617f03f65a0bb6167ac07f47561bbb002d40bc9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQEcBAEBCAAGBQJU0JTXAAoJECo/aRed9267KCwH/i0FS2vVMG7zqilAZtByXqUG -7qpQ3VwL9amFepKzF1s+KFi+w01FEIKsVcRUjdyZtwJAbQNtkyh7NKdqHr5Awvf5 -rwicpxWuAeAt27N4kGHBx6SnyAkNCZVR3ttFCNRoOOcd1VzyRvwccPTqVzNzk38M -6p8KQlofVzlil7lRb8FESCKURnRqO3yh1xhEYOwVdZ7t6jOd8rBMWuHuuQu7L2rI -EEM0K7QJV6mmbSjcQDAuXiyTn8cdg01QSdhZntVDr5bcehZY2KooN9oSLYrx4izb -0WzqwFHDgo16cbND73JDOKRCDQsPPEQnrGQOPgvaMMjBoJSI1Zaao1fysl6+nFY= -=H3cO +iEYEAREIAAYFAlTRIWwACgkQblQW9DDEZTjMEwCgoQ+gF8mAi+CpmyW4nhuIY9Jy +ft4AnR9xW0SO7NiFOtILos9MPbJphhkp +=n/FA -----END PGP SIGNATURE----- diff --git a/net-fs/nfs-utils/files/nfsclient.initd b/net-fs/nfs-utils/files/nfsclient.initd index a13a5ce034f6..77c3bbef106d 100644 --- a/net-fs/nfs-utils/files/nfsclient.initd +++ b/net-fs/nfs-utils/files/nfsclient.initd @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsclient.initd,v 1.3 2014/12/24 18:09:21 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsclient.initd,v 1.4 2015/02/03 19:28:36 williamh Exp $ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs @@ -20,7 +20,6 @@ depend() { before netmount config /etc/fstab need portmap ${myneed} - provide nfsmount use ypbind dns } diff --git a/net-fs/nfs-utils/nfs-utils-1.3.1-r4.ebuild b/net-fs/nfs-utils/nfs-utils-1.3.1-r4.ebuild new file mode 100644 index 000000000000..2fe9bd278869 --- /dev/null +++ b/net-fs/nfs-utils/nfs-utils-1.3.1-r4.ebuild @@ -0,0 +1,172 @@ +# Copyright 1999-2015 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.3.1-r4.ebuild,v 1.1 2015/02/03 19:28:36 williamh Exp $ + +EAPI="5" + +inherit eutils flag-o-matic multilib autotools systemd + +DESCRIPTION="NFS client and server daemons" +HOMEPAGE="http://linux-nfs.org/" +SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86" +IUSE="caps ipv6 kerberos +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid" +REQUIRED_USE="kerberos? ( nfsv4 )" +RESTRICT="test" #315573 + +# 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) +DEPEND_COMMON="tcpd? ( sys-apps/tcp-wrappers ) + caps? ( sys-libs/libcap ) + sys-libs/e2fsprogs-libs + >=net-nds/rpcbind-0.2.0-r1 + net-libs/libtirpc + libmount? ( sys-apps/util-linux ) + nfsdcld? ( >=dev-db/sqlite-3.3 ) + nfsv4? ( + <=dev-libs/libevent-2.1 + >=net-libs/libnfsidmap-0.21-r1 + kerberos? ( + >=net-libs/libtirpc-0.2.4-r1[kerberos] + app-crypt/mit-krb5 + ) + nfsidmap? ( + >=net-libs/libnfsidmap-0.24 + >=sys-apps/keyutils-1.5.9 + ) + ) + nfsv41? ( + sys-fs/lvm2 + ) + uuid? ( sys-apps/util-linux )" +RDEPEND="${DEPEND_COMMON} + !net-nds/portmap + !<sys-apps/openrc-0.13.4 + selinux? ( + sec-policy/selinux-rpc + sec-policy/selinux-rpcbind + ) +" +DEPEND="${DEPEND_COMMON} + virtual/pkgconfig" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch + epatch "${FILESDIR}"/${PN}-1.2.8-cross-build.patch + + sed \ + -e "/^sbindir/s:= := \"${EPREFIX}\":g" \ + -i utils/*/Makefile.am || die + + eautoreconf +} + +src_configure() { + export libsqlite3_cv_is_recent=yes # Our DEPEND forces this. + export ac_cv_header_keyutils_h=$(usex nfsidmap) + econf \ + --with-statedir="${EPREFIX}"/var/lib/nfs \ + --enable-tirpc \ + --with-tirpcinclude="${EPREFIX}"/usr/include/tirpc/ \ + $(use_enable libmount libmount-mount) \ + $(use_with tcpd tcp-wrappers) \ + $(use_enable nfsdcld nfsdcltrack) \ + $(use_enable nfsv4) \ + $(use_enable nfsv41) \ + $(use_enable ipv6) \ + $(use_enable caps) \ + $(use_enable uuid) \ + $(use_enable kerberos gss) \ + --without-gssglue +} + +src_compile(){ + # remove compiled files bundled in the tarball + emake clean + default +} + +src_install() { + default + rm linux-nfs/Makefile* || die + dodoc -r linux-nfs README + + # Don't overwrite existing xtab/etab, install the original + # versions somewhere safe... more info in pkg_postinst + keepdir /var/lib/nfs/{,sm,sm.bak} + mv "${ED}"/var/lib "${ED}"/usr/$(get_libdir) || die + + # Install some client-side binaries in /sbin + dodir /sbin + mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die + + if use nfsv4 && use nfsidmap ; then + # Install a config file for idmappers in newer kernels. #415625 + insinto /etc/request-key.d + echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf + doins id_resolver.conf + fi + + insinto /etc + doins "${FILESDIR}"/exports + keepdir /etc/exports.d + + local f list=() opt_need="" + if use nfsv4 ; then + opt_need="rpc.idmapd" + list+=( rpc.idmapd rpc.pipefs ) + use kerberos && list+=( rpc.gssd rpc.svcgssd ) + fi + for f in nfs nfsclient rpc.statd "${list[@]}" ; do + newinitd "${FILESDIR}"/${f}.initd ${f} + done + newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01 + for f in nfs nfsclient ; do + newconfd "${FILESDIR}"/${f}.confd ${f} + done + sed -i \ + -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \ + "${ED}"/etc/conf.d/nfs || die #234132 + + systemd_dounit systemd/*.{mount,service,target} + if ! use nfsv4 || ! use kerberos ; then + rm "${D}$(systemd_get_unitdir)"/rpc-{gssd,svcgssd}.service || die + fi + rm "${D}$(systemd_get_unitdir)"/nfs-config.service || die + sed -i -r \ + -e "/^EnvironmentFile=/s:=.*:=${EPREFIX}/etc/conf.d/nfs:" \ + -e '/^(After|Wants)=nfs-config.service$/d' \ + -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \ + "${D}$(systemd_get_unitdir)"/* || die +} + +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. #30486 + local f + mkdir -p "${EROOT}"/var/lib/nfs #368505 + for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do + [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue + einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs" + cp -pPR "${f}" "${EROOT}"/var/lib/nfs/ + done + + if systemd_is_booted; then + if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then + ewarn "We have switched to upstream systemd unit files. Since" + ewarn "they got renamed, you should probably enable the new ones." + ewarn "You can run 'equery files nfs-utils | grep systemd'" + ewarn "to know what services you need to enable now." + fi + else + ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient." + ewarn "If you were using nfsmount, please add nfsclient and netmount to the" + ewarn "same runlevel as nfsmount." + fi +} diff --git a/net-fs/nfs-utils/nfs-utils-1.3.2-r5.ebuild b/net-fs/nfs-utils/nfs-utils-1.3.2-r5.ebuild new file mode 100644 index 000000000000..0071640b2944 --- /dev/null +++ b/net-fs/nfs-utils/nfs-utils-1.3.2-r5.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2015 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.3.2-r5.ebuild,v 1.1 2015/02/03 19:28:36 williamh Exp $ + +EAPI="5" + +inherit eutils flag-o-matic multilib autotools systemd + +DESCRIPTION="NFS client and server daemons" +HOMEPAGE="http://linux-nfs.org/" +SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="caps ipv6 kerberos +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid" +REQUIRED_USE="kerberos? ( nfsv4 )" +RESTRICT="test" #315573 + +# 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) +DEPEND_COMMON="tcpd? ( sys-apps/tcp-wrappers ) + caps? ( sys-libs/libcap ) + sys-libs/e2fsprogs-libs + >=net-nds/rpcbind-0.2.0-r1 + net-libs/libtirpc + libmount? ( sys-apps/util-linux ) + nfsdcld? ( >=dev-db/sqlite-3.3 ) + nfsv4? ( + dev-libs/libevent + >=net-libs/libnfsidmap-0.21-r1 + kerberos? ( + >=net-libs/libtirpc-0.2.4-r1[kerberos] + app-crypt/mit-krb5 + ) + nfsidmap? ( + >=net-libs/libnfsidmap-0.24 + >=sys-apps/keyutils-1.5.9 + ) + ) + nfsv41? ( + sys-fs/lvm2 + ) + uuid? ( sys-apps/util-linux )" +RDEPEND="${DEPEND_COMMON} + !net-nds/portmap + !<sys-apps/openrc-0.13.4 + selinux? ( + sec-policy/selinux-rpc + sec-policy/selinux-rpcbind + ) +" +DEPEND="${DEPEND_COMMON} + virtual/pkgconfig" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch + epatch "${FILESDIR}"/${PN}-1.2.8-cross-build.patch + epatch "${FILESDIR}"/${PN}-1.3.2-background-statd.patch + + sed \ + -e "/^sbindir/s:= := \"${EPREFIX}\":g" \ + -i utils/*/Makefile.am || die + + epatch_user + eautoreconf +} + +src_configure() { + export libsqlite3_cv_is_recent=yes # Our DEPEND forces this. + export ac_cv_header_keyutils_h=$(usex nfsidmap) + econf \ + --with-statedir="${EPREFIX}"/var/lib/nfs \ + --enable-tirpc \ + --with-tirpcinclude="${EPREFIX}"/usr/include/tirpc/ \ + $(use_enable libmount libmount-mount) \ + $(use_with tcpd tcp-wrappers) \ + $(use_enable nfsdcld nfsdcltrack) \ + $(use_enable nfsv4) \ + $(use_enable nfsv41) \ + $(use_enable ipv6) \ + $(use_enable caps) \ + $(use_enable uuid) \ + $(use_enable kerberos gss) \ + --without-gssglue +} + +src_compile(){ + # remove compiled files bundled in the tarball + emake clean + default +} + +src_install() { + default + rm linux-nfs/Makefile* || die + dodoc -r linux-nfs README + + # Don't overwrite existing xtab/etab, install the original + # versions somewhere safe... more info in pkg_postinst + keepdir /var/lib/nfs/{,sm,sm.bak} + mv "${ED}"/var/lib "${ED}"/usr/$(get_libdir) || die + + # Install some client-side binaries in /sbin + dodir /sbin + mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die + + if use nfsv4 && use nfsidmap ; then + # Install a config file for idmappers in newer kernels. #415625 + insinto /etc/request-key.d + echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf + doins id_resolver.conf + fi + + insinto /etc + doins "${FILESDIR}"/exports + keepdir /etc/exports.d + + local f list=() opt_need="" + if use nfsv4 ; then + opt_need="rpc.idmapd" + list+=( rpc.idmapd rpc.pipefs ) + use kerberos && list+=( rpc.gssd rpc.svcgssd ) + fi + for f in nfs nfsclient rpc.statd "${list[@]}" ; do + newinitd "${FILESDIR}"/${f}.initd ${f} + done + newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01 + for f in nfs nfsclient ; do + newconfd "${FILESDIR}"/${f}.confd ${f} + done + sed -i \ + -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \ + "${ED}"/etc/conf.d/nfs || die #234132 + + systemd_dounit systemd/*.{mount,service,target} + if ! use nfsv4 || ! use kerberos ; then + rm "${D}$(systemd_get_unitdir)"/rpc-{gssd,svcgssd}.service || die + fi + if ! use nfsv41 ; then + rm "${D}$(systemd_get_unitdir)"/nfs-blkmap.* || die + fi + rm "${D}$(systemd_get_unitdir)"/nfs-config.service || die + sed -i -r \ + -e "/^EnvironmentFile=/s:=.*:=${EPREFIX}/etc/conf.d/nfs:" \ + -e '/^(After|Wants)=nfs-config.service$/d' \ + -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \ + "${D}$(systemd_get_unitdir)"/* || die +} + +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. #30486 + local f + mkdir -p "${EROOT}"/var/lib/nfs #368505 + for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do + [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue + einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs" + cp -pPR "${f}" "${EROOT}"/var/lib/nfs/ + done + + if systemd_is_booted; then + if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then + ewarn "We have switched to upstream systemd unit files. Since" + ewarn "they got renamed, you should probably enable the new ones." + ewarn "You can run 'equery files nfs-utils | grep systemd'" + ewarn "to know what services you need to enable now." + fi + else + ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient." + ewarn "If you were using nfsmount, please add nfsclient and netmount to the" + ewarn "same runlevel as nfsmount." + fi +} |