cryfs: update to 0.11.2.

This commit is contained in:
Andy Weidenbaum 2022-08-29 10:56:35 +10:00 committed by Đoàn Trần Công Danh
parent 4cd17f334b
commit c49a914789
7 changed files with 109 additions and 190 deletions

View file

@ -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}
)

View file

@ -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 <vendor_cryptopp/gzip.h>
+#include <cryptopp/gzip.h>
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 <vendor_cryptopp/cryptlib.h>
+#include <cryptopp/cryptlib.h>
// 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 <cpp-utils/random/Random.h>
@ -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 <vendor_cryptopp/scrypt.h>
@ -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 <boost/optional.hpp>
@ -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 <vendor_cryptopp/gcm.h>
+#include <cryptopp/gcm.h>
#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 <vendor_cryptopp/serpent.h>
-#include <vendor_cryptopp/cast.h>
-#include <vendor_cryptopp/mars.h>
-#include <vendor_cryptopp/chachapoly.h>
+#include <cryptopp/aes.h>
+#include <cryptopp/twofish.h>
+#include <cryptopp/serpent.h>
+#include <cryptopp/cast.h>
+#include <cryptopp/mars.h>
+#include <cryptopp/chachapoly.h>
#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 <vendor_cryptopp/gcm.h>
+#include <cryptopp/gcm.h>
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 <stdexcept>
-#include <vendor_cryptopp/hex.h>
+#include <cryptopp/hex.h>
#include <cpp-utils/crypto/cryptopp_byte.h>
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 <vendor_cryptopp/hex.h>
+#include <cryptopp/hex.h>
#include <string>
#include <array>
#include <cstring>
#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 <vendor_cryptopp/osrng.h>
+#include <cryptopp/osrng.h>
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 <boost/property_tree/ptree.hpp>
@ -157,11 +124,9 @@ Index: cryfs-0.10.2/src/cryfs/localstate/BasedirMetadata.cpp
#include <boost/filesystem/operations.hpp>
#include "LocalStateDir.h"
#include <cpp-utils/logging/logging.h>
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 <vector>
#include <boost/filesystem.hpp>
#include <cpp-utils/data/Data.h>
@ -169,12 +134,9 @@ Index: cryfs-0.10.2/test/cryfs/config/CompatibilityTest.cpp
+#include <cryptopp/hex.h>
#include <cpp-utils/crypto/symmetric/ciphers.h>
#include <cpp-utils/tempfile/TempFile.h>
#include <cryfs/config/CryConfigFile.h>
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 <cryfs/impl/config/CryConfigFile.h>
--- 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)

View file

@ -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<spdlog::sinks::ostream_sink<std::mutex>>(_capturedLogData, true)),
- _logger(spdlog::create("MockLogger", {_sink})) {
+ _logger(spdlog::create<spdlog::sinks::ostream_sink_mt>("MockLogger", _capturedLogData, true)) {
}
~MockLogger() {
@@ -28,7 +27,6 @@ public:
}
private:
std::ostringstream _capturedLogData;
- std::shared_ptr<spdlog::sinks::ostream_sink<std::mutex>> _sink;
std::shared_ptr<spdlog::logger> _logger;
};

View file

@ -0,0 +1,54 @@
From 27515e0116fd7cb034bd4e9763d1f3bfdc855a5f Mon Sep 17 00:00:00 2001
From: Bernhard Rosenkraenzer <bero@lindev.ch>
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 <smessmer@users.noreply.github.com>
---
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());

View file

@ -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 <cryfs/CryfsException.h>
#include <cpp-utils/thread/debugging.h>
+#include <spdlog/sinks/basic_file_sink.h>
//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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
+ spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
} else if (options.foreground()) {
cpputils::logging::setLogger(spdlog::stderr_logger_mt("cryfs"));
} else {

View file

@ -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 <spdlog/spdlog.h>
+#include <spdlog/sinks/stdout_sinks.h>
#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 <stdexcept>
#include <spdlog/fmt/ostr.h>
+#include <spdlog/sinks/syslog_sink.h>
#if defined(_MSC_VER)
#include <spdlog/sinks/msvc_sink.h>
@@ -75,7 +76,7 @@ namespace cpputils {
#if defined(_MSC_VER)
return spdlog::create<spdlog::sinks::msvc_sink_mt>(name);
#else
- return spdlog::syslog_logger(name, name, LOG_PID);
+ return spdlog::syslog_logger_mt(name, name, LOG_PID);
#endif
}
}

View file

@ -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 <atweiden@tutanota.de>"
@ -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"