Gentoo Archives: gentoo-commits

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