Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/nfs-utils/
Date: Tue, 11 Feb 2020 10:30:37
Message-Id: 1581417029.7d15ab4e6d0af5d776b498a7eefe9bee0bda3092.polynomial-c@gentoo
1 commit: 7d15ab4e6d0af5d776b498a7eefe9bee0bda3092
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 11 10:30:19 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 11 10:30:29 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d15ab4e
7
8 net-fs/nfs-utils: Bump to version 2.4.3
9
10 Package-Manager: Portage-2.3.88, Repoman-2.3.20
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 net-fs/nfs-utils/Manifest | 1 +
14 net-fs/nfs-utils/nfs-utils-2.4.3.ebuild | 204 ++++++++++++++++++++++++++++++++
15 2 files changed, 205 insertions(+)
16
17 diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest
18 index a752daf434b..87497d2adaf 100644
19 --- a/net-fs/nfs-utils/Manifest
20 +++ b/net-fs/nfs-utils/Manifest
21 @@ -1,3 +1,4 @@
22 DIST nfs-utils-2.3.4.tar.bz2 906900 BLAKE2B 968fac7b37c7311bc8d29667c88db925aac0c062ed7ef8c13f9e5c11c3c88960ffaea56c1b6cfb5594a01238f9190e55ab7b837a79a7a804bc55dcca75908eea SHA512 25203b38be6683f25ad6583ac8534873c907124092a768955c1454899e2f467b9dd427b167556eb4f28992b5720da13078eb1eb086da991438454f268e1559a5
23 DIST nfs-utils-2.4.1.tar.bz2 910791 BLAKE2B 4419eff7fca21747e0bc4969ebb8a8b863aa951984af8f23f197e7dfc4faad3770173808862b84178714ca75f021be1af96f9e4408fecd7ef97999d261f2f21b SHA512 655a115955f35177b761f821e29c752693d614f4c6c2a90d392e0ab83b615247a397cf18e8ad453a93c6dc528d1fa90cfdf8b04de6626e0f4083b10e2e54f540
24 DIST nfs-utils-2.4.2.tar.bz2 918576 BLAKE2B a1dba3ae2e58794509ea7907d80e40fc49a0c5e72019222ba16daa74aa757cab5e6fde9ed066f6b5f379b40dbd61622a05fcafc298a79231e417ab2086127278 SHA512 f9724ff2ac185e6c29afd577b33da38b1d11803af1ccb905cd615afa3383c6ac7a3fa4e0f43ea8d062e9aedcdbae90adc9b55ae9d0abe4731f69aa3a6f8d2534
25 +DIST nfs-utils-2.4.3.tar.bz2 921710 BLAKE2B 9386a99561370e09ffe871ec38a4fc993e99332c0c6fdb0d07eb7a924cfab4634e5c5186ac1f1629deecf02557fd2d3d5d99b90d97c32d3680ca4478b5c49d9c SHA512 160c828dd7a7b3206b7f167eb99a8dfac7e1a0c8dd88c81b639c3a1f66916908b3ca11fb9a945e4cf6a474f82509ed91a8a3217623f6cb79302d3d9b760f19d9
26
27 diff --git a/net-fs/nfs-utils/nfs-utils-2.4.3.ebuild b/net-fs/nfs-utils/nfs-utils-2.4.3.ebuild
28 new file mode 100644
29 index 00000000000..acb9806ec91
30 --- /dev/null
31 +++ b/net-fs/nfs-utils/nfs-utils-2.4.3.ebuild
32 @@ -0,0 +1,204 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit autotools flag-o-matic linux-info multilib systemd
39 +
40 +DESCRIPTION="NFS client and server daemons"
41 +HOMEPAGE="http://linux-nfs.org/"
42 +
43 +if [[ "${PV}" = *_rc* ]] ; then
44 + MY_PV="$(ver_rs 1- -)"
45 + SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz"
46 + S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
47 +else
48 + SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
49 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
50 +fi
51 +
52 +LICENSE="GPL-2"
53 +SLOT="0"
54 +IUSE="caps ipv6 junction kerberos ldap +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
55 +REQUIRED_USE="kerberos? ( nfsv4 )"
56 +RESTRICT="test" #315573
57 +
58 +# kth-krb doesn't provide the right include
59 +# files, and nfs-utils doesn't build against heimdal either,
60 +# so don't depend on virtual/krb.
61 +# (04 Feb 2005 agriffis)
62 +DEPEND="
63 + >=dev-db/sqlite-3.3
64 + dev-libs/libxml2
65 + net-libs/libtirpc:=
66 + >=net-nds/rpcbind-0.2.4
67 + sys-libs/e2fsprogs-libs
68 + caps? ( sys-libs/libcap )
69 + ldap? ( net-nds/openldap )
70 + libmount? ( sys-apps/util-linux )
71 + nfsv4? (
72 + dev-libs/libevent:=
73 + >=sys-apps/keyutils-1.5.9:=
74 + kerberos? (
75 + >=net-libs/libtirpc-0.2.4-r1[kerberos]
76 + app-crypt/mit-krb5
77 + )
78 + )
79 + nfsv41? (
80 + sys-fs/lvm2
81 + )
82 + tcpd? ( sys-apps/tcp-wrappers )
83 + uuid? ( sys-apps/util-linux )"
84 +RDEPEND="${DEPEND}
85 + !net-libs/libnfsidmap
86 + !net-nds/portmap
87 + !<sys-apps/openrc-0.13.9
88 + selinux? (
89 + sec-policy/selinux-rpc
90 + sec-policy/selinux-rpcbind
91 + )
92 +"
93 +BDEPEND="
94 + net-libs/rpcsvc-proto
95 + virtual/pkgconfig
96 +"
97 +
98 +PATCHES=(
99 + "${FILESDIR}"/${PN}-2.4.2-no-werror.patch
100 + "${FILESDIR}"/${PN}-2.4.2-Ensure-consistent-struct-stat.patch
101 +)
102 +
103 +pkg_setup() {
104 + linux-info_pkg_setup
105 + if use nfsv4 && ! use nfsdcld && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then
106 + ewarn "Your NFS server will be unable to track clients across server restarts!"
107 + ewarn "Please enable the \"${HILITE}nfsdcld${NORMAL}\" USE flag to install the nfsdcltrack usermode"
108 + ewarn "helper upcall program, or enable ${HILITE}CONFIG_CRYPTO_MD5${NORMAL} in your kernel to"
109 + ewarn "support the legacy, in-kernel client tracker."
110 + fi
111 +}
112 +
113 +src_prepare() {
114 + default
115 +
116 + sed \
117 + -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
118 + -i utils/*/Makefile.am || die
119 +
120 + eautoreconf
121 +}
122 +
123 +src_configure() {
124 + export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
125 + export ac_cv_header_keyutils_h=$(usex nfsidmap)
126 + local myeconfargs=(
127 + --with-statedir="${EPREFIX}"/var/lib/nfs
128 + --enable-tirpc
129 + --with-tirpcinclude="${EPREFIX}"/usr/include/tirpc/
130 + --with-pluginpath="${EPREFIX}"/usr/$(get_libdir)/libnfsidmap
131 + --with-rpcgen
132 + --with-systemd="$(systemd_get_systemunitdir)"
133 + --without-gssglue
134 + $(use_enable caps)
135 + $(use_enable ipv6)
136 + $(use_enable junction)
137 + $(use_enable kerberos gss)
138 + $(use_enable kerberos svcgss)
139 + $(use_enable ldap)
140 + $(use_enable libmount libmount-mount)
141 + $(use_enable nfsdcld nfsdcltrack)
142 + $(use_enable nfsv4)
143 + $(use_enable nfsv41)
144 + $(use_enable uuid)
145 + $(use_with tcpd tcp-wrappers)
146 + )
147 + econf "${myeconfargs[@]}"
148 +}
149 +
150 +src_compile(){
151 + # remove compiled files bundled in the tarball
152 + emake clean
153 + default
154 +}
155 +
156 +src_install() {
157 + default
158 + rm linux-nfs/Makefile* || die
159 + dodoc -r linux-nfs README
160 +
161 + # Don't overwrite existing xtab/etab, install the original
162 + # versions somewhere safe... more info in pkg_postinst
163 + keepdir /var/lib/nfs/{,sm,sm.bak}
164 + mv "${ED}"/var/lib/nfs "${ED}"/usr/$(get_libdir)/ || die
165 +
166 + # Install some client-side binaries in /sbin
167 + dodir /sbin
168 + mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die
169 +
170 + if use nfsv4 && use nfsidmap ; then
171 + insinto /etc
172 + doins support/nfsidmap/idmapd.conf
173 +
174 + # Install a config file for idmappers in newer kernels. #415625
175 + insinto /etc/request-key.d
176 + echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
177 + doins id_resolver.conf
178 + fi
179 +
180 + insinto /etc
181 + doins "${FILESDIR}"/exports
182 + keepdir /etc/exports.d
183 +
184 + local f list=() opt_need=""
185 + if use nfsv4 ; then
186 + opt_need="rpc.idmapd"
187 + list+=( rpc.idmapd rpc.pipefs )
188 + use kerberos && list+=( rpc.gssd rpc.svcgssd )
189 + fi
190 + for f in nfs nfsclient rpc.statd "${list[@]}" ; do
191 + newinitd "${FILESDIR}"/${f}.initd ${f}
192 + done
193 + newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
194 + for f in nfs nfsclient ; do
195 + newconfd "${FILESDIR}"/${f}.confd ${f}
196 + done
197 + sed -i \
198 + -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
199 + "${ED}"/etc/conf.d/nfs || die #234132
200 +
201 + local systemd_systemunitdir="$(systemd_get_systemunitdir)"
202 + sed -i \
203 + -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
204 + "${ED}${systemd_systemunitdir}"/* || die
205 +
206 + keepdir /var/lib/nfs #368505
207 + keepdir /var/lib/nfs/v4recovery #603628
208 +
209 +}
210 +
211 +pkg_postinst() {
212 + # Install default xtab and friends if there's none existing. In
213 + # src_install we put them in /usr/lib/nfs for safe-keeping, but
214 + # the daemons actually use the files in /var/lib/nfs. #30486
215 + local f
216 + for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do
217 + [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue
218 + einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
219 + cp -pPR "${f}" "${EROOT}"/var/lib/nfs/
220 + done
221 +
222 + if systemd_is_booted; then
223 + for v in ${REPLACING_VERSIONS}; do
224 + if ver_test "${v}" -lt 1.3.0; then
225 + ewarn "We have switched to upstream systemd unit files. Since"
226 + ewarn "they got renamed, you should probably enable the new ones."
227 + ewarn "You can run 'equery files nfs-utils | grep systemd'"
228 + ewarn "to know what services you need to enable now."
229 + fi
230 + done
231 + else
232 + ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
233 + ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
234 + ewarn "same runlevel as nfsmount."
235 + fi
236 +}