From 0f3d5644f462e87068e34626dca9dcb304ae4faf Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Aug 04 2016 07:04:52 +0000 Subject: trivial fixes Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore index 9006772..169a9da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ /encfs-1.7.4.tgz /encfs-1.8.1.tar.gz -/encfs-default-permissions.patch diff --git a/0001-Revert-Remove-o-default_permissions-unless-needed.patch b/0001-Revert-Remove-o-default_permissions-unless-needed.patch new file mode 100644 index 0000000..2218aab --- /dev/null +++ b/0001-Revert-Remove-o-default_permissions-unless-needed.patch @@ -0,0 +1,58 @@ +From 23d2fb33221f41361fb1042e41a73a5127f4a641 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Thu, 4 Aug 2016 08:54:11 +0200 +Subject: [PATCH] Revert "Remove "-o default_permissions" unless needed." + +This reverts commit 82ceb88998fccfdbe21d2e66cd8764adef7d55e5. +--- + encfs/main.cpp | 27 +++++++-------------------- + 1 file changed, 7 insertions(+), 20 deletions(-) + +diff --git a/encfs/main.cpp b/encfs/main.cpp +index 0fdcb0c..5dd93ab 100644 +--- a/encfs/main.cpp ++++ b/encfs/main.cpp +@@ -373,6 +373,13 @@ static bool processArgs(int argc, char *argv[], + + if (!out->isThreaded) PUSHARG("-s"); + ++ if (useDefaultFlags) { ++ PUSHARG("-o"); ++ PUSHARG("use_ino"); ++ PUSHARG("-o"); ++ PUSHARG("default_permissions"); ++ } ++ + // we should have at least 2 arguments left over - the source directory and + // the mount point. + if (optind + 2 <= argc) { +@@ -395,26 +402,6 @@ static bool processArgs(int argc, char *argv[], + } + } + +- // Add default flags unless --no-default-flags was passed +- if (useDefaultFlags) { +- +- // Expose the underlying stable inode number +- PUSHARG("-o"); +- PUSHARG("use_ino"); +- +- // "default_permissions" comes with a performance cost. Only enable +- // it if makes sense. +- for(int i=0; i < out->fuseArgc; i++) { +- if ( out->fuseArgv[i] == NULL ) { +- continue; +- } else if (strcmp(out->fuseArgv[i], "allow_other") == 0) { +- PUSHARG("-o"); +- PUSHARG("default_permissions"); +- break; +- } +- } +- } +- + // sanity check + if (out->isDaemon && (!isAbsolutePath(out->mountPoint.c_str()) || + !isAbsolutePath(out->opts->rootDir.c_str()))) { +-- +2.7.4 + diff --git a/fuse-encfs.spec b/fuse-encfs.spec index 7be4e1e..8b5a292 100644 --- a/fuse-encfs.spec +++ b/fuse-encfs.spec @@ -6,10 +6,11 @@ License: GPLv3+ Group: System Environment/Kernel Url: http://www.arg0.net/encfs Source0: https://github.com/vgough/encfs/releases/download/v%{version}/encfs-%{version}.tar.gz -Patch0: encfs-default-permissions.patch +Patch0: 0001-Revert-Remove-o-default_permissions-unless-needed.patch Requires: fuse >= 2.6 Provides: encfs = %{version}-%{release} +Provides: encfs%{?_isa} = %{version}-%{release} BuildRequires: pkgconfig(librlog) >= 1.3 BuildRequires: pkgconfig(openssl) BuildRequires: boost-devel >= 1.34 @@ -21,7 +22,6 @@ BuildRequires: libtool BuildRequires: libattr-devel BuildRequires: perl(Pod::Html) - %description EncFS implements an encrypted filesystem in userspace using FUSE. FUSE provides a Linux kernel module which allows virtual filesystems to be written @@ -30,11 +30,10 @@ passes access through to the underlying filesystem. Similar to CFS except that it does not use NFS. %prep -%setup -q -n encfs-%{version} -%patch0 -p1 -b .permissions +%autosetup -n encfs-%{version} -p1 %build -autoreconf -if +autoreconf -vfi %configure --disable-static %make_build diff --git a/sources b/sources index d5597fb..a882edd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -07ae2f257694e3cab21e49952488ec0e encfs-default-permissions.patch +f8365378ab7c0d493e04f4e98ae7eb4e encfs-1.8.1.tar.gz