fuse: import from base
authorRosen Penev <redacted>
Thu, 14 May 2020 23:31:07 +0000 (16:31 -0700)
committerRosen Penev <redacted>
Sun, 17 May 2020 00:26:30 +0000 (17:26 -0700)
This belongs here. All dependent packages are located here.

Signed-off-by: Rosen Penev <redacted>
utils/fuse/Makefile [new file with mode: 0644]
utils/fuse/patches/100-missing_includes.patch [new file with mode: 0644]
utils/fuse/patches/112-no_break_on_mknod.patch [new file with mode: 0644]
utils/fuse/patches/200-backport_arm64_fuse_kernel_h_clean_includes.patch [new file with mode: 0644]

diff --git a/utils/fuse/Makefile b/utils/fuse/Makefile
new file mode 100644 (file)
index 0000000..be80b03
--- /dev/null
@@ -0,0 +1,103 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=fuse
+PKG_VERSION:=2.9.7
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/libfuse/libfuse/releases/download/$(PKG_NAME)-$(PKG_VERSION)
+PKG_HASH:=832432d1ad4f833c20e13b57cf40ce5277a9d33e483205fc63c78111b3358874
+
+PKG_LICENSE:=LGPLv2.1 GPLv2
+PKG_LICENSE_FILES:=COPYING.LIB COPYING
+PKG_CPE_ID:=cpe:/a:fuse_project:fuse
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fuse/Default
+  TITLE:=FUSE
+  URL:=http://fuse.sourceforge.net/
+endef
+
+define Package/fuse/Default/description
+ FUSE (Filesystem in UserSpacE)
+endef
+
+define Package/fuse-utils
+$(call Package/fuse/Default)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libfuse
+  TITLE+= (utilities)
+  SUBMENU:=Filesystem
+endef
+
+define Package/fuse-utils/description
+$(call Package/fuse/Default/description)
+ This package contains the FUSE utilities.
+ - fusermount
+ - ulockmgr_server
+endef
+
+define Package/libfuse
+$(call Package/fuse/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE+= (library)
+  DEPENDS:=+kmod-fuse +libpthread
+  SUBMENU:=Filesystem
+  ABI_VERSION:=1
+endef
+
+define Package/libfuse/description
+$(call Package/fuse/Default/description)
+ This package contains the FUSE shared libraries, needed by other programs.
+ - libfuse
+ - libulockmgr
+endef
+
+# generic args
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --enable-static \
+       --enable-lib \
+       --enable-util \
+       --disable-rpath \
+       --disable-example \
+       --disable-mtab
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP)   $(PKG_INSTALL_DIR)/usr/include/{fuse,fuse.h,ulockmgr.h} $(1)/usr/include/
+       $(INSTALL_DIR)  $(1)/usr/lib
+       $(CP)   $(PKG_INSTALL_DIR)/usr/lib/lib{fuse,ulockmgr}.{a,so*} $(1)/usr/lib/
+       $(INSTALL_DIR)  $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(1)/usr/lib/pkgconfig/
+       $(SED) 's,-I$$$${includedir}/fuse,,g' $(1)/usr/lib/pkgconfig/fuse.pc
+       $(SED) 's,-L$$$${libdir},,g' $(1)/usr/lib/pkgconfig/fuse.pc
+endef
+
+define Package/fuse-utils/install
+       $(INSTALL_DIR) $(1)/sbin
+       $(CP) $(PKG_INSTALL_DIR)/sbin/mount.fuse $(1)/sbin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/{fusermount,ulockmgr_server} $(1)/usr/bin/
+endef
+
+define Package/libfuse/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{fuse,ulockmgr}.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,fuse-utils))
+$(eval $(call BuildPackage,libfuse))
diff --git a/utils/fuse/patches/100-missing_includes.patch b/utils/fuse/patches/100-missing_includes.patch
new file mode 100644 (file)
index 0000000..e74a187
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/include/fuse.h
++++ b/include/fuse.h
+@@ -32,6 +32,7 @@
+ #include <sys/stat.h>
+ #include <sys/statvfs.h>
+ #include <sys/uio.h>
++#include <sys/file.h>
+ #ifdef __cplusplus
+ extern "C" {
diff --git a/utils/fuse/patches/112-no_break_on_mknod.patch b/utils/fuse/patches/112-no_break_on_mknod.patch
new file mode 100644 (file)
index 0000000..f679c41
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/util/Makefile.in
++++ b/util/Makefile.in
+@@ -723,7 +723,7 @@ mount_util.c: $(top_srcdir)/lib/mount_ut
+ install-exec-hook:
+       -chmod u+s $(DESTDIR)$(bindir)/fusermount
+-      @if test ! -e $(DESTDIR)/dev/fuse; then \
++      -@if test ! -e $(DESTDIR)/dev/fuse; then \
+               $(MKDIR_P) $(DESTDIR)/dev; \
+               echo "mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true"; \
+               mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true; \
diff --git a/utils/fuse/patches/200-backport_arm64_fuse_kernel_h_clean_includes.patch b/utils/fuse/patches/200-backport_arm64_fuse_kernel_h_clean_includes.patch
new file mode 100644 (file)
index 0000000..d45da84
--- /dev/null
@@ -0,0 +1,30 @@
+From 914871b20a901e3e1e981c92bc42b1c93b7ab81b Mon Sep 17 00:00:00 2001
+From: Riku Voipio <riku.voipio@linaro.org>
+Date: Thu, 07 Feb 2013 11:04:21 +0000
+Subject: fuse_kernel.h: clean includes
+
+Use <linux/types.h> for linux and define types used for other operating systems
+using <stdint.h> types.
+---
+(limited to 'include/fuse_kernel.h')
+
+--- a/include/fuse_kernel.h
++++ b/include/fuse_kernel.h
+@@ -88,12 +88,16 @@
+ #ifndef _LINUX_FUSE_H
+ #define _LINUX_FUSE_H
+-#include <sys/types.h>
++#ifdef __linux__
++#include <linux/types.h>
++#else
++#include <stdint.h>
+ #define __u64 uint64_t
+ #define __s64 int64_t
+ #define __u32 uint32_t
+ #define __s32 int32_t
+ #define __u16 uint16_t
++#endif
+ /*
+  * Version negotiation:
git clone https://git.99rst.org/PROJECT