mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
fuse: update to fuse-2.8.6
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
58b8cf4d44
commit
62ffffa021
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="fuse"
|
||||
PKG_VERSION="2.8.5"
|
||||
PKG_VERSION="2.8.6"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
@ -1,125 +0,0 @@
|
||||
From d8bdebc639a84fa280153a466d4bb420fc9572bc Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Wed, 27 Oct 2010 16:29:45 +0400
|
||||
Subject: [PATCH 3/3] Fix mounting FUSE fs into current working directory
|
||||
|
||||
See rhbz #622255 for bug description:
|
||||
|
||||
https://bugzilla.redhat.com/622255
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
lib/mount_util.c | 75 +++++++++++++-----------------------------------------
|
||||
1 files changed, 18 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/lib/mount_util.c b/lib/mount_util.c
|
||||
index 33e6697..b9a0895 100644
|
||||
--- a/lib/mount_util.c
|
||||
+++ b/lib/mount_util.c
|
||||
@@ -54,8 +54,8 @@ static int mtab_needs_update(const char *mnt)
|
||||
return 1;
|
||||
}
|
||||
|
||||
-static int add_mount_legacy(const char *progname, const char *fsname,
|
||||
- const char *mnt, const char *type, const char *opts)
|
||||
+static int add_mount(const char *progname, const char *fsname,
|
||||
+ const char *mnt, const char *type, const char *opts, int is_legacy)
|
||||
{
|
||||
int res;
|
||||
int status;
|
||||
@@ -76,6 +76,14 @@ static int add_mount_legacy(const char *progname, const char *fsname,
|
||||
goto out_restore;
|
||||
}
|
||||
if (res == 0) {
|
||||
+ /*
|
||||
+ * Hide output, because old versions don't support
|
||||
+ * --no-canonicalize
|
||||
+ */
|
||||
+ int fd = open("/dev/null", O_RDONLY);
|
||||
+ dup2(fd, 1);
|
||||
+ dup2(fd, 2);
|
||||
+
|
||||
char templ[] = "/tmp/fusermountXXXXXX";
|
||||
char *tmp;
|
||||
|
||||
@@ -99,59 +107,12 @@ static int add_mount_legacy(const char *progname, const char *fsname,
|
||||
exit(1);
|
||||
}
|
||||
rmdir(tmp);
|
||||
- execl("/bin/mount", "/bin/mount", "-i", "-f", "-t", type,
|
||||
- "-o", opts, fsname, mnt, NULL);
|
||||
- fprintf(stderr, "%s: failed to execute /bin/mount: %s\n",
|
||||
- progname, strerror(errno));
|
||||
- exit(1);
|
||||
- }
|
||||
- res = waitpid(res, &status, 0);
|
||||
- if (res == -1)
|
||||
- fprintf(stderr, "%s: waitpid: %s\n", progname, strerror(errno));
|
||||
-
|
||||
- if (status != 0)
|
||||
- res = -1;
|
||||
-
|
||||
- out_restore:
|
||||
- sigprocmask(SIG_SETMASK, &oldmask, NULL);
|
||||
-
|
||||
- return res;
|
||||
-}
|
||||
-
|
||||
-static int add_mount(const char *progname, const char *fsname,
|
||||
- const char *mnt, const char *type, const char *opts)
|
||||
-{
|
||||
- int res;
|
||||
- int status;
|
||||
- sigset_t blockmask;
|
||||
- sigset_t oldmask;
|
||||
-
|
||||
- sigemptyset(&blockmask);
|
||||
- sigaddset(&blockmask, SIGCHLD);
|
||||
- res = sigprocmask(SIG_BLOCK, &blockmask, &oldmask);
|
||||
- if (res == -1) {
|
||||
- fprintf(stderr, "%s: sigprocmask: %s\n", progname, strerror(errno));
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- res = fork();
|
||||
- if (res == -1) {
|
||||
- fprintf(stderr, "%s: fork: %s\n", progname, strerror(errno));
|
||||
- goto out_restore;
|
||||
- }
|
||||
- if (res == 0) {
|
||||
- /*
|
||||
- * Hide output, because old versions don't support
|
||||
- * --no-canonicalize
|
||||
- */
|
||||
- int fd = open("/dev/null", O_RDONLY);
|
||||
- dup2(fd, 1);
|
||||
- dup2(fd, 2);
|
||||
-
|
||||
- sigprocmask(SIG_SETMASK, &oldmask, NULL);
|
||||
- setuid(geteuid());
|
||||
- execl("/bin/mount", "/bin/mount", "--no-canonicalize", "-i",
|
||||
- "-f", "-t", type, "-o", opts, fsname, mnt, NULL);
|
||||
+ if(is_legacy)
|
||||
+ execl("/bin/mount", "/bin/mount", "-i",
|
||||
+ "-f", "-t", type, "-o", opts, fsname, mnt, NULL);
|
||||
+ else
|
||||
+ execl("/bin/mount", "/bin/mount", "--no-canonicalize", "-i",
|
||||
+ "-f", "-t", type, "-o", opts, fsname, mnt, NULL);
|
||||
fprintf(stderr, "%s: failed to execute /bin/mount: %s\n",
|
||||
progname, strerror(errno));
|
||||
exit(1);
|
||||
@@ -177,9 +138,9 @@ int fuse_mnt_add_mount(const char *progname, const char *fsname,
|
||||
if (!mtab_needs_update(mnt))
|
||||
return 0;
|
||||
|
||||
- res = add_mount(progname, fsname, mnt, type, opts);
|
||||
+ res = add_mount(progname, fsname, mnt, type, opts, 0);
|
||||
if (res == -1)
|
||||
- res = add_mount_legacy(progname, fsname, mnt, type, opts);
|
||||
+ res = add_mount(progname, fsname, mnt, type, opts, 1);
|
||||
|
||||
return res;
|
||||
}
|
||||
--
|
||||
1.7.3.1
|
||||
|
13
packages/sysutils/fuse/patches/fuse-2.8.6-000-clone.patch
Normal file
13
packages/sysutils/fuse/patches/fuse-2.8.6-000-clone.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -Naur fuse-2.8.6/util/fusermount.c fuse-2.8.6.patch/util/fusermount.c
|
||||
--- fuse-2.8.6/util/fusermount.c 2011-09-13 09:23:14.000000000 +0200
|
||||
+++ fuse-2.8.6.patch/util/fusermount.c 2011-09-18 00:19:46.120163595 +0200
|
||||
@@ -7,6 +7,9 @@
|
||||
*/
|
||||
/* This program does the mounting and unmounting of FUSE filesystems */
|
||||
|
||||
+/* for CLONE_NEWNS in sched.h */
|
||||
+#define _GNU_SOURCE
|
||||
+
|
||||
#include <config.h>
|
||||
|
||||
#include "mount_util.h"
|
Loading…
x
Reference in New Issue
Block a user