diff options
Diffstat (limited to 'meta-filesystems/recipes-support/fuse')
-rw-r--r-- | meta-filesystems/recipes-support/fuse/files/fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch | 53 | ||||
-rw-r--r-- | meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb (renamed from meta-filesystems/recipes-support/fuse/fuse_2.9.7.bb) | 50 |
2 files changed, 84 insertions, 19 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/fuse_2.9.7.bb b/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb index 202d4c3eb8..6f613e9cd1 100644 --- a/meta-filesystems/recipes-support/fuse/fuse_2.9.7.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,44 +14,50 @@ 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] = "9bd4ce8184745fd3d000ca2692adacdb" -SRC_URI[sha256sum] = "832432d1ad4f833c20e13b57cf40ce5277a9d33e483205fc63c78111b3358874" +SRC_URI[md5sum] = "8000410aadc9231fd48495f7642f3312" +SRC_URI[sha256sum] = "d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5" + +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-dbg fuse-utils libulockmgr libulockmgr-dev libulockmgr-dbg" +PACKAGES =+ "fuse-utils libulockmgr libulockmgr-dev" + +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-dbg += "${libdir}/.debug/libulock*" +FILES:libulockmgr = "${libdir}/libulockmgr.so.*" +FILES:libulockmgr-dev += "${libdir}/libulock*.la" # Forbid auto-renaming to libfuse-utils -FILES_fuse-utils = "${bindir} ${base_sbindir}" -FILES_fuse-utils-dbg = "${bindir}/.debug ${base_sbindir}/.debug" -DEBIAN_NOAUTONAME_fuse-utils = "1" -DEBIAN_NOAUTONAME_fuse-utils-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() { - rm -rf ${D}${base_prefix}/dev +do_install:append() { + rm -rf ${D}/dev # systemd class remove the sysv_initddir only if systemd_system_unitdir # contains anything, but it's not needed if sysvinit is not in DISTRO_FEATURES @@ -62,8 +68,14 @@ do_install_append() { # Install systemd related configuration file if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/modules-load.d - install -m 0644 ${WORKDIR}/fuse.conf ${D}${sysconfdir}/modules-load.d + install -m 0644 ${UNPACKDIR}/fuse.conf ${D}${sysconfdir}/modules-load.d fi } +do_install:append:class-nativesdk() { + install -d ${D}${sysconfdir} + mv ${D}/etc/* ${D}${sysconfdir}/ + rmdir ${D}/etc +} + BBCLASSEXTEND = "native nativesdk" |