summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-22 11:40:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-22 11:40:06 +0100
commit7a86906b67693cc65671d3e1476835d3a7e13092 (patch)
tree9de1b9e2cf77833183d4e5ffab2e94d0403ef725 /sys-fs
parentd56d144655e3785864da43c9acb6c228ef9360ae (diff)
gentoo resync : 22.06.2019
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/bees/bees-0.6.1.ebuild72
-rw-r--r--sys-fs/cryfs/cryfs-0.10.2.ebuild97
-rw-r--r--sys-fs/cryfs/files/cryfs-0.10.2-install-targets.patch36
-rw-r--r--sys-fs/cryfs/files/cryfs-0.10.2-unbundle-libs.patch409
-rw-r--r--sys-fs/cryptsetup/cryptsetup-2.2.0_rc1.ebuild137
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch13
-rw-r--r--sys-fs/lvm2/lvm2-2.02.185.ebuild273
-rw-r--r--sys-fs/udisks/udisks-2.8.3.ebuild120
8 files changed, 1157 insertions, 0 deletions
diff --git a/sys-fs/bees/bees-0.6.1.ebuild b/sys-fs/bees/bees-0.6.1.ebuild
new file mode 100644
index 000000000000..a232eb5d07fd
--- /dev/null
+++ b/sys-fs/bees/bees-0.6.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info systemd
+
+DESCRIPTION="Best-Effort Extent-Same, a btrfs dedup agent"
+HOMEPAGE="https://github.com/Zygo/bees"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/Zygo/bees.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/Zygo/bees/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="tools"
+
+DEPEND="
+ >=sys-apps/util-linux-2.30.2
+ >=sys-fs/btrfs-progs-4.1
+"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~BTRFS_FS"
+ERROR_BTRFS_FS="CONFIG_BTRFS_FS: bees does currently only work with btrfs"
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ if kernel_is -lt 4 4 3; then
+ ewarn "Kernel versions below 4.4.3 lack critical features needed for bees to"
+ ewarn "properly operate, so it won't work. It's recommended to run at least"
+ ewarn "kernel version 4.11 for best performance and reliability."
+ ewarn
+ elif kernel_is -lt 4 11; then
+ ewarn "With kernel versions below 4.11, bees may severely degrade system performance"
+ ewarn "and responsiveness. Especially, the kernel may deadlock while bees is"
+ ewarn "running, it's recommended to run at least kernel 4.11."
+ ewarn
+ elif kernel_is -lt 4 14 29; then
+ ewarn "With kernel versions below 4.14.29, bees may generate a lot of bogus WARN_ON()"
+ ewarn "messages in the kernel log. These messages can be ignored and this is fixed"
+ ewarn "with more recent kernels:"
+ ewarn "# WARNING: CPU: 3 PID: 18172 at fs/btrfs/backref.c:1391 find_parent_nodes+0xc41/0x14e0"
+ ewarn
+ fi
+ elog "Bees recommends to run the latest current kernel for performance and"
+ elog "reliability reasons, see README.md."
+ fi
+}
+
+src_configure() {
+ cat >localconf <<-EOF || die
+ LIBEXEC_PREFIX=/usr/libexec
+ PREFIX=/usr
+ LIBDIR="$(get_libdir)"
+ SYSTEMD_SYSTEM_UNIT_DIR="$(systemd_get_systemunitdir)"
+ DEFAULT_MAKE_TARGET=all
+ EOF
+ if [[ ${PV} != "9999" ]] ; then
+ cat >>localconf <<-EOF || die
+ BEES_VERSION=v${PV}
+ EOF
+ fi
+ if use tools; then
+ echo OPTIONAL_INSTALL_TARGETS=install_tools >>localconf || die
+ fi
+}
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 000000000000..56ffbdfc5458
--- /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} == 9999 ]] ; 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 000000000000..5f4881002c46
--- /dev/null
+++ b/sys-fs/cryfs/files/cryfs-0.10.2-install-targets.patch
@@ -0,0 +1,36 @@
+From 18503b00bd16d95dd2cf8a9047446f8be7289082 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 16 Jun 2019 19:35:49 +0200
+Subject: [PATCH 3/3] Don't limit install on Release/Debug/RelWithDebInfo
+ CONFIGURATIONS
+
+---
+ src/cryfs-cli/CMakeLists.txt | 1 -
+ src/cryfs-unmount/CMakeLists.txt | 3 +--
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/cryfs-cli/CMakeLists.txt b/src/cryfs-cli/CMakeLists.txt
+index 90edb227..e8c03916 100644
+--- a/src/cryfs-cli/CMakeLists.txt
++++ b/src/cryfs-cli/CMakeLists.txt
+@@ -27,6 +27,5 @@ target_enable_style_warnings(${PROJECT_NAME}_bin)
+ target_activate_cpp14(${PROJECT_NAME}_bin)
+
+ install(TARGETS ${PROJECT_NAME}_bin
+- CONFIGURATIONS Debug Release RelWithDebInfo
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
+ )
+diff --git a/src/cryfs-unmount/CMakeLists.txt b/src/cryfs-unmount/CMakeLists.txt
+index 0a246a7f..c5f096ab 100644
+--- a/src/cryfs-unmount/CMakeLists.txt
++++ b/src/cryfs-unmount/CMakeLists.txt
+@@ -19,6 +19,5 @@ target_enable_style_warnings(${PROJECT_NAME}_bin)
+ target_activate_cpp14(${PROJECT_NAME}_bin)
+
+ install(TARGETS ${PROJECT_NAME}_bin
+- CONFIGURATIONS Debug Release RelWithDebInfo
+- DESTINATION ${CMAKE_INSTALL_BINDIR}
++ DESTINATION ${CMAKE_INSTALL_BINDIR}
+ )
+--
+2.22.0
diff --git a/sys-fs/cryfs/files/cryfs-0.10.2-unbundle-libs.patch b/sys-fs/cryfs/files/cryfs-0.10.2-unbundle-libs.patch
new file mode 100644
index 000000000000..65d72a99ac89
--- /dev/null
+++ b/sys-fs/cryfs/files/cryfs-0.10.2-unbundle-libs.patch
@@ -0,0 +1,409 @@
+From b78c249ce3e048d481d11347c98a86e6669ff5bb Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 16 Jun 2019 10:59:46 +0200
+Subject: [PATCH 1/3] Add USE_SYSTEM_LIBS option to build without bundled libs
+
+headers: s/vendor_cryptopp/cryptopp/
+
+Only gtest and crypto++ are being unbundled. In release/0.10 branch,
+bundled spdlog version is too old for Gentoo to satisfy with system-lib.
+---
+ CMakeLists.txt | 15 ++++++++++++++-
+ .../compressing/compressors/Gzip.cpp | 2 +-
+ src/cpp-utils/CMakeLists.txt | 6 +++++-
+ src/cpp-utils/crypto/cryptopp_byte.h | 2 +-
+ src/cpp-utils/crypto/hash/Hash.cpp | 2 +-
+ src/cpp-utils/crypto/kdf/Scrypt.cpp | 2 +-
+ src/cpp-utils/crypto/symmetric/CFB_Cipher.h | 2 +-
+ src/cpp-utils/crypto/symmetric/GCM_Cipher.h | 2 +-
+ src/cpp-utils/crypto/symmetric/ciphers.h | 10 +++++-----
+ src/cpp-utils/data/Data.cpp | 2 +-
+ src/cpp-utils/data/FixedSizeData.h | 2 +-
+ src/cpp-utils/random/OSRandomGenerator.h | 2 +-
+ src/cpp-utils/random/RandomGeneratorThread.h | 2 +-
+ src/cryfs/localstate/BasedirMetadata.cpp | 2 +-
+ test/blobstore/CMakeLists.txt | 2 +-
+ test/blockstore/CMakeLists.txt | 2 +-
+ test/cpp-utils/CMakeLists.txt | 2 +-
+ test/cryfs-cli/CMakeLists.txt | 2 +-
+ test/cryfs/CMakeLists.txt | 2 +-
+ test/cryfs/config/CompatibilityTest.cpp | 2 +-
+ test/fspp/CMakeLists.txt | 2 +-
+ test/gitversion/CMakeLists.txt | 2 +-
+ test/my-gtest-main/CMakeLists.txt | 2 +-
+ test/parallelaccessstore/CMakeLists.txt | 2 +-
+ 24 files changed, 45 insertions(+), 28 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fdbff715..9797d1ee 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,6 +17,7 @@ require_clang_version(4.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")
+@@ -48,7 +49,19 @@ if(MSVC)
+ add_definitions(/bigobj)
+ endif()
+
+-add_subdirectory(vendor EXCLUDE_FROM_ALL)
++if(USE_SYSTEM_LIBS)
++ include(FindPkgConfig)
++ pkg_check_modules(CRYPTOPP REQUIRED libcryptopp>=8.2)
++ add_subdirectory(vendor/spdlog EXCLUDE_FROM_ALL)
++ if(BUILD_TESTING)
++ find_package(GTest CONFIG REQUIRED)
++ set(GOOGLETEST_LIBS GTest::gtest GTest::gmock)
++ endif()
++else()
++ add_subdirectory(vendor EXCLUDE_FROM_ALL)
++ set(GOOGLETEST_LIBS googletest)
++endif()
++
+ add_subdirectory(src)
+ add_subdirectory(doc)
+ add_subdirectory(test)
+diff --git a/src/blockstore/implementations/compressing/compressors/Gzip.cpp b/src/blockstore/implementations/compressing/compressors/Gzip.cpp
+index 67b7f49a..64f13e97 100644
+--- a/src/blockstore/implementations/compressing/compressors/Gzip.cpp
++++ b/src/blockstore/implementations/compressing/compressors/Gzip.cpp
+@@ -1,6 +1,6 @@
+ #include "cpp-utils/crypto/cryptopp_byte.h"
+ #include "Gzip.h"
+-#include <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+
+ using cpputils::Data;
+
+diff --git a/src/cpp-utils/CMakeLists.txt b/src/cpp-utils/CMakeLists.txt
+index f66f99f8..b57e02ba 100644
+--- a/src/cpp-utils/CMakeLists.txt
++++ b/src/cpp-utils/CMakeLists.txt
+@@ -89,7 +89,11 @@ target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_THREAD_LIBS_INIT})
+
+ target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_DL_LIBS})
+
+-target_link_libraries(${PROJECT_NAME} PUBLIC spdlog cryptopp)
++if(USE_SYSTEM_LIBS)
++ target_link_libraries(${PROJECT_NAME} PUBLIC spdlog ${CRYPTOPP_LIBRARIES})
++else()
++ target_link_libraries(${PROJECT_NAME} PUBLIC spdlog cryptopp)
++endif()
+
+ target_add_boost(${PROJECT_NAME} filesystem system thread chrono)
+ target_enable_style_warnings(${PROJECT_NAME})
+diff --git a/src/cpp-utils/crypto/cryptopp_byte.h b/src/cpp-utils/crypto/cryptopp_byte.h
+index e00cf7cf..363990e9 100644
+--- a/src/cpp-utils/crypto/cryptopp_byte.h
++++ b/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).
+diff --git a/src/cpp-utils/crypto/hash/Hash.cpp b/src/cpp-utils/crypto/hash/Hash.cpp
+index 696cdeaf..e07d28da 100644
+--- a/src/cpp-utils/crypto/hash/Hash.cpp
++++ b/src/cpp-utils/crypto/hash/Hash.cpp
+@@ -1,6 +1,6 @@
+ #include "Hash.h"
+ #include <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+
+ using cpputils::Random;
+ using CryptoPP::SHA512;
+diff --git a/src/cpp-utils/crypto/kdf/Scrypt.cpp b/src/cpp-utils/crypto/kdf/Scrypt.cpp
+index f97d6940..e26db8db 100644
+--- a/src/cpp-utils/crypto/kdf/Scrypt.cpp
++++ b/src/cpp-utils/crypto/kdf/Scrypt.cpp
+@@ -1,5 +1,5 @@
+ #include "Scrypt.h"
+-#include <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+
+ using std::string;
+
+diff --git a/src/cpp-utils/crypto/symmetric/CFB_Cipher.h b/src/cpp-utils/crypto/symmetric/CFB_Cipher.h
+index 217111d9..0ea6355c 100644
+--- a/src/cpp-utils/crypto/symmetric/CFB_Cipher.h
++++ b/src/cpp-utils/crypto/symmetric/CFB_Cipher.h
+@@ -7,7 +7,7 @@
+ #include "../../data/Data.h"
+ #include "../../random/Random.h"
+ #include <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #include "Cipher.h"
+ #include "EncryptionKey.h"
+
+diff --git a/src/cpp-utils/crypto/symmetric/GCM_Cipher.h b/src/cpp-utils/crypto/symmetric/GCM_Cipher.h
+index 87404c8f..385f399f 100644
+--- a/src/cpp-utils/crypto/symmetric/GCM_Cipher.h
++++ b/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"
+
+diff --git a/src/cpp-utils/crypto/symmetric/ciphers.h b/src/cpp-utils/crypto/symmetric/ciphers.h
+index 7a8f8d45..61a6a25a 100644
+--- a/src/cpp-utils/crypto/symmetric/ciphers.h
++++ b/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 <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 <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #include "GCM_Cipher.h"
+ #include "CFB_Cipher.h"
+
+diff --git a/src/cpp-utils/data/Data.cpp b/src/cpp-utils/data/Data.cpp
+index c8a3a25b..3a6d41eb 100644
+--- a/src/cpp-utils/data/Data.cpp
++++ b/src/cpp-utils/data/Data.cpp
+@@ -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;
+diff --git a/src/cpp-utils/data/FixedSizeData.h b/src/cpp-utils/data/FixedSizeData.h
+index 832a96ee..e45127a4 100644
+--- a/src/cpp-utils/data/FixedSizeData.h
++++ b/src/cpp-utils/data/FixedSizeData.h
+@@ -2,7 +2,7 @@
+ #ifndef MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_
+ #define MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_
+
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #include "../assert/assert.h"
+diff --git a/src/cpp-utils/random/OSRandomGenerator.h b/src/cpp-utils/random/OSRandomGenerator.h
+index 18a8002d..8c8dc6f5 100644
+--- a/src/cpp-utils/random/OSRandomGenerator.h
++++ b/src/cpp-utils/random/OSRandomGenerator.h
+@@ -4,7 +4,7 @@
+
+ #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 {
+diff --git a/src/cpp-utils/random/RandomGeneratorThread.h b/src/cpp-utils/random/RandomGeneratorThread.h
+index 593750ed..103c00d7 100644
+--- a/src/cpp-utils/random/RandomGeneratorThread.h
++++ b/src/cpp-utils/random/RandomGeneratorThread.h
+@@ -4,7 +4,7 @@
+
+ #include "../thread/LoopThread.h"
+ #include "ThreadsafeRandomDataBuffer.h"
+-#include <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+
+ namespace cpputils {
+ //TODO Test
+diff --git a/src/cryfs/localstate/BasedirMetadata.cpp b/src/cryfs/localstate/BasedirMetadata.cpp
+index d32ced93..3de2d3ad 100644
+--- a/src/cryfs/localstate/BasedirMetadata.cpp
++++ b/src/cryfs/localstate/BasedirMetadata.cpp
+@@ -1,7 +1,7 @@
+ #include "BasedirMetadata.h"
+ #include <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+diff --git a/test/blobstore/CMakeLists.txt b/test/blobstore/CMakeLists.txt
+index 05e98b8d..342d5626 100644
+--- 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})
+diff --git a/test/blockstore/CMakeLists.txt b/test/blockstore/CMakeLists.txt
+index ca63acce..6dc5f505 100644
+--- 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})
+diff --git a/test/cpp-utils/CMakeLists.txt b/test/cpp-utils/CMakeLists.txt
+index 02cc9d5d..55f367eb 100644
+--- a/test/cpp-utils/CMakeLists.txt
++++ b/test/cpp-utils/CMakeLists.txt
+@@ -70,7 +70,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})
+
+diff --git a/test/cryfs-cli/CMakeLists.txt b/test/cryfs-cli/CMakeLists.txt
+index 2d0b38c5..76fd75bc 100644
+--- 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})
+diff --git a/test/cryfs/CMakeLists.txt b/test/cryfs/CMakeLists.txt
+index 77a025f4..71c74310 100644
+--- 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})
+diff --git a/test/cryfs/config/CompatibilityTest.cpp b/test/cryfs/config/CompatibilityTest.cpp
+index 36c1871c..a1d5f22b 100644
+--- a/test/cryfs/config/CompatibilityTest.cpp
++++ b/test/cryfs/config/CompatibilityTest.cpp
+@@ -3,7 +3,7 @@
+ #include <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+diff --git a/test/fspp/CMakeLists.txt b/test/fspp/CMakeLists.txt
+index dabff1f1..c3949206 100644
+--- a/test/fspp/CMakeLists.txt
++++ b/test/fspp/CMakeLists.txt
+@@ -102,7 +102,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})
+diff --git a/test/gitversion/CMakeLists.txt b/test/gitversion/CMakeLists.txt
+index 51a5ccc1..396289fa 100644
+--- 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})
+diff --git a/test/my-gtest-main/CMakeLists.txt b/test/my-gtest-main/CMakeLists.txt
+index 1d1e7e08..de4fd107 100644
+--- 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 .)
+
+diff --git a/test/parallelaccessstore/CMakeLists.txt b/test/parallelaccessstore/CMakeLists.txt
+index 16170d17..97379304 100644
+--- 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.22.0
+
+
+From 6d5b1dd6f040dbdf3e330962a174c91281b19472 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 16 Jun 2019 15:17:16 +0200
+Subject: [PATCH 2/3] Use FeatureSummary
+
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9797d1ee..9e37b2e6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,6 +9,7 @@ project(cryfs)
+
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake-utils)
+ include(utils)
++include(FeatureSummary)
+
+ require_gcc_version(5.0)
+ require_clang_version(4.0)
+@@ -66,3 +67,5 @@ add_subdirectory(src)
+ add_subdirectory(doc)
+ add_subdirectory(test)
+ add_subdirectory(cpack)
++
++feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+--
+2.22.0
+
diff --git a/sys-fs/cryptsetup/cryptsetup-2.2.0_rc1.ebuild b/sys-fs/cryptsetup/cryptsetup-2.2.0_rc1.ebuild
new file mode 100644
index 000000000000..e0142bdc5218
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-2.2.0_rc1.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools linux-info libtool eapi7-ver
+
+DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
+HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md"
+SRC_URI="mirror://kernel/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0/12" # libcryptsetup.so version
+[[ ${PV} != *_rc* ]] && \
+KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+# cryptsetup does _not_ have a libressl backend. We only have this for REQUIRED_USE
+# and change "libressl" to "openssl" in our econf call.
+CRYPTO_BACKENDS="gcrypt kernel libressl nettle +openssl"
+# we don't support nss since it doesn't allow cryptsetup to be built statically
+# and it's missing ripemd160 support so it can't provide full backward compatibility
+IUSE="${CRYPTO_BACKENDS} +argon2 libressl +luks1_default nls pwquality reencrypt static static-libs +udev urandom"
+REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
+ static? ( !gcrypt )" #496612
+
+LIB_DEPEND="
+ dev-libs/json-c:=[static-libs(+)]
+ dev-libs/libgpg-error[static-libs(+)]
+ dev-libs/popt[static-libs(+)]
+ >=sys-apps/util-linux-2.31-r1[static-libs(+)]
+ argon2? ( app-crypt/argon2:=[static-libs(+)] )
+ gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
+ nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
+ openssl? (
+ !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
+ libressl? ( dev-libs/libressl:=[static-libs(+)] )
+ )
+ pwquality? ( dev-libs/libpwquality[static-libs(+)] )
+ sys-fs/lvm2[static-libs(+)]
+ udev? ( virtual/libudev[static-libs(+)] )"
+# We have to always depend on ${LIB_DEPEND} rather than put behind
+# !static? () because we provide a shared library which links against
+# these other packages. #414665
+RDEPEND="static-libs? ( ${LIB_DEPEND} )
+ ${LIB_DEPEND//\[static-libs\(+\)\]}"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ static? ( ${LIB_DEPEND} )"
+
+S="${WORKDIR}/${P/_/-}"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.0.4-fix-static-pwquality-build.patch )
+
+pkg_pretend() {
+ if ! use luks1_default ; then
+ ewarn "WARNING! WARNING! WARNING!"
+ ewarn "You have chosen LUKS2 as your default format."
+ ewarn "This can break LUKS1 backwards compatibility."
+ ewarn "Enable \"luks1_default\" USE flag if you need backwards compatibility."
+ fi
+}
+
+pkg_setup() {
+ local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256"
+ local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
+ local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n"
+ local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
+ local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
+ check_extra_config
+}
+
+src_prepare() {
+ sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
+ default
+ eautoreconf
+}
+
+src_configure() {
+ if use kernel ; then
+ ewarn "Note that kernel backend is very slow for this type of operation"
+ ewarn "and is provided mainly for embedded systems wanting to avoid"
+ ewarn "userspace crypto libraries."
+ fi
+
+ local x cryptobackend
+ for x in ${CRYPTO_BACKENDS//+/} ; do
+ use ${x} && cryptobackend="${x/libressl/openssl}"
+ done
+
+ local myeconfargs=(
+ --disable-internal-argon2
+ --enable-shared
+ --sbindir=/sbin
+ # for later use
+ --with-default-luks-format=LUKS$(usex luks1_default 1 2)
+ --with-tmpfilesdir="${EPREFIX%/}/usr/lib/tmpfiles.d"
+ --with-crypto_backend=${cryptobackend}
+ $(use_enable argon2 libargon2)
+ $(use_enable nls)
+ $(use_enable pwquality)
+ $(use_enable reencrypt cryptsetup-reencrypt)
+ $(use_enable static static-cryptsetup)
+ $(use_enable static-libs static)
+ $(use_enable udev)
+ $(use_enable !urandom dev-random)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ if [[ ! -e /dev/mapper/control ]] ; then
+ ewarn "No /dev/mapper/control found -- skipping tests"
+ return 0
+ fi
+
+ local p
+ for p in /dev/mapper /dev/loop* ; do
+ addwrite ${p}
+ done
+
+ default
+}
+
+src_install() {
+ default
+
+ if use static ; then
+ mv "${ED%}"/sbin/cryptsetup{.static,} || die
+ mv "${ED%}"/sbin/veritysetup{.static,} || die
+ use reencrypt && { mv "${ED%}"/sbin/cryptsetup-reencrypt{.static,} || die ; }
+ fi
+ find "${ED}" -name "*.la" -delete || die
+
+ dodoc docs/v*ReleaseNotes
+
+ newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt
+ newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt
+}
diff --git a/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch b/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
new file mode 100644
index 000000000000..49c6853f23a7
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/686652
+
+--- LVM2.2.02.184/tools/Makefile.in
++++ LVM2.2.02.184/tools/Makefile.in
+@@ -220,6 +220,6 @@
+ echo "/* Do not edit. This file is generated by the Makefile. */" && \
+ echo -en "const char _command_input[] =\n\n\"" && \
+ $(EGREP) -v '^#|\-\-\-|^$$' $(srcdir)/command-lines.in | $(AWK) 'BEGIN {ORS = "\\n\"\n\""} //' && \
+- echo "\\n\";" \
++ printf "%s\n" "\\n\";" \
+ ) > $@
+
+ $(SOURCES:%.c=%.d) $(SOURCES2:%.c=%.d): command-lines-input.h command-count.h cmds.h
diff --git a/sys-fs/lvm2/lvm2-2.02.185.ebuild b/sys-fs/lvm2/lvm2-2.02.185.ebuild
new file mode 100644
index 000000000000..871a483ce9f3
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.185.ebuild
@@ -0,0 +1,273 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sourceware.org/lvm2/"
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+ ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="readline static static-libs systemd lvm2create_initrd sanlock selinux +udev +thin device-mapper-only"
+REQUIRED_USE="device-mapper-only? ( !lvm2create_initrd !sanlock !thin )
+ systemd? ( udev )"
+
+DEPEND_COMMON="
+ dev-libs/libaio[static-libs?]
+ static? ( dev-libs/libaio[static-libs] )
+ !static? ( dev-libs/libaio[static-libs?] )
+ readline? ( sys-libs/readline:0= )
+ sanlock? ( sys-cluster/sanlock )
+ systemd? ( >=sys-apps/systemd-205:0= )
+ udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+ >=sys-apps/baselayout-2.2
+ !<sys-apps/openrc-0.11
+ !<sys-fs/cryptsetup-1.1.2
+ !!sys-fs/lvm-user
+ >=sys-apps/util-linux-2.16
+ lvm2create_initrd? ( sys-apps/makedev )
+ thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+ >=sys-devel/binutils-2.20.1-r1
+ static? (
+ selinux? ( sys-libs/libselinux[static-libs] )
+ udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+ >=sys-apps/util-linux-2.16[static-libs]
+ )"
+BDEPEND="
+ sys-devel/autoconf-archive
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
+
+PATCHES=(
+ # Gentoo specific modification(s):
+ "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
+
+ # For upstream -- review and forward:
+ "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+ "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+ "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+ "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+ "${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
+ "${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
+ "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
+ "${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
+ "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
+ "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
+ #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
+ "${FILESDIR}"/${PN}-2.02.184-dmeventd-no-idle-exit.patch
+ #"${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380 # merged upstream
+ "${FILESDIR}"/${PN}-2.02.184-mksh_build.patch #686652
+)
+
+pkg_setup() {
+ local CONFIG_CHECK="~SYSVIPC"
+
+ if use udev; then
+ local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+ if linux_config_exists; then
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+ if [[ -n "${uevent_helper_path}" ]] && [[ "${uevent_helper_path}" != '""' ]]; then
+ ewarn "It's recommended to set an empty value to the following kernel config option:"
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+ fi
+ fi
+ fi
+
+ check_extra_config
+
+ # 1. Genkernel no longer copies /sbin/lvm blindly.
+ if use static; then
+ elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+ elog "their static versions. If you need the static binaries,"
+ elog "you must append .static to the filename!"
+ fi
+}
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "1iAR = $(tc-getAR)" \
+ -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+ make.tmpl.in || die #444082
+
+ sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212
+
+ if use udev && ! use device-mapper-only; then
+ sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+ elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+ elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+ elog "if it was previously disabled."
+ fi
+
+ sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+ # Without thin-privision-tools, there is nothing to install for target install_man7:
+ if ! use thin ; then
+ sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -flto
+ local myeconfargs=()
+
+ # Most of this package does weird stuff.
+ # The build options are tristate, and --without is NOT supported
+ # options: 'none', 'internal', 'shared'
+ myeconfargs+=(
+ $(use_enable !device-mapper-only dmfilemapd)
+ $(use_enable !device-mapper-only dmeventd)
+ $(use_enable !device-mapper-only cmdlib)
+ $(use_enable !device-mapper-only applib)
+ $(use_enable !device-mapper-only fsadm)
+ $(use_enable !device-mapper-only lvmetad)
+ $(use_enable !device-mapper-only lvmpolld)
+ $(usex device-mapper-only --disable-udev-systemd-background-jobs '')
+
+ # This only causes the .static versions to become available
+ $(usex static --enable-static_link '')
+
+ # dmeventd requires mirrors to be internal, and snapshot available
+ # so we cannot disable them
+ --with-mirrors="$(usex device-mapper-only none internal)"
+ --with-snapshots="$(usex device-mapper-only none internal)"
+
+ # disable O_DIRECT support on hppa, breaks pv detection (#99532)
+ $(usex hppa --disable-o_direct '')
+ )
+
+ if use thin; then
+ myeconfargs+=( --with-thin=internal --with-cache=internal )
+ local texec
+ for texec in check dump repair restore; do
+ myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+ myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
+ done
+ else
+ myeconfargs+=( --with-thin=none --with-cache=none )
+ fi
+
+ myeconfargs+=( --with-clvmd=none --with-cluster=none )
+
+ myeconfargs+=(
+ $(use_enable readline)
+ $(use_enable selinux)
+ --enable-pkgconfig
+ --with-confdir="${EPREFIX}"/etc
+ --exec-prefix="${EPREFIX}"
+ --sbindir="${EPREFIX}/sbin"
+ --with-staticdir="${EPREFIX}"/sbin
+ --libdir="${EPREFIX}/$(get_libdir)"
+ --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)"
+ --with-default-dm-run-dir=/run
+ --with-default-run-dir=/run/lvm
+ --with-default-locking-dir=/run/lock/lvm
+ --with-default-pid-dir=/run
+ $(use_enable udev udev_rules)
+ $(use_enable udev udev_sync)
+ $(use_with udev udevdir "$(get_udevdir)"/rules.d)
+ $(use_enable sanlock lvmlockd-sanlock)
+ $(use_enable systemd udev-systemd-background-jobs)
+ $(use_enable systemd notify-dbus)
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ CLDFLAGS="${LDFLAGS}"
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ pushd include >/dev/null
+ emake V=1
+ popd >/dev/null
+
+ if use device-mapper-only ; then
+ emake V=1 device-mapper
+ else
+ emake V=1
+ emake V=1 CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+ fi
+}
+
+src_install() {
+ local inst INSTALL_TARGETS
+ INSTALL_TARGETS=( install install_tmpfiles_configuration )
+ # install systemd related files only when requested, bug #522430
+ use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators )
+ use device-mapper-only && INSTALL_TARGETS=( install_device-mapper )
+ for inst in ${INSTALL_TARGETS[@]}; do
+ emake V=1 DESTDIR="${D}" ${inst}
+ done
+
+ newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+ newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+ if use !device-mapper-only ; then
+ newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd
+ newinitd "${FILESDIR}"/lvm.rc-2.02.184-r3 lvm
+ newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm
+ if ! use udev ; then
+ # We keep the variable but remove udev from it.
+ sed -r -i \
+ -e '/^rc_need=/s/\<udev\>//g' \
+ "${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need"
+ fi
+
+ newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
+ newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
+ newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld
+ fi
+
+ if use sanlock; then
+ newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
+ fi
+
+ if use static-libs; then
+ dolib.a libdm/ioctl/libdevmapper.a
+ dolib.a libdaemon/client/libdaemonclient.a #462908
+ #gen_usr_ldscript libdevmapper.so
+ dolib.a daemons/dmeventd/libdevmapper-event.a
+ #gen_usr_ldscript libdevmapper-event.so
+ else
+ rm -f "${ED}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+ fi
+
+ if use lvm2create_initrd; then
+ dosbin scripts/lvm2create_initrd/lvm2create_initrd
+ doman scripts/lvm2create_initrd/lvm2create_initrd.8
+ newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+ fi
+
+ insinto /etc
+ doins "${FILESDIR}"/dmtab
+
+ dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+ ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+ ewarn "# rc-update add lvm boot"
+ ewarn
+ ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+ ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+ einfo "Tests are disabled because of device-node mucking, if you want to"
+ einfo "run tests, compile the package and see ${S}/tests"
+}
diff --git a/sys-fs/udisks/udisks-2.8.3.ebuild b/sys-fs/udisks/udisks-2.8.3.ebuild
new file mode 100644
index 000000000000..2db934f25193
--- /dev/null
+++ b/sys-fs/udisks/udisks-2.8.3.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit bash-completion-r1 linux-info systemd udev xdg-utils
+
+DESCRIPTION="Daemon providing interfaces to work with storage devices"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/udisks"
+SRC_URI="https://github.com/storaged-project/udisks/releases/download/${P}/${P}.tar.bz2"
+
+LICENSE="LGPL-2+ GPL-2+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="acl debug elogind +introspection lvm nls selinux systemd vdo"
+
+REQUIRED_USE="?? ( elogind systemd )"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.50:2
+ >=dev-libs/libatasmart-0.19
+ >=sys-auth/polkit-0.110
+ >=sys-libs/libblockdev-2.19[cryptsetup,lvm?,vdo?]
+ >=virtual/libgudev-165:=
+ virtual/udev
+ acl? ( virtual/acl )
+ elogind? ( >=sys-auth/elogind-219 )
+ introspection? ( >=dev-libs/gobject-introspection-1.30:= )
+ lvm? ( sys-fs/lvm2 )
+ systemd? ( >=sys-apps/systemd-209 )
+"
+# util-linux -> mount, umount, swapon, swapoff (see also #403073)
+RDEPEND="${COMMON_DEPEND}
+ >=sys-apps/util-linux-2.30
+ >=sys-block/parted-3
+ virtual/eject
+ selinux? ( sec-policy/selinux-devicekit )
+"
+DEPEND="${COMMON_DEPEND}
+ >=sys-kernel/linux-headers-3.1
+"
+BDEPEND="
+ app-text/docbook-xsl-stylesheets
+ >=dev-util/gdbus-codegen-2.32
+ >=dev-util/gtk-doc-am-1.3
+ virtual/pkgconfig
+ nls? ( >=sys-devel/gettext-0.19.8 )
+"
+# If adding a eautoreconf, then these might be needed at buildtime:
+# dev-libs/gobject-introspection-common
+# sys-devel/autoconf-archive
+
+DOCS=( AUTHORS HACKING NEWS README.md )
+
+pkg_setup() {
+ # Listing only major arch's here to avoid tracking kernel's defconfig
+ if use amd64 || use arm || use ppc || use ppc64 || use x86; then
+ CONFIG_CHECK="~!IDE" #319829
+ CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" #412377
+ CONFIG_CHECK+=" ~NLS_UTF8" #425562
+ kernel_is lt 3 10 && CONFIG_CHECK+=" ~USB_SUSPEND" #331065, #477278
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ xdg_environment_reset
+ default
+
+ if ! use systemd ; then
+ sed -i -e 's:libsystemd-login:&disable:' configure || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-btrfs
+ --disable-gtk-doc
+ --disable-static
+ --localstatedir="${EPREFIX%/}"/var
+ --with-html-dir="${EPREFIX%/}"/usr/share/gtk-doc/html
+ --with-modprobedir="${EPREFIX%/}"/lib/modprobe.d
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ --with-tmpfilesdir="/usr/lib/tmpfiles.d"
+ --with-udevdir="$(get_udevdir)"
+ $(use_enable acl)
+ $(use_enable debug)
+ $(use_enable introspection)
+ $(use_enable lvm lvm2)
+ $(use_enable lvm lvmcache)
+ $(use_enable nls)
+ $(use_enable vdo)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ find "${ED}" -type f -name "*.la" -delete || die
+ keepdir /var/lib/udisks2 #383091
+
+ rm -rf "${ED}"/usr/share/bash-completion
+ dobashcomp data/completions/udisksctl
+}
+
+pkg_preinst() {
+ # Remove gtk-doc symlink, #597628
+ if [[ -L "${EROOT}"/usr/share/gtk-doc/html/udisks2 ]]; then
+ rm "${EROOT}"/usr/share/gtk-doc/html/udisks2 || die
+ fi
+}
+
+pkg_postinst() {
+ mkdir -p "${EROOT}"/run #415987
+
+ # See pkg_postinst() of >=sys-apps/baselayout-2.1-r1. Keep in sync?
+ if ! grep -qs "^tmpfs.*/run " "${EROOT}"/proc/mounts ; then
+ echo
+ ewarn "You should reboot the system now to get /run mounted with tmpfs!"
+ fi
+}