diff --git a/srcpkgs/cryfs/patches/allow-build-type-none.patch b/srcpkgs/cryfs/patches/allow-build-type-none.patch new file mode 100644 index 00000000000..e591974c05f --- /dev/null +++ b/srcpkgs/cryfs/patches/allow-build-type-none.patch @@ -0,0 +1,33 @@ +Index: cryfs-0.10.2/doc/CMakeLists.txt +=================================================================== +--- cryfs-0.10.2.orig/doc/CMakeLists.txt ++++ cryfs-0.10.2/doc/CMakeLists.txt +@@ -15,6 +15,5 @@ ELSE (WIN32) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cryfs.1.gz + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 +- 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 new file mode 100644 index 00000000000..4909cad7b84 --- /dev/null +++ b/srcpkgs/cryfs/patches/de-vendor.patch @@ -0,0 +1,180 @@ +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" + #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 +@@ -1,6 +1,6 @@ + #include "Hash.h" + #include +-#include ++#include + + 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 +@@ -1,5 +1,5 @@ + #include "Scrypt.h" +-#include ++#include + + 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 @@ + #include "../../data/Data.h" + #include "../../random/Random.h" + #include +-#include ++#include + #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 @@ + #ifndef MESSMER_CPPUTILS_CRYPTO_SYMMETRIC_CIPHERS_H_ + #define MESSMER_CPPUTILS_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 +@@ -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 +@@ -2,7 +2,7 @@ + #ifndef MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_ + #define MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_ + +-#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 @@ + + #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 +@@ -4,7 +4,7 @@ + + #include "../thread/LoopThread.h" + #include "ThreadsafeRandomDataBuffer.h" +-#include ++#include + + 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 +@@ -1,7 +1,7 @@ + #include "BasedirMetadata.h" + #include + #include +-#include ++#include + #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 @@ + #include + #include + #include +-#include ++#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 @@ + 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 new file mode 100644 index 00000000000..d3a5847b1a3 --- /dev/null +++ b/srcpkgs/cryfs/patches/fix-test.patch @@ -0,0 +1,22 @@ +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/rename-simple-to-basic-filesink.patch b/srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch new file mode 100644 index 00000000000..08513cb4d0c --- /dev/null +++ b/srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch @@ -0,0 +1,21 @@ +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 new file mode 100644 index 00000000000..2c1c5a926cf --- /dev/null +++ b/srcpkgs/cryfs/patches/spdlog-include.patch @@ -0,0 +1,33 @@ +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 e8022335f01..76880174d7b 100644 --- a/srcpkgs/cryfs/template +++ b/srcpkgs/cryfs/template @@ -4,9 +4,11 @@ version=0.10.2 revision=1 create_wrksrc=yes build_style=cmake -configure_args="-DCRYFS_UPDATE_CHECKS=off" -hostmakedepends="git python" -makedepends="boost-devel fuse-devel libcurl-devel libgomp-devel" +configure_args="-DCRYFS_UPDATE_CHECKS=off -DCMAKE_BUILD_TYPE=None + -DBoost_USE_STATIC_LIBS=OFF -DCMAKE_CXX_STANDARD_LIBRARIES=-lfmt" +hostmakedepends="pkg-config python3" +makedepends="boost-devel fuse-devel libcurl-devel libgomp-devel crypto++-devel + spdlog" depends="fuse" short_desc="Cryptographic filesystem for the cloud" maintainer="Andy Weidenbaum " @@ -15,7 +17,32 @@ 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 +patch_args=-Np1 if [ "${XBPS_CHECK_PKGS}" ]; then configure_args+=" -DBUILD_TESTING=on" fi + +post_patch() { + rm -rf vendor/cryptopp + rm -rf vendor/spdlog +} + +pre_configure() { + local _pkg_config="$($PKG_CONFIG --cflags spdlog)" + CFLAGS+=" $_pkg_config" + CXXFLAGS+=" $_pkg_config" +} + +do_check() { + cd ${wrksrc}/build + # XXX: check their Travis-CI script on update + ./test/gitversion/gitversion-test + ./test/cpp-utils/cpp-utils-test + ./test/parallelaccessstore/parallelaccessstore-test + ./test/blockstore/blockstore-test + ./test/blobstore/blobstore-test + ./test/cryfs/cryfs-test + # ./test/cryfs-cli/cryfs-cli-test + cd ${wrksrc} +}