Skip to content

Commit

Permalink
- nfs-utils: bump version to 2.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
vanhofen committed May 3, 2020
1 parent c0c389b commit 63b2e69
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 268 deletions.
14 changes: 5 additions & 9 deletions make/target-tools.mk
Expand Up @@ -1359,19 +1359,15 @@ dosfstools: $(ARCHIVE)/$(DOSFSTOOLS_SOURCE) | $(TARGET_DIR)

# -----------------------------------------------------------------------------

NFS-UTILS_VER = 2.2.1
NFS-UTILS_VER = 2.4.3
NFS-UTILS_TMP = nfs-utils-$(NFS-UTILS_VER)
NFS-UTILS_SOURCE = nfs-utils-$(NFS-UTILS_VER).tar.bz2
NFS-UTILS_URL = https://sourceforge.net/projects/nfs/files/nfs-utils/$(NFS-UTILS_VER)

$(ARCHIVE)/$(NFS-UTILS_SOURCE):
$(DOWNLOAD) $(NFS-UTILS_URL)/$(NFS-UTILS_SOURCE)

NFS-UTILS_PATCH = nfs-utils_01-Patch-taken-from-Gentoo.patch
NFS-UTILS_PATCH += nfs-utils_02-Switch-legacy-index-in-favour-of-strchr.patch
NFS-UTILS_PATCH += nfs-utils_03-Let-the-configure-script-find-getrpcbynumber-in-libt.patch
NFS-UTILS_PATCH += nfs-utils_04-mountd-Add-check-for-struct-file_handle.patch
NFS-UTILS_PATCH += nfs-utils_05-sm-notify-use-sbin-instead-of-usr-sbin.patch
NFS-UTILS_PATCH = 0001-nfs-utils-print-time-in-64-bit.patch

NFS-UTILS_DEPS = rpcbind

Expand All @@ -1381,7 +1377,7 @@ nfs-utils: $(NFS-UTILS_DEPS) $(ARCHIVE)/$(NFS-UTILS_SOURCE) | $(TARGET_DIR)
$(REMOVE)/$(NFS-UTILS_TMP)
$(UNTAR)/$(NFS-UTILS_SOURCE)
$(CHDIR)/$(NFS-UTILS_TMP); \
$(call apply_patches, $(NFS-UTILS_PATCH)); \
$(call apply_patches, $(addprefix $(@F)/,$(NFS-UTILS_PATCH))); \
export knfsd_cv_bsd_signals=no; \
autoreconf -fi; \
$(CONFIGURE) \
Expand All @@ -1390,15 +1386,15 @@ nfs-utils: $(NFS-UTILS_DEPS) $(ARCHIVE)/$(NFS-UTILS_SOURCE) | $(TARGET_DIR)
--docdir=$(remove-docdir) \
--mandir=$(remove-mandir) \
--enable-maintainer-mode \
--disable-nfsdcltrack \
--disable-nfsv4 \
--disable-nfsv41 \
--disable-gss \
--disable-uuid \
$(NFS-UTILS_CONF) \
--without-tcp-wrappers \
--with-statedir=/var/lib/nfs \
--with-rpcgen=internal \
--without-systemd \
--with-statedir=/var/lib/nfs \
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
Expand Down
84 changes: 84 additions & 0 deletions patches/nfs-utils/0001-nfs-utils-print-time-in-64-bit.patch
@@ -0,0 +1,84 @@
From cb75ec49c0a92f55b2241eb1cd95a3fdf63f0dac Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Mon, 13 Apr 2020 14:14:45 -0400
Subject: [PATCH] nfs-utils: print time in 64-bit

musl 1.2.0 defines time_t as 64-bit, even under 32-bit OSes.

Fixes -Wformat errors.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
support/nfs/cacheio.c | 3 ++-
utils/idmapd/idmapd.c | 11 ++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
index 7c4cf373..126c1283 100644
--- a/support/nfs/cacheio.c
+++ b/support/nfs/cacheio.c
@@ -20,6 +20,7 @@
#endif

#include <nfslib.h>
+#include <inttypes.h>
#include <stdio.h>
#include <stdio_ext.h>
#include <string.h>
@@ -238,7 +239,7 @@ cache_flush(int force)
stb.st_mtime > now)
stb.st_mtime = time(0);

- sprintf(stime, "%ld\n", stb.st_mtime);
+ sprintf(stime, "%" PRId64 "\n", (int64_t)stb.st_mtime);
for (c=0; cachelist[c]; c++) {
int fd;
sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]);
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index c187e7d7..893159f1 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -54,6 +54,7 @@
#include <dirent.h>
#include <unistd.h>
#include <netdb.h>
+#include <inttypes.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -172,7 +173,7 @@ flush_nfsd_cache(char *path, time_t now)
int fd;
char stime[32];

- sprintf(stime, "%ld\n", now);
+ sprintf(stime, "%" PRId64 "\n", (int64_t)now);
fd = open(path, O_RDWR);
if (fd == -1)
return -1;
@@ -625,8 +626,8 @@ nfsdcb(int UNUSED(fd), short which, void *data)
/* Name */
addfield(&bp, &bsiz, im.im_name);
/* expiry */
- snprintf(buf1, sizeof(buf1), "%lu",
- time(NULL) + cache_entry_expiration);
+ snprintf(buf1, sizeof(buf1), "%" PRId64,
+ (int64_t)time(NULL) + cache_entry_expiration);
addfield(&bp, &bsiz, buf1);
/* Note that we don't want to write the id if the mapping
* failed; instead, by leaving it off, we write a negative
@@ -653,8 +654,8 @@ nfsdcb(int UNUSED(fd), short which, void *data)
snprintf(buf1, sizeof(buf1), "%u", im.im_id);
addfield(&bp, &bsiz, buf1);
/* expiry */
- snprintf(buf1, sizeof(buf1), "%lu",
- time(NULL) + cache_entry_expiration);
+ snprintf(buf1, sizeof(buf1), "%" PRId64,
+ (int64_t)time(NULL) + cache_entry_expiration);
addfield(&bp, &bsiz, buf1);
/* Note we're ignoring the status field in this case; we'll
* just map to nobody instead. */
--
2.20.1

60 changes: 0 additions & 60 deletions patches/nfs-utils_01-Patch-taken-from-Gentoo.patch

This file was deleted.

72 changes: 0 additions & 72 deletions patches/nfs-utils_02-Switch-legacy-index-in-favour-of-strchr.patch

This file was deleted.

This file was deleted.

46 changes: 0 additions & 46 deletions patches/nfs-utils_04-mountd-Add-check-for-struct-file_handle.patch

This file was deleted.

35 changes: 0 additions & 35 deletions patches/nfs-utils_05-sm-notify-use-sbin-instead-of-usr-sbin.patch

This file was deleted.

0 comments on commit 63b2e69

Please sign in to comment.