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/, net-fs/nfs-utils/files/
Date: Sat, 16 Nov 2019 13:06:28
Message-Id: 1573909575.9aea63b35f973c79ed6fb1384396fd4e44ee7995.polynomial-c@gentoo
1 commit: 9aea63b35f973c79ed6fb1384396fd4e44ee7995
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 16 11:11:53 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 16 13:06:15 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9aea63b3
7
8 net-fs/nfs-utils: Bump to version 2.4.2
9
10 Package-Manager: Portage-2.3.79, Repoman-2.3.18
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 net-fs/nfs-utils/Manifest | 1 +
14 .../files/nfs-utils-2.4.2-no-werror.patch | 68 +++++++
15 net-fs/nfs-utils/nfs-utils-2.4.2.ebuild | 206 +++++++++++++++++++++
16 3 files changed, 275 insertions(+)
17
18 diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest
19 index 33eadfc1820..81ed810ff75 100644
20 --- a/net-fs/nfs-utils/Manifest
21 +++ b/net-fs/nfs-utils/Manifest
22 @@ -1 +1,2 @@
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
26 diff --git a/net-fs/nfs-utils/files/nfs-utils-2.4.2-no-werror.patch b/net-fs/nfs-utils/files/nfs-utils-2.4.2-no-werror.patch
27 new file mode 100644
28 index 00000000000..114942f09a4
29 --- /dev/null
30 +++ b/net-fs/nfs-utils/files/nfs-utils-2.4.2-no-werror.patch
31 @@ -0,0 +1,68 @@
32 +From b7df6ae89846104b99f46336592b928a5421c3d8 Mon Sep 17 00:00:00 2001
33 +From: Mike Frysinger <vapier@g.o>
34 +Date: Sat, 16 Nov 2019 12:04:48 +0100
35 +Subject: [PATCH] Don't build with -Werror flags
36 +
37 +https://bugs.gentoo.org/656984
38 +
39 +Signed-off-by: Lars Wendler <polynomial-c@g.o>
40 +---
41 + configure.ac | 33 +--------------------------------
42 + 1 file changed, 1 insertion(+), 32 deletions(-)
43 +
44 +diff --git a/configure.ac b/configure.ac
45 +index 9ba9d4b5..26663264 100644
46 +--- a/configure.ac
47 ++++ b/configure.ac
48 +@@ -581,47 +581,16 @@ AC_SUBST(CPPFLAGS_FOR_BUILD)
49 + AC_SUBST(LDFLAGS_FOR_BUILD)
50 +
51 + my_am_cflags="\
52 +- -pipe \
53 + -Wall \
54 + -Wextra \
55 + $rpcgen_cflags \
56 +- -Werror=missing-prototypes \
57 +- -Werror=missing-declarations \
58 +- -Werror=format=2 \
59 +- -Werror=undef \
60 +- -Werror=missing-include-dirs \
61 +- -Werror=strict-aliasing=2 \
62 +- -Werror=init-self \
63 +- -Werror=implicit-function-declaration \
64 +- -Werror=return-type \
65 +- -Werror=switch \
66 +- -Werror=overflow \
67 +- -Werror=parentheses \
68 +- -Werror=aggregate-return \
69 +- -Werror=unused-result \
70 + -Wno-cast-function-type \
71 + -fno-strict-aliasing \
72 + "
73 +
74 +-AC_DEFUN([CHECK_CCSUPPORT], [
75 +- my_save_cflags="$CFLAGS"
76 +- CFLAGS=$1
77 +- AC_MSG_CHECKING([whether CC supports $1])
78 +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
79 +- [AC_MSG_RESULT([yes])]
80 +- [$2+=$1],
81 +- [AC_MSG_RESULT([no])]
82 +- )
83 +- CFLAGS="$my_save_cflags"
84 +-])
85 +-
86 +-CHECK_CCSUPPORT([-Werror=format-overflow=2], [flg1])
87 +-CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
88 +-CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
89 +-CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
90 + AX_GCC_FUNC_ATTRIBUTE([format])
91 +
92 +-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
93 ++AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
94 +
95 + # Make sure that $ACLOCAL_FLAGS are used during a rebuild
96 + AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
97 +--
98 +2.24.0
99 +
100
101 diff --git a/net-fs/nfs-utils/nfs-utils-2.4.2.ebuild b/net-fs/nfs-utils/nfs-utils-2.4.2.ebuild
102 new file mode 100644
103 index 00000000000..4ff3af16fc9
104 --- /dev/null
105 +++ b/net-fs/nfs-utils/nfs-utils-2.4.2.ebuild
106 @@ -0,0 +1,206 @@
107 +# Copyright 1999-2019 Gentoo Authors
108 +# Distributed under the terms of the GNU General Public License v2
109 +
110 +EAPI=7
111 +
112 +inherit autotools flag-o-matic linux-info multilib systemd
113 +
114 +DESCRIPTION="NFS client and server daemons"
115 +HOMEPAGE="http://linux-nfs.org/"
116 +
117 +if [[ "${PV}" = *_rc* ]] ; then
118 + MY_PV="$(ver_rs 1- -)"
119 + 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"
120 + S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
121 +else
122 + SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
123 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
124 +fi
125 +
126 +LICENSE="GPL-2"
127 +SLOT="0"
128 +IUSE="caps ipv6 junction kerberos ldap +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
129 +REQUIRED_USE="kerberos? ( nfsv4 )"
130 +RESTRICT="test" #315573
131 +
132 +# kth-krb doesn't provide the right include
133 +# files, and nfs-utils doesn't build against heimdal either,
134 +# so don't depend on virtual/krb.
135 +# (04 Feb 2005 agriffis)
136 +DEPEND="
137 + >=dev-db/sqlite-3.3
138 + dev-libs/libxml2
139 + net-libs/libtirpc:=
140 + >=net-nds/rpcbind-0.2.4
141 + sys-libs/e2fsprogs-libs
142 + caps? ( sys-libs/libcap )
143 + ldap? ( net-nds/openldap )
144 + libmount? ( sys-apps/util-linux )
145 + nfsv4? (
146 + dev-libs/libevent:=
147 + >=sys-apps/keyutils-1.5.9:=
148 + kerberos? (
149 + >=net-libs/libtirpc-0.2.4-r1[kerberos]
150 + app-crypt/mit-krb5
151 + )
152 + )
153 + nfsv41? (
154 + sys-fs/lvm2
155 + )
156 + tcpd? ( sys-apps/tcp-wrappers )
157 + uuid? ( sys-apps/util-linux )"
158 +RDEPEND="${DEPEND}
159 + !net-libs/libnfsidmap
160 + !net-nds/portmap
161 + !<sys-apps/openrc-0.13.9
162 + selinux? (
163 + sec-policy/selinux-rpc
164 + sec-policy/selinux-rpcbind
165 + )
166 +"
167 +BDEPEND="
168 + net-libs/rpcsvc-proto
169 + virtual/pkgconfig
170 +"
171 +
172 +PATCHES=(
173 + "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
174 + "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
175 + "${FILESDIR}"/${PN}-2.4.2-no-werror.patch
176 + "${FILESDIR}"/${PN}-2.4.1-statx.patch #688644
177 +)
178 +
179 +pkg_setup() {
180 + linux-info_pkg_setup
181 + if use nfsv4 && ! use nfsdcld && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then
182 + ewarn "Your NFS server will be unable to track clients across server restarts!"
183 + ewarn "Please enable the \"${HILITE}nfsdcld${NORMAL}\" USE flag to install the nfsdcltrack usermode"
184 + ewarn "helper upcall program, or enable ${HILITE}CONFIG_CRYPTO_MD5${NORMAL} in your kernel to"
185 + ewarn "support the legacy, in-kernel client tracker."
186 + fi
187 +}
188 +
189 +src_prepare() {
190 + default
191 +
192 + sed \
193 + -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
194 + -i utils/*/Makefile.am || die
195 +
196 + eautoreconf
197 +}
198 +
199 +src_configure() {
200 + export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
201 + export ac_cv_header_keyutils_h=$(usex nfsidmap)
202 + local myeconfargs=(
203 + --with-statedir="${EPREFIX%/}"/var/lib/nfs
204 + --enable-tirpc
205 + --with-tirpcinclude="${EPREFIX%/}"/usr/include/tirpc/
206 + --with-pluginpath="${EPREFIX%/}"/usr/$(get_libdir)/libnfsidmap
207 + --with-rpcgen
208 + --with-systemd="$(systemd_get_systemunitdir)"
209 + --without-gssglue
210 + $(use_enable caps)
211 + $(use_enable ipv6)
212 + $(use_enable junction)
213 + $(use_enable kerberos gss)
214 + $(use_enable kerberos svcgss)
215 + $(use_enable ldap)
216 + $(use_enable libmount libmount-mount)
217 + $(use_enable nfsdcld nfsdcltrack)
218 + $(use_enable nfsv4)
219 + $(use_enable nfsv41)
220 + $(use_enable uuid)
221 + $(use_with tcpd tcp-wrappers)
222 + )
223 + econf "${myeconfargs[@]}"
224 +}
225 +
226 +src_compile(){
227 + # remove compiled files bundled in the tarball
228 + emake clean
229 + default
230 +}
231 +
232 +src_install() {
233 + default
234 + rm linux-nfs/Makefile* || die
235 + dodoc -r linux-nfs README
236 +
237 + # Don't overwrite existing xtab/etab, install the original
238 + # versions somewhere safe... more info in pkg_postinst
239 + keepdir /var/lib/nfs/{,sm,sm.bak}
240 + mv "${ED}"/var/lib/nfs "${ED}"/usr/$(get_libdir)/ || die
241 +
242 + # Install some client-side binaries in /sbin
243 + dodir /sbin
244 + mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die
245 +
246 + if use nfsv4 && use nfsidmap ; then
247 + insinto /etc
248 + doins support/nfsidmap/idmapd.conf
249 +
250 + # Install a config file for idmappers in newer kernels. #415625
251 + insinto /etc/request-key.d
252 + echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
253 + doins id_resolver.conf
254 + fi
255 +
256 + insinto /etc
257 + doins "${FILESDIR}"/exports
258 + keepdir /etc/exports.d
259 +
260 + local f list=() opt_need=""
261 + if use nfsv4 ; then
262 + opt_need="rpc.idmapd"
263 + list+=( rpc.idmapd rpc.pipefs )
264 + use kerberos && list+=( rpc.gssd rpc.svcgssd )
265 + fi
266 + for f in nfs nfsclient rpc.statd "${list[@]}" ; do
267 + newinitd "${FILESDIR}"/${f}.initd ${f}
268 + done
269 + newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
270 + for f in nfs nfsclient ; do
271 + newconfd "${FILESDIR}"/${f}.confd ${f}
272 + done
273 + sed -i \
274 + -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
275 + "${ED}"/etc/conf.d/nfs || die #234132
276 +
277 + local systemd_systemunitdir="$(systemd_get_systemunitdir)"
278 + sed -i \
279 + -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
280 + "${ED}${systemd_systemunitdir}"/* || die
281 +
282 + keepdir /var/lib/nfs #368505
283 + keepdir /var/lib/nfs/v4recovery #603628
284 +
285 +}
286 +
287 +pkg_postinst() {
288 + # Install default xtab and friends if there's none existing. In
289 + # src_install we put them in /usr/lib/nfs for safe-keeping, but
290 + # the daemons actually use the files in /var/lib/nfs. #30486
291 + local f
292 + for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do
293 + [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue
294 + einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
295 + cp -pPR "${f}" "${EROOT}"/var/lib/nfs/
296 + done
297 +
298 + if systemd_is_booted; then
299 + for v in ${REPLACING_VERSIONS}; do
300 + if ver_test "${v}" -lt 1.3.0; then
301 + ewarn "We have switched to upstream systemd unit files. Since"
302 + ewarn "they got renamed, you should probably enable the new ones."
303 + ewarn "You can run 'equery files nfs-utils | grep systemd'"
304 + ewarn "to know what services you need to enable now."
305 + fi
306 + done
307 + else
308 + ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
309 + ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
310 + ewarn "same runlevel as nfsmount."
311 + fi
312 +}