diff --git a/0001-Replace-linux-define-with-more-standard-__linux__.patch b/0001-Replace-linux-define-with-more-standard-__linux__.patch new file mode 100644 index 0000000..58d2764 --- /dev/null +++ b/0001-Replace-linux-define-with-more-standard-__linux__.patch @@ -0,0 +1,107 @@ +From f5d37d2c6581e874c8d4aedfe8a09339b3f8b03d Mon Sep 17 00:00:00 2001 +From: Jakob Unterwurzacher +Date: Sun, 1 Oct 2017 19:04:30 +0200 +Subject: [PATCH] Replace "linux" define with more-standard "__linux__" + +The "linux" define is not available with "g++ -std=c++11", +which resulted in bug https://github.com/vgough/encfs/issues/398 . + +Available defines for gcc 7.1.1, g++ 7.1.7, clang 4.0.0: + +$ g++ -dM -E -x c++ /dev/null | grep linux + +$ g++ -dM -E -x c++ -std=c++11 /dev/null | grep linux + +$ echo "" | gcc -E -dM -c - | grep linux + +$ echo "" | clang -E - -dM | grep linux +--- + encfs/DirNode.cpp | 2 +- + encfs/FileNode.cpp | 2 +- + encfs/FileUtils.cpp | 2 +- + encfs/RawFileIO.cpp | 2 +- + encfs/encfs.cpp | 2 +- + encfs/encfs.h | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/encfs/DirNode.cpp b/encfs/DirNode.cpp +index 8dc3335..00b60bf 100644 +--- a/encfs/DirNode.cpp ++++ b/encfs/DirNode.cpp +@@ -31,7 +31,7 @@ + #include "FileNode.h" + #include "FileUtils.h" + #include "NameIO.h" +-#ifdef linux ++#ifdef __linux__ + #include + #endif + +diff --git a/encfs/FileNode.cpp b/encfs/FileNode.cpp +index 7486720..64ae8af 100644 +--- a/encfs/FileNode.cpp ++++ b/encfs/FileNode.cpp +@@ -24,7 +24,7 @@ + #include + #include + #include +-#ifdef linux ++#ifdef __linux__ + #include + #endif + +diff --git a/encfs/FileUtils.cpp b/encfs/FileUtils.cpp +index 444b2e8..c477786 100644 +--- a/encfs/FileUtils.cpp ++++ b/encfs/FileUtils.cpp +@@ -19,7 +19,7 @@ + */ + + // defines needed for RedHat 7.3... +-#ifdef linux ++#ifdef __linux__ + #define _XOPEN_SOURCE 500 // make sure pwrite() is pulled in + #endif + #define _BSD_SOURCE // pick up setenv on RH7.3 +diff --git a/encfs/RawFileIO.cpp b/encfs/RawFileIO.cpp +index 6f722c9..7cab3dd 100644 +--- a/encfs/RawFileIO.cpp ++++ b/encfs/RawFileIO.cpp +@@ -18,7 +18,7 @@ + * along with this program. If not, see . + */ + +-#ifdef linux ++#ifdef __linux__ + #define _XOPEN_SOURCE 500 // pick up pread , pwrite + #endif + #include "easylogging++.h" +diff --git a/encfs/encfs.cpp b/encfs/encfs.cpp +index 721c28a..99fad32 100644 +--- a/encfs/encfs.cpp ++++ b/encfs/encfs.cpp +@@ -32,7 +32,7 @@ + #include + #include + #include +-#ifdef linux ++#ifdef __linux__ + #include + #endif + +diff --git a/encfs/encfs.h b/encfs/encfs.h +index 0d6b7d1..28b7709 100644 +--- a/encfs/encfs.h ++++ b/encfs/encfs.h +@@ -34,7 +34,7 @@ namespace encfs { + #define HAVE_XATTR + #endif + +-#ifndef linux ++#ifndef __linux__ + #include + + static __inline int setfsuid(uid_t uid) { +-- +2.13.6 + diff --git a/fuse-encfs.spec b/fuse-encfs.spec index 93e64ad..9c6feb2 100644 --- a/fuse-encfs.spec +++ b/fuse-encfs.spec @@ -1,11 +1,12 @@ Name: fuse-encfs Version: 1.9.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Encrypted pass-thru filesystem in userspace 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: 0001-Replace-linux-define-with-more-standard-__linux__.patch Requires: fuse >= 2.6 Provides: encfs = %{version}-%{release} @@ -29,8 +30,7 @@ passes access through to the underlying filesystem. Similar to CFS except that it does not use NFS. %prep -%autosetup -n encfs-%{version} -rm -rf internal/tinyxml2-3.0.0 +%autosetup -p1 -n encfs-%{version} mkdir %{_target_platform} sed -i 's|install (FILES encfs/encfssh DESTINATION bin)|install (PROGRAMS encfs/encfssh DESTINATION bin)|' CMakeLists.txt @@ -61,6 +61,9 @@ rm -f %{buildroot}/%{_libdir}/*.so %{_mandir}/man1/encfs* %changelog +* Mon Oct 02 2017 Vasiliy N. Glazov 1.9.2-4 +- Added fix patch (rhbz #1487354) + * Fri Aug 11 2017 Vasiliy N. Glazov 1.9.2-3 - Correct exec permission (rhbz #1382894)