summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-08-17 09:24:37 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-21 22:51:41 +0100
commit0081575ff9b3627c6d2fdee4bf88ea6cb87feb09 (patch)
tree579c11bf36ab9bc52d0e33da6704c48d7ca19754 /meta/recipes-connectivity
parent7bde98700f8fc559886f833988de64492493eabb (diff)
downloadpoky-0081575ff9b3627c6d2fdee4bf88ea6cb87feb09.tar.gz
nfs-utils: Upgrade to 2.6.2
Fix build with clang Package new rpcctl utility into a new package (From OE-Core rev: eab13974ff1b271f25caaf5df32887f017645229) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0005-mountd-Check-for-return-of-stat-function.patch34
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0006-Fix-function-prototypes.patch93
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.2.bb (renamed from meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.1.bb)11
3 files changed, 135 insertions, 3 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-mountd-Check-for-return-of-stat-function.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-mountd-Check-for-return-of-stat-function.patch
new file mode 100644
index 0000000000..13a21e5307
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-mountd-Check-for-return-of-stat-function.patch
@@ -0,0 +1,34 @@
1From 887ecc7837962e9be77a4fea7d9122648f73a84a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 15 Aug 2022 14:47:53 -0700
4Subject: [PATCH] mountd: Check for return of stat function
5
6simplify the check, stat() return 0 on success -1 on failure
7
8Fixes clang reported errors e.g.
9
10| v4clients.c:29:6: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
11| if (!stat("/proc/fs/nfsd/clients", &sb) == 0 ||
12| ^ ~~
13
14Upstream-Status: Submitted [https://patchwork.kernel.org/project/linux-nfs/patch/20220816024403.2694169-1-raj.khem@gmail.com/]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16Cc: Konstantin Khorenko <khorenko@virtuozzo.com>
17Cc: Steve Dickson <steved@redhat.com>
18---
19 support/export/v4clients.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/support/export/v4clients.c b/support/export/v4clients.c
23index 5f15b61..3230251 100644
24--- a/support/export/v4clients.c
25+++ b/support/export/v4clients.c
26@@ -26,7 +26,7 @@ void v4clients_init(void)
27 {
28 struct stat sb;
29
30- if (!stat("/proc/fs/nfsd/clients", &sb) == 0 ||
31+ if (stat("/proc/fs/nfsd/clients", &sb) != 0 ||
32 !S_ISDIR(sb.st_mode))
33 return;
34 if (clients_fd >= 0)
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0006-Fix-function-prototypes.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0006-Fix-function-prototypes.patch
new file mode 100644
index 0000000000..793bc4651c
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0006-Fix-function-prototypes.patch
@@ -0,0 +1,93 @@
1From cf0ffbb5c8fa167376926d12a63613f15aa7602f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 15 Aug 2022 14:50:15 -0700
4Subject: [PATCH] Fix function prototypes
5
6Clang is now erroring out on functions with out parameter types
7
8Fixes errors like
9error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
10
11Upstream-Status: Submitted [https://patchwork.kernel.org/project/linux-nfs/patch/20220816024403.2694169-2-raj.khem@gmail.com/]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 support/export/auth.c | 2 +-
15 support/export/v4root.c | 2 +-
16 support/export/xtab.c | 2 +-
17 utils/exportfs/exportfs.c | 4 ++--
18 utils/mount/network.c | 2 +-
19 5 files changed, 6 insertions(+), 6 deletions(-)
20
21diff --git a/support/export/auth.c b/support/export/auth.c
22index 03ce4b8..2d7960f 100644
23--- a/support/export/auth.c
24+++ b/support/export/auth.c
25@@ -82,7 +82,7 @@ check_useipaddr(void)
26 }
27
28 unsigned int
29-auth_reload()
30+auth_reload(void)
31 {
32 struct stat stb;
33 static ino_t last_inode;
34diff --git a/support/export/v4root.c b/support/export/v4root.c
35index c12a7d8..fbb0ad5 100644
36--- a/support/export/v4root.c
37+++ b/support/export/v4root.c
38@@ -198,7 +198,7 @@ static int v4root_add_parents(nfs_export *exp)
39 * looking for components of the v4 mount.
40 */
41 void
42-v4root_set()
43+v4root_set(void)
44 {
45 nfs_export *exp;
46 int i;
47diff --git a/support/export/xtab.c b/support/export/xtab.c
48index c888a80..e210ca9 100644
49--- a/support/export/xtab.c
50+++ b/support/export/xtab.c
51@@ -135,7 +135,7 @@ xtab_write(char *xtab, char *xtabtmp, char *lockfn, int is_export)
52 }
53
54 int
55-xtab_export_write()
56+xtab_export_write(void)
57 {
58 return xtab_write(etab.statefn, etab.tmpfn, etab.lockfn, 1);
59 }
60diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
61index 6ba615d..0897b22 100644
62--- a/utils/exportfs/exportfs.c
63+++ b/utils/exportfs/exportfs.c
64@@ -69,14 +69,14 @@ static int _lockfd = -1;
65 * need these additional lockfile() routines.
66 */
67 static void
68-grab_lockfile()
69+grab_lockfile(void)
70 {
71 _lockfd = open(lockfile, O_CREAT|O_RDWR, 0666);
72 if (_lockfd != -1)
73 lockf(_lockfd, F_LOCK, 0);
74 }
75 static void
76-release_lockfile()
77+release_lockfile(void)
78 {
79 if (_lockfd != -1) {
80 lockf(_lockfd, F_ULOCK, 0);
81diff --git a/utils/mount/network.c b/utils/mount/network.c
82index ed2f825..01ead49 100644
83--- a/utils/mount/network.c
84+++ b/utils/mount/network.c
85@@ -179,7 +179,7 @@ static const unsigned long probe_mnt3_only[] = {
86
87 static const unsigned int *nfs_default_proto(void);
88 #ifdef MOUNT_CONFIG
89-static const unsigned int *nfs_default_proto()
90+static const unsigned int *nfs_default_proto(void)
91 {
92 extern unsigned long config_default_proto;
93 /*
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.2.bb
index bbed5aea59..4b5c28c27b 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.1.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.6.2.bb
@@ -30,8 +30,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
30 file://bugfix-adjust-statd-service-name.patch \ 30 file://bugfix-adjust-statd-service-name.patch \
31 file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ 31 file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \
32 file://clang-warnings.patch \ 32 file://clang-warnings.patch \
33 file://0005-mountd-Check-for-return-of-stat-function.patch \
34 file://0006-Fix-function-prototypes.patch \
33 " 35 "
34SRC_URI[sha256sum] = "60dfcd94a9f3d72a12bc7058d811787ec87a6d593d70da2123faf9aad3d7a1df" 36SRC_URI[sha256sum] = "5200873e81c4d610e2462fc262fe18135f2dbe78b7979f95accd159ae64d5011"
35 37
36# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will 38# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
37# pull in the remainder of the dependencies. 39# pull in the remainder of the dependencies.
@@ -70,7 +72,7 @@ PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmap
70# keyutils is available in meta-oe 72# keyutils is available in meta-oe
71PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils,python3-core" 73PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils,python3-core"
72 74
73PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats" 75PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats ${PN}-rpcctl"
74 76
75CONFFILES:${PN}-client += "${localstatedir}/lib/nfs/etab \ 77CONFFILES:${PN}-client += "${localstatedir}/lib/nfs/etab \
76 ${localstatedir}/lib/nfs/rmtab \ 78 ${localstatedir}/lib/nfs/rmtab \
@@ -93,9 +95,12 @@ FILES:${PN}-mount = "${base_sbindir}/*mount.nfs*"
93FILES:${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat ${sbindir}/nfsdclnts" 95FILES:${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat ${sbindir}/nfsdclnts"
94RDEPENDS:${PN}-stats = "python3-core" 96RDEPENDS:${PN}-stats = "python3-core"
95 97
98FILES:${PN}-rpcctl = "${sbindir}/rpcctl"
99RDEPENDS:${PN}-rpcctl = "python3-core"
100
96FILES:${PN}-staticdev += "${libdir}/libnfsidmap/*.a" 101FILES:${PN}-staticdev += "${libdir}/libnfsidmap/*.a"
97 102
98FILES:${PN} += "${systemd_unitdir} ${libdir}/libnfsidmap/" 103FILES:${PN} += "${systemd_unitdir} ${libdir}/libnfsidmap/ ${nonarch_libdir}/modprobe.d"
99 104
100do_configure:prepend() { 105do_configure:prepend() {
101 sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ 106 sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \