[gentoo-commits] repo/gentoo:master commit in: sys-fs/cryfs/, sys-fs/cryfs/files/

2021-08-13 Thread Sam James
commit: d9ff8f9b7363aee509e561b39b8fb99c6ce4de97
Author: Sam James  gentoo  org>
AuthorDate: Fri Aug 13 18:29:44 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Aug 13 18:33:28 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9ff8f9b

sys-fs/cryfs: fix build with Boost 1.77

Signed-off-by: Sam James  gentoo.org>

 sys-fs/cryfs/cryfs-0.10.3.ebuild   |  1 +
 .../cryfs-0.10.3-fix-build-with-boost-1-77.patch   | 26 ++
 2 files changed, 27 insertions(+)

diff --git a/sys-fs/cryfs/cryfs-0.10.3.ebuild b/sys-fs/cryfs/cryfs-0.10.3.ebuild
index 05cf0d45dc4..dbd42c68d85 100644
--- a/sys-fs/cryfs/cryfs-0.10.3.ebuild
+++ b/sys-fs/cryfs/cryfs-0.10.3.ebuild
@@ -41,6 +41,7 @@ PATCHES=(
"${FILESDIR}/${PN}-0.10.2-install-targets.patch"
# From upstream
"${FILESDIR}/${PN}-0.10.3-gcc11.patch"
+   "${FILESDIR}/${PN}-0.10.3-fix-build-with-boost-1-77.patch"
 )
 
 pkg_setup() {

diff --git a/sys-fs/cryfs/files/cryfs-0.10.3-fix-build-with-boost-1-77.patch 
b/sys-fs/cryfs/files/cryfs-0.10.3-fix-build-with-boost-1-77.patch
new file mode 100644
index 000..a9252e729fb
--- /dev/null
+++ b/sys-fs/cryfs/files/cryfs-0.10.3-fix-build-with-boost-1-77.patch
@@ -0,0 +1,26 @@
+https://github.com/cryfs/cryfs/pull/395
+
+From dcc072d51d0bbb56c9d8709214ce49f8bd6de73c Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Fri, 13 Aug 2021 18:46:55 +0100
+Subject: [PATCH] Add missing memory.h include for std::shared_ptr
+
+---
+ src/fspp/fuse/Fuse.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/fspp/fuse/Fuse.h b/src/fspp/fuse/Fuse.h
+index 0b384d8..2ed98da 100644
+--- a/src/fspp/fuse/Fuse.h
 b/src/fspp/fuse/Fuse.h
+@@ -11,6 +11,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "stat_compatibility.h"
+ 
+ namespace fspp {
+-- 
+2.32.0
+



[gentoo-commits] repo/gentoo:master commit in: sys-fs/cryfs/, sys-fs/cryfs/files/

2021-05-10 Thread Sam James
commit: 3d938ca65dc367476475ef148fd20cb2cf1472f7
Author: Sam James  gentoo  org>
AuthorDate: Mon May 10 10:46:20 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Mon May 10 10:46:48 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d938ca6

sys-fs/cryfs: add GCC 11 patch

(And fix the paths from PR which I hadn't staged...)

Closes: https://bugs.gentoo.org/786459
Signed-off-by: Sam James  gentoo.org>

 sys-fs/cryfs/cryfs-0.10.3.ebuild|   7 +-
 sys-fs/cryfs/files/cryfs-0.10.3-gcc11.patch | 271 
 2 files changed, 276 insertions(+), 2 deletions(-)

diff --git a/sys-fs/cryfs/cryfs-0.10.3.ebuild b/sys-fs/cryfs/cryfs-0.10.3.ebuild
index 16a91505cca..05cf0d45dc4 100644
--- a/sys-fs/cryfs/cryfs-0.10.3.ebuild
+++ b/sys-fs/cryfs/cryfs-0.10.3.ebuild
@@ -37,8 +37,10 @@ DEPEND="${RDEPEND}
 
 PATCHES=(
# TODO upstream:
-   "${FILESDIR}/0.10.2-unbundle-libs.patch"
-   "${FILESDIR}/0.10.2-install-targets.patch"
+   "${FILESDIR}/${PN}-0.10.2-unbundle-libs.patch"
+   "${FILESDIR}/${PN}-0.10.2-install-targets.patch"
+   # From upstream
+   "${FILESDIR}/${PN}-0.10.3-gcc11.patch"
 )
 
 pkg_setup() {
@@ -71,6 +73,7 @@ src_configure() {
-DUSE_SYSTEM_LIBS=ON
-DBUILD_TESTING=$(usex test)
)
+
use custom-optimization || append-flags -O3
use debug || append-flags -DNDEBUG
 

diff --git a/sys-fs/cryfs/files/cryfs-0.10.3-gcc11.patch 
b/sys-fs/cryfs/files/cryfs-0.10.3-gcc11.patch
new file mode 100644
index 000..9a7252ba506
--- /dev/null
+++ b/sys-fs/cryfs/files/cryfs-0.10.3-gcc11.patch
@@ -0,0 +1,271 @@
+https://github.com/cryfs/cryfs/commit/27587ea1acec5f939a31217f1c43953378f18821.patch
+https://bugs.gentoo.org/786459
+
+From 27587ea1acec5f939a31217f1c43953378f18821 Mon Sep 17 00:00:00 2001
+From: Sebastian Messmer 
+Date: Sat, 8 May 2021 14:44:27 -0700
+Subject: [PATCH] Fixed an issue when compiling with GCC 11, see
+ https://github.com/cryfs/cryfs/issues/389
+
+---
+--- a/src/blobstore/implementations/onblocks/datanodestore/DataNodeView.h
 b/src/blobstore/implementations/onblocks/datanodestore/DataNodeView.h
+@@ -67,7 +67,7 @@ class DataNodeView final {
+ 
+   static DataNodeView create(blockstore::BlockStore *blockStore, const 
DataNodeLayout , uint16_t formatVersion, uint8_t depth, uint32_t size, 
cpputils::Data data) {
+ ASSERT(data.size() <= layout.datasizeBytes(), "Data is too large for 
node");
+-cpputils::Data serialized = _serialize(layout, formatVersion, depth, 
size, std::move(data));
++cpputils::Data serialized = serialize_(layout, formatVersion, depth, 
size, std::move(data));
+ ASSERT(serialized.size() == layout.blocksizeBytes(), "Wrong block size");
+ auto block = blockStore->create(serialized);
+ return DataNodeView(std::move(block));
+@@ -75,7 +75,7 @@ class DataNodeView final {
+ 
+   static DataNodeView initialize(cpputils::unique_ref 
block, const DataNodeLayout , uint16_t formatVersion, uint8_t depth, 
uint32_t size, cpputils::Data data) {
+ ASSERT(data.size() <= DataNodeLayout(block->size()).datasizeBytes(), 
"Data is too large for node");
+-cpputils::Data serialized = _serialize(layout, formatVersion, depth, 
size, std::move(data));
++cpputils::Data serialized = serialize_(layout, formatVersion, depth, 
size, std::move(data));
+ ASSERT(serialized.size() == block->size(), "Block has wrong size");
+ block->write(serialized.data(), 0, serialized.size());
+ return DataNodeView(std::move(block));
+@@ -83,7 +83,7 @@ class DataNodeView final {
+ 
+   static DataNodeView overwrite(blockstore::BlockStore *blockStore, const 
DataNodeLayout , uint16_t formatVersion, uint8_t depth, uint32_t size, 
const blockstore::BlockId , cpputils::Data data) {
+ ASSERT(data.size() <= layout.datasizeBytes(), "Data is too large for 
node");
+-cpputils::Data serialized = _serialize(layout, formatVersion, depth, 
size, std::move(data));
++cpputils::Data serialized = serialize_(layout, formatVersion, depth, 
size, std::move(data));
+ auto block = blockStore->overwrite(blockId, std::move(serialized));
+ return DataNodeView(std::move(block));
+   }
+@@ -143,7 +143,7 @@ class DataNodeView final {
+   }
+ 
+ private:
+-  static cpputils::Data _serialize(const DataNodeLayout , uint16_t 
formatVersion, uint8_t depth, uint32_t size, cpputils::Data data) {
++  static cpputils::Data serialize_(const DataNodeLayout , uint16_t 
formatVersion, uint8_t depth, uint32_t size, cpputils::Data data) {
+ cpputils::Data result(layout.blocksizeBytes());
+ 
cpputils::serialize(result.dataOffset(layout.FORMAT_VERSION_OFFSET_BYTES),
 formatVersion);
+ 
cpputils::serialize(result.dataOffset(layout.DEPTH_OFFSET_BYTES), 
depth);
+--- a/src/cryfs/filesystem/fsblobstore/utils/DirEntry.cpp
 b/src/cryfs/filesystem/fsblobstore/utils/DirEntry.cpp
+@@ -11,55 +11,55 @@ namespace cryfs {
+ 
+ namespace {

[gentoo-commits] repo/gentoo:master commit in: sys-fs/cryfs/, sys-fs/cryfs/files/

2019-06-16 Thread Andreas Sturmlechner
commit: 192ac7421ddd4093125f4997898fb62e8a140a44
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Jun 16 15:45:42 2019 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Jun 16 21:57:08 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=192ac742

sys-fs/cryfs: 0.10.2 version bump

Add patch to unbundle:
dev-cpp/gtest
dev-libs/crypto++

Unfortunately spdlog in 0.10 branch is too old for dev-libs/spdlog to satisfy.

Add patch for install targets irrespective of CONFIGURATION

Bug: https://bugs.gentoo.org/631196
Bug: https://bugs.gentoo.org/678572
Closes: https://github.com/gentoo/gentoo/pull/11980
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 sys-fs/cryfs/Manifest  |   1 +
 sys-fs/cryfs/cryfs-0.10.2.ebuild   |  97 +
 .../cryfs/files/cryfs-0.10.2-install-targets.patch |  36 ++
 .../cryfs/files/cryfs-0.10.2-unbundle-libs.patch   | 409 +
 4 files changed, 543 insertions(+)

diff --git a/sys-fs/cryfs/Manifest b/sys-fs/cryfs/Manifest
index ff47d4c0067..728ceadfdf6 100644
--- a/sys-fs/cryfs/Manifest
+++ b/sys-fs/cryfs/Manifest
@@ -1 +1,2 @@
+DIST cryfs-0.10.2.tar.xz 7902252 BLAKE2B 
704d124ed32a8a958f400188af99498cedb706ccfc004131b677a113b6ab2733942becb1ab64fd06d0b9d5b39f7abe832b3b0669caaf2b6feb7c6577c8c7fbfd
 SHA512 
e49dd6d1e402d968cc4df0e8ca0460a01a27e4e73482041dca0fa9cde905a91d12e2bda18d257a044335e32e316b9363cecf374eb2ca621924b394dd2fabcb8f
 DIST cryfs-0.9.9.tar.xz 977928 BLAKE2B 
927d5f61be99a6400cfd53de6291e14ae32f446d281485901e758341f138a2efdfb7385b6c205db6f865dc83f6fbd9ede8fd1bb5a7957fb242624d78d2523eaf
 SHA512 
18f0ce954dc9958b52a77aac85d4d30d03409e4f88c27ec3e904a6014f5257e12fe47a4f3bb628f6ebf3b5aa8cb9d3a59e0aee76d83a3f6bdd4ef864b66898aa

diff --git a/sys-fs/cryfs/cryfs-0.10.2.ebuild b/sys-fs/cryfs/cryfs-0.10.2.ebuild
new file mode 100644
index 000..56ffbdfc545
--- /dev/null
+++ b/sys-fs/cryfs/cryfs-0.10.2.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+inherit cmake-utils flag-o-matic linux-info python-any-r1
+
+if [[ ${PV} ==  ]] ; then
+   inherit git-r3
+   EGIT_REPO_URI="https://github.com/cryfs/cryfs;
+else
+   
SRC_URI="https://github.com/cryfs/cryfs/releases/download/${PV}/${P}.tar.xz;
+   KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+   S="${WORKDIR}"
+fi
+
+DESCRIPTION="Encrypted FUSE filesystem that conceals metadata"
+HOMEPAGE="https://www.cryfs.org/;
+
+LICENSE="LGPL-3 MIT"
+SLOT="0"
+IUSE="custom-optimization debug libressl test"
+
+RDEPEND="
+   >=dev-libs/boost-1.65.1:=
+   >=dev-libs/crypto++-8.2.0:=
+   net-misc/curl:=
+   >=sys-fs/fuse-2.8.6:0
+   !libressl? ( dev-libs/openssl:0= )
+   libressl? ( dev-libs/libressl:= )
+"
+DEPEND="${RDEPEND}
+   ${PYTHON_DEPS}
+   test? ( dev-cpp/gtest )
+"
+
+PATCHES=(
+   # TODO upstream:
+   "${FILESDIR}/${P}-unbundle-libs.patch"
+   "${FILESDIR}/${P}-install-targets.patch"
+)
+
+pkg_setup() {
+   local CONFIG_CHECK="~FUSE_FS"
+   local WARNING_FUSE_FS="CONFIG_FUSE_FS is required for cryfs support."
+
+   check_extra_config
+}
+
+src_prepare() {
+   cmake-utils_src_prepare
+
+   # don't install compressed manpage
+   cmake_comment_add_subdirectory doc
+
+   # remove tests that require internet access to comply with Gentoo policy
+   sed -e "/CurlHttpClientTest.cpp/d" -e "/FakeHttpClientTest.cpp/d" \
+   -i test/cpp-utils/CMakeLists.txt || die
+}
+
+src_configure() {
+   local mycmakeargs=(
+   -DBoost_USE_STATIC_LIBS=OFF
+   -DCRYFS_UPDATE_CHECKS=OFF
+   -DBUILD_SHARED_LIBS=OFF
+   -DUSE_SYSTEM_LIBS=ON
+   -DBUILD_TESTING=$(usex test)
+   )
+   use custom-optimization || append-flags -O3
+
+   cmake-utils_src_configure
+}
+
+src_test() {
+   local TMPDIR="${T}"
+   addread /dev/fuse
+   addwrite /dev/fuse
+   local tests_failed=()
+
+   for i in gitversion cpp-utils parallelaccessstore blockstore blobstore 
fspp cryfs cryfs-cli ; do
+   "${BUILD_DIR}"/test/${i}/${i}-test || tests_failed+=( "${i}" )
+   done
+
+   adddeny /dev/fuse
+
+   if [[ -n ${tests_failed[@]} ]] ; then
+   eerror "The following tests failed:"
+   eerror "${tests_failed[@]}"
+   die "At least one test failed"
+   fi
+}
+
+src_install() {
+   cmake-utils_src_install
+   doman doc/man/cryfs.1
+}

diff --git a/sys-fs/cryfs/files/cryfs-0.10.2-install-targets.patch 
b/sys-fs/cryfs/files/cryfs-0.10.2-install-targets.patch
new file mode 100644
index 000..5f4881002c4
--- /dev/null
+++ b/sys-fs/cryfs/files/cryfs-0.10.2-install-targets.patch
@@ -0,0 +1,36 @@
+From