summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-14 15:07:20 +0000
committerSam James <sam@gentoo.org>2022-01-14 15:07:26 +0000
commit16ff43bbd3fa6ac5f4998b1eabaecbeb0661f465 (patch)
tree1f5358825b204fffd6aca9c651b741636a887337 /sys-fs
parentsys-fs/cryptsetup: add 2.3.7 (diff)
downloadgentoo-16ff43bbd3fa6ac5f4998b1eabaecbeb0661f465.tar.gz
gentoo-16ff43bbd3fa6ac5f4998b1eabaecbeb0661f465.tar.bz2
gentoo-16ff43bbd3fa6ac5f4998b1eabaecbeb0661f465.zip
sys-fs/cryptsetup: add 2.4.3
Bug: https://bugs.gentoo.org/831157 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/cryptsetup/Manifest1
-rw-r--r--sys-fs/cryptsetup/cryptsetup-2.4.3.ebuild136
2 files changed, 137 insertions, 0 deletions
diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
index dc51fc6cca29..106cf0b15950 100644
--- a/sys-fs/cryptsetup/Manifest
+++ b/sys-fs/cryptsetup/Manifest
@@ -2,3 +2,4 @@ DIST cryptsetup-2.3.6.tar.xz 11154148 BLAKE2B 23a7d6fdeed2b8fb0492e800266a263b12
DIST cryptsetup-2.3.7.tar.xz 11203500 BLAKE2B 34f39e8f17c0fb44a186345d58e3ff1632fc4bd0e570bb1935181d2dfd43bc34c300f96eb70efbddb85168e6c16886b6675db2c86482b7ff7dba64c168b5920c SHA512 d209225c6f195f54c513904b71637bdadd47f3efc6227c61c15434a1467ddb76fe14123683a3d5e943ffa203ef33611f51b7c67bc1aed67d019a6aa552ea15ab
DIST cryptsetup-2.4.1.tar.xz 11171180 BLAKE2B 6b999a19df54276d295eb2f1729be2eefb5fb09cd29aae5f7c0b93c539b4b552f92327f2474e0f4793a3c7f8a264a4ef927178dabfc9ba56012bdf9949ef9ada SHA512 17fc73c180e41acbd4ebeddebaf54f8baeef09fce7f154aa9c55936a58bda7adcc7b1bb257336c22295d7b5af426fc8dfd0e4e644e4a52098bcb8a2adb562ca7
DIST cryptsetup-2.4.2.tar.xz 11173984 BLAKE2B 33a26ac2f38750171c74cdd827317cd4bba193a6b60cc7250dc52a5117c0feb1d2fca6b52b5ae7926725d77dc6c1ab9d13e85a1c59606e80003294b90578781d SHA512 9464f180f24dffa4566450041fc88c372baa3334c62724487ccee230c16e87572439dc604766d94144cc1fc13802a4322b378185eca0cc848892821653566848
+DIST cryptsetup-2.4.3.tar.xz 11242152 BLAKE2B f5859d794d626cb19426a2c9afc4655fac3a1bae462daa42b37b925882804d5146aadff8733799dea89dcfdc311e628e5b806754495824705709ba105f91682f SHA512 2d52498497be37a837126d9cdc9b6331236eccf857c3482fe3347eb88fccc3cd0fd3d8b4490569603e18cfaa462431ae194bce0328f3eafa8bfe3e02e135a26e
diff --git a/sys-fs/cryptsetup/cryptsetup-2.4.3.ebuild b/sys-fs/cryptsetup/cryptsetup-2.4.3.ebuild
new file mode 100644
index 000000000000..bcaafc0292c5
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-2.4.3.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2022 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 test +udev urandom"
+RESTRICT="!test? ( test )"
+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:= )"
+# vim-core needed for xxd in tests
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ test? ( app-editors/vim-core )"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+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
+}