diff --git a/0001-modify-include-path.patch b/0001-modify-include-path.patch new file mode 100644 index 0000000..c99673f --- /dev/null +++ b/0001-modify-include-path.patch @@ -0,0 +1,24 @@ +From 99206f8a96329627996b00c76ff4f79086a4cb4e Mon Sep 17 00:00:00 2001 +From: loong ci +Date: Fri, 29 Jul 2022 18:02:53 +0800 +Subject: [PATCH] modify include path + +--- + src/cpp-utils/system/get_total_memory.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cpp-utils/system/get_total_memory.cpp b/src/cpp-utils/system/get_total_memory.cpp +index 83abe6c..6840d45 100644 +--- a/src/cpp-utils/system/get_total_memory.cpp ++++ b/src/cpp-utils/system/get_total_memory.cpp +@@ -1,6 +1,6 @@ + #include "get_total_memory.h" + #include +-#include ++#include + #include + #include + +-- +2.20.1 + diff --git a/cryfs-0.9.10.tar.gz b/cryfs-0.9.10.tar.gz new file mode 100644 index 0000000..c2b99af Binary files /dev/null and b/cryfs-0.9.10.tar.gz differ diff --git a/cryfs.spec b/cryfs.spec new file mode 100644 index 0000000..1f40299 --- /dev/null +++ b/cryfs.spec @@ -0,0 +1,60 @@ +%global optflags %{optflags} -O3 -fPIC -I%{_includedir}/libunwind + +Summary: Cryptographic filesystem for the cloud +Name: cryfs +Version: 0.9.10 +Release: 1 +License: LGPLv3+ +Group: File tools +Url: https://www.cryfs.org +Source0: https://github.com/cryfs/cryfs/releases/download/%{version}/%{name}-%{version}.tar.gz +Patch0: fix-for-UnionTech.patch +Patch1: 0001-modify-include-path.patch +BuildRequires: cmake make python gcc-c++ +BuildRequires: boost-devel +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(fuse) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(cryptopp) +BuildRequires: pkgconfig(libunwind) +Requires: fuse + +%description +CryFS provides a FUSE-based mount that encrypts file contents, file +sizes, metadata and directory structure. It uses encrypted same-size +blocks to store both the files themselves and the blocks' relations +to one another. These blocks are stored as individual files in the +base directory, which can then be synchronized to remote storage +(using an external tool). + +%prep +%autosetup -p1 -n %{name}-%{version} +# Use system cryptopp +rm -rf vendor/cryptopp +find . -name "*.cpp" -o -name "*.h" |xargs sed -i -e 's,vendor_cryptopp,cryptopp,g' +sed -i -e '/cryptopp/d' vendor/CMakeLists.txt + +%build +export LDFLAGS="%{__global_ldflags} -lboost_thread -lboost_program_options -lboost_filesystem -lcryptopp -lboost_chrono -lfuse" + +%cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBoost_USE_STATIC_LIBS=OFF \ + -DBUILD_TESTING=OFF \ + -DCRYFS_UPDATE_CHECKS=OFF \ + -DBUILD_TESTING=OFF + +%make_build + +%install +%make_install + +%files +%doc README.md ChangeLog.txt +%license LICENSE +%{_bindir}/cryfs* +%{_mandir}/man?/cryfs* + +%changelog +* Tue Jul 26 2022 uoser - 0.9.10-1 +- package init diff --git a/fix-for-UnionTech.patch b/fix-for-UnionTech.patch new file mode 100644 index 0000000..506b05d --- /dev/null +++ b/fix-for-UnionTech.patch @@ -0,0 +1,25 @@ +From 98e238b65f3016203e8b3efdc4577aaa3ac0efeb Mon Sep 17 00:00:00 2001 +From: panchenbo +Date: Fri, 16 Jul 2021 08:54:33 +0800 +Subject: [PATCH] fix for UnionTech + +--- + src/cryfs-cli/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cryfs-cli/CMakeLists.txt b/src/cryfs-cli/CMakeLists.txt +index 07a0ad5..5b13f23 100644 +--- a/src/cryfs-cli/CMakeLists.txt ++++ b/src/cryfs-cli/CMakeLists.txt +@@ -11,7 +11,7 @@ set(SOURCES + program_options/Parser.cpp + ) + +-add_library(${PROJECT_NAME} ${SOURCES}) ++add_library(${PROJECT_NAME} STATIC ${SOURCES}) + target_link_libraries(${PROJECT_NAME} PUBLIC cryfs cpp-utils gitversion) + target_enable_style_warnings(${PROJECT_NAME}) + target_activate_cpp14(${PROJECT_NAME}) +-- +2.20.1 +