From c49a91478927c00d2aede285cbd47ef2b8067f68 Mon Sep 17 00:00:00 2001 From: Andy Weidenbaum Date: Mon, 29 Aug 2022 10:56:35 +1000 Subject: [PATCH] cryfs: update to 0.11.2. --- .../cryfs/patches/allow-build-type-none.patch | 22 --- srcpkgs/cryfs/patches/de-vendor.patch | 134 +++++++----------- srcpkgs/cryfs/patches/fix-test.patch | 22 --- srcpkgs/cryfs/patches/fmt-9-fix.patch | 54 +++++++ .../rename-simple-to-basic-filesink.patch | 21 --- srcpkgs/cryfs/patches/spdlog-include.patch | 33 ----- srcpkgs/cryfs/template | 13 +- 7 files changed, 109 insertions(+), 190 deletions(-) delete mode 100644 srcpkgs/cryfs/patches/fix-test.patch create mode 100644 srcpkgs/cryfs/patches/fmt-9-fix.patch delete mode 100644 srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch delete mode 100644 srcpkgs/cryfs/patches/spdlog-include.patch diff --git a/srcpkgs/cryfs/patches/allow-build-type-none.patch b/srcpkgs/cryfs/patches/allow-build-type-none.patch index e591974c05f..ffcf0ee5332 100644 --- a/srcpkgs/cryfs/patches/allow-build-type-none.patch +++ b/srcpkgs/cryfs/patches/allow-build-type-none.patch @@ -9,25 +9,3 @@ Index: cryfs-0.10.2/doc/CMakeLists.txt - CONFIGURATIONS Release ) ENDIF(WIN32) -Index: cryfs-0.10.2/src/cryfs-cli/CMakeLists.txt -=================================================================== ---- cryfs-0.10.2.orig/src/cryfs-cli/CMakeLists.txt -+++ cryfs-0.10.2/src/cryfs-cli/CMakeLists.txt -@@ -27,6 +27,5 @@ target_enable_style_warnings(${PROJECT_N - target_activate_cpp14(${PROJECT_NAME}_bin) - - install(TARGETS ${PROJECT_NAME}_bin -- CONFIGURATIONS Debug Release RelWithDebInfo - DESTINATION ${CMAKE_INSTALL_BINDIR} - ) -Index: cryfs-0.10.2/src/cryfs-unmount/CMakeLists.txt -=================================================================== ---- cryfs-0.10.2.orig/src/cryfs-unmount/CMakeLists.txt -+++ cryfs-0.10.2/src/cryfs-unmount/CMakeLists.txt -@@ -19,6 +19,5 @@ target_enable_style_warnings(${PROJECT_N - target_activate_cpp14(${PROJECT_NAME}_bin) - - install(TARGETS ${PROJECT_NAME}_bin -- CONFIGURATIONS Debug Release RelWithDebInfo - DESTINATION ${CMAKE_INSTALL_BINDIR} - ) diff --git a/srcpkgs/cryfs/patches/de-vendor.patch b/srcpkgs/cryfs/patches/de-vendor.patch index 4909cad7b84..09e51f0aa7f 100644 --- a/srcpkgs/cryfs/patches/de-vendor.patch +++ b/srcpkgs/cryfs/patches/de-vendor.patch @@ -1,32 +1,14 @@ -Index: cryfs-0.10.2/src/blockstore/implementations/compressing/compressors/Gzip.cpp -=================================================================== ---- cryfs-0.10.2.orig/src/blockstore/implementations/compressing/compressors/Gzip.cpp -+++ cryfs-0.10.2/src/blockstore/implementations/compressing/compressors/Gzip.cpp -@@ -1,6 +1,6 @@ - #include "cpp-utils/crypto/cryptopp_byte.h" +--- a/src/blockstore/implementations/compressing/compressors/Gzip.cpp 2022-08-25 22:14:05.481898162 +0400 ++++ b/src/blockstore/implementations/compressing/compressors/Gzip.cpp 2022-08-25 22:17:49.606653292 +0400 +@@ -1,5 +1,5 @@ #include "Gzip.h" -#include +#include using cpputils::Data; -Index: cryfs-0.10.2/src/cpp-utils/crypto/cryptopp_byte.h -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/crypto/cryptopp_byte.h -+++ cryfs-0.10.2/src/cpp-utils/crypto/cryptopp_byte.h -@@ -2,7 +2,7 @@ - #ifndef _CPPUTILS_CRYPTO_CRYPTOPP_BYTE_H - #define _CPPUTILS_CRYPTO_CRYPTOPP_BYTE_H - --#include -+#include - - // If we're running an older CryptoPP version, CryptoPP::byte isn't defined yet. - // Define it. Refer to "byte" type in the global namespace (placed by CryptoPP). -Index: cryfs-0.10.2/src/cpp-utils/crypto/hash/Hash.cpp -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/crypto/hash/Hash.cpp -+++ cryfs-0.10.2/src/cpp-utils/crypto/hash/Hash.cpp +--- a/src/cpp-utils/crypto/hash/Hash.cpp 2022-08-25 22:14:05.482898159 +0400 ++++ b/src/cpp-utils/crypto/hash/Hash.cpp 2022-08-25 22:18:07.131800277 +0400 @@ -1,6 +1,6 @@ #include "Hash.h" #include @@ -35,10 +17,8 @@ Index: cryfs-0.10.2/src/cpp-utils/crypto/hash/Hash.cpp using cpputils::Random; using CryptoPP::SHA512; -Index: cryfs-0.10.2/src/cpp-utils/crypto/kdf/Scrypt.cpp -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/crypto/kdf/Scrypt.cpp -+++ cryfs-0.10.2/src/cpp-utils/crypto/kdf/Scrypt.cpp +--- a/src/cpp-utils/crypto/kdf/Scrypt.cpp 2022-08-25 22:14:05.482898159 +0400 ++++ b/src/cpp-utils/crypto/kdf/Scrypt.cpp 2022-08-25 22:18:17.754889373 +0400 @@ -1,5 +1,5 @@ #include "Scrypt.h" -#include @@ -46,11 +26,9 @@ Index: cryfs-0.10.2/src/cpp-utils/crypto/kdf/Scrypt.cpp using std::string; -Index: cryfs-0.10.2/src/cpp-utils/crypto/symmetric/CFB_Cipher.h -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/crypto/symmetric/CFB_Cipher.h -+++ cryfs-0.10.2/src/cpp-utils/crypto/symmetric/CFB_Cipher.h -@@ -7,7 +7,7 @@ +--- a/src/cpp-utils/crypto/symmetric/CFB_Cipher.h 2022-08-25 22:14:05.482898159 +0400 ++++ b/src/cpp-utils/crypto/symmetric/CFB_Cipher.h 2022-08-25 22:18:28.524979704 +0400 +@@ -6,7 +6,7 @@ #include "../../data/Data.h" #include "../../random/Random.h" #include @@ -59,24 +37,9 @@ Index: cryfs-0.10.2/src/cpp-utils/crypto/symmetric/CFB_Cipher.h #include "Cipher.h" #include "EncryptionKey.h" -Index: cryfs-0.10.2/src/cpp-utils/crypto/symmetric/GCM_Cipher.h -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/crypto/symmetric/GCM_Cipher.h -+++ cryfs-0.10.2/src/cpp-utils/crypto/symmetric/GCM_Cipher.h -@@ -6,7 +6,7 @@ - #include "../../data/FixedSizeData.h" - #include "../../data/Data.h" - #include "../../random/Random.h" --#include -+#include - #include "Cipher.h" - #include "EncryptionKey.h" - -Index: cryfs-0.10.2/src/cpp-utils/crypto/symmetric/ciphers.h -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/crypto/symmetric/ciphers.h -+++ cryfs-0.10.2/src/cpp-utils/crypto/symmetric/ciphers.h -@@ -2,11 +2,11 @@ +--- a/src/cpp-utils/crypto/symmetric/ciphers.h 2022-08-25 22:14:05.482898159 +0400 ++++ b/src/cpp-utils/crypto/symmetric/ciphers.h 2022-08-25 22:18:52.181178110 +0400 +@@ -2,12 +2,12 @@ #ifndef MESSMER_CPPUTILS_CRYPTO_SYMMETRIC_CIPHERS_H_ #define MESSMER_CPPUTILS_CRYPTO_SYMMETRIC_CIPHERS_H_ @@ -85,30 +48,39 @@ Index: cryfs-0.10.2/src/cpp-utils/crypto/symmetric/ciphers.h -#include -#include -#include +-#include +#include +#include +#include +#include +#include ++#include #include "GCM_Cipher.h" #include "CFB_Cipher.h" -Index: cryfs-0.10.2/src/cpp-utils/data/Data.cpp -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/data/Data.cpp -+++ cryfs-0.10.2/src/cpp-utils/data/Data.cpp +--- a/src/cpp-utils/crypto/symmetric/GCM_Cipher.h 2022-08-25 22:14:05.482898159 +0400 ++++ b/src/cpp-utils/crypto/symmetric/GCM_Cipher.h 2022-08-25 22:18:38.836066183 +0400 +@@ -3,7 +3,7 @@ + #define MESSMER_CPPUTILS_CRYPTO_SYMMETRIC_GCMCIPHER_H_ + + #include "AEAD_Cipher.h" +-#include ++#include + + namespace cpputils { + +--- a/src/cpp-utils/data/Data.cpp 2022-08-25 22:14:05.482898159 +0400 ++++ b/src/cpp-utils/data/Data.cpp 2022-08-25 22:19:09.349322106 +0400 @@ -1,6 +1,6 @@ #include "Data.h" #include -#include +#include - #include using std::istream; -Index: cryfs-0.10.2/src/cpp-utils/data/FixedSizeData.h -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/data/FixedSizeData.h -+++ cryfs-0.10.2/src/cpp-utils/data/FixedSizeData.h + using std::ofstream; +--- a/src/cpp-utils/data/FixedSizeData.h 2022-08-25 22:14:05.482898159 +0400 ++++ b/src/cpp-utils/data/FixedSizeData.h 2022-08-25 22:19:19.103403916 +0400 @@ -2,7 +2,7 @@ #ifndef MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_ #define MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_ @@ -116,25 +88,21 @@ Index: cryfs-0.10.2/src/cpp-utils/data/FixedSizeData.h -#include +#include #include + #include #include - #include "../assert/assert.h" -Index: cryfs-0.10.2/src/cpp-utils/random/OSRandomGenerator.h -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/random/OSRandomGenerator.h -+++ cryfs-0.10.2/src/cpp-utils/random/OSRandomGenerator.h -@@ -4,7 +4,7 @@ +--- a/src/cpp-utils/random/OSRandomGenerator.h 2022-08-25 22:14:05.483898156 +0400 ++++ b/src/cpp-utils/random/OSRandomGenerator.h 2022-08-25 22:19:29.602491973 +0400 +@@ -3,7 +3,7 @@ + #define MESSMER_CPPUTILS_RANDOM_OSRANDOMGENERATOR_H - #include "cpp-utils/crypto/cryptopp_byte.h" #include "RandomGenerator.h" -#include +#include namespace cpputils { class OSRandomGenerator final : public RandomGenerator { -Index: cryfs-0.10.2/src/cpp-utils/random/RandomGeneratorThread.h -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/random/RandomGeneratorThread.h -+++ cryfs-0.10.2/src/cpp-utils/random/RandomGeneratorThread.h +--- a/src/cpp-utils/random/RandomGeneratorThread.h 2022-08-25 22:14:05.484898153 +0400 ++++ b/src/cpp-utils/random/RandomGeneratorThread.h 2022-08-25 22:19:36.713551613 +0400 @@ -4,7 +4,7 @@ #include "../thread/LoopThread.h" @@ -144,10 +112,9 @@ Index: cryfs-0.10.2/src/cpp-utils/random/RandomGeneratorThread.h namespace cpputils { //TODO Test -Index: cryfs-0.10.2/src/cryfs/localstate/BasedirMetadata.cpp -=================================================================== ---- cryfs-0.10.2.orig/src/cryfs/localstate/BasedirMetadata.cpp -+++ cryfs-0.10.2/src/cryfs/localstate/BasedirMetadata.cpp +diff -Naurp0 -U3 cryfs-0.11.2/src/cryfs/impl/localstate/BasedirMetadata.cpp cryfs-0.11.2-mine/src/cryfs/impl/localstate/BasedirMetadata.cpp +--- a/src/cryfs/impl/localstate/BasedirMetadata.cpp 2022-08-25 22:14:05.487898144 +0400 ++++ b/src/cryfs/impl/localstate/BasedirMetadata.cpp 2022-08-25 22:19:46.722635560 +0400 @@ -1,7 +1,7 @@ #include "BasedirMetadata.h" #include @@ -157,11 +124,9 @@ Index: cryfs-0.10.2/src/cryfs/localstate/BasedirMetadata.cpp #include #include "LocalStateDir.h" #include -Index: cryfs-0.10.2/test/cryfs/config/CompatibilityTest.cpp -=================================================================== ---- cryfs-0.10.2.orig/test/cryfs/config/CompatibilityTest.cpp -+++ cryfs-0.10.2/test/cryfs/config/CompatibilityTest.cpp -@@ -3,7 +3,7 @@ +--- a/test/cryfs/impl/config/CompatibilityTest.cpp 2022-08-25 22:14:05.493898126 +0400 ++++ b/test/cryfs/impl/config/CompatibilityTest.cpp 2022-08-25 22:19:54.589701542 +0400 +@@ -2,7 +2,7 @@ #include #include #include @@ -169,12 +134,9 @@ Index: cryfs-0.10.2/test/cryfs/config/CompatibilityTest.cpp +#include #include #include - #include -Index: cryfs-0.10.2/vendor/CMakeLists.txt -=================================================================== ---- cryfs-0.10.2.orig/vendor/CMakeLists.txt -+++ cryfs-0.10.2/vendor/CMakeLists.txt -@@ -1,3 +1 @@ + #include +--- a/vendor/CMakeLists.txt 2022-08-25 22:14:05.497898115 +0400 ++++ b/vendor/CMakeLists.txt 2022-08-25 22:20:11.176840657 +0400 +@@ -1,2 +1 @@ add_subdirectory(googletest) --add_subdirectory(spdlog) -add_subdirectory(cryptopp) diff --git a/srcpkgs/cryfs/patches/fix-test.patch b/srcpkgs/cryfs/patches/fix-test.patch deleted file mode 100644 index d3a5847b1a3..00000000000 --- a/srcpkgs/cryfs/patches/fix-test.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h -=================================================================== ---- cryfs-0.10.2.orig/test/cpp-utils/logging/testutils/LoggingTest.h -+++ cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h -@@ -11,8 +11,7 @@ class MockLogger final { - public: - MockLogger(): - _capturedLogData(), -- _sink(std::make_shared>(_capturedLogData, true)), -- _logger(spdlog::create("MockLogger", {_sink})) { -+ _logger(spdlog::create("MockLogger", _capturedLogData, true)) { - } - - ~MockLogger() { -@@ -28,7 +27,6 @@ public: - } - private: - std::ostringstream _capturedLogData; -- std::shared_ptr> _sink; - std::shared_ptr _logger; - }; - diff --git a/srcpkgs/cryfs/patches/fmt-9-fix.patch b/srcpkgs/cryfs/patches/fmt-9-fix.patch new file mode 100644 index 00000000000..6fe97eaeafa --- /dev/null +++ b/srcpkgs/cryfs/patches/fmt-9-fix.patch @@ -0,0 +1,54 @@ +From 27515e0116fd7cb034bd4e9763d1f3bfdc855a5f Mon Sep 17 00:00:00 2001 +From: Bernhard Rosenkraenzer +Date: Fri, 22 Jul 2022 14:13:38 +0200 +Subject: [PATCH] Fix build with fmt 9.0 (#433) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* Fix build with fmt 9.0 + +Co-authored-by: Sebastian Meßmer +--- + ChangeLog.txt | 4 ++++ + src/fspp/fuse/Fuse.cpp | 8 ++++---- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/fspp/fuse/Fuse.cpp b/src/fspp/fuse/Fuse.cpp +index 4e9dbd7f..4b881815 100644 +--- a/src/fspp/fuse/Fuse.cpp ++++ b/src/fspp/fuse/Fuse.cpp +@@ -603,21 +603,21 @@ int Fuse::mknod(const bf::path &path, ::mode_t mode, dev_t rdev) { + UNUSED(mode); + UNUSED(path); + ThreadNameForDebugging _threadName("mknod"); +- LOG(WARN, "Called non-implemented mknod({}, {}, _)", path, mode); ++ LOG(WARN, "Called non-implemented mknod({}, {}, _)", path.string(), mode); + return ENOSYS; + } + + int Fuse::mkdir(const bf::path &path, ::mode_t mode) { + ThreadNameForDebugging _threadName("mkdir"); + #ifdef FSPP_LOG +- LOG(DEBUG, "mkdir({}, {})", path, mode); ++ LOG(DEBUG, "mkdir({}, {})", path.string(), mode); + #endif + try { + ASSERT(is_valid_fspp_path(path), "has to be an absolute path"); + // DokanY seems to call mkdir("/"). Ignore that + if ("/" == path) { + #ifdef FSPP_LOG +- LOG(DEBUG, "mkdir({}, {}): ignored", path, mode); ++ LOG(DEBUG, "mkdir({}, {}): ignored", path.string(), mode); + #endif + return 0; + } +@@ -766,7 +766,7 @@ int Fuse::rename(const bf::path &from, const bf::path &to) { + //TODO + int Fuse::link(const bf::path &from, const bf::path &to) { + ThreadNameForDebugging _threadName("link"); +- LOG(WARN, "NOT IMPLEMENTED: link({}, {})", from, to); ++ LOG(WARN, "NOT IMPLEMENTED: link({}, {})", from.string(), to.string()); + //auto real_from = _impl->RootDir() / from; + //auto real_to = _impl->RootDir() / to; + //int retstat = ::link(real_from.string().c_str(), real_to.string().c_str()); diff --git a/srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch b/srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch deleted file mode 100644 index 08513cb4d0c..00000000000 --- a/srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: cryfs-0.10.2/src/cryfs-cli/Cli.cpp -=================================================================== ---- cryfs-0.10.2.orig/src/cryfs-cli/Cli.cpp -+++ cryfs-0.10.2/src/cryfs-cli/Cli.cpp -@@ -27,6 +27,7 @@ - #include "Environment.h" - #include - #include -+#include - - //TODO Many functions accessing the ProgramOptions object. Factor out into class that stores it as a member. - //TODO Factor out class handling askPassword -@@ -310,7 +311,7 @@ namespace cryfs_cli { - //TODO Test that --logfile parameter works. Should be: file if specified, otherwise stderr if foreground, else syslog. - if (options.logFile() != none) { - cpputils::logging::setLogger( -- spdlog::create>("cryfs", options.logFile()->string())); -+ spdlog::create>("cryfs", options.logFile()->string())); - } else if (options.foreground()) { - cpputils::logging::setLogger(spdlog::stderr_logger_mt("cryfs")); - } else { diff --git a/srcpkgs/cryfs/patches/spdlog-include.patch b/srcpkgs/cryfs/patches/spdlog-include.patch deleted file mode 100644 index 2c1c5a926cf..00000000000 --- a/srcpkgs/cryfs/patches/spdlog-include.patch +++ /dev/null @@ -1,33 +0,0 @@ -Index: cryfs-0.10.2/src/cpp-utils/logging/Logger.h -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/logging/Logger.h -+++ cryfs-0.10.2/src/cpp-utils/logging/Logger.h -@@ -7,6 +7,7 @@ - #endif - - #include -+#include - #include "../macros.h" - - namespace cpputils { -Index: cryfs-0.10.2/src/cpp-utils/logging/logging.h -=================================================================== ---- cryfs-0.10.2.orig/src/cpp-utils/logging/logging.h -+++ cryfs-0.10.2/src/cpp-utils/logging/logging.h -@@ -5,6 +5,7 @@ - #include "Logger.h" - #include - #include -+#include - - #if defined(_MSC_VER) - #include -@@ -75,7 +76,7 @@ namespace cpputils { - #if defined(_MSC_VER) - return spdlog::create(name); - #else -- return spdlog::syslog_logger(name, name, LOG_PID); -+ return spdlog::syslog_logger_mt(name, name, LOG_PID); - #endif - } - } diff --git a/srcpkgs/cryfs/template b/srcpkgs/cryfs/template index 495c2b318a3..1affee1d8f0 100644 --- a/srcpkgs/cryfs/template +++ b/srcpkgs/cryfs/template @@ -1,14 +1,15 @@ # Template file for 'cryfs' pkgname=cryfs -version=0.10.2 -revision=5 +version=0.11.2 +revision=1 create_wrksrc=yes build_style=cmake -configure_args="-DCRYFS_UPDATE_CHECKS=off - -DBoost_USE_STATIC_LIBS=OFF -DCMAKE_CXX_STANDARD_LIBRARIES=-lfmt" +configure_args="-DCRYFS_UPDATE_CHECKS=off -DBoost_USE_STATIC_LIBS=OFF + -DCMAKE_CXX_STANDARD_LIBRARIES=-lfmt + -DDEPENDENCY_CONFIG=../cmake-utils/DependenciesFromLocalSystem.cmake" hostmakedepends="pkg-config python3" makedepends="boost-devel fuse-devel libcurl-devel libgomp-devel crypto++-devel - spdlog" + spdlog range-v3 fmt-devel" depends="fuse" short_desc="Cryptographic filesystem for the cloud" maintainer="Andy Weidenbaum " @@ -16,7 +17,7 @@ license="LGPL-3.0-only" homepage="https://www.cryfs.org" changelog="https://github.com/cryfs/cryfs/raw/master/ChangeLog.txt" distfiles="https://github.com/cryfs/cryfs/releases/download/${version}/${pkgname}-${version}.tar.gz" -checksum=004c7fdf537062e197aaa0bcdafd2682904a279802441bb6063cb72c1fba52d2 +checksum=a89ab8fea2d494b496867107ec0a3772fe606ebd71ef12152fcd233f463a2c00 if [ "${XBPS_CHECK_PKGS}" ]; then configure_args+=" -DBUILD_TESTING=on"