Gentoo Archives: gentoo-commits

From: Dave Hughes <davidhughes205@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: net-fs/nfs-utils/, net-fs/nfs-utils/files/
Date: Tue, 01 Jun 2021 02:20:32
Message-Id: 1622514033.75195b7d6c7532b8aa5acd8b9a27fc6ad4555548.xaero@gentoo
1 commit: 75195b7d6c7532b8aa5acd8b9a27fc6ad4555548
2 Author: Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
3 AuthorDate: Tue Jun 1 02:20:33 2021 +0000
4 Commit: Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
5 CommitDate: Tue Jun 1 02:20:33 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=75195b7d
7
8 net-fs/nfs-utils: sync with ::gentoo
9
10 Package-Manager: Portage-3.0.19, Repoman-3.0.3
11 Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com>
12
13 net-fs/nfs-utils/Manifest | 4 +-
14 net-fs/nfs-utils/files/musl-getservbyport.patch | 18 ++
15 net-fs/nfs-utils/files/musl-svcgssd-sysconf.patch | 144 ++++++++++++++++
16 net-fs/nfs-utils/files/musl-time64.patch | 51 ++++++
17 .../nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch | 39 -----
18 .../files/nfs-utils-1.2.8-cross-build.patch | 48 ------
19 ...s-utils-2.3.1-svcgssd_undefined_reference.patch | 40 -----
20 .../files/nfs-utils-2.3.2-junction_libs.patch | 45 -----
21 ...utils-2.4.2-Ensure-consistent-struct-stat.patch | 115 +++++++++++++
22 ...error.patch => nfs-utils-2.5.2-no-werror.patch} | 29 +++-
23 net-fs/nfs-utils/files/nfs-utils-musl.patch | 147 ----------------
24 net-fs/nfs-utils/files/nfs-utils.conf | 3 -
25 net-fs/nfs-utils/files/nfs.initd | 12 +-
26 net-fs/nfs-utils/files/nfsmount.confd | 7 -
27 net-fs/nfs-utils/files/nfsmount.initd | 47 ------
28 net-fs/nfs-utils/metadata.xml | 1 -
29 net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild | 182 --------------------
30 net-fs/nfs-utils/nfs-utils-2.3.1-r3.ebuild | 187 ---------------------
31 ...tils-2.3.3.ebuild => nfs-utils-2.5.3-r1.ebuild} | 91 ++++++----
32 19 files changed, 410 insertions(+), 800 deletions(-)
33
34 diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest
35 index 3196928..0ae2ec8 100644
36 --- a/net-fs/nfs-utils/Manifest
37 +++ b/net-fs/nfs-utils/Manifest
38 @@ -1,3 +1 @@
39 -DIST nfs-utils-1.3.4.tar.bz2 814545 BLAKE2B 4b8c5fa4c1c21858e19d05f973c6d94185cf6a15c88348dda5e47c6714f9dba00dfa05237d908479970440b2ea57287600e92cb4d49872127b3801e075d6bf1a SHA512 765c0bc55a9a0bdb2c25d8fb7189a9054fb9f2dd51726eda29f44e5d5c423e245b02307dfcfab9239276d8f44869a72732416f6e9ef5a1f80753d9243ba1b38c
40 -DIST nfs-utils-2.3.1.tar.bz2 854899 BLAKE2B f9541b9dc103d978f21d57d8ba0c14a3b30f6ba874b112239d014076c1c72b6654e8e02b4bfea686e658dac84d1e896b872bc2054591275ef1713ae4e7b7d005 SHA512 de3e70f8656bc5b5aa98262685a9e80929c6314234d9bbb74d4c7efcb7a8b2640d48d2100850b403157ebefc8f0eb48598b48238fae795f64c7a0e9a8bff93e3
41 -DIST nfs-utils-2.3.3.tar.bz2 888947 BLAKE2B 7c913f0c5061807d4af162fb392c8f466abb97c88960853b52298f61056bcad08f67a16e577036dec9afa737d88268d5a766b67c4b30a014b666dfbf3db81031 SHA512 266b86ef5041a7ecd144c6f2570e8a6eb00ebb4e547fa4b8c8c3e60a4af117c2690ff9effb0d4113a7b7ef57164583c8a6ada9cb1bb8f7b748524c826eaf1cba
42 +DIST nfs-utils-2.5.3.tar.bz2 937544 BLAKE2B 817af2c302cf110519e64353a507645137ffd3b93b46eb94e71d45a1869c9e831e344f0baa33b1b39514962798cca542cf56a2830520c67e96e78995f2bf901f SHA512 3be82f42c5da2bbbca4429459c858c58ae7333725749213c824d0c01b78f0beb7384455f314fc1cc1799968f9f40fd616297c7baf3514ca0e31d4686e9d6e732
43
44 diff --git a/net-fs/nfs-utils/files/musl-getservbyport.patch b/net-fs/nfs-utils/files/musl-getservbyport.patch
45 new file mode 100644
46 index 0000000..6fa589c
47 --- /dev/null
48 +++ b/net-fs/nfs-utils/files/musl-getservbyport.patch
49 @@ -0,0 +1,18 @@
50 +Musl will always return something with getservbyport so we cannot skip
51 +ports that returns non-null.
52 +
53 +diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
54 +index fd576d9..d72a0bf 100644
55 +--- a/utils/statd/rmtcall.c
56 ++++ b/utils/statd/rmtcall.c
57 +@@ -93,8 +93,10 @@
58 + __func__);
59 + break;
60 + }
61 ++#if 0
62 + se = getservbyport(sin.sin_port, "udp");
63 + if (se == NULL)
64 ++#endif
65 + break;
66 +
67 + if (retries == MAX_BRP_RETRIES) {
68
69 diff --git a/net-fs/nfs-utils/files/musl-svcgssd-sysconf.patch b/net-fs/nfs-utils/files/musl-svcgssd-sysconf.patch
70 new file mode 100644
71 index 0000000..ec280cc
72 --- /dev/null
73 +++ b/net-fs/nfs-utils/files/musl-svcgssd-sysconf.patch
74 @@ -0,0 +1,144 @@
75 +--- a/support/nfsidmap/libnfsidmap.c
76 ++++ b/support/nfsidmap/libnfsidmap.c
77 +@@ -432,11 +432,17 @@ int nfs4_init_name_mapping(char *conffil
78 +
79 + nobody_user = conf_get_str("Mapping", "Nobody-User");
80 + if (nobody_user) {
81 +- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
82 ++ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
83 ++ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
84 + struct passwd *buf;
85 + struct passwd *pw = NULL;
86 + int err;
87 +
88 ++ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
89 ++ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
90 ++ if (scbuflen > 0)
91 ++ buflen = (size_t)scbuflen;
92 ++
93 + buf = malloc(sizeof(*buf) + buflen);
94 + if (buf) {
95 + err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
96 +@@ -453,11 +459,17 @@ int nfs4_init_name_mapping(char *conffil
97 +
98 + nobody_group = conf_get_str("Mapping", "Nobody-Group");
99 + if (nobody_group) {
100 +- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
101 ++ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
102 ++ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
103 + struct group *buf;
104 + struct group *gr = NULL;
105 + int err;
106 +
107 ++ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
108 ++ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
109 ++ if (scbuflen > 0)
110 ++ buflen = (size_t)scbuflen;
111 ++
112 + buf = malloc(sizeof(*buf) + buflen);
113 + if (buf) {
114 + err = getgrnam_r(nobody_group, buf, ((char *)buf) + sizeof(*buf), buflen, &gr);
115 +--- a/support/nfsidmap/static.c
116 ++++ b/support/nfsidmap/static.c
117 +@@ -98,10 +98,14 @@ static struct passwd *static_getpwnam(co
118 + {
119 + struct passwd *pw;
120 + struct pwbuf *buf;
121 +- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
122 ++ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
123 ++ size_t buflen = 1024;
124 + char *localname;
125 + int err;
126 +
127 ++ if (scbuflen > 0)
128 ++ buflen = (size_t)scbuflen;
129 ++
130 + buf = malloc(sizeof(*buf) + buflen);
131 + if (!buf) {
132 + err = ENOMEM;
133 +@@ -149,10 +153,14 @@ static struct group *static_getgrnam(con
134 + {
135 + struct group *gr;
136 + struct grbuf *buf;
137 +- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
138 ++ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
139 ++ size_t buflen = 1024;
140 + char *localgroup;
141 + int err;
142 +
143 ++ if (scbuflen > 0)
144 ++ buflen = (size_t)scbuflen;
145 ++
146 + buf = malloc(sizeof(*buf) + buflen);
147 + if (!buf) {
148 + err = ENOMEM;
149 +--- a/support/nfsidmap/nss.c
150 ++++ b/support/nfsidmap/nss.c
151 +@@ -91,9 +91,13 @@ static int nss_uid_to_name(uid_t uid, ch
152 + struct passwd *pw = NULL;
153 + struct passwd pwbuf;
154 + char *buf;
155 +- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
156 ++ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
157 ++ size_t buflen = 1024;
158 + int err = -ENOMEM;
159 +
160 ++ if (scbuflen > 0)
161 ++ buflen = (size_t)scbuflen;
162 ++
163 + buf = malloc(buflen);
164 + if (!buf)
165 + goto out;
166 +@@ -119,9 +123,13 @@ static int nss_gid_to_name(gid_t gid, ch
167 + struct group *gr = NULL;
168 + struct group grbuf;
169 + char *buf;
170 +- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
171 ++ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
172 ++ size_t buflen = 1024;
173 + int err;
174 +
175 ++ if (scbuflen > 0)
176 ++ buflen = (size_t)scbuflen;
177 ++
178 + if (domain == NULL)
179 + domain = get_default_domain();
180 +
181 +@@ -192,12 +200,13 @@ static struct passwd *nss_getpwnam(const
182 + {
183 + struct passwd *pw;
184 + struct pwbuf *buf;
185 +- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
186 ++ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
187 ++ size_t buflen = 1024;
188 + char *localname;
189 + int err = ENOMEM;
190 +
191 +- if (buflen > UINT_MAX)
192 +- goto err;
193 ++ if (scbuflen > 0)
194 ++ buflen = (size_t)scbuflen;
195 +
196 + buf = malloc(sizeof(*buf) + buflen);
197 + if (buf == NULL)
198 +@@ -301,7 +310,8 @@ static int _nss_name_to_gid(char *name,
199 + struct group *gr = NULL;
200 + struct group grbuf;
201 + char *buf, *domain;
202 +- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
203 ++ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
204 ++ size_t buflen = 1024;
205 + int err = -EINVAL;
206 + char *localname = NULL;
207 + char *ref_name = NULL;
208 +@@ -327,8 +337,8 @@ static int _nss_name_to_gid(char *name,
209 + }
210 +
211 + err = -ENOMEM;
212 +- if (buflen > UINT_MAX)
213 +- goto out_name;
214 ++ if (scbuflen > 0)
215 ++ buflen = (size_t)scbuflen;
216 +
217 + do {
218 + buf = malloc(buflen);
219
220 diff --git a/net-fs/nfs-utils/files/musl-time64.patch b/net-fs/nfs-utils/files/musl-time64.patch
221 new file mode 100644
222 index 0000000..62a1d1e
223 --- /dev/null
224 +++ b/net-fs/nfs-utils/files/musl-time64.patch
225 @@ -0,0 +1,51 @@
226 +diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c
227 +index b45a904..6b1049f 100644
228 +--- a/utils/nfsdcltrack/nfsdcltrack.c
229 ++++ b/utils/nfsdcltrack/nfsdcltrack.c
230 +@@ -25,9 +25,11 @@
231 +
232 + #include <stdio.h>
233 + #include <stdlib.h>
234 +-#include <ctype.h>
235 + #include <errno.h>
236 + #include <stdbool.h>
237 ++#include <stdint.h>
238 ++#include <inttypes.h>
239 ++#include <ctype.h>
240 + #include <getopt.h>
241 + #include <string.h>
242 + #include <sys/stat.h>
243 +@@ -525,7 +527,8 @@ cltrack_gracedone(const char *timestr)
244 + if (*tail)
245 + return -EINVAL;
246 +
247 +- xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime);
248 ++ xlog(D_GENERAL, "%s: grace done. gracetime=%" PRId64, __func__,
249 ++ (int64_t)gracetime);
250 +
251 + ret = sqlite_remove_unreclaimed(gracetime);
252 +
253 +diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c
254 +index 2801201..c4e0cdf 100644
255 +--- a/utils/nfsdcltrack/sqlite.c
256 ++++ b/utils/nfsdcltrack/sqlite.c
257 +@@ -42,6 +42,8 @@
258 + #include <errno.h>
259 + #include <event.h>
260 + #include <stdbool.h>
261 ++#include <stdint.h>
262 ++#include <inttypes.h>
263 + #include <string.h>
264 + #include <sys/stat.h>
265 + #include <sys/types.h>
266 +@@ -544,8 +546,8 @@ sqlite_remove_unreclaimed(time_t grace_start)
267 + int ret;
268 + char *err = NULL;
269 +
270 +- ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld",
271 +- grace_start);
272 ++ ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %" PRId64,
273 ++ (int64_t)grace_start);
274 + if (ret < 0) {
275 + return ret;
276 + } else if ((size_t)ret >= sizeof(buf)) {
277
278 diff --git a/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch b/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch
279 deleted file mode 100644
280 index c9e60af..0000000
281 --- a/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch
282 +++ /dev/null
283 @@ -1,39 +0,0 @@
284 -ripped from Debian
285 -
286 ---- nfs-utils-1.1.4/utils/mount/fstab.c
287 -+++ nfs-utils-1.1.4/utils/mount/fstab.c
288 -@@ -57,7 +57,7 @@ mtab_does_not_exist(void) {
289 - return var_mtab_does_not_exist;
290 - }
291 -
292 --static int
293 -+int
294 - mtab_is_a_symlink(void) {
295 - get_mtab_info();
296 - return var_mtab_is_a_symlink;
297 ---- nfs-utils-1.1.4/utils/mount/fstab.h
298 -+++ nfs-utils-1.1.4/utils/mount/fstab.h
299 -@@ -7,6 +7,7 @@
300 - #define _PATH_FSTAB "/etc/fstab"
301 - #endif
302 -
303 -+int mtab_is_a_symlink(void);
304 - int mtab_is_writable(void);
305 - int mtab_does_not_exist(void);
306 - void reset_mtab_info(void);
307 ---- nfs-utils-1.1.4/utils/mount/mount.c
308 -+++ nfs-utils-1.1.4/utils/mount/mount.c
309 -@@ -230,6 +230,13 @@ create_mtab (void) {
310 - int flags;
311 - mntFILE *mfp;
312 -
313 -+ /* Avoid writing if the mtab is a symlink to /proc/mounts, since
314 -+ that would create a file /proc/mounts in case the proc filesystem
315 -+ is not mounted, and the fchmod below would also fail. */
316 -+ if (mtab_is_a_symlink()) {
317 -+ return EX_SUCCESS;
318 -+ }
319 -+
320 - lock_mtab();
321 -
322 - mfp = nfs_setmntent (MOUNTED, "a+");
323
324 diff --git a/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch b/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch
325 deleted file mode 100644
326 index 7317115..0000000
327 --- a/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch
328 +++ /dev/null
329 @@ -1,48 +0,0 @@
330 -this is kind of hacky, but automake doesn't make this easy
331 -for us atm, so hack away :(
332 -
333 -(recent autotools will always add $(CFLAGS)/etc... to the compile)
334 -
335 ---- a/tools/locktest/Makefile.am
336 -+++ b/tools/locktest/Makefile.am
337 -@@ -1,12 +1,11 @@
338 - ## Process this file with automake to produce Makefile.in
339 -
340 - CC=$(CC_FOR_BUILD)
341 --LIBTOOL = @LIBTOOL@ --tag=CC
342 -+CFLAGS=$(CFLAGS_FOR_BUILD)
343 -+CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
344 -+LDFLAGS=$(LDFLAGS_FOR_BUILD)
345 -
346 - noinst_PROGRAMS = testlk
347 - testlk_SOURCES = testlk.c
348 --testlk_CFLAGS=$(CFLAGS_FOR_BUILD)
349 --testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
350 --testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD)
351 -
352 - MAINTAINERCLEANFILES = Makefile.in
353 ---- a/tools/rpcgen/Makefile.am
354 -+++ b/tools/rpcgen/Makefile.am
355 -@@ -1,7 +1,9 @@
356 - ## Process this file with automake to produce Makefile.in
357 -
358 - CC=$(CC_FOR_BUILD)
359 --LIBTOOL = @LIBTOOL@ --tag=CC
360 -+CFLAGS=$(CFLAGS_FOR_BUILD)
361 -+CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
362 -+LDFLAGS=$(LDFLAGS_FOR_BUILD)
363 -
364 - noinst_PROGRAMS = rpcgen
365 - rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
366 -@@ -9,10 +11,6 @@
367 - rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \
368 - rpc_scan.h rpc_util.h
369 -
370 --rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD)
371 --rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
372 --rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD)
373 --rpcgen_LDADD=$(LIBTIRPC)
374 -
375 - MAINTAINERCLEANFILES = Makefile.in
376 -
377 - EXTRA_DIST = rpcgen.new.1
378
379 diff --git a/net-fs/nfs-utils/files/nfs-utils-2.3.1-svcgssd_undefined_reference.patch b/net-fs/nfs-utils/files/nfs-utils-2.3.1-svcgssd_undefined_reference.patch
380 deleted file mode 100644
381 index 77c902f..0000000
382 --- a/net-fs/nfs-utils/files/nfs-utils-2.3.1-svcgssd_undefined_reference.patch
383 +++ /dev/null
384 @@ -1,40 +0,0 @@
385 -From 1451d7585bf1c622658ccc04abac7e79ffe40263 Mon Sep 17 00:00:00 2001
386 -From: Justin Mitchell <jumitche@××××××.com>
387 -Date: Mon, 8 Jan 2018 09:14:11 -0500
388 -Subject: [PATCH] svcgssd: Update svcgssd so that it builds
389 -
390 -Since a15bd948 the --enable-svcgss option no longer builds
391 -as svcgssd references functions which were changed at that time.
392 -Fix those, and other function changes since then.
393 -
394 -Signed-off-by: Justin Mitchell <jumitche@××××××.com>
395 -Signed-off-by: Steve Dickson <steved@××××××.com>
396 ----
397 - utils/gssd/svcgssd.c | 4 +++-
398 - 1 file changed, 3 insertions(+), 1 deletion(-)
399 -
400 -diff --git a/utils/gssd/svcgssd.c b/utils/gssd/svcgssd.c
401 -index 3514ae1..23f0c0b 100644
402 ---- a/utils/gssd/svcgssd.c
403 -+++ b/utils/gssd/svcgssd.c
404 -@@ -63,6 +63,8 @@
405 - #include "err_util.h"
406 - #include "conffile.h"
407 -
408 -+struct state_paths etab;
409 -+
410 - void
411 - sig_die(int signal)
412 - {
413 -@@ -101,7 +103,7 @@ main(int argc, char *argv[])
414 - char *principal = NULL;
415 - char *s;
416 -
417 -- conf_init(NFS_CONFFILE);
418 -+ conf_init_file(NFS_CONFFILE);
419 -
420 - s = conf_get_str("svcgssd", "principal");
421 - if (!s)
422 ---
423 -1.8.3.1
424 -
425
426 diff --git a/net-fs/nfs-utils/files/nfs-utils-2.3.2-junction_libs.patch b/net-fs/nfs-utils/files/nfs-utils-2.3.2-junction_libs.patch
427 deleted file mode 100644
428 index f13f07a..0000000
429 --- a/net-fs/nfs-utils/files/nfs-utils-2.3.2-junction_libs.patch
430 +++ /dev/null
431 @@ -1,45 +0,0 @@
432 -From 8f3e4f4d6df9f813572051e12e974b35c26a1743 Mon Sep 17 00:00:00 2001
433 -From: Lars Wendler <polynomial-c@g.o>
434 -Date: Mon, 28 May 2018 12:13:10 +0200
435 -Subject: [PATCH] Fix undefined references and bad include when build with
436 - junction support
437 -
438 ----
439 - support/junction/Makefile.am | 2 +-
440 - utils/nfsref/Makefile.am | 6 +++---
441 - 2 files changed, 4 insertions(+), 4 deletions(-)
442 -
443 -diff --git a/support/junction/Makefile.am b/support/junction/Makefile.am
444 -index 97e7426..89cb532 100644
445 ---- a/support/junction/Makefile.am
446 -+++ b/support/junction/Makefile.am
447 -@@ -31,4 +31,4 @@ libjunction_la_SOURCES = display.c export-cache.c junction.c \
448 -
449 - MAINTAINERCLEANFILES = Makefile.in
450 -
451 --AM_CPPFLAGS = -I. -I../include -I/usr/include/libxml2
452 -+AM_CPPFLAGS = -I. -I../include -I/usr/include/libxml2 @TIRPC_CFLAGS@
453 -diff --git a/utils/nfsref/Makefile.am b/utils/nfsref/Makefile.am
454 -index 2b2bb53..a652b03 100644
455 ---- a/utils/nfsref/Makefile.am
456 -+++ b/utils/nfsref/Makefile.am
457 -@@ -27,13 +27,13 @@ noinst_HEADERS = nfsref.h
458 -
459 - sbin_PROGRAMS = nfsref
460 - nfsref_SOURCES = add.c lookup.c nfsref.c remove.c
461 --LDADD = $(LIBXML2) $(LIBCAP) \
462 -- ../../support/nfs/libnfs.la \
463 -+LIBS += $(LIBXML2) $(LIBCAP)
464 -+LDADD = ../../support/nfs/libnfs.la \
465 - ../../support/junction/libjunction.la
466 -
467 - man8_MANS = nfsref.man
468 -
469 - MAINTAINERCLEANFILES = Makefile.in
470 -
471 --AM_CPPFLAGS = -I. -I../../support/include
472 -+AM_CPPFLAGS = -I. -I../../support/include @TIRPC_CFLAGS@
473 - ##AM_LDFLAGS = -Wl,--as-needed
474 ---
475 -2.17.0
476 -
477
478 diff --git a/net-fs/nfs-utils/files/nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch b/net-fs/nfs-utils/files/nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch
479 new file mode 100644
480 index 0000000..8541a98
481 --- /dev/null
482 +++ b/net-fs/nfs-utils/files/nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch
483 @@ -0,0 +1,115 @@
484 +From 1378280398ef9f5cd45f5542ae2945b9a360b132 Mon Sep 17 00:00:00 2001
485 +From: Doug Nazar <nazard@×××××.ca>
486 +Date: Sun, 17 Nov 2019 14:31:33 -0500
487 +Subject: [PATCH] Ensure consistent struct stat definition
488 +
489 +Although 2fbc62e2a13fc ("Fix include order between config.h and stat.h")
490 +reorganized those files that were already including config.h, not all
491 +files were including config.h.
492 +
493 +Fixes at least stack smashing crashes in mountd on 32-bit systems.
494 +
495 +Signed-off-by: Doug Nazar <nazard@×××××.ca>
496 +Signed-off-by: Steve Dickson <steved@××××××.com>
497 +---
498 + support/junction/junction.c | 4 ++++
499 + support/misc/file.c | 4 ++++
500 + support/misc/mountpoint.c | 4 ++++
501 + support/nfs/cacheio.c | 4 ++++
502 + utils/mount/fstab.c | 4 ++++
503 + utils/nfsdcld/legacy.c | 4 ++++
504 + 6 files changed, 24 insertions(+)
505 +
506 +diff --git a/support/junction/junction.c b/support/junction/junction.c
507 +index ab6caa6..41cce26 100644
508 +--- a/support/junction/junction.c
509 ++++ b/support/junction/junction.c
510 +@@ -27,6 +27,10 @@
511 + #include <config.h>
512 + #endif
513 +
514 ++#ifdef HAVE_CONFIG_H
515 ++#include <config.h>
516 ++#endif
517 ++
518 + #include <sys/types.h>
519 + #include <sys/stat.h>
520 +
521 +diff --git a/support/misc/file.c b/support/misc/file.c
522 +index e7c3819..06f6bb2 100644
523 +--- a/support/misc/file.c
524 ++++ b/support/misc/file.c
525 +@@ -22,6 +22,10 @@
526 + #include <config.h>
527 + #endif
528 +
529 ++#ifdef HAVE_CONFIG_H
530 ++#include <config.h>
531 ++#endif
532 ++
533 + #include <sys/stat.h>
534 +
535 + #include <string.h>
536 +diff --git a/support/misc/mountpoint.c b/support/misc/mountpoint.c
537 +index c6217f2..14d6731 100644
538 +--- a/support/misc/mountpoint.c
539 ++++ b/support/misc/mountpoint.c
540 +@@ -7,6 +7,10 @@
541 + #include <config.h>
542 + #endif
543 +
544 ++#ifdef HAVE_CONFIG_H
545 ++#include <config.h>
546 ++#endif
547 ++
548 + #include <string.h>
549 + #include "xcommon.h"
550 + #include <sys/stat.h>
551 +diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
552 +index 9dc4cf1..7c4cf37 100644
553 +--- a/support/nfs/cacheio.c
554 ++++ b/support/nfs/cacheio.c
555 +@@ -19,6 +19,10 @@
556 + #include <config.h>
557 + #endif
558 +
559 ++#ifdef HAVE_CONFIG_H
560 ++#include <config.h>
561 ++#endif
562 ++
563 + #include <nfslib.h>
564 + #include <inttypes.h>
565 + #include <stdio.h>
566 +diff --git a/utils/mount/fstab.c b/utils/mount/fstab.c
567 +index eedbdda..8b0aaf1 100644
568 +--- a/utils/mount/fstab.c
569 ++++ b/utils/mount/fstab.c
570 +@@ -11,6 +11,10 @@
571 + #include <config.h>
572 + #endif
573 +
574 ++#ifdef HAVE_CONFIG_H
575 ++#include <config.h>
576 ++#endif
577 ++
578 + #include <errno.h>
579 + #include <stdio.h>
580 + #include <fcntl.h>
581 +diff --git a/utils/nfsdcld/legacy.c b/utils/nfsdcld/legacy.c
582 +index 07f477a..3c6bea6 100644
583 +--- a/utils/nfsdcld/legacy.c
584 ++++ b/utils/nfsdcld/legacy.c
585 +@@ -19,6 +19,10 @@
586 + #include <config.h>
587 + #endif
588 +
589 ++#ifdef HAVE_CONFIG_H
590 ++#include <config.h>
591 ++#endif
592 ++
593 + #include <stdio.h>
594 + #include <dirent.h>
595 + #include <string.h>
596 +--
597 +1.8.3.1
598 +
599
600 diff --git a/net-fs/nfs-utils/files/nfs-utils-2.3.2-no-werror.patch b/net-fs/nfs-utils/files/nfs-utils-2.5.2-no-werror.patch
601 similarity index 63%
602 rename from net-fs/nfs-utils/files/nfs-utils-2.3.2-no-werror.patch
603 rename to net-fs/nfs-utils/files/nfs-utils-2.5.2-no-werror.patch
604 index d06fc4c..a7226db 100644
605 --- a/net-fs/nfs-utils/files/nfs-utils-2.3.2-no-werror.patch
606 +++ b/net-fs/nfs-utils/files/nfs-utils-2.5.2-no-werror.patch
607 @@ -1,17 +1,27 @@
608 +From 6ab8c7c186bd4a547a0ca435ecabe10ee50039c5 Mon Sep 17 00:00:00 2001
609 +From: Mike Frysinger <vapier@g.o>
610 +Date: Thu, 22 Oct 2020 19:44:34 +0200
611 +Subject: [PATCH] Don't build with -Werror flags
612 +
613 https://bugs.gentoo.org/656984
614
615 -Don't build with -Werror flags.
616 +Signed-off-by: Lars Wendler <polynomial-c@g.o>
617 +---
618 + configure.ac | 34 +---------------------------------
619 + 1 file changed, 1 insertion(+), 33 deletions(-)
620
621 +diff --git a/configure.ac b/configure.ac
622 +index 50847d8a..6bc18e93 100644
623 --- a/configure.ac
624 +++ b/configure.ac
625 -@@ -544,45 +544,11 @@
626 +@@ -631,47 +631,15 @@ AC_SUBST(CPPFLAGS_FOR_BUILD)
627 AC_SUBST(LDFLAGS_FOR_BUILD)
628
629 my_am_cflags="\
630 - -pipe \
631 -Wall \
632 -Wextra \
633 -- -Werror=strict-prototypes \
634 + $rpcgen_cflags \
635 - -Werror=missing-prototypes \
636 - -Werror=missing-declarations \
637 - -Werror=format=2 \
638 @@ -28,10 +38,10 @@ Don't build with -Werror flags.
639 - -Werror=unused-result \
640 -fno-strict-aliasing \
641 "
642 --
643 +
644 -AC_DEFUN([CHECK_CCSUPPORT], [
645 - my_save_cflags="$CFLAGS"
646 -- CFLAGS=$1
647 +- CFLAGS="-Werror $1"
648 - AC_MSG_CHECKING([whether CC supports $1])
649 - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
650 - [AC_MSG_RESULT([yes])]
651 @@ -45,9 +55,14 @@ Don't build with -Werror flags.
652 -CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
653 -CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
654 -CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
655 --
656 --AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
657 +-CHECK_CCSUPPORT([-Wno-cast-function-type], [flg5])
658 + AX_GCC_FUNC_ATTRIBUTE([format])
659 +
660 +-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4 $flg5"])
661 +AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
662
663 # Make sure that $ACLOCAL_FLAGS are used during a rebuild
664 AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
665 +--
666 +2.29.0
667 +
668
669 diff --git a/net-fs/nfs-utils/files/nfs-utils-musl.patch b/net-fs/nfs-utils/files/nfs-utils-musl.patch
670 deleted file mode 100644
671 index e880072..0000000
672 --- a/net-fs/nfs-utils/files/nfs-utils-musl.patch
673 +++ /dev/null
674 @@ -1,147 +0,0 @@
675 ---- nfs-utils-2.3.1/configure.ac.orig 2018-05-21 11:05:01.939912918 -0700
676 -+++ nfs-utils-2.3.1/configure.ac 2018-05-21 11:05:10.531968707 -0700
677 -@@ -401,7 +401,7 @@
678 - fi
679 -
680 - dnl libdnsidmap specific checks
681 --AC_CHECK_LIB([resolv], [__res_querydomain], , AC_MSG_ERROR(res_querydomain needed))
682 -+AC_CHECK_LIB([resolv], [res_querydomain], , AC_MSG_ERROR(res_querydomain needed))
683 -
684 - AC_ARG_ENABLE([ldap],
685 - [AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:default=detect@:>@])])
686 ---- nfs-utils-2.3.1/support/misc/file.c.orig 2018-05-21 18:15:37.572007979 +0000
687 -+++ nfs-utils-2.3.1/support/misc/file.c 2018-05-21 18:15:43.668047008 +0000
688 -@@ -27,6 +27,7 @@
689 - #include <dirent.h>
690 - #include <stdlib.h>
691 - #include <stdbool.h>
692 -+#include <limits.h> /* PATH_MAX */
693 -
694 - #include "xlog.h"
695 - #include "misc.h"
696 -diff -Naur nfs-utils-2.3.3-orig/support/export/client.c nfs-utils-2.3.3/support/export/client.c
697 ---- nfs-utils-2.3.3-orig/support/export/client.c 2018-09-06 13:09:08.000000000 -0500
698 -+++ nfs-utils-2.3.3/support/export/client.c 2019-04-21 02:48:45.676838188 -0500
699 -@@ -309,7 +309,8 @@
700 - init_addrlist(clp, ai);
701 -
702 - out:
703 -- freeaddrinfo(ai);
704 -+ if (ai != NULL)
705 -+ freeaddrinfo(ai);
706 - return clp;
707 - }
708 -
709 -diff -Naur nfs-utils-2.3.3-orig/tests/nsm_client/nsm_client.c nfs-utils-2.3.3/tests/nsm_client/nsm_client.c
710 ---- nfs-utils-2.3.3-orig/tests/nsm_client/nsm_client.c 2018-09-06 13:09:08.000000000 -0500
711 -+++ nfs-utils-2.3.3/tests/nsm_client/nsm_client.c 2019-04-21 02:35:53.139552780 -0500
712 -@@ -243,7 +243,8 @@
713 - printf("RPC client creation failed\n");
714 - }
715 - out:
716 -- freeaddrinfo(ai);
717 -+ if (ai != NULL)
718 -+ freeaddrinfo(ai);
719 - return client;
720 - }
721 -
722 -diff -Naur nfs-utils-2.3.3-orig/utils/exportfs/exportfs.c nfs-utils-2.3.3/utils/exportfs/exportfs.c
723 ---- nfs-utils-2.3.3-orig/utils/exportfs/exportfs.c 2018-09-06 13:09:08.000000000 -0500
724 -+++ nfs-utils-2.3.3/utils/exportfs/exportfs.c 2019-04-21 02:40:07.432327005 -0500
725 -@@ -282,7 +282,8 @@
726 - validate_export(exp);
727 -
728 - out:
729 -- freeaddrinfo(ai);
730 -+ if (ai != NULL)
731 -+ freeaddrinfo(ai);
732 - }
733 -
734 - static int exportfs_generic(char *arg, char *options, int verbose)
735 -@@ -395,7 +396,8 @@
736 - if (!success)
737 - xlog(L_ERROR, "Could not find '%s:%s' to unexport.", hname, path);
738 -
739 -- freeaddrinfo(ai);
740 -+ if (ai != NULL)
741 -+ freeaddrinfo(ai);
742 - }
743 -
744 - static int unexportfs_generic(char *arg, int verbose)
745 -@@ -639,8 +641,10 @@
746 - }
747 -
748 - out:
749 -- freeaddrinfo(results1);
750 -- freeaddrinfo(results2);
751 -+ if (results1 != NULL)
752 -+ freeaddrinfo(results1);
753 -+ if (results2 != NULL)
754 -+ freeaddrinfo(results2);
755 - return result;
756 - }
757 -
758 -diff -Naur nfs-utils-2.3.3-orig/utils/mount/stropts.c nfs-utils-2.3.3/utils/mount/stropts.c
759 ---- nfs-utils-2.3.3-orig/utils/mount/stropts.c 2018-09-06 13:09:08.000000000 -0500
760 -+++ nfs-utils-2.3.3/utils/mount/stropts.c 2019-04-21 02:43:18.451874403 -0500
761 -@@ -1263,7 +1263,8 @@
762 - } else
763 - nfs_error(_("%s: internal option parsing error"), progname);
764 -
765 -- freeaddrinfo(mi.address);
766 -+ if (mi.address != NULL)
767 -+ freeaddrinfo(mi.address);
768 - free(mi.hostname);
769 - return retval;
770 - }
771 -diff -Naur nfs-utils-2.3.3-orig/utils/mountd/cache.c nfs-utils-2.3.3/utils/mountd/cache.c
772 ---- nfs-utils-2.3.3-orig/utils/mountd/cache.c 2019-04-21 02:33:43.603417171 -0500
773 -+++ nfs-utils-2.3.3/utils/mountd/cache.c 2019-04-21 02:45:11.289792765 -0500
774 -@@ -834,7 +834,8 @@
775 - out:
776 - if (found_path)
777 - free(found_path);
778 -- freeaddrinfo(ai);
779 -+ if (ai != NULL)
780 -+ freeaddrinfo(ai);
781 - free(dom);
782 - xlog(D_CALL, "nfsd_fh: found %p path %s", found, found ? found->e_path : NULL);
783 - }
784 -@@ -1355,7 +1356,7 @@
785 - xlog(D_CALL, "nfsd_export: found %p path %s", found, path ? path : NULL);
786 - if (dom) free(dom);
787 - if (path) free(path);
788 -- freeaddrinfo(ai);
789 -+ if (ai) freeaddrinfo(ai);
790 - }
791 -
792 -
793 -diff -Naur nfs-utils-2.3.3-orig/utils/mountd/mountd.c nfs-utils-2.3.3/utils/mountd/mountd.c
794 ---- nfs-utils-2.3.3-orig/utils/mountd/mountd.c 2018-09-06 13:09:08.000000000 -0500
795 -+++ nfs-utils-2.3.3/utils/mountd/mountd.c 2019-04-21 02:45:41.796526387 -0500
796 -@@ -581,7 +581,8 @@
797 - freeaddrinfo(ai);
798 - continue;
799 - }
800 -- freeaddrinfo(ai);
801 -+ if (ai != NULL)
802 -+ freeaddrinfo(ai);
803 - }
804 - cp = &(c->gr_next);
805 - }
806 -diff -Naur nfs-utils-2.3.3-orig/utils/statd/hostname.c nfs-utils-2.3.3/utils/statd/hostname.c
807 ---- nfs-utils-2.3.3-orig/utils/statd/hostname.c 2018-09-06 13:09:08.000000000 -0500
808 -+++ nfs-utils-2.3.3/utils/statd/hostname.c 2019-04-21 02:41:39.712446505 -0500
809 -@@ -308,8 +308,10 @@
810 - }
811 -
812 - out:
813 -- freeaddrinfo(results2);
814 -- freeaddrinfo(results1);
815 -+ if (results2 != NULL)
816 -+ freeaddrinfo(results2);
817 -+ if (results1 != NULL)
818 -+ freeaddrinfo(results1);
819 -
820 - xlog(D_CALL, "%s: hostnames %s and %s %s", __func__,
821 - hostname1, hostname2,
822
823 diff --git a/net-fs/nfs-utils/files/nfs-utils.conf b/net-fs/nfs-utils/files/nfs-utils.conf
824 deleted file mode 100644
825 index b9b586c..0000000
826 --- a/net-fs/nfs-utils/files/nfs-utils.conf
827 +++ /dev/null
828 @@ -1,3 +0,0 @@
829 -d /var/lib/nfs/rpc_pipefs
830 -d /var/lib/nfs/v4recovery
831 -d /var/lib/nfs/v4root
832
833 diff --git a/net-fs/nfs-utils/files/nfs.initd b/net-fs/nfs-utils/files/nfs.initd
834 index 4b572fc..9b4f8a4 100644
835 --- a/net-fs/nfs-utils/files/nfs.initd
836 +++ b/net-fs/nfs-utils/files/nfs.initd
837 @@ -1,13 +1,9 @@
838 #!/sbin/openrc-run
839 -# Copyright 1999-2014 Gentoo Foundation
840 +# Copyright 1999-2021 Gentoo Authors
841 # Distributed under the terms of the GNU General Public License v2
842
843 extra_started_commands="reload"
844
845 -# This variable is used for controlling whether or not to run exportfs -ua;
846 -# see stop() for more information
847 -restarting=no
848 -
849 # The binary locations
850 exportfs=/usr/sbin/exportfs
851 mountd=/usr/sbin/rpc.mountd
852 @@ -88,7 +84,7 @@ start() {
853 # Exportfs likes to hang if networking isn't working.
854 # If that's the case, then try to kill it so the
855 # bootup process can continue.
856 - if grep -qs '^[[:space:]]*/' /etc/exports /etc/exports.d/*.exports ; then
857 + if grep -qs '^[[:space:]]*"\?/' /etc/exports /etc/exports.d/*.exports ; then
858 ebegin "Exporting NFS directories"
859 ${exportfs} -r &
860 waitfor_exportfs $!
861 @@ -131,7 +127,7 @@ stop() {
862 # then "exportfs -r" will reread the xtab, and all the current
863 # clients will be able to resume NFS activity, *without* needing
864 # to umount/(re)mount the filesystem.
865 - if [ "${restarting}" = no -o "${RC_CMD}" = "restart" ] ; then
866 + if [ "${RC_CMD}" != "restart" ] ; then
867 ebegin "Unexporting NFS directories"
868 # Exportfs likes to hang if networking isn't working.
869 # If that's the case, then try to kill it so the
870 @@ -155,8 +151,6 @@ reload() {
871 }
872
873 restart() {
874 - # See long comment in stop() regarding "restarting" and exportfs -ua
875 - restarting=yes
876 svc_stop
877 svc_start
878 }
879
880 diff --git a/net-fs/nfs-utils/files/nfsmount.confd b/net-fs/nfs-utils/files/nfsmount.confd
881 deleted file mode 100644
882 index 4183536..0000000
883 --- a/net-fs/nfs-utils/files/nfsmount.confd
884 +++ /dev/null
885 @@ -1,7 +0,0 @@
886 -# You will need to set the dependencies in the nfsmount script to match
887 -# the network configuration tools you are using. This should be done in
888 -# this file by following the examples below, and not by changing the
889 -# service script itself. See /etc/conf.d/netmount for more examples.
890 -#
891 -# This is a safe default.
892 -rc_after="net"
893
894 diff --git a/net-fs/nfs-utils/files/nfsmount.initd b/net-fs/nfs-utils/files/nfsmount.initd
895 deleted file mode 100644
896 index 12c7d78..0000000
897 --- a/net-fs/nfs-utils/files/nfsmount.initd
898 +++ /dev/null
899 @@ -1,47 +0,0 @@
900 -#!/sbin/openrc-run
901 -# Copyright 1999-2013 Gentoo Foundation
902 -# Distributed under the terms of the GNU General Public License v2
903 -
904 -[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
905 -
906 -depend() {
907 - local myneed=""
908 - if [ -e /etc/fstab ] ; then
909 - myneed="${myneed} $(
910 - awk '!/^[[:space:]]*#/ && ($3 == "nfs" || $3 == "nfs4") {
911 - if ($3 == "nfs4")
912 - idmapd = "rpc.idmapd"
913 - if ($4 ~ /sec=(krb|spkm)/)
914 - gssd = "rpc.gssd"
915 - }
916 - END { print idmapd " " gssd }
917 - ' /etc/fstab
918 - )"
919 - fi
920 - config /etc/fstab
921 - need portmap rpc.statd ${myneed}
922 - use ypbind dns rpc.idmapd rpc.gssd
923 -}
924 -
925 -start() {
926 - if [ -x /usr/sbin/sm-notify ] ; then
927 - ebegin "Starting NFS sm-notify"
928 - /usr/sbin/sm-notify ${OPTS_SMNOTIFY}
929 - eend $?
930 - fi
931 -
932 - # Make sure nfs support is loaded in the kernel #64709
933 - if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then
934 - modprobe -q nfs
935 - fi
936 -
937 - ebegin "Mounting NFS filesystems"
938 - mount -a -t nfs,nfs4
939 - eend $?
940 -}
941 -
942 -stop() {
943 - ebegin "Unmounting NFS filesystems"
944 - umount -a -t nfs,nfs4
945 - eend $?
946 -}
947
948 diff --git a/net-fs/nfs-utils/metadata.xml b/net-fs/nfs-utils/metadata.xml
949 index 45351e4..159356c 100644
950 --- a/net-fs/nfs-utils/metadata.xml
951 +++ b/net-fs/nfs-utils/metadata.xml
952 @@ -5,7 +5,6 @@
953 <email>base-system@g.o</email>
954 <name>Gentoo Base System</name>
955 </maintainer>
956 - <longdescription>NFS client and server daemons</longdescription>
957 <use>
958 <flag name="junction">Enable NFS junction support in nfsref</flag>
959 <flag name="ldap">Add ldap support</flag>
960
961 diff --git a/net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild b/net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild
962 deleted file mode 100644
963 index 7f48d44..0000000
964 --- a/net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild
965 +++ /dev/null
966 @@ -1,182 +0,0 @@
967 -# Copyright 1999-2018 Gentoo Foundation
968 -# Distributed under the terms of the GNU General Public License v2
969 -
970 -EAPI="5"
971 -
972 -inherit eutils flag-o-matic multilib autotools systemd
973 -
974 -DESCRIPTION="NFS client and server daemons"
975 -HOMEPAGE="http://linux-nfs.org/"
976 -SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
977 -
978 -LICENSE="GPL-2"
979 -SLOT="0"
980 -KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
981 -IUSE="caps ipv6 kerberos +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
982 -REQUIRED_USE="kerberos? ( nfsv4 )"
983 -RESTRICT="test" #315573
984 -
985 -# kth-krb doesn't provide the right include
986 -# files, and nfs-utils doesn't build against heimdal either,
987 -# so don't depend on virtual/krb.
988 -# (04 Feb 2005 agriffis)
989 -DEPEND_COMMON="tcpd? ( sys-apps/tcp-wrappers )
990 - caps? ( sys-libs/libcap )
991 - sys-libs/e2fsprogs-libs
992 - >=net-nds/rpcbind-0.2.4
993 - net-libs/libtirpc:=
994 - libmount? ( sys-apps/util-linux )
995 - nfsdcld? ( >=dev-db/sqlite-3.3 )
996 - nfsv4? (
997 - dev-libs/libevent:=
998 - >=net-libs/libnfsidmap-0.21-r1
999 - kerberos? (
1000 - >=net-libs/libtirpc-0.2.4-r1[kerberos]
1001 - app-crypt/mit-krb5
1002 - )
1003 - nfsidmap? (
1004 - >=net-libs/libnfsidmap-0.24
1005 - >=sys-apps/keyutils-1.5.9
1006 - )
1007 - )
1008 - nfsv41? (
1009 - sys-fs/lvm2
1010 - )
1011 - uuid? ( sys-apps/util-linux )"
1012 -RDEPEND="${DEPEND_COMMON}
1013 - !net-nds/portmap
1014 - !<sys-apps/openrc-0.13.9
1015 - selinux? (
1016 - sec-policy/selinux-rpc
1017 - sec-policy/selinux-rpcbind
1018 - )
1019 -"
1020 -DEPEND="${DEPEND_COMMON}
1021 - virtual/pkgconfig"
1022 -
1023 -PATCHES=(
1024 - "${FILESDIR}"/${PN}-musl.patch
1025 -)
1026 -
1027 -src_prepare() {
1028 - epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
1029 - epatch "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
1030 -
1031 - sed \
1032 - -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
1033 - -i utils/*/Makefile.am || die
1034 -
1035 - epatch_user
1036 - eautoreconf
1037 -}
1038 -
1039 -src_configure() {
1040 - export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
1041 - export ac_cv_header_keyutils_h=$(usex nfsidmap)
1042 - econf \
1043 - --with-statedir="${EPREFIX}"/var/lib/nfs \
1044 - --enable-tirpc \
1045 - --with-tirpcinclude="${EPREFIX}"/usr/include/tirpc/ \
1046 - $(use_enable libmount libmount-mount) \
1047 - $(use_with tcpd tcp-wrappers) \
1048 - $(use_enable nfsdcld nfsdcltrack) \
1049 - $(use_enable nfsv4) \
1050 - $(use_enable nfsv41) \
1051 - $(use_enable ipv6) \
1052 - $(use_enable caps) \
1053 - $(use_enable uuid) \
1054 - $(use_enable kerberos gss) \
1055 - $(use_enable kerberos svcgss) \
1056 - --without-gssglue
1057 -}
1058 -
1059 -src_compile(){
1060 - # remove compiled files bundled in the tarball
1061 - emake clean
1062 - default
1063 -}
1064 -
1065 -src_install() {
1066 - default
1067 - rm linux-nfs/Makefile* || die
1068 - dodoc -r linux-nfs README
1069 -
1070 - # Don't overwrite existing xtab/etab, install the original
1071 - # versions somewhere safe... more info in pkg_postinst
1072 - keepdir /var/lib/nfs/{,sm,sm.bak}
1073 - mv "${ED}"/var/lib "${ED}"/usr/$(get_libdir) || die
1074 -
1075 - # Install some client-side binaries in /sbin
1076 - dodir /sbin
1077 - mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die
1078 -
1079 - if use nfsv4 && use nfsidmap ; then
1080 - # Install a config file for idmappers in newer kernels. #415625
1081 - insinto /etc/request-key.d
1082 - echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
1083 - doins id_resolver.conf
1084 - fi
1085 -
1086 - insinto /etc
1087 - doins "${FILESDIR}"/exports
1088 - keepdir /etc/exports.d
1089 -
1090 - local f list=() opt_need=""
1091 - if use nfsv4 ; then
1092 - opt_need="rpc.idmapd"
1093 - list+=( rpc.idmapd rpc.pipefs )
1094 - use kerberos && list+=( rpc.gssd rpc.svcgssd )
1095 - fi
1096 - for f in nfs nfsclient rpc.statd "${list[@]}" ; do
1097 - newinitd "${FILESDIR}"/${f}.initd ${f}
1098 - done
1099 - newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
1100 - for f in nfs nfsclient ; do
1101 - newconfd "${FILESDIR}"/${f}.confd ${f}
1102 - done
1103 - sed -i \
1104 - -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
1105 - "${ED}"/etc/conf.d/nfs || die #234132
1106 -
1107 - systemd_dounit systemd/*.{mount,service,target}
1108 - if ! use nfsv4 || ! use kerberos ; then
1109 - rm "${D}$(systemd_get_unitdir)"/rpc-{gssd,svcgssd}.service || die
1110 - fi
1111 - if ! use nfsv41 ; then
1112 - rm "${D}$(systemd_get_unitdir)"/nfs-blkmap.* || die
1113 - fi
1114 - rm "${D}$(systemd_get_unitdir)"/nfs-config.service || die
1115 - sed -i -r \
1116 - -e "/^EnvironmentFile=/s:=.*:=${EPREFIX}/etc/conf.d/nfs:" \
1117 - -e '/^(After|Wants)=nfs-config.service$/d' \
1118 - -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
1119 - "${D}$(systemd_get_unitdir)"/* || die
1120 -
1121 - keepdir /var/lib/nfs #368505
1122 - keepdir /var/lib/nfs/v4recovery #603628
1123 -}
1124 -
1125 -pkg_postinst() {
1126 - # Install default xtab and friends if there's none existing. In
1127 - # src_install we put them in /usr/lib/nfs for safe-keeping, but
1128 - # the daemons actually use the files in /var/lib/nfs. #30486
1129 - local f
1130 - for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do
1131 - [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue
1132 - einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
1133 - cp -pPR "${f}" "${EROOT}"/var/lib/nfs/
1134 - done
1135 -
1136 - if systemd_is_booted; then
1137 - if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then
1138 - ewarn "We have switched to upstream systemd unit files. Since"
1139 - ewarn "they got renamed, you should probably enable the new ones."
1140 - ewarn "You can run 'equery files nfs-utils | grep systemd'"
1141 - ewarn "to know what services you need to enable now."
1142 - fi
1143 - else
1144 - ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
1145 - ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
1146 - ewarn "same runlevel as nfsmount."
1147 - fi
1148 -}
1149
1150 diff --git a/net-fs/nfs-utils/nfs-utils-2.3.1-r3.ebuild b/net-fs/nfs-utils/nfs-utils-2.3.1-r3.ebuild
1151 deleted file mode 100644
1152 index 432515c..0000000
1153 --- a/net-fs/nfs-utils/nfs-utils-2.3.1-r3.ebuild
1154 +++ /dev/null
1155 @@ -1,187 +0,0 @@
1156 -# Copyright 1999-2018 Gentoo Foundation
1157 -# Distributed under the terms of the GNU General Public License v2
1158 -
1159 -EAPI=6
1160 -
1161 -inherit autotools flag-o-matic multilib systemd
1162 -
1163 -DESCRIPTION="NFS client and server daemons"
1164 -HOMEPAGE="http://linux-nfs.org/"
1165 -
1166 -if [[ "${PV}" = *_rc* ]] ; then
1167 - inherit versionator
1168 - MY_PV="$(replace_all_version_separators -)"
1169 - 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"
1170 - S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
1171 -else
1172 - SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
1173 - KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
1174 -fi
1175 -
1176 -LICENSE="GPL-2"
1177 -SLOT="0"
1178 -IUSE="caps ipv6 kerberos ldap +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
1179 -REQUIRED_USE="kerberos? ( nfsv4 )"
1180 -RESTRICT="test" #315573
1181 -
1182 -# kth-krb doesn't provide the right include
1183 -# files, and nfs-utils doesn't build against heimdal either,
1184 -# so don't depend on virtual/krb.
1185 -# (04 Feb 2005 agriffis)
1186 -DEPEND_COMMON="
1187 - net-libs/libtirpc:=
1188 - >=net-nds/rpcbind-0.2.4
1189 - sys-libs/e2fsprogs-libs
1190 - caps? ( sys-libs/libcap )
1191 - ldap? ( net-nds/openldap )
1192 - libmount? ( sys-apps/util-linux )
1193 - nfsdcld? ( >=dev-db/sqlite-3.3 )
1194 - nfsv4? (
1195 - dev-libs/libevent:=
1196 - >=sys-apps/keyutils-1.5.9
1197 - kerberos? (
1198 - >=net-libs/libtirpc-0.2.4-r1[kerberos]
1199 - app-crypt/mit-krb5
1200 - )
1201 - )
1202 - nfsv41? (
1203 - sys-fs/lvm2
1204 - )
1205 - tcpd? ( sys-apps/tcp-wrappers )
1206 - uuid? ( sys-apps/util-linux )"
1207 -RDEPEND="${DEPEND_COMMON}
1208 - !net-libs/libnfsidmap
1209 - !net-nds/portmap
1210 - !<sys-apps/openrc-0.13.9
1211 - selinux? (
1212 - sec-policy/selinux-rpc
1213 - sec-policy/selinux-rpcbind
1214 - )
1215 -"
1216 -DEPEND="${DEPEND_COMMON}
1217 - virtual/pkgconfig"
1218 -
1219 -PATCHES=(
1220 - "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
1221 - "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
1222 - "${FILESDIR}"/${P}-svcgssd_undefined_reference.patch #641912
1223 - "${FILESDIR}"/${PN}-musl.patch
1224 -)
1225 -
1226 -src_prepare() {
1227 - default
1228 -
1229 - sed \
1230 - -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
1231 - -i utils/*/Makefile.am || die
1232 -
1233 - eautoreconf
1234 -}
1235 -
1236 -src_configure() {
1237 - export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
1238 - export ac_cv_header_keyutils_h=$(usex nfsidmap)
1239 - local myeconfargs=(
1240 - --with-statedir="${EPREFIX%/}"/var/lib/nfs
1241 - --enable-tirpc
1242 - --with-tirpcinclude="${EPREFIX%/}"/usr/include/tirpc/
1243 - --with-pluginpath="${EPREFIX%/}"/usr/$(get_libdir)/libnfsidmap
1244 - --with-systemd="$(systemd_get_systemunitdir)"
1245 - --without-gssglue
1246 - $(use_enable caps)
1247 - $(use_enable ipv6)
1248 - $(use_enable kerberos gss)
1249 - $(use_enable kerberos svcgss)
1250 - $(use_enable ldap)
1251 - $(use_enable libmount libmount-mount)
1252 - $(use_enable nfsdcld nfsdcltrack)
1253 - $(use_enable nfsv4)
1254 - $(use_enable nfsv41)
1255 - $(use_enable uuid)
1256 - $(use_with tcpd tcp-wrappers)
1257 - )
1258 - econf "${myeconfargs[@]}"
1259 -}
1260 -
1261 -src_compile(){
1262 - # remove compiled files bundled in the tarball
1263 - emake clean
1264 - default
1265 -}
1266 -
1267 -src_install() {
1268 - default
1269 - rm linux-nfs/Makefile* || die
1270 - dodoc -r linux-nfs README
1271 -
1272 - # Don't overwrite existing xtab/etab, install the original
1273 - # versions somewhere safe... more info in pkg_postinst
1274 - keepdir /var/lib/nfs/{,sm,sm.bak}
1275 - mv "${ED%/}"/var/lib/nfs "${ED%/}"/usr/$(get_libdir)/ || die
1276 -
1277 - # Install some client-side binaries in /sbin
1278 - dodir /sbin
1279 - mv "${ED%/}"/usr/sbin/rpc.statd "${ED%/}"/sbin/ || die
1280 -
1281 - if use nfsv4 && use nfsidmap ; then
1282 - # Install a config file for idmappers in newer kernels. #415625
1283 - insinto /etc/request-key.d
1284 - echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
1285 - doins id_resolver.conf
1286 - fi
1287 -
1288 - insinto /etc
1289 - doins "${FILESDIR}"/exports
1290 - keepdir /etc/exports.d
1291 -
1292 - local f list=() opt_need=""
1293 - if use nfsv4 ; then
1294 - opt_need="rpc.idmapd"
1295 - list+=( rpc.idmapd rpc.pipefs )
1296 - use kerberos && list+=( rpc.gssd rpc.svcgssd )
1297 - fi
1298 - for f in nfs nfsclient rpc.statd "${list[@]}" ; do
1299 - newinitd "${FILESDIR}"/${f}.initd ${f}
1300 - done
1301 - newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
1302 - for f in nfs nfsclient ; do
1303 - newconfd "${FILESDIR}"/${f}.confd ${f}
1304 - done
1305 - sed -i \
1306 - -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
1307 - "${ED%/}"/etc/conf.d/nfs || die #234132
1308 -
1309 - local systemd_systemunitdir="$(systemd_get_systemunitdir)"
1310 - sed -i \
1311 - -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
1312 - "${ED%/}${systemd_systemunitdir}"/* || die
1313 -
1314 - keepdir /var/lib/nfs #368505
1315 - keepdir /var/lib/nfs/v4recovery #603628
1316 -
1317 -}
1318 -
1319 -pkg_postinst() {
1320 - # Install default xtab and friends if there's none existing. In
1321 - # src_install we put them in /usr/lib/nfs for safe-keeping, but
1322 - # the daemons actually use the files in /var/lib/nfs. #30486
1323 - local f
1324 - for f in "${EROOT%/}"/usr/$(get_libdir)/nfs/*; do
1325 - [[ -e ${EROOT%/}/var/lib/nfs/${f##*/} ]] && continue
1326 - einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
1327 - cp -pPR "${f}" "${EROOT%/}"/var/lib/nfs/
1328 - done
1329 -
1330 - if systemd_is_booted; then
1331 - if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then
1332 - ewarn "We have switched to upstream systemd unit files. Since"
1333 - ewarn "they got renamed, you should probably enable the new ones."
1334 - ewarn "You can run 'equery files nfs-utils | grep systemd'"
1335 - ewarn "to know what services you need to enable now."
1336 - fi
1337 - else
1338 - ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
1339 - ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
1340 - ewarn "same runlevel as nfsmount."
1341 - fi
1342 -}
1343
1344 diff --git a/net-fs/nfs-utils/nfs-utils-2.3.3.ebuild b/net-fs/nfs-utils/nfs-utils-2.5.3-r1.ebuild
1345 similarity index 65%
1346 rename from net-fs/nfs-utils/nfs-utils-2.3.3.ebuild
1347 rename to net-fs/nfs-utils/nfs-utils-2.5.3-r1.ebuild
1348 index 82f23c9..60ec533 100644
1349 --- a/net-fs/nfs-utils/nfs-utils-2.3.3.ebuild
1350 +++ b/net-fs/nfs-utils/nfs-utils-2.5.3-r1.ebuild
1351 @@ -1,21 +1,20 @@
1352 -# Copyright 1999-2019 Gentoo Authors
1353 +# Copyright 1999-2021 Gentoo Authors
1354 # Distributed under the terms of the GNU General Public License v2
1355
1356 -EAPI=6
1357 +EAPI=7
1358
1359 -inherit autotools flag-o-matic multilib systemd
1360 +inherit autotools linux-info systemd
1361
1362 DESCRIPTION="NFS client and server daemons"
1363 HOMEPAGE="http://linux-nfs.org/"
1364
1365 if [[ "${PV}" = *_rc* ]] ; then
1366 - inherit versionator
1367 - MY_PV="$(replace_all_version_separators -)"
1368 + MY_PV="$(ver_rs 1- -)"
1369 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"
1370 S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
1371 else
1372 SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
1373 - KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
1374 + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
1375 fi
1376
1377 LICENSE="GPL-2"
1378 @@ -28,17 +27,18 @@ RESTRICT="test" #315573
1379 # files, and nfs-utils doesn't build against heimdal either,
1380 # so don't depend on virtual/krb.
1381 # (04 Feb 2005 agriffis)
1382 -DEPEND_COMMON="
1383 +DEPEND="
1384 + >=dev-db/sqlite-3.3
1385 + dev-libs/libxml2
1386 net-libs/libtirpc:=
1387 >=net-nds/rpcbind-0.2.4
1388 sys-libs/e2fsprogs-libs
1389 caps? ( sys-libs/libcap )
1390 ldap? ( net-nds/openldap )
1391 libmount? ( sys-apps/util-linux )
1392 - nfsdcld? ( >=dev-db/sqlite-3.3 )
1393 nfsv4? (
1394 dev-libs/libevent:=
1395 - >=sys-apps/keyutils-1.5.9
1396 + >=sys-apps/keyutils-1.5.9:=
1397 kerberos? (
1398 >=net-libs/libtirpc-0.2.4-r1[kerberos]
1399 app-crypt/mit-krb5
1400 @@ -49,7 +49,7 @@ DEPEND_COMMON="
1401 )
1402 tcpd? ( sys-apps/tcp-wrappers )
1403 uuid? ( sys-apps/util-linux )"
1404 -RDEPEND="${DEPEND_COMMON}
1405 +RDEPEND="${DEPEND}
1406 !net-libs/libnfsidmap
1407 !net-nds/portmap
1408 !<sys-apps/openrc-0.13.9
1409 @@ -58,22 +58,35 @@ RDEPEND="${DEPEND_COMMON}
1410 sec-policy/selinux-rpcbind
1411 )
1412 "
1413 -DEPEND="${DEPEND_COMMON}
1414 - dev-libs/libxml2
1415 +BDEPEND="
1416 net-libs/rpcsvc-proto
1417 - virtual/pkgconfig"
1418 + virtual/pkgconfig
1419 +"
1420
1421 PATCHES=(
1422 - "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
1423 - "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
1424 - "${FILESDIR}"/${PN}-2.3.2-junction_libs.patch
1425 - "${FILESDIR}"/${PN}-2.3.2-no-werror.patch
1426 - "${FILESDIR}"/${PN}-musl.patch
1427 + "${FILESDIR}"/${PN}-2.5.2-no-werror.patch
1428 + "${FILESDIR}"/${PN}-2.4.2-Ensure-consistent-struct-stat.patch
1429 )
1430
1431 +pkg_setup() {
1432 + linux-info_pkg_setup
1433 + if use nfsv4 && ! use nfsdcld && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then
1434 + ewarn "Your NFS server will be unable to track clients across server restarts!"
1435 + ewarn "Please enable the \"${HILITE}nfsdcld${NORMAL}\" USE flag to install the nfsdcltrack usermode"
1436 + ewarn "helper upcall program, or enable ${HILITE}CONFIG_CRYPTO_MD5${NORMAL} in your kernel to"
1437 + ewarn "support the legacy, in-kernel client tracker."
1438 + fi
1439 +}
1440 +
1441 src_prepare() {
1442 default
1443
1444 + if use elibc_musl; then
1445 + eapply "${FILESDIR}/musl-time64.patch"
1446 + eapply "${FILESDIR}/musl-getservbyport.patch"
1447 + eapply "${FILESDIR}/musl-svcgssd-sysconf.patch"
1448 + fi
1449 +
1450 sed \
1451 -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
1452 -i utils/*/Makefile.am || die
1453 @@ -85,10 +98,11 @@ src_configure() {
1454 export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
1455 export ac_cv_header_keyutils_h=$(usex nfsidmap)
1456 local myeconfargs=(
1457 - --with-statedir="${EPREFIX%/}"/var/lib/nfs
1458 + --disable-static
1459 + --with-statedir="${EPREFIX}"/var/lib/nfs
1460 --enable-tirpc
1461 - --with-tirpcinclude="${EPREFIX%/}"/usr/include/tirpc/
1462 - --with-pluginpath="${EPREFIX%/}"/usr/$(get_libdir)/libnfsidmap
1463 + --with-tirpcinclude="${ESYSROOT}"/usr/include/tirpc/
1464 + --with-pluginpath="${EPREFIX}"/usr/$(get_libdir)/libnfsidmap
1465 --with-rpcgen
1466 --with-systemd="$(systemd_get_systemunitdir)"
1467 --without-gssglue
1468 @@ -108,7 +122,7 @@ src_configure() {
1469 econf "${myeconfargs[@]}"
1470 }
1471
1472 -src_compile(){
1473 +src_compile() {
1474 # remove compiled files bundled in the tarball
1475 emake clean
1476 default
1477 @@ -122,13 +136,16 @@ src_install() {
1478 # Don't overwrite existing xtab/etab, install the original
1479 # versions somewhere safe... more info in pkg_postinst
1480 keepdir /var/lib/nfs/{,sm,sm.bak}
1481 - mv "${ED%/}"/var/lib/nfs "${ED%/}"/usr/$(get_libdir)/ || die
1482 + mv "${ED}"/var/lib/nfs "${ED}"/usr/$(get_libdir)/ || die
1483
1484 # Install some client-side binaries in /sbin
1485 dodir /sbin
1486 - mv "${ED%/}"/usr/sbin/rpc.statd "${ED%/}"/sbin/ || die
1487 + mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die
1488
1489 if use nfsv4 && use nfsidmap ; then
1490 + insinto /etc
1491 + doins support/nfsidmap/idmapd.conf
1492 +
1493 # Install a config file for idmappers in newer kernels. #415625
1494 insinto /etc/request-key.d
1495 echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
1496 @@ -154,16 +171,18 @@ src_install() {
1497 done
1498 sed -i \
1499 -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
1500 - "${ED%/}"/etc/conf.d/nfs || die #234132
1501 + "${ED}"/etc/conf.d/nfs || die #234132
1502
1503 local systemd_systemunitdir="$(systemd_get_systemunitdir)"
1504 sed -i \
1505 -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
1506 - "${ED%/}${systemd_systemunitdir}"/* || die
1507 + "${ED}${systemd_systemunitdir}"/* || die
1508
1509 keepdir /var/lib/nfs #368505
1510 keepdir /var/lib/nfs/v4recovery #603628
1511
1512 + # no static archives
1513 + find "${ED}" -name '*.la' -delete || die
1514 }
1515
1516 pkg_postinst() {
1517 @@ -171,19 +190,21 @@ pkg_postinst() {
1518 # src_install we put them in /usr/lib/nfs for safe-keeping, but
1519 # the daemons actually use the files in /var/lib/nfs. #30486
1520 local f
1521 - for f in "${EROOT%/}"/usr/$(get_libdir)/nfs/*; do
1522 - [[ -e ${EROOT%/}/var/lib/nfs/${f##*/} ]] && continue
1523 + for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do
1524 + [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue
1525 einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
1526 - cp -pPR "${f}" "${EROOT%/}"/var/lib/nfs/
1527 + cp -pPR "${f}" "${EROOT}"/var/lib/nfs/
1528 done
1529
1530 if systemd_is_booted; then
1531 - if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then
1532 - ewarn "We have switched to upstream systemd unit files. Since"
1533 - ewarn "they got renamed, you should probably enable the new ones."
1534 - ewarn "You can run 'equery files nfs-utils | grep systemd'"
1535 - ewarn "to know what services you need to enable now."
1536 - fi
1537 + for v in ${REPLACING_VERSIONS}; do
1538 + if ver_test "${v}" -lt 1.3.0; then
1539 + ewarn "We have switched to upstream systemd unit files. Since"
1540 + ewarn "they got renamed, you should probably enable the new ones."
1541 + ewarn "You can run 'equery files nfs-utils | grep systemd'"
1542 + ewarn "to know what services you need to enable now."
1543 + fi
1544 + done
1545 else
1546 ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
1547 ewarn "If you were using nfsmount, please add nfsclient and netmount to the"