# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= fuse2 VERSION= 2.9.9 KEYWORDS= sysutils VARIANTS= std SDESC[std]= File System in Userspace (FUSE), legacy HOMEPAGE= https://github.com/libfuse/libfuse CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GITHUB/libfuse:libfuse:fuse-2.9.9 DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[std]= set primary dev tools man OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none NOT_FOR_OPSYS= dragonfly sunos EXRUN[tools]= primary USES= cpe iconv libtool autoreconf gettext:build LICENSE= LGPL21:primary LICENSE_TERMS= primary:{{WRKDIR}}/TERMS LICENSE_FILE= LGPL21:{{WRKSRC}}/COPYING.LIB LICENSE_AWK= TERMS:"\*\/" LICENSE_SOURCE= TERMS:{{WRKSRC}}/include/fuse.h LICENSE_SCHEME= solo CPE_PRODUCT= fuse CPE_VENDOR= fuse_project FPC_EQUIVALENT= sysutils/fusefs-libs MUST_CONFIGURE= gnu CONFIGURE_ARGS= --with-pkgconfigdir={{PREFIX}}/lib/pkgconfig CONFIGURE_ENV= MOUNT_FUSE_PATH={{PREFIX}}/sbin INSTALL_TARGET= install-strip SOVERSION= 2.9.9 post-install-linux: ${RM} -r ${STAGEDIR}/dev post-install: ${INSTALL_DATA} ${WRKSRC}/include/fuse_kernel.h \ ${STAGEDIR}${PREFIX}/include/fuse # This file conflicts with fuse3 ${RM} ${STAGEDIR}${PREFIX}/share/man/man8/mount.fuse.8 pre-configure: ${CP} ${LOCALBASE}/share/gettext/config.rpath ${WRKSRC} [FILE:1174:descriptions/desc.primary] FUSE (Filesystem in Userspace) is an interface for userspace programs to export a filesystem to the kernel. The FUSE project consists of two components: the fuse kernel module (maintained by supported operating system) and the libfuse userspace library (the contents of this package). libfuse provides the reference implementation for communicating with the FUSE kernel module. A FUSE file system is typically implemented as a standalone application that links with libfuse. libfuse provides functions to mount the file system, unmount it, read requests from the kernel, and send responses back. libfuse offers two APIs: a "high-level", synchronous API, and a "low-level" asynchronous API. In both cases, incoming requests from the kernel are passed to the main program using callbacks. When using the high-level API, the callbacks may work with file names and paths instead of inodes, and processing of a request finishes when the callback function returns. When using the low-level API, the callbacks must work with inodes and responses must be sent explicitly using a separate set of API functions. This package contains FUSE version 2, the legacy version. [FILE:38:descriptions/desc.tools] This package contains fuse2 programs. [FILE:112:distinfo] e57a24721177c3b3dd71cb9239ca46b4dee283db9388d48f7ccd256184982194 212017 libfuse-libfuse-fuse-2.9.9.tar.gz [FILE:95:manifests/plist.primary] lib/ libfuse.so.%%SOMAJOR%% libfuse.so.%%SOVERSION%% libulockmgr.so.1 libulockmgr.so.1.0.1 [FILE:269:manifests/plist.dev] include/ fuse.h ulockmgr.h include/fuse/ cuse_lowlevel.h fuse.h fuse_common.h fuse_common_compat.h fuse_compat.h fuse_kernel.h fuse_lowlevel.h fuse_lowlevel_compat.h fuse_opt.h lib/ libfuse.a libfuse.so libulockmgr.a libulockmgr.so lib/pkgconfig/fuse.pc [FILE:155:manifests/plist.tools] %%ONLY-LINUX%%/etc/init.d/fuse %%ONLY-LINUX%%/etc/udev/rules.d/99-fuse.rules %%ONLY-LINUX%%bin/ fusermount ulockmgr_server %%ONLY-LINUX%%sbin/mount.fuse [FILE:49:manifests/plist.man] share/man/man1/ fusermount.1 ulockmgr_server.1 [FILE:304:patches/patch-lib_mount__bsd.c] --- lib/mount_bsd.c.intermediate 2024-11-26 13:24:03 UTC +++ lib/mount_bsd.c @@ -207,7 +207,8 @@ void fuse_kern_unmount(const char *mount /* Check if kernel is doing init in background */ static int init_backgrounded(void) { - unsigned ibg, len; + unsigned ibg; + size_t len; len = sizeof(ibg); [FILE:1481:patches/patch-support-closefrom] From ae2352bca9b4e607538412da0cc2a9625cd8b692 Mon Sep 17 00:00:00 2001 From: Sam James 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 --- configure.ac | 1 + util/ulockmgr_server.c | 6 ++++++ 2 files changed, 7 insertions(+) --- configure.ac.orig +++ 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]) --- util/ulockmgr_server.c.orig +++ util/ulockmgr_server.c @@ -22,6 +22,10 @@ #include #include +#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, void *buf, size_t buflen, int *fdp, 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) { [FILE:202:files/messages-primary-freebsd.ucl] primary: { type: "install" message: <argv[0], args); + if (!hopts.fsname) { + res = add_default_fsname(args->argv[0], args); if (res == -1) goto err; } [FILE:1611:freebsd/patch-lib_mount__bsd.c] --- lib/mount_bsd.c.orig 2019-01-04 13:38:34 UTC +++ lib/mount_bsd.c @@ -10,6 +10,8 @@ #include "fuse_misc.h" #include "fuse_opt.h" +#include +#include #include #include #include @@ -78,6 +80,7 @@ static const struct fuse_opt fuse_mount_ FUSE_DUAL_OPT_KEY("ro", KEY_KERN), FUSE_DUAL_OPT_KEY("rw", KEY_KERN), FUSE_DUAL_OPT_KEY("auto", KEY_KERN), + FUSE_DUAL_OPT_KEY("automounted", KEY_KERN), /* options supported under both Linux and FBSD */ FUSE_DUAL_OPT_KEY("allow_other", KEY_KERN), FUSE_DUAL_OPT_KEY("default_permissions",KEY_KERN), @@ -192,56 +195,12 @@ void fuse_unmount_compat22(const char *m free(umount_cmd); } -static void do_unmount(char *dev, int fd) -{ - char device_path[SPECNAMELEN + 12]; - const char *argv[4]; - const char umount_cmd[] = "/sbin/umount"; - pid_t pid; - - snprintf(device_path, SPECNAMELEN + 12, _PATH_DEV "%s", dev); - - argv[0] = umount_cmd; - argv[1] = "-f"; - argv[2] = device_path; - argv[3] = NULL; - - pid = fork(); - - if (pid == -1) - return; - - if (pid == 0) { - close(fd); - execvp(umount_cmd, (char **)argv); - exit(1); - } - - waitpid(pid, NULL, 0); -} - void fuse_kern_unmount(const char *mountpoint, int fd) { char *ep, dev[128]; struct stat sbuf; - (void)mountpoint; - - if (fstat(fd, &sbuf) == -1) - goto out; - - devname_r(sbuf.st_rdev, S_IFCHR, dev, 128); - - if (strncmp(dev, "fuse", 4)) - goto out; - - strtol(dev + 4, &ep, 10); - if (*ep != '\0') - goto out; - - do_unmount(dev, fd); - -out: + unmount(mountpoint, MNT_FORCE); close(fd); } [FILE:414:freebsd/patch-lib_mount__util.c] --- lib/mount_util.c.orig 2019-01-04 13:38:34 UTC +++ lib/mount_util.c @@ -344,20 +344,3 @@ int fuse_mnt_check_empty(const char *pro } return 0; } - -int fuse_mnt_check_fuseblk(void) -{ - char buf[256]; - FILE *f = fopen("/proc/filesystems", "r"); - if (!f) - return 1; - - while (fgets(buf, sizeof(buf), f)) - if (strstr(buf, "fuseblk\n")) { - fclose(f); - return 1; - } - - fclose(f); - return 0; -} [FILE:339:freebsd/patch-lib_mount__util.h] --- lib/mount_util.h.orig 2019-01-04 13:38:34 UTC +++ lib/mount_util.h @@ -16,4 +16,3 @@ int fuse_mnt_umount(const char *progname char *fuse_mnt_resolve_path(const char *progname, const char *orig); int fuse_mnt_check_empty(const char *progname, const char *mnt, mode_t rootmode, off_t rootsize); -int fuse_mnt_check_fuseblk(void);