From 860d80c21714ccefe23b331e438ada87ca39f7b3 Mon Sep 17 00:00:00 2001 From: Markham Date: Tue, 7 Jun 2022 23:10:13 +0200 Subject: [PATCH] fix target fuse; try to fix djmount --- ...fuse-2.9.9-fix-build-with-glibc-2.34.patch | 41 ------------------- make/applications.mk | 22 +++++----- make/libraries.mk | 14 +++++-- 3 files changed, 22 insertions(+), 55 deletions(-) delete mode 100644 archive-patches/libfuse-2.9.9-fix-build-with-glibc-2.34.patch diff --git a/archive-patches/libfuse-2.9.9-fix-build-with-glibc-2.34.patch b/archive-patches/libfuse-2.9.9-fix-build-with-glibc-2.34.patch deleted file mode 100644 index 1f0ed53..0000000 --- a/archive-patches/libfuse-2.9.9-fix-build-with-glibc-2.34.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -55,6 +55,7 @@ fi - - AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat]) - AC_CHECK_FUNCS([posix_fallocate]) -+AC_CHECK_FUNCS([closefrom]) - AC_CHECK_MEMBERS([struct stat.st_atim]) - AC_CHECK_MEMBERS([struct stat.st_atimespec]) - -diff --git a/util/ulockmgr_server.c b/util/ulockmgr_server.c -index 273c7d923..a04dac5c6 100644 ---- a/util/ulockmgr_server.c -+++ b/util/ulockmgr_server.c -@@ -22,6 +22,10 @@ - #include - #include - -+#ifdef HAVE_CONFIG_H -+ #include "config.h" -+#endif -+ - struct message { - unsigned intr : 1; - unsigned nofd : 1; -@@ -124,6 +128,7 @@ static int receive_message(int sock, void *buf, size_t buflen, int *fdp, - return res; - } - -+#if !defined(HAVE_CLOSEFROM) - static int closefrom(int minfd) - { - DIR *dir = opendir("/proc/self/fd"); -@@ -141,6 +146,7 @@ static int closefrom(int minfd) - } - return 0; - } -+#endif - - static void send_reply(int cfd, struct message *msg) - { diff --git a/make/applications.mk b/make/applications.mk index 498626c..5ca57b0 100755 --- a/make/applications.mk +++ b/make/applications.mk @@ -675,25 +675,25 @@ DJMOUNT_PATCH += djmount-fix-new-autotools.patch DJMOUNT_PATCH += djmount-fix-newer-gcc.patch DJMOUNT_PATCH += djmount-support-fstab-mounting.patch DJMOUNT_PATCH += djmount-support-seeking-in-large-2gb-files.patch +DJMOUNT_PATCH += djmount-pthread-fix.patch DJMOUNT_PATCH += 0011-fix-build-with-gettext-0.20.x.patch -$(D)/djmount: $(D)/libfuse $(ARCHIVE)/djmount-0.71.tar.gz | $(TARGETPREFIX) +# works with libupnp 1.6.25, laters maybe! +$(D)/djmount: $(D)/libfuse $(ARCHIVE)/djmount-0.71.tar.gz | $(TARGETPREFIX) $(START_BUILD) - $(UNTAR)/djmount-0.71.tar.gz + $(REMOVE)/djmount-0.71 + cp -fr $(ARCHIVE)/djmount-0.71 $(BUILD_TMP) pushd $(BUILD_TMP)/djmount-0.71 && \ $(call apply_patches, $(addprefix djmount/, $(DJMOUNT_PATCH))); \ - CFLAGS="-I$(TARGETPREFIX)/include -fPIC" \ - LDFLAGS="-L$(TARGETPREFIX)/lib -lz -fPIC" \ - LIBS="-Wl,--rpath-link -Wl,$(TARGETPREFIX)/lib" \ touch libupnp/config.aux/config.rpath; \ autoreconf -fi; \ $(CONFIGURE) -C \ - --prefix= --build=$(BUILD) --host=$(TARGET) \ - --disable-debug \ - --with-lib-prefix=$(TARGETPREFIX) && \ - make && \ - make install DESTDIR=$(TARGETPREFIX); + --prefix= \ + --disable-debug && \ + make CFLAGS=" -fcommon"; \ + make CFLAGS=" -fcommon" install DESTDIR=$(TARGETPREFIX); install -m 755 $(PATCHES)/djmount/djmount.init $(TARGETPREFIX)/etc/init.d/djmount + $(TARGET)-strip $(BUILD_TMP)/djmount-0.71/djmount/djmount pushd $(TARGETPREFIX)/etc/init.d ln -sf djmount $(TARGETPREFIX)/etc/init.d/S75djmount ln -sf djmount $(TARGETPREFIX)/etc/init.d/K75djmount @@ -748,7 +748,7 @@ $(D)/libupnp: $(ARCHIVE)/libupnp-$(LIBUPNP_VER).tar.bz2 | $(TARGETPREFIX) $(PATCH)/libupnpd-use_pthread_mutexattr_settype.patch; \ $(CONFIGURE) \ --prefix= \ - --libdir=$(TARGETPREFIX)/lib \ + --libdir=$(TARGETLIB) \ --includedir=$(TARGETPREFIX)/include; \ $(MAKE) all; \ $(MAKE) install diff --git a/make/libraries.mk b/make/libraries.mk index e2ff36f..13bb53a 100755 --- a/make/libraries.mk +++ b/make/libraries.mk @@ -331,13 +331,21 @@ $(D)/zlib: $(ARCHIVE)/zlib-$(ZLIB_VER).tar.xz | $(TARGETPREFIX) $(REMOVE)/zlib-$(ZLIB_VER) $(TOUCH) +FUSE_PATCH = fuse2-0001-More-parentheses.patch +FUSE_PATCH += fuse2-0002-add-fix-for-namespace-conflict-in-fuse_kernel.h.patch +FUSE_PATCH += fuse2-0003-make-buffer-size-match-kernel-max-transfer-size.patch +FUSE_PATCH += fuse2-0004-Whitelist-SMB2-found-on-some-NAS-devices.patch +FUSE_PATCH += fuse2-0005-Whitelist-UFSD-backport-to-2.9-branch-452.patch +FUSE_PATCH += fuse2-0006-Correct-errno-comparison-571.patch +FUSE_PATCH += fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch + $(D)/libfuse: $(ARCHIVE)/fuse-$(FUSE_VER).tar.gz | $(TARGETPREFIX) $(START_BUILD) $(REMOVE)/fuse-$(FUSE_VER) $(UNTAR)/fuse-$(FUSE_VER).tar.gz pushd $(BUILD_TMP)/fuse-$(FUSE_VER) && \ - $(PATCH)/libfuse-2.9.9-fix-build-with-glibc-2.34.patch && \ - autoreconf -fi && \ + $(call apply_patches, $(addprefix fuse/, $(FUSE_PATCH))); \ + autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ --datarootdir=/.remove \ @@ -347,7 +355,7 @@ $(D)/libfuse: $(ARCHIVE)/fuse-$(FUSE_VER).tar.gz | $(TARGETPREFIX) --with-gnu-ld \ --enable-util \ --enable-lib \ - --enable-silent-rules && \ + --enable-silent-rules; \ $(MAKE) all && \ $(MAKE) install DESTDIR=$(TARGETPREFIX) $(REWRITE_LIBTOOL)/libfuse.la -- 2.39.5