Browse Source

Merge pull request #12190 from neheb/fuse

fuse: import from base
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by GitHub
parent
commit
a4bb7e884f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 226 additions and 0 deletions
  1. +68
    -0
      libs/libfuse3/Makefile
  2. +107
    -0
      utils/fuse/Makefile
  3. +10
    -0
      utils/fuse/patches/100-missing_includes.patch
  4. +11
    -0
      utils/fuse/patches/112-no_break_on_mknod.patch
  5. +30
    -0
      utils/fuse/patches/200-backport_arm64_fuse_kernel_h_clean_includes.patch

+ 68
- 0
libs/libfuse3/Makefile View File

@ -0,0 +1,68 @@
#
# 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:=libfuse3
PKG_VERSION:=3.9.1
PKG_RELEASE:=1
PKG_SOURCE:=fuse-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/libfuse/libfuse/releases/download/fuse-$(PKG_VERSION)
PKG_HASH:=1bafcfd6c66ba35b7b0beb822532a9106eb8409ad6cde988888fde85f89be645
PKG_BUILD_DIR:=$(BUILD_DIR)/fuse-$(PKG_VERSION)
PKG_MAINTAINER:=
PKG_CPE_ID:=cpe:/a:fuse_project:fuse
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=meson/host
include $(INCLUDE_DIR)/package.mk
include ../../devel/meson/meson.mk
define Package/libfuse3
TITLE:=FUSE3 library
URL:=https://github.com/libfuse/libfuse
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+kmod-fuse +libpthread
SUBMENU:=Filesystem
ABI_VERSION:=1
LICENSE:=LGPL-2.1-only
LICENSE_FILES:=LGPL2.txt
endef
define Package/libfuse3/description
fuse3 (Filesystem in UserSpacE)
This package contains the fuse3 shared libraries, needed by other programs.
- libfuse3
endef
MESON_ARGS += \
-Ddisable-mtab=true \
-Dutils=false \
-Dexamples=false \
-Duseroot=false
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/fuse3
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/fuse3/*.h $(1)/usr/include/fuse3
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse3.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse3.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libfuse3/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse3.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libfuse3))

+ 107
- 0
utils/fuse/Makefile View File

@ -0,0 +1,107 @@
#
# 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.9
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/libfuse/libfuse/releases/download/$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5
PKG_MAINTAINER:=
PKG_CPE_ID:=cpe:/a:fuse_project:fuse
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/fuse/Default
TITLE:=FUSE
URL:=https://github.com/libfuse/libfuse
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
LICENSE:=GPL-2.0-only
LICENSE_FILES:=COPYING
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
LICENSE:=LGPL-2.1-only
LICENSE_FILES:=COPYING.LIB
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))

+ 10
- 0
utils/fuse/patches/100-missing_includes.patch View File

@ -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" {

+ 11
- 0
utils/fuse/patches/112-no_break_on_mknod.patch View File

@ -0,0 +1,11 @@
--- a/util/Makefile.in
+++ b/util/Makefile.in
@@ -736,7 +736,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; \

+ 30
- 0
utils/fuse/patches/200-backport_arm64_fuse_kernel_h_clean_includes.patch View File

@ -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:

Loading…
Cancel
Save