diff options
Diffstat (limited to 'meta-filesystems/recipes-support/fuse')
5 files changed, 157 insertions, 62 deletions
diff --git a/meta-filesystems/recipes-support/fuse/files/fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch b/meta-filesystems/recipes-support/fuse/files/fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch new file mode 100644 index 0000000000..7b548b4cde --- /dev/null +++ b/meta-filesystems/recipes-support/fuse/files/fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch @@ -0,0 +1,53 @@ +Upstream-Status: Pending + +From: Sam James <sam@gentoo.org> +Date: Sat, 24 Jul 2021 22:02:45 +0100 +Subject: [PATCH] util/ulockmgr_server.c: conditionally define closefrom (fix + glibc-2.34+) + +closefrom(3) has joined us in glibc-land from *BSD and Solaris. Since +it's available in glibc 2.34+, we want to detect it and only define our +fallback if the libc doesn't provide it. + +Bug: https://bugs.gentoo.org/803923 +Signed-off-by: Sam James <sam@gentoo.org> + +--- 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]) + +--- a/util/ulockmgr_server.c ++++ b/util/ulockmgr_server.c +@@ -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) + { diff --git a/meta-filesystems/recipes-support/fuse/fuse3/run-ptest b/meta-filesystems/recipes-support/fuse/fuse3/run-ptest new file mode 100644 index 0000000000..b63c4de0d9 --- /dev/null +++ b/meta-filesystems/recipes-support/fuse/fuse3/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' diff --git a/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb b/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb new file mode 100644 index 0000000000..2b0797a6f5 --- /dev/null +++ b/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb @@ -0,0 +1,84 @@ +SUMMARY = "Implementation of a fully functional filesystem in a userspace program" +DESCRIPTION = "FUSE (Filesystem in Userspace) is a simple interface for userspace \ + programs to export a virtual filesystem to the Linux kernel. FUSE \ + also aims to provide a secure method for non privileged users to \ + create and mount their own filesystem implementations. \ + " +HOMEPAGE = "https://github.com/libfuse/libfuse" +SECTION = "libs" +LICENSE = "GPL-2.0-only & LGPL-2.0-only" +LIC_FILES_CHKSUM = " \ + file://GPL2.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LGPL2.txt;md5=4fbd65380cdd255951079008b364516c \ + file://LICENSE;md5=a55c12a2d7d742ecb41ca9ae0a6ddc66 \ +" + +SRC_URI = "https://github.com/libfuse/libfuse/releases/download/fuse-${PV}/fuse-${PV}.tar.gz \ +" +SRC_URI[sha256sum] = "f797055d9296b275e981f5f62d4e32e089614fc253d1ef2985851025b8a0ce87" + +S = "${WORKDIR}/fuse-${PV}" + +UPSTREAM_CHECK_URI = "https://github.com/libfuse/libfuse/releases" +UPSTREAM_CHECK_REGEX = "fuse\-(?P<pver>3(\.\d+)+).tar.xz" + +CVE_PRODUCT = "fuse_project:fuse" + +inherit meson pkgconfig ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-looseversion \ + bash \ +" +RRECOMMENDS:${PN}-ptest += " kernel-module-cuse" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + install -d ${D}${PTEST_PATH}/example + install -d ${D}${PTEST_PATH}/util + cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ + + example_excutables=`find ${B}/example -type f -executable` + util_excutables=`find ${B}/util -type f -executable` + test_excutables=`find ${B}/test -type f -executable` + + for e in $example_excutables + do + cp -rf $e ${D}${PTEST_PATH}/example/ + done + + for e in $util_excutables + do + cp -rf $e ${D}${PTEST_PATH}/util/ + done + + for e in $test_excutables + do + cp -rf $e ${D}${PTEST_PATH}/test + done +} + +DEPENDS = "udev" + +PACKAGES =+ "fuse3-utils" + +RPROVIDES:${PN}-dbg += "fuse3-utils-dbg" + +RRECOMMENDS:${PN}:class-target = "kernel-module-fuse fuse3-utils" + +FILES:${PN} += "${libdir}/libfuse3.so.*" +FILES:${PN}-dev += "${libdir}/libfuse3*.la" + +# Forbid auto-renaming to libfuse3-utils +FILES:fuse3-utils = "${bindir} ${base_sbindir}" +DEBIAN_NOAUTONAME:fuse3-utils = "1" +DEBIAN_NOAUTONAME:${PN}-dbg = "1" + +do_install:append() { + rm -rf ${D}${base_prefix}/dev +} diff --git a/meta-filesystems/recipes-support/fuse/fuse3_3.7.0.bb b/meta-filesystems/recipes-support/fuse/fuse3_3.7.0.bb deleted file mode 100644 index f0cbf12a90..0000000000 --- a/meta-filesystems/recipes-support/fuse/fuse3_3.7.0.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "Implementation of a fully functional filesystem in a userspace program" -DESCRIPTION = "FUSE (Filesystem in Userspace) is a simple interface for userspace \ - programs to export a virtual filesystem to the Linux kernel. FUSE \ - also aims to provide a secure method for non privileged users to \ - create and mount their own filesystem implementations. \ - " -HOMEPAGE = "https://github.com/libfuse/libfuse" -SECTION = "libs" -LICENSE = "GPLv2 & LGPLv2" -LIC_FILES_CHKSUM = "file://GPL2.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LGPL2.txt;md5=4fbd65380cdd255951079008b364516c \ - file://LICENSE;md5=a55c12a2d7d742ecb41ca9ae0a6ddc66" - -SRC_URI = "https://github.com/libfuse/libfuse/releases/download/fuse-${PV}/fuse-${PV}.tar.xz \ -" -SRC_URI[md5sum] = "b9e6558aa25f66c0f1a95d1c7455b944" -SRC_URI[sha256sum] = "3aea4766da5e2751aba82e8f77047d5d3c412bc3c298e4ec9532e59d7bd73a7a" - -S = "${WORKDIR}/fuse-${PV}" - -UPSTREAM_CHECK_URI = "https://github.com/libfuse/libfuse/releases" -UPSTREAM_CHECK_REGEX = "fuse\-(?P<pver>3(\.\d+)+).tar.xz" - -inherit meson pkgconfig - -DEPENDS = "udev" - -PACKAGES =+ "fuse3-utils" - -RPROVIDES_${PN}-dbg += "fuse3-utils-dbg" - -RRECOMMENDS_${PN}_class-target = "kernel-module-fuse fuse3-utils" - -FILES_${PN} += "${libdir}/libfuse3.so.*" -FILES_${PN}-dev += "${libdir}/libfuse3*.la" - -EXTRA_OEMESON += " \ - -Dexamples=false \ -" - -# Forbid auto-renaming to libfuse3-utils -FILES_fuse3-utils = "${bindir} ${base_sbindir}" -DEBIAN_NOAUTONAME_fuse3-utils = "1" -DEBIAN_NOAUTONAME_${PN}-dbg = "1" - -do_install_append() { - rm -rf ${D}${base_prefix}/dev -} diff --git a/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb b/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb index 95e870691c..cee4879eee 100644 --- a/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb +++ b/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb @@ -6,7 +6,7 @@ DESCRIPTION = "FUSE (Filesystem in Userspace) is a simple interface for userspac " HOMEPAGE = "https://github.com/libfuse/libfuse" SECTION = "libs" -LICENSE = "GPLv2 & LGPLv2" +LICENSE = "GPL-2.0-only & LGPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" @@ -14,6 +14,7 @@ SRC_URI = "https://github.com/libfuse/libfuse/releases/download/${BP}/${BP}.tar. file://gold-unversioned-symbol.patch \ file://aarch64.patch \ file://0001-fuse-fix-the-return-value-of-help-option.patch \ + file://fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch \ file://fuse.conf \ " SRC_URI[md5sum] = "8000410aadc9231fd48495f7642f3312" @@ -22,38 +23,40 @@ SRC_URI[sha256sum] = "d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7 UPSTREAM_CHECK_URI = "https://github.com/libfuse/libfuse/releases" UPSTREAM_CHECK_REGEX = "fuse\-(?P<pver>2(\.\d+)+).tar.gz" +CVE_PRODUCT = "fuse_project:fuse" + inherit autotools pkgconfig update-rc.d systemd INITSCRIPT_NAME = "fuse" INITSCRIPT_PARAMS = "start 3 S . stop 20 0 6 ." -SYSTEMD_SERVICE_${PN} = "" +SYSTEMD_SERVICE:${PN} = "" DEPENDS = "gettext-native" PACKAGES =+ "fuse-utils libulockmgr libulockmgr-dev" -RPROVIDES_${PN}-dbg += "fuse-utils-dbg libulockmgr-dbg" +RPROVIDES:${PN}-dbg += "fuse-utils-dbg libulockmgr-dbg" -RRECOMMENDS_${PN}_class-target = "kernel-module-fuse libulockmgr fuse-utils" +RRECOMMENDS:${PN}:class-target = "kernel-module-fuse libulockmgr fuse-utils" -FILES_${PN} += "${libdir}/libfuse.so.*" -FILES_${PN}-dev += "${libdir}/libfuse*.la" +FILES:${PN} += "${libdir}/libfuse.so.*" +FILES:${PN}-dev += "${libdir}/libfuse*.la" -FILES_libulockmgr = "${libdir}/libulockmgr.so.*" -FILES_libulockmgr-dev += "${libdir}/libulock*.la" +FILES:libulockmgr = "${libdir}/libulockmgr.so.*" +FILES:libulockmgr-dev += "${libdir}/libulock*.la" # Forbid auto-renaming to libfuse-utils -FILES_fuse-utils = "${bindir} ${base_sbindir}" -DEBIAN_NOAUTONAME_fuse-utils = "1" -DEBIAN_NOAUTONAME_${PN}-dbg = "1" +FILES:fuse-utils = "${bindir} ${base_sbindir}" +DEBIAN_NOAUTONAME:fuse-utils = "1" +DEBIAN_NOAUTONAME:${PN}-dbg = "1" -do_configure_prepend() { +do_configure:prepend() { # Make this explicit so overriding base_sbindir propagates properly. export MOUNT_FUSE_PATH="${base_sbindir}" } -do_install_append() { +do_install:append() { rm -rf ${D}/dev # systemd class remove the sysv_initddir only if systemd_system_unitdir @@ -69,7 +72,7 @@ do_install_append() { fi } -do_install_append_class-nativesdk() { +do_install:append:class-nativesdk() { install -d ${D}${sysconfdir} mv ${D}/etc/* ${D}${sysconfdir}/ rmdir ${D}/etc |