summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-12-12 18:47:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-28 23:25:42 +0000
commit098b39dc40e71a370ddd73e6f6707e537a012958 (patch)
tree56d15090438b76e7daaa0ba5cf784ce287231754 /meta/recipes-connectivity/nfs-utils
parent669b0f4c55c5bf8f83d203e03115c496dd929ca6 (diff)
downloadpoky-098b39dc40e71a370ddd73e6f6707e537a012958.tar.gz
nfs-utils: update to 2.4.2
Drop backports, and a musl patch that is no longer needed. (From OE-Core rev: 91ab8c4ba830136116e2e9486898e683e32513d8) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch156
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch183
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch46
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.2.bb (renamed from meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb)9
4 files changed, 3 insertions, 391 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch
deleted file mode 100644
index 7b0f93535f..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Fix-include-order-between-config.h-and-stat.h.patch
+++ /dev/null
@@ -1,156 +0,0 @@
1From 2fbc62e2a13fc22b6ae4910e295a2c10fb790486 Mon Sep 17 00:00:00 2001
2From: Zoltan Karcagi <zkr7432@gmail.com>
3Date: Mon, 12 Aug 2019 13:27:16 -0400
4Subject: [PATCH] Fix include order between config.h and stat.h
5
6At least on Arch linux ARM, the definition of struct stat in stat.h depends
7on __USE_FILE_OFFSET64. This symbol comes from config.h when defined,
8therefore config.h must always be included before stat.h. Fix all
9occurrences where the order is wrong by moving config.h to the top.
10
11This fixes the client side error "Stale file handle" when mounting from
12a server running Arch Linux ARM.
13
14Signed-off-by: Zoltan Karcagi <zkr7432@gmail.com>
15Signed-off-by: Steve Dickson <steved@redhat.com>
16
17Upstream-Status: Backport
18[http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=2fbc62e2a13fc22b6ae4910e295a2c10fb790486]
19
20Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
21---
22 support/misc/nfsd_path.c | 5 ++++-
23 support/misc/xstat.c | 5 ++++-
24 support/nfs/conffile.c | 8 +++++++-
25 utils/blkmapd/device-discovery.c | 8 ++++----
26 utils/idmapd/idmapd.c | 8 ++++----
27 5 files changed, 23 insertions(+), 11 deletions(-)
28
29diff --git a/support/misc/nfsd_path.c b/support/misc/nfsd_path.c
30index 84e4802..f078a66 100644
31--- a/support/misc/nfsd_path.c
32+++ b/support/misc/nfsd_path.c
33@@ -1,3 +1,7 @@
34+#ifdef HAVE_CONFIG_H
35+#include <config.h>
36+#endif
37+
38 #include <errno.h>
39 #include <sys/types.h>
40 #include <sys/stat.h>
41@@ -5,7 +9,6 @@
42 #include <stdlib.h>
43 #include <unistd.h>
44
45-#include "config.h"
46 #include "conffile.h"
47 #include "xmalloc.h"
48 #include "xlog.h"
49diff --git a/support/misc/xstat.c b/support/misc/xstat.c
50index fa04788..4c997ee 100644
51--- a/support/misc/xstat.c
52+++ b/support/misc/xstat.c
53@@ -1,3 +1,7 @@
54+#ifdef HAVE_CONFIG_H
55+#include <config.h>
56+#endif
57+
58 #include <errno.h>
59 #include <sys/types.h>
60 #include <fcntl.h>
61@@ -5,7 +9,6 @@
62 #include <sys/sysmacros.h>
63 #include <unistd.h>
64
65-#include "config.h"
66 #include "xstat.h"
67
68 #ifdef HAVE_FSTATAT
69diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
70index b6400be..6ba8a35 100644
71--- a/support/nfs/conffile.c
72+++ b/support/nfs/conffile.c
73@@ -500,7 +500,7 @@ conf_readfile(const char *path)
74
75 if ((stat (path, &sb) == 0) || (errno != ENOENT)) {
76 char *new_conf_addr = NULL;
77- size_t sz = sb.st_size;
78+ off_t sz;
79 int fd = open (path, O_RDONLY, 0);
80
81 if (fd == -1) {
82@@ -517,6 +517,11 @@ conf_readfile(const char *path)
83
84 /* only after we have the lock, check the file size ready to read it */
85 sz = lseek(fd, 0, SEEK_END);
86+ if (sz < 0) {
87+ xlog_warn("conf_readfile: unable to determine file size: %s",
88+ strerror(errno));
89+ goto fail;
90+ }
91 lseek(fd, 0, SEEK_SET);
92
93 new_conf_addr = malloc(sz+1);
94@@ -2162,6 +2167,7 @@ conf_write(const char *filename, const char *section, const char *arg,
95 ret = 0;
96
97 cleanup:
98+ flush_outqueue(&inqueue, NULL);
99 flush_outqueue(&outqueue, NULL);
100
101 if (buff)
102diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c
103index e811703..f5f9b10 100644
104--- a/utils/blkmapd/device-discovery.c
105+++ b/utils/blkmapd/device-discovery.c
106@@ -26,6 +26,10 @@
107 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
108 */
109
110+#ifdef HAVE_CONFIG_H
111+#include "config.h"
112+#endif /* HAVE_CONFIG_H */
113+
114 #include <sys/sysmacros.h>
115 #include <sys/types.h>
116 #include <sys/stat.h>
117@@ -51,10 +55,6 @@
118 #include <errno.h>
119 #include <libdevmapper.h>
120
121-#ifdef HAVE_CONFIG_H
122-#include "config.h"
123-#endif /* HAVE_CONFIG_H */
124-
125 #include "device-discovery.h"
126 #include "xcommon.h"
127 #include "nfslib.h"
128diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
129index 62e37b8..267acea 100644
130--- a/utils/idmapd/idmapd.c
131+++ b/utils/idmapd/idmapd.c
132@@ -34,6 +34,10 @@
133 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
134 */
135
136+#ifdef HAVE_CONFIG_H
137+#include "config.h"
138+#endif /* HAVE_CONFIG_H */
139+
140 #include <sys/types.h>
141 #include <sys/time.h>
142 #include <sys/inotify.h>
143@@ -62,10 +66,6 @@
144 #include <libgen.h>
145 #include <nfsidmap.h>
146
147-#ifdef HAVE_CONFIG_H
148-#include "config.h"
149-#endif /* HAVE_CONFIG_H */
150-
151 #include "xlog.h"
152 #include "conffile.h"
153 #include "queue.h"
154--
1552.7.4
156
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch
deleted file mode 100644
index 1d693e4142..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch
+++ /dev/null
@@ -1,183 +0,0 @@
1Clang comes up with more printf format warnings
2Correcting “format string is not a string literal” warning
3requires us to declare that parameter is a printf style
4format using the attribute flag
5
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10Index: nfs-utils-2.3.3/support/include/xcommon.h
11===================================================================
12--- nfs-utils-2.3.3.orig/support/include/xcommon.h
13+++ nfs-utils-2.3.3/support/include/xcommon.h
14@@ -27,7 +27,7 @@
15
16 /* Functions in sundries.c that are used in mount.c and umount.c */
17 char *canonicalize (const char *path);
18-void nfs_error (const char *fmt, ...);
19+void nfs_error (const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
20 void *xmalloc (size_t size);
21 void *xrealloc(void *p, size_t size);
22 void xfree(void *);
23@@ -36,9 +36,9 @@ char *xstrndup (const char *s, int n);
24 char *xstrconcat2 (const char *, const char *);
25 char *xstrconcat3 (const char *, const char *, const char *);
26 char *xstrconcat4 (const char *, const char *, const char *, const char *);
27-void die (int errcode, const char *fmt, ...);
28+void die (int errcode, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
29
30-extern void die(int err, const char *fmt, ...);
31+extern void die(int err, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
32 extern void (*at_die)(void);
33
34 /* exit status - bits below are ORed */
35Index: nfs-utils-2.3.3/support/include/xlog.h
36===================================================================
37--- nfs-utils-2.3.3.orig/support/include/xlog.h
38+++ nfs-utils-2.3.3/support/include/xlog.h
39@@ -43,10 +43,10 @@ void xlog_config(int fac, int on);
40 void xlog_sconfig(char *, int on);
41 void xlog_from_conffile(char *);
42 int xlog_enabled(int fac);
43-void xlog(int fac, const char *fmt, ...);
44-void xlog_warn(const char *fmt, ...);
45-void xlog_err(const char *fmt, ...);
46-void xlog_errno(int err, const char *fmt, ...);
47-void xlog_backend(int fac, const char *fmt, va_list args);
48+void xlog(int fac, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
49+void xlog_warn(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
50+void xlog_err(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
51+void xlog_errno(int err, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
52+void xlog_backend(int fac, const char *fmt, va_list args) __attribute__((__format__ (__printf__, 2, 0)));
53
54 #endif /* XLOG_H */
55Index: nfs-utils-2.3.3/support/nfs/xcommon.c
56===================================================================
57--- nfs-utils-2.3.3.orig/support/nfs/xcommon.c
58+++ nfs-utils-2.3.3/support/nfs/xcommon.c
59@@ -93,7 +93,10 @@ nfs_error (const char *fmt, ...) {
60
61 fmt2 = xstrconcat2 (fmt, "\n");
62 va_start (args, fmt);
63+#pragma clang diagnostic push
64+#pragma clang diagnostic ignored "-Wformat-nonliteral"
65 vfprintf (stderr, fmt2, args);
66+#pragma clang diagnostic pop
67 va_end (args);
68 free (fmt2);
69 }
70Index: nfs-utils-2.3.3/utils/exportfs/exportfs.c
71===================================================================
72--- nfs-utils-2.3.3.orig/utils/exportfs/exportfs.c
73+++ nfs-utils-2.3.3/utils/exportfs/exportfs.c
74@@ -644,6 +644,7 @@ out:
75 return result;
76 }
77
78+__attribute__((__format__ (__printf__, 2, 3)))
79 static char
80 dumpopt(char c, char *fmt, ...)
81 {
82Index: nfs-utils-2.3.3/utils/statd/statd.c
83===================================================================
84--- nfs-utils-2.3.3.orig/utils/statd/statd.c
85+++ nfs-utils-2.3.3/utils/statd/statd.c
86@@ -136,7 +136,7 @@ static void log_modes(void)
87 strcat(buf, "TI-RPC ");
88 #endif
89
90- xlog_warn(buf);
91+ xlog_warn("%s", buf);
92 }
93
94 /*
95Index: nfs-utils-2.3.3/support/nfs/svc_create.c
96===================================================================
97--- nfs-utils-2.3.3.orig/support/nfs/svc_create.c
98+++ nfs-utils-2.3.3/support/nfs/svc_create.c
99@@ -184,7 +184,7 @@ svc_create_sock(const struct sockaddr *s
100 type = SOCK_STREAM;
101 break;
102 default:
103- xlog(D_GENERAL, "%s: Unrecognized bind address semantics: %u",
104+ xlog(D_GENERAL, "%s: Unrecognized bind address semantics: %lu",
105 __func__, nconf->nc_semantics);
106 return -1;
107 }
108Index: nfs-utils-2.3.3/support/nsm/rpc.c
109===================================================================
110--- nfs-utils-2.3.3.orig/support/nsm/rpc.c
111+++ nfs-utils-2.3.3/support/nsm/rpc.c
112@@ -182,7 +182,7 @@ nsm_xmit_getport(const int sock, const s
113 uint32_t xid;
114 XDR xdr;
115
116- xlog(D_CALL, "Sending PMAP_GETPORT for %u, %u, udp", program, version);
117+ xlog(D_CALL, "Sending PMAP_GETPORT for %lu, %lu, udp", program, version);
118
119 nsm_init_xdrmem(msgbuf, NSM_MAXMSGSIZE, &xdr);
120 xid = nsm_init_rpc_header(PMAPPROG, PMAPVERS,
121Index: nfs-utils-2.3.3/utils/mountd/cache.c
122===================================================================
123--- nfs-utils-2.3.3.orig/utils/mountd/cache.c
124+++ nfs-utils-2.3.3/utils/mountd/cache.c
125@@ -968,8 +968,7 @@ lookup_export(char *dom, char *path, str
126 } else if (found_type == i && found->m_warned == 0) {
127 xlog(L_WARNING, "%s exported to both %s and %s, "
128 "arbitrarily choosing options from first",
129- path, found->m_client->m_hostname, exp->m_client->m_hostname,
130- dom);
131+ path, found->m_client->m_hostname, exp->m_client->m_hostname);
132 found->m_warned = 1;
133 }
134 }
135Index: nfs-utils-2.3.3/utils/mountd/mountd.c
136===================================================================
137--- nfs-utils-2.3.3.orig/utils/mountd/mountd.c
138+++ nfs-utils-2.3.3/utils/mountd/mountd.c
139@@ -213,7 +213,7 @@ static void
140 sig_hup (int sig)
141 {
142 /* don't exit on SIGHUP */
143- xlog (L_NOTICE, "Received SIGHUP... Ignoring.\n", sig);
144+ xlog (L_NOTICE, "Received SIGHUP(%d)... Ignoring.\n", sig);
145 return;
146 }
147
148Index: nfs-utils-2.3.3/utils/statd/rmtcall.c
149===================================================================
150--- nfs-utils-2.3.3.orig/utils/statd/rmtcall.c
151+++ nfs-utils-2.3.3/utils/statd/rmtcall.c
152@@ -247,7 +247,7 @@ process_reply(FD_SET_TYPE *rfds)
153 xlog_warn("%s: service %d not registered on localhost",
154 __func__, NL_MY_PROG(lp));
155 } else {
156- xlog(D_GENERAL, "%s: Callback to %s (for %d) succeeded",
157+ xlog(D_GENERAL, "%s: Callback to %s (for %s) succeeded",
158 __func__, NL_MY_NAME(lp), NL_MON_NAME(lp));
159 }
160 nlist_free(&notify, lp);
161Index: nfs-utils-2.3.3/utils/statd/svc_run.c
162===================================================================
163--- nfs-utils-2.3.3.orig/utils/statd/svc_run.c
164+++ nfs-utils-2.3.3/utils/statd/svc_run.c
165@@ -53,6 +53,7 @@
166
167 #include <errno.h>
168 #include <time.h>
169+#include <inttypes.h>
170 #include "statd.h"
171 #include "notlist.h"
172
173@@ -104,8 +105,8 @@ my_svc_run(int sockfd)
174
175 tv.tv_sec = NL_WHEN(notify) - now;
176 tv.tv_usec = 0;
177- xlog(D_GENERAL, "Waiting for reply... (timeo %d)",
178- tv.tv_sec);
179+ xlog(D_GENERAL, "Waiting for reply... (timeo %jd)",
180+ (intmax_t)tv.tv_sec);
181 selret = select(FD_SETSIZE, &readfds,
182 (void *) 0, (void *) 0, &tv);
183 } else {
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch
deleted file mode 100644
index 921f5edc82..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-musl-res_querydomain.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From caa19231196d73541445728e6813c8fa70345acb Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Tue, 26 Jun 2018 15:59:00 +0800
4Subject: [PATCH] nfs-utils: 2.1.1 -> 2.3.1
5
6Fixed:
7configure: error: res_querydomain needed
8
9Upstream-Status: Pending [https://github.com/alpinelinux/aports/blob/master/main/nfs-utils/musl-configure_ac.patch]
10
11Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
12
13---
14 configure.ac | 9 ++++-----
15 1 file changed, 4 insertions(+), 5 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index 50002b4..dcadb23 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -582,10 +582,10 @@ my_am_cflags="\
22 -Wall \
23 -Wextra \
24 $rpcgen_cflags \
25- -Werror=missing-prototypes \
26- -Werror=missing-declarations \
27+ -Wmissing-prototypes \
28+ -Wmissing-declarations \
29 -Werror=format=2 \
30- -Werror=undef \
31+ -Wundef \
32 -Werror=missing-include-dirs \
33 -Werror=strict-aliasing=2 \
34 -Werror=init-self \
35@@ -614,10 +614,9 @@ AC_DEFUN([CHECK_CCSUPPORT], [
36
37 CHECK_CCSUPPORT([-Werror=format-overflow=2], [flg1])
38 CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
39-CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
40 CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
41
42-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
43+AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg4"])
44
45 # Make sure that $ACLOCAL_FLAGS are used during a rebuild
46 AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.2.bb
index eb32bccb57..df3070bd8b 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.2.bb
@@ -29,16 +29,13 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
29 file://nfs-utils-debianize-start-statd.patch \ 29 file://nfs-utils-debianize-start-statd.patch \
30 file://bugfix-adjust-statd-service-name.patch \ 30 file://bugfix-adjust-statd-service-name.patch \
31 file://0001-cacheio-use-intmax_t-for-formatted-IO.patch \ 31 file://0001-cacheio-use-intmax_t-for-formatted-IO.patch \
32 file://clang-format-string.patch \
33 file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ 32 file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \
34 file://0001-Don-t-build-tools-with-CC_FOR_BUILD.patch \ 33 file://0001-Don-t-build-tools-with-CC_FOR_BUILD.patch \
35 file://0001-Fix-include-order-between-config.h-and-stat.h.patch \ 34 "
36"
37SRC_URI_append_libc-glibc = " file://0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch" 35SRC_URI_append_libc-glibc = " file://0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch"
38SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch"
39 36
40SRC_URI[md5sum] = "161efe469ec1b06f1c750bd87f8ba6dd" 37SRC_URI[md5sum] = "d427c6b3014e9a04e8498f0598b1c1b9"
41SRC_URI[sha256sum] = "85274ada94479b1beba9f8eeffd19f477c53a6710b9998d1192c807854087736" 38SRC_URI[sha256sum] = "4464737a03d5f73ded2ffefe19d5543ed7b1d6c541985d8acaafdc8025aa1038"
42 39
43# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will 40# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
44# pull in the remainder of the dependencies. 41# pull in the remainder of the dependencies.