Browse Source

fuse: use latest 2.x version

Waldemar Brodkorb 1 year ago
parent
commit
42cc5a7110

+ 14 - 14
package/fuse/Makefile

@@ -4,18 +4,17 @@
 include ${ADK_TOPDIR}/rules.mk
 
 PKG_NAME:=		fuse
-PKG_VERSION:=		3.16.2
+PKG_VERSION:=		2.9.9
 PKG_RELEASE:=		1
-PKG_HASH:=		1bc306be1a1f4f6c8965fbdd79c9ccca021fdc4b277d501483a711cbd7dbcd6c
+PKG_HASH:=		d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5
 PKG_DESCR:=		filesystem in userspace utility
 PKG_SECTION:=		sys/fs
 PKG_DEPENDS:=		libfuse
-PKG_SITES:=		https://github.com/libfuse/libfuse/archive/refs/tags/
+PKG_SITES:=		https://github.com/libfuse/libfuse/releases/download/fuse-$(PKG_VERSION)/
 PKG_LIBNAME:=		libfuse
 PKG_OPTS:=		dev
 
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz
-WRKDIST=		$(WRKDIR)/libfuse-$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_SUBPKGS:=		FUSE_UTILS LIBFUSE
 PKGSD_LIBFUSE:=		filesystem in userspace library
@@ -26,22 +25,23 @@ include ${ADK_TOPDIR}/mk/package.mk
 $(eval $(call PKG_template,FUSE_UTILS,fuse-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 $(eval $(call PKG_template,LIBFUSE,libfuse,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBFUSE},${PKGSC_LIBFUSE},${PKG_OPTS}))
 
-WRKBUILD=               $(WRKDIR)/$(PKG_NAME)-obj
-
-CONFIG_STYLE:=		meson
-BUILD_STYLE:=		meson
-INSTALL_STYLE:=		meson
-
-MESON_FLAGS+=		-Dinitscriptdir="" \
-			-Dudevrulesdir=""
+CONFIGURE_ARGS+=	--enable-lib \
+			--enable-util \
+			--with-libiconv-prefix="${STAGING_TARGET_DIR}/usr" \
+			--disable-example \
+			--disable-auto-modprobe \
+			--disable-mtab \
+			--disable-kernel-module
 
 fuse-utils-install:
 	${INSTALL_DIR} ${IDIR_FUSE_UTILS}/usr/bin
-	${CP} ${WRKINST}/usr/bin/fusermount3 ${IDIR_FUSE_UTILS}/usr/bin
+	${CP} ${WRKINST}/usr/bin/fusermount ${IDIR_FUSE_UTILS}/usr/bin
 
 libfuse-install:
 	${INSTALL_DIR} ${IDIR_LIBFUSE}/usr/lib
-	${CP} ${WRKINST}/usr/lib/libfuse3.so* \
+	${CP} ${WRKINST}/usr/lib/libfuse.so* \
+		${IDIR_LIBFUSE}/usr/lib
+	${CP} ${WRKINST}/usr/lib/libulockmgr.so* \
 		${IDIR_LIBFUSE}/usr/lib
 
 include ${ADK_TOPDIR}/mk/pkg-bottom.mk

+ 10 - 0
package/fuse/patches/patch-configure_ac

@@ -0,0 +1,10 @@
+--- fuse-2.9.9.orig/configure.ac	2019-01-04 14:37:03.000000000 +0100
++++ fuse-2.9.9/configure.ac	2024-02-12 17:14:14.790450294 +0100
+@@ -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])
+ 

+ 16 - 0
package/fuse/patches/patch-include_fuse_kernel_h

@@ -0,0 +1,16 @@
+--- fuse-2.9.9.orig/include/fuse_kernel.h	2019-01-04 14:33:33.000000000 +0100
++++ fuse-2.9.9/include/fuse_kernel.h	2024-02-12 17:14:08.594450378 +0100
+@@ -88,12 +88,7 @@
+ #ifndef _LINUX_FUSE_H
+ #define _LINUX_FUSE_H
+ 
+-#include <sys/types.h>
+-#define __u64 uint64_t
+-#define __s64 int64_t
+-#define __u32 uint32_t
+-#define __s32 int32_t
+-#define __u16 uint16_t
++#include <linux/types.h>
+ 
+ /*
+  * Version negotiation:

+ 29 - 0
package/fuse/patches/patch-util_ulockmgr_server_c

@@ -0,0 +1,29 @@
+--- fuse-2.9.9.orig/util/ulockmgr_server.c	2019-01-04 14:33:33.000000000 +0100
++++ fuse-2.9.9/util/ulockmgr_server.c	2024-02-12 17:14:14.798450294 +0100
+@@ -22,6 +22,10 @@
+ #include <sys/socket.h>
+ #include <sys/wait.h>
+ 
++#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, voi
+ 	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)
+ {