mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-02 17:20:57 +08:00
nfs-kernel-server: update to 2.5.4 (#462)
* nfs-kernel-server: update to 2.5.4 Signed-off-by: Rosen Penev <rosenp@gmail.com> * nfs-kernel-server: reload when exported mountpoints show Use newly introduced procd_add_reload_mount_trigger to reload nfsd when a mountpoint covering an exported filesystem is added by blockd. Signed-off-by: Daniel Golle <daniel@makrotopia.org> * nfs-kernel-server: move hardcoded /run to /tmp/run statd currently fails to start due to missing /run which doesn't exist on OpenWrt. Add a patch moving /run to /tmp/run as the path is hardcoded in several places and cannot be configured neither at buildtime nor at runtime. Signed-off-by: Daniel Golle <daniel@makrotopia.org> * nfs-kernel-server: fix build on macos arm64 1. prctl() check is not required for host-compile on any OS due to prctl is not used in rpcgen which is only one is compiled during host-compile phase. prctl() check is disabled via HOST_CONFIGURE_VARS in OpenWrt makefile 2. __DARWIN_ONLY_64_BIT_INO_T is true on macos arm64 so struct stat64 and stat64() are not available. This patch defines stat64 as stat if __DARWIN_ONLY_64_BIT_INO_T is true Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in> * treewide: remove rpath-link Most usages seem to be outdated and fixed a long time ago. Signed-off-by: Rosen Penev <rosenp@gmail.com> * nfs-kernel-server: disable IPv6 for host Some issue with static libtirpc Signed-off-by: Rosen Penev <rosenp@gmail.com> Co-authored-by: Rosen Penev <rosenp@gmail.com> Co-authored-by: Daniel Golle <daniel@makrotopia.org> Co-authored-by: Sergey V. Lobanov <sergey@lobanov.in>
This commit is contained in:
parent
200b6ee4a3
commit
cb56ef7422
@ -7,9 +7,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nfs-kernel-server
|
||||
PKG_VERSION:=2.5.2
|
||||
PKG_RELEASE:=1
|
||||
PKG_HASH:=09c20d30322e957a6e9547fb5aa742b163c142cd36b244c2485ae0cc3d71d32d
|
||||
PKG_VERSION:=2.5.4
|
||||
PKG_RELEASE:=5
|
||||
PKG_HASH:=546ce4b51eeebc66e354b6cc6ca0ce509437efbdef0caaf99389534eef0e598b
|
||||
|
||||
PKG_SOURCE_URL:=@SF/nfs
|
||||
PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.xz
|
||||
@ -100,8 +100,7 @@ TARGET_CFLAGS += -Wno-error=implicit-function-declaration \
|
||||
-Wno-error=undef \
|
||||
-Wno-error=missing-include-dirs
|
||||
|
||||
TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
|
||||
-L$(STAGING_DIR)/usr/lib/libevent
|
||||
TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/libevent
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-caps \
|
||||
@ -150,6 +149,8 @@ HOST_CONFIGURE_VARS += \
|
||||
ac_cv_header_nfsidmap_h=yes \
|
||||
ac_cv_header_blkid_blkid_h=yes \
|
||||
ac_cv_lib_resolv___res_querydomain=yes \
|
||||
ac_cv_func_prctl=yes \
|
||||
enable_ipv6=no \
|
||||
GSSGLUE_CFLAGS=" " \
|
||||
GSSGLUE_LIBS=" " \
|
||||
RPCSECGSS_CFLAGS=" " \
|
||||
|
@ -42,3 +42,8 @@ stop_service() {
|
||||
grep -q /proc/fs/nfsd /proc/mounts && \
|
||||
umount /proc/fs/nfsd
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
local export_dirs="$(while read mp _r ; do echo -n "$mp " ; done < /etc/exports)"
|
||||
procd_add_reload_mount_trigger $export_dirs
|
||||
}
|
||||
|
@ -0,0 +1,44 @@
|
||||
--- a/utils/blkmapd/device-discovery.c
|
||||
+++ b/utils/blkmapd/device-discovery.c
|
||||
@@ -64,7 +64,7 @@
|
||||
#define EVENT_BUFSIZE (1024 * EVENT_SIZE)
|
||||
|
||||
#define RPCPIPE_DIR "/var/lib/nfs/rpc_pipefs"
|
||||
-#define PID_FILE "/run/blkmapd.pid"
|
||||
+#define PID_FILE "/tmp/run/blkmapd.pid"
|
||||
|
||||
#define CONF_SAVE(w, f) do { \
|
||||
char *p = f; \
|
||||
--- a/utils/gssd/gssd.h
|
||||
+++ b/utils/gssd/gssd.h
|
||||
@@ -44,7 +44,7 @@
|
||||
#define DNOTIFY_SIGNAL (SIGRTMIN + 3)
|
||||
|
||||
#define GSSD_DEFAULT_CRED_DIR "/tmp"
|
||||
-#define GSSD_USER_CRED_DIR "/run/user/%U"
|
||||
+#define GSSD_USER_CRED_DIR "/tmp/run/user/%U"
|
||||
#define GSSD_DEFAULT_CRED_PREFIX "krb5cc"
|
||||
#define GSSD_DEFAULT_MACHINE_CRED_SUFFIX "machine"
|
||||
#define GSSD_DEFAULT_KEYTAB_FILE "/etc/krb5.keytab"
|
||||
--- a/utils/statd/sm-notify.c
|
||||
+++ b/utils/statd/sm-notify.c
|
||||
@@ -913,7 +913,7 @@ static int record_pid(void)
|
||||
int fd;
|
||||
|
||||
(void)snprintf(pid, sizeof(pid), "%d\n", (int)getpid());
|
||||
- fd = open("/run/sm-notify.pid", O_CREAT|O_EXCL|O_WRONLY, 0600);
|
||||
+ fd = open("/tmp/run/sm-notify.pid", O_CREAT|O_EXCL|O_WRONLY, 0600);
|
||||
if (fd < 0)
|
||||
return 0;
|
||||
|
||||
--- a/utils/statd/statd.c
|
||||
+++ b/utils/statd/statd.c
|
||||
@@ -161,7 +161,7 @@ usage(void)
|
||||
fprintf(stderr," -H Specify a high-availability callout program.\n");
|
||||
}
|
||||
|
||||
-static const char *pidfile = "/run/rpc.statd.pid";
|
||||
+static const char *pidfile = "/tmp/run/rpc.statd.pid";
|
||||
|
||||
int pidfd = -1;
|
||||
static void create_pidfile(void)
|
17
net/nfs-kernel-server/patches/200-fix-macos-build.patch
Normal file
17
net/nfs-kernel-server/patches/200-fix-macos-build.patch
Normal file
@ -0,0 +1,17 @@
|
||||
fix stat64 issue for modern macos versions (including macos arm64)
|
||||
|
||||
--- a/tools/rpcgen/rpc_main.c
|
||||
+++ b/tools/rpcgen/rpc_main.c
|
||||
@@ -62,6 +62,12 @@
|
||||
#define EXTEND 1 /* alias for TRUE */
|
||||
#define DONT_EXTEND 0 /* alias for FALSE */
|
||||
|
||||
+#ifdef __APPLE__
|
||||
+# if __DARWIN_ONLY_64_BIT_INO_T
|
||||
+# define stat64 stat
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
struct commandline
|
||||
{
|
||||
int cflag; /* xdr C routines */
|
Loading…
Reference in New Issue
Block a user