summaryrefslogtreecommitdiff
path: root/filesystems/fusefs-libs/files
diff options
context:
space:
mode:
Diffstat (limited to 'filesystems/fusefs-libs/files')
-rw-r--r--filesystems/fusefs-libs/files/patch-doc_Makefile.am11
-rw-r--r--filesystems/fusefs-libs/files/patch-lib_fuse__versionscript53
-rw-r--r--filesystems/fusefs-libs/files/patch-lib_helper.c72
-rw-r--r--filesystems/fusefs-libs/files/patch-lib_mount__bsd.c77
-rw-r--r--filesystems/fusefs-libs/files/patch-lib_mount__util.c23
-rw-r--r--filesystems/fusefs-libs/files/patch-lib_mount__util.h7
6 files changed, 243 insertions, 0 deletions
diff --git a/filesystems/fusefs-libs/files/patch-doc_Makefile.am b/filesystems/fusefs-libs/files/patch-doc_Makefile.am
new file mode 100644
index 000000000000..d80aa802128e
--- /dev/null
+++ b/filesystems/fusefs-libs/files/patch-doc_Makefile.am
@@ -0,0 +1,11 @@
+--- doc/Makefile.am.orig 2019-07-31 16:36:32 UTC
++++ doc/Makefile.am
+@@ -1,5 +1,8 @@
+ ## Process this file with automake to produce Makefile.in
+
++if BSD
++else
+ dist_man_MANS = fusermount.1 mount.fuse.8 ulockmgr_server.1
++endif
+
+ EXTRA_DIST = how-fuse-works kernel.txt Doxyfile html
diff --git a/filesystems/fusefs-libs/files/patch-lib_fuse__versionscript b/filesystems/fusefs-libs/files/patch-lib_fuse__versionscript
new file mode 100644
index 000000000000..f287af348fce
--- /dev/null
+++ b/filesystems/fusefs-libs/files/patch-lib_fuse__versionscript
@@ -0,0 +1,53 @@
+--- lib/fuse_versionscript.orig 2019-01-04 13:33:33 UTC
++++ lib/fuse_versionscript
+@@ -9,15 +9,15 @@ FUSE_2.2 {
+ fuse_loop_mt;
+ fuse_loop_mt_proc;
+ fuse_main;
+- fuse_main_compat1;
+- fuse_main_compat2;
+- fuse_mount_compat1;
+- fuse_new_compat1;
+- fuse_new_compat2;
++# fuse_main_compat1;
++# fuse_main_compat2;
++# fuse_mount_compat1;
++# fuse_new_compat1;
++# fuse_new_compat2;
+ fuse_process_cmd;
+ fuse_read_cmd;
+ fuse_set_getcontext_func;
+- fuse_setup_compat2;
++# fuse_setup_compat2;
+ };
+
+ FUSE_2.4 {
+@@ -56,10 +56,10 @@ FUSE_2.5 {
+
+ FUSE_2.5 {
+ global:
+- fuse_lowlevel_new_compat;
+- fuse_main_real_compat22;
+- fuse_mount_compat22;
+- fuse_new_compat22;
++# fuse_lowlevel_new_compat;
++# fuse_main_real_compat22;
++# fuse_mount_compat22;
++# fuse_new_compat22;
+ fuse_opt_parse;
+ fuse_opt_add_opt;
+ fuse_opt_add_arg;
+@@ -69,10 +69,10 @@ FUSE_2.5 {
+ fuse_remove_signal_handlers;
+ fuse_reply_create;
+ fuse_reply_open;
+- fuse_reply_open_compat;
++# fuse_reply_open_compat;
+ fuse_reply_statfs;
+- fuse_reply_statfs_compat;
+- fuse_setup_compat22;
++# fuse_reply_statfs_compat;
++# fuse_setup_compat22;
+ fuse_set_signal_handlers;
+ } FUSE_2.4;
+
diff --git a/filesystems/fusefs-libs/files/patch-lib_helper.c b/filesystems/fusefs-libs/files/patch-lib_helper.c
new file mode 100644
index 000000000000..a9cb4b6fd1aa
--- /dev/null
+++ b/filesystems/fusefs-libs/files/patch-lib_helper.c
@@ -0,0 +1,72 @@
+--- lib/helper.c.orig 2015-05-22 09:24:02 UTC
++++ lib/helper.c
+@@ -31,7 +31,7 @@ enum {
+ struct helper_opts {
+ int singlethread;
+ int foreground;
+- int nodefault_subtype;
++ int fsname;
+ char *mountpoint;
+ };
+
+@@ -42,8 +42,7 @@ static const struct fuse_opt fuse_helper
+ FUSE_HELPER_OPT("debug", foreground),
+ FUSE_HELPER_OPT("-f", foreground),
+ FUSE_HELPER_OPT("-s", singlethread),
+- FUSE_HELPER_OPT("fsname=", nodefault_subtype),
+- FUSE_HELPER_OPT("subtype=", nodefault_subtype),
++ FUSE_HELPER_OPT("fsname=", fsname),
+
+ FUSE_OPT_KEY("-h", KEY_HELP),
+ FUSE_OPT_KEY("--help", KEY_HELP),
+@@ -53,7 +52,6 @@ static const struct fuse_opt fuse_helper
+ FUSE_OPT_KEY("-d", FUSE_OPT_KEY_KEEP),
+ FUSE_OPT_KEY("debug", FUSE_OPT_KEY_KEEP),
+ FUSE_OPT_KEY("fsname=", FUSE_OPT_KEY_KEEP),
+- FUSE_OPT_KEY("subtype=", FUSE_OPT_KEY_KEEP),
+ FUSE_OPT_END
+ };
+
+@@ -123,24 +121,24 @@ static int fuse_helper_opt_proc(void *da
+ }
+ }
+
+-static int add_default_subtype(const char *progname, struct fuse_args *args)
++static int add_default_fsname(const char *progname, struct fuse_args *args)
+ {
+ int res;
+- char *subtype_opt;
++ char *fsname_opt;
+ const char *basename = strrchr(progname, '/');
+ if (basename == NULL)
+ basename = progname;
+ else if (basename[1] != '\0')
+ basename++;
+
+- subtype_opt = (char *) malloc(strlen(basename) + 64);
+- if (subtype_opt == NULL) {
++ fsname_opt = (char *) malloc(strlen(basename) + 64);
++ if (fsname_opt == NULL) {
+ fprintf(stderr, "fuse: memory allocation failed\n");
+ return -1;
+ }
+- sprintf(subtype_opt, "-osubtype=%s", basename);
+- res = fuse_opt_add_arg(args, subtype_opt);
+- free(subtype_opt);
++ sprintf(fsname_opt, "-ofsname=%s", basename);
++ res = fuse_opt_add_arg(args, fsname_opt);
++ free(fsname_opt);
+ return res;
+ }
+
+@@ -156,8 +154,8 @@ int fuse_parse_cmdline(struct fuse_args
+ if (res == -1)
+ return -1;
+
+- if (!hopts.nodefault_subtype) {
+- res = add_default_subtype(args->argv[0], args);
++ if (!hopts.fsname) {
++ res = add_default_fsname(args->argv[0], args);
+ if (res == -1)
+ goto err;
+ }
diff --git a/filesystems/fusefs-libs/files/patch-lib_mount__bsd.c b/filesystems/fusefs-libs/files/patch-lib_mount__bsd.c
new file mode 100644
index 000000000000..765ec8fb8159
--- /dev/null
+++ b/filesystems/fusefs-libs/files/patch-lib_mount__bsd.c
@@ -0,0 +1,77 @@
+--- lib/mount_bsd.c.orig 2015-05-22 09:24:02 UTC
++++ lib/mount_bsd.c
+@@ -10,6 +10,8 @@
+ #include "fuse_misc.h"
+ #include "fuse_opt.h"
+
++#include <sys/param.h>
++#include <sys/mount.h>
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <sys/sysctl.h>
+@@ -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);
+ }
+
diff --git a/filesystems/fusefs-libs/files/patch-lib_mount__util.c b/filesystems/fusefs-libs/files/patch-lib_mount__util.c
new file mode 100644
index 000000000000..1d6a5db2a488
--- /dev/null
+++ b/filesystems/fusefs-libs/files/patch-lib_mount__util.c
@@ -0,0 +1,23 @@
+--- lib/mount_util.c.orig 2015-05-22 09:24:02 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;
+-}
diff --git a/filesystems/fusefs-libs/files/patch-lib_mount__util.h b/filesystems/fusefs-libs/files/patch-lib_mount__util.h
new file mode 100644
index 000000000000..07865d839d77
--- /dev/null
+++ b/filesystems/fusefs-libs/files/patch-lib_mount__util.h
@@ -0,0 +1,7 @@
+--- lib/mount_util.h.orig 2015-05-22 09:24:02 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);