summaryrefslogtreecommitdiff
path: root/sys-fs/cryptsetup
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
commitc719fdcee603a5a706a45d10cb598762d56a727d (patch)
tree620cbf137661399a3fb1eff92914204f9a970713 /sys-fs/cryptsetup
parentcc4618c9ba3d974948ebf340b542d8cb01db2f55 (diff)
gentoo resync : 25.09.2021
Diffstat (limited to 'sys-fs/cryptsetup')
-rw-r--r--sys-fs/cryptsetup/Manifest3
-rw-r--r--sys-fs/cryptsetup/cryptsetup-2.4.1-r1.ebuild137
-rw-r--r--sys-fs/cryptsetup/files/cryptsetup-2.4.1-external-tokens.patch34
3 files changed, 174 insertions, 0 deletions
diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
index 62fb67be6f42..055afb88e642 100644
--- a/sys-fs/cryptsetup/Manifest
+++ b/sys-fs/cryptsetup/Manifest
@@ -3,8 +3,11 @@ AUX 1.6.7-dmcrypt.rc 8815 BLAKE2B 9e88475af36f7ab3c7b48672ecf64e885e7be4b1af27c2
AUX 2.4.0-dmcrypt.confd 4009 BLAKE2B efaf826fc78b60068aeddb6d5fbd9665bcf85e66c5f0b48fa74316d8ad98fb5400ed89f674b6a93e30d76fa1adc3391a209a95936156fcd472b779cf5dbdd8b4 SHA512 131cee054019eed3f1939615386ba849bad2b02e31042075d5839e9a5943c8716431aae01aece25b2193645bcd706e14e6c947ee59f1fab4c2d7e0afc80228be
AUX 2.4.0-dmcrypt.rc 9059 BLAKE2B 622320bd69a9e2d2779bd0eb97034635335125d2def73f66ba4be5df1a0d29da7c1dadd0e2379a5f4ef35a9b17d4cb11fe2419cce6cad2df63546370b6a1975b SHA512 7f32bd09e22405deb4a7cd8233da0262764233562421a8fb49bd625be591f1dc27154c2204462df480668ab2f1a81aab5a992f426603a8a4fd86cd15a27a6a97
AUX cryptsetup-2.0.4-fix-static-pwquality-build.patch 427 BLAKE2B dfdc56c6627084732973254cd52c48f0869aa7b4c58e466840a87f77c1d4fb09ae37295fb54e980abccfdfe51dc63161e188a0be9bb4bf3c69d7731120f84bac SHA512 23b5f9b21ec86c92787bfc8744682ce0777dfa87e1de97afbb8db33c4587f1e2c8e5f8c9d0fa56ca801d7795739f9a66f14633d8a3904ea68ddd58ddc3863adf
+AUX cryptsetup-2.4.1-external-tokens.patch 1015 BLAKE2B ca7b5940caf000cc97742dfcbf8ee38e9fec049a4a3788737b283851dc3fd340664d332aff507f8d9d5962bca66b56a232419902114ac08ace5df76825cccd1a SHA512 23dff40a535ac1d4ccae41cc7a24e0ca53b412e0f6c0fc3e4a8ef7b7255ed28d8010a5684aa5029ec1d5d534196c4fbb83bc2a1ab5794cc6197b19f1a0696bab
DIST cryptsetup-2.3.6.tar.xz 11154148 BLAKE2B 23a7d6fdeed2b8fb0492e800266a263b12dcf2b8c4304bda82e46d2de90b6c05a97a40f0f6f9c337b3dc428d51689d76953de5cc4daed210967cf0ea0ff503d2 SHA512 5b25cc806140d24181a0e4f0e7b0bd3caa8263aa502e8633b41c980f06ecba2e6acbf9c2d9cc4a785d38ce90d86dd8d22c52b28b9ca4a15824c2e8bdb3656665
DIST cryptsetup-2.4.0.tar.xz 11162168 BLAKE2B a2074d1607ff3c136818b14ea3939fde3a528430b50ebd4d483d1e164ede6a62432c27e0d7d8b29b89ad6bce69dae30fc6bdf5ce458b3c6faa5178f6218519e6 SHA512 9c868b1dee7145f91092160cf977d3ada57a14634b5312d54477e111250975b6f077a92c417373bb7de07244b01ab19553bcce5030ee456ca2c38030e3067186
+DIST cryptsetup-2.4.1.tar.xz 11171180 BLAKE2B 6b999a19df54276d295eb2f1729be2eefb5fb09cd29aae5f7c0b93c539b4b552f92327f2474e0f4793a3c7f8a264a4ef927178dabfc9ba56012bdf9949ef9ada SHA512 17fc73c180e41acbd4ebeddebaf54f8baeef09fce7f154aa9c55936a58bda7adcc7b1bb257336c22295d7b5af426fc8dfd0e4e644e4a52098bcb8a2adb562ca7
EBUILD cryptsetup-2.3.6-r2.ebuild 3908 BLAKE2B f2b709398da106f2d2b89365d67eee7298703035b1c94960fc0819b00dc48231692a6df2bf13322778e3704003bc0637a14d8198343053010b74fd21b1f52050 SHA512 6a9ee5bdd788a51944af30311ec84698d0fcaf19fe5845be4e0758dc89367ba9786c47b861595dfa691e3b9a82e11a239e54b1166fddd4848ec3bf37d5ceb195
EBUILD cryptsetup-2.4.0-r1.ebuild 4118 BLAKE2B 87d307168f52ba2476fa3acfbe4a9203a6a720ea957bc5be45acec3264311e2648270878cfbf4ba82b8935cbd8fa49dc32843617bc5f70b54c0c222b6b693d83 SHA512 eb71c347d866fd91f9ed940ce32daa117204259f55eed0e65e99f12c2756e5dcd857ff954171c861aa8eacead09fb714e2133169544766300c22dcec68273920
+EBUILD cryptsetup-2.4.1-r1.ebuild 4134 BLAKE2B 057b3f0f264a35155971feb860c83ac7fba48f963973aa626543f7aa0172f2284f1f0d6ea4469e144a0f12dc202b5f0278d4221865fc5ed942ca822d2e221865 SHA512 512df86889fdbd000b2c17f36c1cee96976be1a92c1c3421ed4f320bf822ff2026159d708b0cdd50c69b72ab682312aad0bdbd569849a68a9f6f7930f4ab315d
MISC metadata.xml 1076 BLAKE2B 132b07201bfa3a7d8889d0b2558c15f35829bfa021b31cd5a9cf2cb21de822ceb89fae177b014590f46411cd609b4e44b20165b07c7676483a547987fffcbb9d SHA512 b06b884e0e369022cea4b3634d9df3c7d62d854754969d0c7848a3baf3a3ea69cce2131527539600424c72c539e502378b0627ba7c4fdcbc74e6f7a58b5800a8
diff --git a/sys-fs/cryptsetup/cryptsetup-2.4.1-r1.ebuild b/sys-fs/cryptsetup/cryptsetup-2.4.1-r1.ebuild
new file mode 100644
index 000000000000..cd60372120e6
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-2.4.1-r1.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info tmpfiles
+
+DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
+HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md"
+SRC_URI="https://www.kernel.org/pub/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 ~riscv ~s390 ~sparc ~x86"
+CRYPTO_BACKENDS="gcrypt kernel 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 nls pwquality reencrypt ssh static static-libs +udev urandom"
+REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
+ static? ( !gcrypt !udev )" #496612
+
+LIB_DEPEND="
+ dev-libs/json-c:=[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(+)]
+ dev-libs/libgpg-error[static-libs(+)]
+ )
+ nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
+ openssl? ( dev-libs/openssl:0=[static-libs(+)] )
+ pwquality? ( dev-libs/libpwquality[static-libs(+)] )
+ ssh? ( net-libs/libssh[static-libs(+)] )
+ sys-fs/lvm2[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\([+-]\)\]}
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+PATCHES=(
+ "${FILESDIR}"/cryptsetup-2.4.1-external-tokens.patch
+)
+
+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
+}
+
+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 myeconfargs=(
+ --disable-internal-argon2
+ --enable-shared
+ --sbindir=/sbin
+ # for later use
+ --with-default-luks-format=LUKS2
+ --with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d"
+ --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
+ $(use_enable argon2 libargon2)
+ $(use_enable nls)
+ $(use_enable pwquality)
+ $(use_enable reencrypt cryptsetup-reencrypt)
+ $(use_enable !static external-tokens)
+ $(use_enable static static-cryptsetup)
+ $(use_enable static-libs static)
+ $(use_enable udev)
+ $(use_enable !urandom dev-random)
+ $(use_enable ssh ssh-token)
+ $(usex argon2 '' '--with-luks2-pbkdf=pbkdf2')
+ )
+ 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
+ mv "${ED}"/sbin/integritysetup{.static,} || die
+ if use ssh ; then
+ mv "${ED}"/sbin/cryptsetup-ssh{.static,} || die
+ fi
+ if use reencrypt ; then
+ mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die
+ fi
+ fi
+ find "${ED}" -type f -name "*.la" -delete || die
+
+ dodoc docs/v*ReleaseNotes
+
+ newconfd "${FILESDIR}"/2.4.0-dmcrypt.confd dmcrypt
+ newinitd "${FILESDIR}"/2.4.0-dmcrypt.rc dmcrypt
+}
+
+pkg_postinst() {
+ tmpfiles_process cryptsetup.conf
+}
diff --git a/sys-fs/cryptsetup/files/cryptsetup-2.4.1-external-tokens.patch b/sys-fs/cryptsetup/files/cryptsetup-2.4.1-external-tokens.patch
new file mode 100644
index 000000000000..1777a02652ce
--- /dev/null
+++ b/sys-fs/cryptsetup/files/cryptsetup-2.4.1-external-tokens.patch
@@ -0,0 +1,34 @@
+From a1b577c085cc9ef6b95c4556ec8815070828ee6c Mon Sep 17 00:00:00 2001
+From: Hector Martin <marcan@marcan.st>
+Date: Fri, 17 Sep 2021 05:44:18 +0000
+Subject: [PATCH] Do not attempt to unload external tokens if
+ USE_EXTERNAL_TOKENS is disabled.
+
+This allows building a static binary as long as --disable-external-tokens is used
+---
+ lib/luks2/luks2_token.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/luks2/luks2_token.c b/lib/luks2/luks2_token.c
+index d34cebf5..88d84418 100644
+--- a/lib/luks2/luks2_token.c
++++ b/lib/luks2/luks2_token.c
+@@ -245,6 +245,7 @@ int crypt_token_register(const crypt_token_handler *handler)
+
+ void crypt_token_unload_external_all(struct crypt_device *cd)
+ {
++#if USE_EXTERNAL_TOKENS
+ int i;
+
+ for (i = LUKS2_TOKENS_MAX - 1; i >= 0; i--) {
+@@ -258,6 +259,7 @@ void crypt_token_unload_external_all(struct crypt_device *cd)
+ if (dlclose(CONST_CAST(void *)token_handlers[i].u.v2.dlhandle))
+ log_dbg(cd, "%s", dlerror());
+ }
++#endif
+ }
+
+ static const void
+--
+GitLab
+