sys-fs/cryfs: drop 0.11.4

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Andreas Sturmlechner
2025-07-05 14:33:10 +02:00
parent 35beb667dc
commit 59f7dacfba
3 changed files with 0 additions and 487 deletions

View File

@@ -1,2 +1 @@
DIST cryfs-0.11.4.tar.gz 10420508 BLAKE2B 3b096180f204b90774c2dee5a8bbfa2305fad62fdb86cfa03e802d6a01f3d7a01005c411a16cc3693f2c858e1be9313ba42ab2883daae993220049b34622e391 SHA512 a1aa9377cb0881f08f536f4b2116b27aeef71739e6a1362b209f38f1b54a9ae9e11a2a47ceaa28dcabd74d1ac57f0c92e3d1d8060eabeef4e7efd3d62cc7feea
DIST cryfs-1.0.1.tar.xz 7508060 BLAKE2B 21c2feba56181e51ec7799ccb90d604d6e183443ddf7ddaaa5e8952405d4b16382805c6c10affbd1e5ff251853bad53dcade9a1d004fa28220e0aa10c433f7c3 SHA512 e6bba11b0229cad75ae4383b04f73c436f5badf4b727a992cbef7071807049fa628768e375f057c54043af99bb9624ef0e69bcfa680dcc82ed6ed281887da11c

View File

@@ -1,171 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
inherit cmake flag-o-matic linux-info python-any-r1
if [[ ${PV} == 9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/cryfs/cryfs"
else
SRC_URI="
https://github.com/cryfs/cryfs/archive/refs/tags/${PV}.tar.gz
-> ${P}.tar.gz
"
KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv x86"
fi
DESCRIPTION="Encrypted FUSE filesystem that conceals metadata"
HOMEPAGE="https://www.cryfs.org/"
LICENSE="LGPL-3 MIT"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/boost:=
dev-libs/crypto++:=
dev-libs/libfmt:=
dev-libs/spdlog:=
net-misc/curl
>=sys-fs/fuse-2.8.6:0
"
DEPEND="
${RDEPEND}
dev-cpp/range-v3
test? (
dev-cpp/gtest
)
"
BDEPEND="
${PYTHON_DEPS}
virtual/pkgconfig
$(python_gen_any_dep '
dev-python/versioneer[${PYTHON_USEDEP}]
')
"
PATCHES=(
# TODO: upstream:
"${FILESDIR}"/cryfs-0.11.4-unbundle-vendored-libs.patch
)
python_check_deps() {
python_has_version "dev-python/versioneer[${PYTHON_USEDEP}]"
}
pkg_setup() {
local CONFIG_CHECK="~FUSE_FS"
local WARNING_FUSE_FS="CONFIG_FUSE_FS is required for cryfs support."
check_extra_config
python-any-r1_pkg_setup
}
src_prepare() {
cmake_src_prepare
# don't install compressed manpage
cmake_comment_add_subdirectory doc
# We use the package instead for >=py3.12 compat, bug #908997
rm src/gitversion/versioneer.py || die
# Hook up ctest properly for better maintainer quality of life
sed -i -e '/option(BUILD_TESTING/aenable_testing()' CMakeLists.txt || die
sed -i -e '/BUILD_TESTING/a include(GoogleTest)' test/CMakeLists.txt || die
sed -i -e 's/add_test/gtest_discover_tests/' test/*/CMakeLists.txt || die
}
src_configure() {
# ODR violations (bug #880563)
# ./CMakeLists.txt
# """
# We don't use LTO because crypto++ has problems with it,
# see https://github.com/weidai11/cryptopp/issues/1031 and
# https://www.cryptopp.com/wiki/Link_Time_Optimization
# """
filter-lto
local mycmakeargs=(
# Upstream inconsistently specifies their libraries as STATIC
# Leading to issues when static libraries without PIC are linked
# with PIC shared libraries.
-DBUILD_SHARED_LIBS=OFF
-DBUILD_TESTING=$(usex test)
-DCRYFS_UPDATE_CHECKS=OFF
-DUSE_SYSTEM_LIBS=ON
# Upstream offered method of using system packages for packages installed via conan
# This only affects those fetched via Conan not those bundled in /vendor.
# "Note that this is only provided as an example and not officially supported."
# bug #631196
-DDEPENDENCY_CONFIG="${S}/cmake-utils/DependenciesFromLocalSystem.cmake"
)
append-cppflags -DNDEBUG
# bug 907096
use elibc_musl && append-flags -D_LARGEFILE64_SOURCE
cmake_src_configure
}
src_test() {
local TMPDIR="${T}"
local CMAKE_SKIP_TESTS=(
# Breaks network sanbox
CurlHttpClientTest
FakeHttpClientTest
# Filesystem did not call onMounted callback, probably wasn't successfully mounted.
# bug #808849
CliTest.WorksWithCommasInBasedir
CliTest_IntegrityCheck.givenIncorrectFilesystemId_thenFails
CliTest_IntegrityCheck.givenIncorrectFilesystemKey_thenFails
CliTest_Setup.AutocreateBasedir
CliTest_Setup.AutocreateMountpoint
CliTest_Setup.ConfigfileGiven
CliTest_Setup.ExistingLogfileGiven
CliTest_Setup.NoSpecialOptions
CliTest_Setup.NotexistingLogfileGiven
CliTest_Unmount.givenMountedFilesystem_whenUnmounting_thenSucceeds
RunningInForeground/CliTest_WrongEnvironment.BaseDir_AllPermissions
RunningInForeground/CliTest_WrongEnvironment.BaseDir_DoesntExist_Create
RunningInForeground/CliTest_WrongEnvironment.MountDir_AllPermissions
RunningInForeground/CliTest_WrongEnvironment.MountDir_DoesntExist_Create
RunningInForeground/CliTest_WrongEnvironment.NoErrorCondition
RunningInForeground_ExternalConfigfile/CliTest_WrongEnvironment.BaseDir_AllPermissions
RunningInForeground_ExternalConfigfile/CliTest_WrongEnvironment.BaseDir_DoesntExist_Create
RunningInForeground_ExternalConfigfile/CliTest_WrongEnvironment.MountDir_AllPermissions
RunningInForeground_ExternalConfigfile/CliTest_WrongEnvironment.MountDir_DoesntExist_Create
RunningInForeground_ExternalConfigfile/CliTest_WrongEnvironment.NoErrorCondition
RunningInForeground_ExternalConfigfile_LogIsNotStderr/CliTest_WrongEnvironment.BaseDir_AllPermissions
RunningInForeground_ExternalConfigfile_LogIsNotStderr/CliTest_WrongEnvironment.BaseDir_DoesntExist_Create
RunningInForeground_ExternalConfigfile_LogIsNotStderr/CliTest_WrongEnvironment.MountDir_AllPermissions
RunningInForeground_ExternalConfigfile_LogIsNotStderr/CliTest_WrongEnvironment.MountDir_DoesntExist_Create
RunningInForeground_ExternalConfigfile_LogIsNotStderr/CliTest_WrongEnvironment.NoErrorCondition
RunningInForeground_LogIsNotStderr/CliTest_WrongEnvironment.BaseDir_AllPermissions
RunningInForeground_LogIsNotStderr/CliTest_WrongEnvironment.BaseDir_DoesntExist_Create
RunningInForeground_LogIsNotStderr/CliTest_WrongEnvironment.MountDir_AllPermissions
RunningInForeground_LogIsNotStderr/CliTest_WrongEnvironment.MountDir_DoesntExist_Create
RunningInForeground_LogIsNotStderr/CliTest_WrongEnvironment.NoErrorCondition
# Filesystem did not call onMounted callback, probably wasn't successfully mounted.
# fuse: failed to open /dev/fuse: Permission denied
CliTest_IntegrityCheck.givenFilesystemWithRolledBackBasedir_whenMounting_thenFails
CliTest_IntegrityCheck.whenRollingBackBasedirWhileMounted_thenUnmounts
# Tests that hang due being unable to open fuse
# bug #699044
# fuse: failed to open /dev/fuse: Permission denied
Fuse*
)
cmake_src_test
}
src_install() {
cmake_src_install
doman doc/man/cryfs.1
}

View File

@@ -1,315 +0,0 @@
https://bugs.gentoo.org/631196
From 00ddc58b11ec76641f6f9b96584de1b0c2b57390 Mon Sep 17 00:00:00 2001
From: Alfred Wingate <parona@protonmail.com>
Date: Mon, 3 Jun 2024 15:05:01 +0300
Subject: [PATCH] Add USE_SYSTEM_LIBS option to build without bundled libs
* Based on a patch by Andreas Sturmlechner.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ require_clang_version(7.0)
option(BUILD_TESTING "build test cases" OFF)
option(CRYFS_UPDATE_CHECKS "let cryfs check for updates and security vulnerabilities" ON)
option(DISABLE_OPENMP "allow building without OpenMP libraries. This will cause performance degradations." OFF)
+option(USE_SYSTEM_LIBS "build with system libs instead of bundled libs" OFF)
# The following options are helpful for development and/or CI
option(USE_WERROR "build with -Werror flag")
@@ -46,7 +47,20 @@ endif()
include(${DEPENDENCY_CONFIG})
-add_subdirectory(vendor EXCLUDE_FROM_ALL)
+if(USE_SYSTEM_LIBS)
+ include(FindPkgConfig)
+ pkg_check_modules(CRYPTOPP REQUIRED libcryptopp>=8.2)
+ if(BUILD_TESTING)
+ find_package(GTest CONFIG REQUIRED)
+ set(GOOGLETEST_LIBS GTest::gtest GTest::gmock)
+ endif()
+
+ add_definitions(-DUSE_SYSTEM_LIBS)
+else()
+ add_subdirectory(vendor EXCLUDE_FROM_ALL)
+ set(GOOGLETEST_LIBS googletest)
+endif()
+
add_subdirectory(src)
add_subdirectory(doc)
add_subdirectory(test)
--- a/src/blockstore/implementations/compressing/compressors/Gzip.cpp
+++ b/src/blockstore/implementations/compressing/compressors/Gzip.cpp
@@ -1,5 +1,9 @@
#include "Gzip.h"
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/gzip.h>
+#else
#include <vendor_cryptopp/gzip.h>
+#endif
using cpputils::Data;
--- a/src/cpp-utils/crypto/hash/Hash.cpp
+++ b/src/cpp-utils/crypto/hash/Hash.cpp
@@ -1,6 +1,10 @@
#include "Hash.h"
#include <cpp-utils/random/Random.h>
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/sha.h>
+#else
#include <vendor_cryptopp/sha.h>
+#endif
using cpputils::Random;
using CryptoPP::SHA512;
--- a/src/cpp-utils/crypto/kdf/Scrypt.cpp
+++ b/src/cpp-utils/crypto/kdf/Scrypt.cpp
@@ -1,5 +1,9 @@
#include "Scrypt.h"
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/scrypt.h>
+#else
#include <vendor_cryptopp/scrypt.h>
+#endif
using std::string;
--- a/src/cpp-utils/crypto/symmetric/CFB_Cipher.h
+++ b/src/cpp-utils/crypto/symmetric/CFB_Cipher.h
@@ -6,7 +6,11 @@
#include "../../data/Data.h"
#include "../../random/Random.h"
#include <boost/optional.hpp>
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/modes.h>
+#else
#include <vendor_cryptopp/modes.h>
+#endif
#include "Cipher.h"
#include "EncryptionKey.h"
--- a/src/cpp-utils/crypto/symmetric/GCM_Cipher.h
+++ b/src/cpp-utils/crypto/symmetric/GCM_Cipher.h
@@ -3,7 +3,12 @@
#define MESSMER_CPPUTILS_CRYPTO_SYMMETRIC_GCMCIPHER_H_
#include "AEAD_Cipher.h"
+
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/gcm.h>
+#else
#include <vendor_cryptopp/gcm.h>
+#endif
namespace cpputils {
--- a/src/cpp-utils/crypto/symmetric/ciphers.h
+++ b/src/cpp-utils/crypto/symmetric/ciphers.h
@@ -2,12 +2,21 @@
#ifndef MESSMER_CPPUTILS_CRYPTO_SYMMETRIC_CIPHERS_H_
#define MESSMER_CPPUTILS_CRYPTO_SYMMETRIC_CIPHERS_H_
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/aes.h>
+#include <cryptopp/twofish.h>
+#include <cryptopp/serpent.h>
+#include <cryptopp/cast.h>
+#include <cryptopp/mars.h>
+#include <cryptopp/chachapoly.h>
+#else
#include <vendor_cryptopp/aes.h>
#include <vendor_cryptopp/twofish.h>
#include <vendor_cryptopp/serpent.h>
#include <vendor_cryptopp/cast.h>
#include <vendor_cryptopp/mars.h>
#include <vendor_cryptopp/chachapoly.h>
+#endif
#include "GCM_Cipher.h"
#include "CFB_Cipher.h"
--- a/src/cpp-utils/data/Data.cpp
+++ b/src/cpp-utils/data/Data.cpp
@@ -1,6 +1,10 @@
#include "Data.h"
#include <stdexcept>
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/hex.h>
+#else
#include <vendor_cryptopp/hex.h>
+#endif
using std::istream;
using std::ofstream;
--- a/src/cpp-utils/data/FixedSizeData.h
+++ b/src/cpp-utils/data/FixedSizeData.h
@@ -2,7 +2,11 @@
#ifndef MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_
#define MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/hex.h>
+#else
#include <vendor_cryptopp/hex.h>
+#endif
#include <string>
#include <array>
#include <cstring>
--- a/src/cpp-utils/random/OSRandomGenerator.h
+++ b/src/cpp-utils/random/OSRandomGenerator.h
@@ -3,7 +3,11 @@
#define MESSMER_CPPUTILS_RANDOM_OSRANDOMGENERATOR_H
#include "RandomGenerator.h"
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/osrng.h>
+#else
#include <vendor_cryptopp/osrng.h>
+#endif
namespace cpputils {
class OSRandomGenerator final : public RandomGenerator {
--- a/src/cpp-utils/random/RandomGeneratorThread.h
+++ b/src/cpp-utils/random/RandomGeneratorThread.h
@@ -4,7 +4,11 @@
#include "../thread/LoopThread.h"
#include "ThreadsafeRandomDataBuffer.h"
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/osrng.h>
+#else
#include <vendor_cryptopp/osrng.h>
+#endif
namespace cpputils {
//TODO Test
--- a/src/cryfs/impl/localstate/BasedirMetadata.cpp
+++ b/src/cryfs/impl/localstate/BasedirMetadata.cpp
@@ -1,7 +1,11 @@
#include "BasedirMetadata.h"
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/sha.h>
+#else
#include <vendor_cryptopp/sha.h>
+#endif
#include <boost/filesystem/operations.hpp>
#include "LocalStateDir.h"
#include <cpp-utils/logging/logging.h>
--- a/test/blobstore/CMakeLists.txt
+++ b/test/blobstore/CMakeLists.txt
@@ -27,7 +27,7 @@ set(SOURCES
)
add_executable(${PROJECT_NAME} ${SOURCES})
-target_link_libraries(${PROJECT_NAME} my-gtest-main googletest blobstore)
+target_link_libraries(${PROJECT_NAME} my-gtest-main ${GOOGLETEST_LIBS} blobstore)
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
--- a/test/blockstore/CMakeLists.txt
+++ b/test/blockstore/CMakeLists.txt
@@ -42,7 +42,7 @@ set(SOURCES
)
add_executable(${PROJECT_NAME} ${SOURCES})
-target_link_libraries(${PROJECT_NAME} my-gtest-main googletest blockstore)
+target_link_libraries(${PROJECT_NAME} my-gtest-main ${GOOGLETEST_LIBS} blockstore)
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
--- a/test/cpp-utils/CMakeLists.txt
+++ b/test/cpp-utils/CMakeLists.txt
@@ -71,7 +71,7 @@ target_activate_cpp14(${PROJECT_NAME}_exit_signal)
target_link_libraries(${PROJECT_NAME}_exit_signal cpp-utils)
add_executable(${PROJECT_NAME} ${SOURCES})
-target_link_libraries(${PROJECT_NAME} my-gtest-main googletest cpp-utils)
+target_link_libraries(${PROJECT_NAME} my-gtest-main ${GOOGLETEST_LIBS} cpp-utils)
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_exit_status ${PROJECT_NAME}_exit_signal)
add_test(${PROJECT_NAME} ${PROJECT_NAME})
--- a/test/cryfs-cli/CMakeLists.txt
+++ b/test/cryfs-cli/CMakeLists.txt
@@ -16,7 +16,7 @@ set(SOURCES
)
add_executable(${PROJECT_NAME} ${SOURCES})
-target_link_libraries(${PROJECT_NAME} my-gtest-main googletest cryfs-cli cryfs-unmount fspp-fuse)
+target_link_libraries(${PROJECT_NAME} my-gtest-main ${GOOGLETEST_LIBS} cryfs-cli cryfs-unmount fspp-fuse)
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
--- a/test/cryfs/CMakeLists.txt
+++ b/test/cryfs/CMakeLists.txt
@@ -24,7 +24,7 @@ set(SOURCES
)
add_executable(${PROJECT_NAME} ${SOURCES})
-target_link_libraries(${PROJECT_NAME} my-gtest-main googletest cryfs)
+target_link_libraries(${PROJECT_NAME} my-gtest-main ${GOOGLETEST_LIBS} cryfs)
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
--- a/test/cryfs/impl/config/CompatibilityTest.cpp
+++ b/test/cryfs/impl/config/CompatibilityTest.cpp
@@ -2,7 +2,11 @@
#include <vector>
#include <boost/filesystem.hpp>
#include <cpp-utils/data/Data.h>
+#if defined(USE_SYSTEM_LIBS)
+#include <cryptopp/hex.h>
+#else
#include <vendor_cryptopp/hex.h>
+#endif
#include <cpp-utils/crypto/symmetric/ciphers.h>
#include <cpp-utils/tempfile/TempFile.h>
#include <cryfs/impl/config/CryConfigFile.h>
--- a/test/fspp/CMakeLists.txt
+++ b/test/fspp/CMakeLists.txt
@@ -103,7 +103,7 @@ set(SOURCES
testutils/OpenFileHandle.cpp testutils/OpenFileHandle.h)
add_executable(${PROJECT_NAME} ${SOURCES})
-target_link_libraries(${PROJECT_NAME} my-gtest-main googletest fspp-interface fspp-fuse)
+target_link_libraries(${PROJECT_NAME} my-gtest-main ${GOOGLETEST_LIBS} fspp-interface fspp-fuse)
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
--- a/test/gitversion/CMakeLists.txt
+++ b/test/gitversion/CMakeLists.txt
@@ -6,7 +6,7 @@ set(SOURCES
)
add_executable(${PROJECT_NAME} ${SOURCES})
-target_link_libraries(${PROJECT_NAME} my-gtest-main googletest gitversion)
+target_link_libraries(${PROJECT_NAME} my-gtest-main ${GOOGLETEST_LIBS} gitversion)
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
--- a/test/my-gtest-main/CMakeLists.txt
+++ b/test/my-gtest-main/CMakeLists.txt
@@ -5,7 +5,7 @@ set(SOURCES
)
add_library(${PROJECT_NAME} STATIC ${SOURCES})
-target_link_libraries(${PROJECT_NAME} PUBLIC googletest cpp-utils)
+target_link_libraries(${PROJECT_NAME} PUBLIC ${GOOGLETEST_LIBS} cpp-utils)
target_add_boost(${PROJECT_NAME} filesystem system)
target_include_directories(${PROJECT_NAME} PUBLIC .)
--- a/test/parallelaccessstore/CMakeLists.txt
+++ b/test/parallelaccessstore/CMakeLists.txt
@@ -6,7 +6,7 @@ set(SOURCES
)
add_executable(${PROJECT_NAME} ${SOURCES})
-target_link_libraries(${PROJECT_NAME} my-gtest-main googletest parallelaccessstore)
+target_link_libraries(${PROJECT_NAME} my-gtest-main ${GOOGLETEST_LIBS} parallelaccessstore)
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_enable_style_warnings(${PROJECT_NAME})
--
2.45.2