diff --git a/fuse-2.8.5.tar.bz2 b/fuse-2.8.5.tar.bz2 deleted file mode 100644 index 789ad34..0000000 --- a/fuse-2.8.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11c9c14dfb0f6ef251be83ba6b9c9c6bf973431d7f05290deb4fd382ef88ab40 -size 395506 diff --git a/fuse-2.8.7.tar.bz2 b/fuse-2.8.7.tar.bz2 new file mode 100644 index 0000000..97e8d25 --- /dev/null +++ b/fuse-2.8.7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd9b14ce4e593be9f69f5f0e3dd5c187c5f1c322092d7fda3572e8c393660b09 +size 429969 diff --git a/fuse-fix-cleanup-in-case-of-failed-mount.patch b/fuse-fix-cleanup-in-case-of-failed-mount.patch deleted file mode 100644 index 78c39ee..0000000 --- a/fuse-fix-cleanup-in-case-of-failed-mount.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- - util/fusermount.c | 1 - - 1 file changed, 1 deletion(-) - -Index: fuse-2.7.2/util/fusermount.c -=================================================================== ---- fuse-2.7.2.orig/util/fusermount.c 2011-02-21 17:30:34.000000000 +0100 -+++ fuse-2.7.2/util/fusermount.c 2011-02-21 17:31:11.682067022 +0100 -@@ -770,7 +770,6 @@ static int mount_fuse(const char *mnt, c - if (geteuid() == 0) { - res = add_mount(source, mnt, type, mnt_opts); - if (res == -1) { -- umount2(mnt, 2); /* lazy umount */ - close(fd); - return -1; - } diff --git a/fuse-handle-failure-to-allocate-req.patch b/fuse-handle-failure-to-allocate-req.patch deleted file mode 100644 index 98656e5..0000000 --- a/fuse-handle-failure-to-allocate-req.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9294657fb966c685cf6a99f4bbe73a91eb2b8f3c Mon Sep 17 00:00:00 2001 -From: Miklos Szeredi -Date: Sun, 23 Oct 2011 10:07:20 +0200 -Subject: Reply with ENOMEM in case of failure to allocate request - -Reply to request with ENOMEM in case of failure to allocate request -structure. Otherwise the task issuing the request will just freeze up -until the filesystem daemon is killed. Reported by Stephan Kulow ---- - lib/fuse_lowlevel.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -Index: fuse-2.8.5/lib/fuse_lowlevel.c -=================================================================== ---- fuse-2.8.5.orig/lib/fuse_lowlevel.c 2010-09-28 10:03:09.000000000 +0200 -+++ fuse-2.8.5/lib/fuse_lowlevel.c 2011-11-03 13:10:07.000000000 +0100 -@@ -1467,7 +1467,18 @@ static void fuse_ll_process(void *data, - - req = (struct fuse_req *) calloc(1, sizeof(struct fuse_req)); - if (req == NULL) { -+ struct fuse_out_header out = { -+ .unique = in->unique, -+ .error = -ENOMEM, -+ .len = sizeof(struct fuse_out_header), -+ }; -+ struct iovec iov = { -+ .iov_base = &out, -+ .iov_len = sizeof(struct fuse_out_header), -+ }; -+ - fprintf(stderr, "fuse: failed to allocate request\n"); -+ fuse_chan_send(ch, &iov, 1); - return; - } - diff --git a/fuse-umount-race-fix.patch b/fuse-umount-race-fix.patch deleted file mode 100644 index 41f5f43..0000000 --- a/fuse-umount-race-fix.patch +++ /dev/null @@ -1,123 +0,0 @@ ---- - lib/mount_util.c | 59 ++++++++++++++++++++++++++++++++++++++++++++---------- - lib/mount_util.h | 1 - util/fusermount.c | 9 +++++++- - 3 files changed, 58 insertions(+), 11 deletions(-) - -Index: fuse-2.8.5/lib/mount_util.c -=================================================================== ---- fuse-2.8.5.orig/lib/mount_util.c 2010-09-28 10:03:09.000000000 +0200 -+++ fuse-2.8.5/lib/mount_util.c 2010-12-02 14:58:34.000000000 +0100 -@@ -140,14 +140,6 @@ static int add_mount(const char *prognam - 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", -@@ -178,8 +170,6 @@ int fuse_mnt_add_mount(const char *progn - return 0; - - res = add_mount(progname, fsname, mnt, type, opts); -- if (res == -1) -- res = add_mount_legacy(progname, fsname, mnt, type, opts); - - return res; - } -@@ -243,6 +233,55 @@ int fuse_mnt_umount(const char *progname - return exec_umount(progname, rel_mnt, lazy); - } - -+static int remove_mount(const char *progname, const char *mnt) -+{ -+ 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) { -+ sigprocmask(SIG_SETMASK, &oldmask, NULL); -+ setuid(geteuid()); -+ execl("/bin/umount", "/bin/umount", "--no-canonicalize", "-i", -+ "--fake", mnt, NULL); -+ fprintf(stderr, "%s: failed to execute /bin/umount: %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; -+} -+ -+int fuse_mnt_remove_mount(const char *progname, const char *mnt) -+{ -+ if (!mtab_needs_update(mnt)) -+ return 0; -+ -+ return remove_mount(progname, mnt); -+} -+ - char *fuse_mnt_resolve_path(const char *progname, const char *orig) - { - char buf[PATH_MAX]; -Index: fuse-2.8.5/lib/mount_util.h -=================================================================== ---- fuse-2.8.5.orig/lib/mount_util.h 2010-06-23 15:04:14.000000000 +0200 -+++ fuse-2.8.5/lib/mount_util.h 2010-12-02 14:58:34.000000000 +0100 -@@ -10,6 +10,7 @@ - - int fuse_mnt_add_mount(const char *progname, const char *fsname, - const char *mnt, const char *type, const char *opts); -+int fuse_mnt_remove_mount(const char *progname, const char *mnt); - int fuse_mnt_umount(const char *progname, const char *abs_mnt, - const char *rel_mnt, int lazy); - char *fuse_mnt_resolve_path(const char *progname, const char *orig); -Index: fuse-2.8.5/util/fusermount.c -=================================================================== ---- fuse-2.8.5.orig/util/fusermount.c 2010-09-28 10:04:13.000000000 +0200 -+++ fuse-2.8.5/util/fusermount.c 2010-12-02 14:58:34.000000000 +0100 -@@ -407,8 +407,15 @@ static int unmount_fuse_locked(const cha - if (res == -1) - goto out; - -- res = fuse_mnt_umount(progname, mnt, last, lazy); -+ res = umount2(last, lazy ? 2 : 0); -+ if (res == -1 && !quiet) { -+ fprintf(stderr, -+ "%s: failed to unmount %s: %s\n", -+ progname, mnt, strerror(errno)); -+ } - -+ if (res == 0) -+ res = fuse_mnt_remove_mount(progname, mnt); - out: - free(copy); - if (currdir_fd != -1) { diff --git a/fuse.changes b/fuse.changes index 5a2b4b9..a57e0c0 100644 --- a/fuse.changes +++ b/fuse.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Wed Jan 25 19:57:36 CET 2012 - mszeredi@suse.cz + +- use %set_permissions instead of %run_permissions in specfile + +------------------------------------------------------------------- +Wed Jan 25 19:11:44 CET 2012 - mszeredi@suse.cz + +- compile /bin/fusermount as a position independent executable + [bnc#743155] + +------------------------------------------------------------------- +Wed Jan 25 18:32:49 CET 2012 - mszeredi@suse.cz + +- update to 2.8.7 + * fix ambiguous symbol version for fuse_chan_new + * prevent calling ulockmgr_server with illegal arguments + * fix hang in wait_on_path() + ------------------------------------------------------------------- Thu Nov 3 13:15:39 CET 2011 - mszeredi@suse.cz diff --git a/fuse.spec b/fuse.spec index e83b6b2..fbd7c5b 100644 --- a/fuse.spec +++ b/fuse.spec @@ -1,7 +1,7 @@ # # spec file for package fuse # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ Name: fuse Summary: User space File System -Version: 2.8.5 +Version: 2.8.7 Release: 10 License: GPL-2.0+ ; LGPL-2.1+ Group: System/Filesystems @@ -30,10 +30,8 @@ Source2: fuse.rpmlintrc Source3: baselibs.conf Patch: fuse-install-fix.diff Patch2: fuse-pc-remove-libdir-from-Libs.diff -Patch3: fuse-umount-race-fix.patch -Patch4: fuse-fix-cleanup-in-case-of-failed-mount.patch -Patch5: fuse-gnu_source.patch -Patch6: fuse-handle-failure-to-allocate-req.patch +Patch3: fuse-gnu_source.patch +Patch4: fusermount-compile-as-pie.patch Url: http://fuse.sourceforge.net BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} > 1130 @@ -276,10 +274,8 @@ Authors: %if "%{_exec_prefix}" == "/" || "%{_exec_prefix}" == "/usr" %patch2 %endif -%patch3 -p1 +%patch3 %patch4 -p1 -%patch5 -%patch6 -p1 %build autoreconf -fiv @@ -313,7 +309,11 @@ done %{__rm} -rf example/.deps example/Makefile.am example/Makefile.in %post +%if 0%{?suse_version} >= 1140 +%set_permissions %{_bindir}/fusermount +%else %run_permissions +%endif %verifyscript %verify_permissions -e %{_bindir}/fusermount diff --git a/fusermount-compile-as-pie.patch b/fusermount-compile-as-pie.patch new file mode 100644 index 0000000..741cb04 --- /dev/null +++ b/fusermount-compile-as-pie.patch @@ -0,0 +1,14 @@ +Index: fuse-2.8.7/util/Makefile.am +=================================================================== +--- fuse-2.8.7.orig/util/Makefile.am 2012-01-25 19:13:34.000000000 +0100 ++++ fuse-2.8.7/util/Makefile.am 2012-01-25 19:16:02.231609707 +0100 +@@ -7,6 +7,9 @@ noinst_PROGRAMS = mount.fuse + fusermount_SOURCES = fusermount.c + fusermount_LDADD = ../lib/mount_util.lo + fusermount_CPPFLAGS = -I../lib ++fusermount_CFLAGS = -fPIE $(AM_CFLAGS) ++fusermount_LDFLAGS = -pie $(AM_LDFLAGS) ++ + mount_fuse_SOURCES = mount.fuse.c + + ulockmgr_server_SOURCES = ulockmgr_server.c