From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1259843-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 9BE2C1382C5
	for <garchives@archives.gentoo.org>; Thu, 11 Mar 2021 17:33:37 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id EB5BAE0895;
	Thu, 11 Mar 2021 17:33:36 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id BE74FE0895
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Mar 2021 17:33:36 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id A4803340D24
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Mar 2021 17:33:35 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id F2FBA573
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Mar 2021 17:33:33 +0000 (UTC)
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" <polynomial-c@gentoo.org>
Message-ID: <1615484011.fdf721c51158f585aa779073c7614d705f653faf.polynomial-c@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/cryptsetup/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-fs/cryptsetup/Manifest sys-fs/cryptsetup/cryptsetup-2.3.5.ebuild
X-VCS-Directories: sys-fs/cryptsetup/
X-VCS-Committer: polynomial-c
X-VCS-Committer-Name: Lars Wendler
X-VCS-Revision: fdf721c51158f585aa779073c7614d705f653faf
X-VCS-Branch: master
Date: Thu, 11 Mar 2021 17:33:33 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: d293fb10-cedf-4a60-b872-ad8050fa7488
X-Archives-Hash: f90cad521adf4556b168bab40ab2413b

commit:     fdf721c51158f585aa779073c7614d705f653faf
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 11 17:32:00 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 11 17:33:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdf721c5

sys-fs/cryptsetup: Bump to version 2.3.5

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-fs/cryptsetup/Manifest                |   1 +
 sys-fs/cryptsetup/cryptsetup-2.3.5.ebuild | 126 ++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
index 212251c1571..7d9f379c37d 100644
--- a/sys-fs/cryptsetup/Manifest
+++ b/sys-fs/cryptsetup/Manifest
@@ -1,3 +1,4 @@
 DIST cryptsetup-2.3.2.tar.xz 11037076 BLAKE2B b0f8a1a274e6b95b12aa7172dbdd41e512aea2c87a98d62b8b4d4cbb898b2d4b82e250368e385c4d4acc8e77046ea4b4f7be730750587569572c4b9490815bc1 SHA512 c5eb41751ca64ff906187f40805705570c261816b014dfcdbf2777f42e53668e32966197092a2235b8f6a7a4e7f9c3f301d82f17c45cfbcff96b9818631d7e5f
 DIST cryptsetup-2.3.3.tar.xz 11104768 BLAKE2B 54aa6f087c5366e843c1f9b649fd77ec8be8c4e65c783a2a84a036b4ef460c9d070bdd8aff72f87a7a3136f13581e84534940b435f0b49eb1951d1a755cab47a SHA512 d613efb80e003364a21832da3fefe3891d36a891119cc0efa970aad40ba135dfcd42b32a0c19c31ad879d4eddf27864beccbea1d4b31a47a4e075bc0f756365c
 DIST cryptsetup-2.3.4.tar.xz 11114004 BLAKE2B 680e6eeb594737aeb8330b0ac8638e94941bdcc56fc3441b6f1bc4f3d209d768096e23a7f840dc1012f9e63fae0fdbc0e72d735d89e92a621cec88ea59560f19 SHA512 db0bfd795343e575acb7a80ea2b9d32acf08ac970037e5b158a1e4381976552dc292107ce79e55913f49fcf643d4ea7104ed73de7c1e8d424b83d471d20ab60d
+DIST cryptsetup-2.3.5.tar.xz 11146364 BLAKE2B fb37c1a7308ecb82630f3a50b70bedcc540dab40a5c716a9d1ac218c7b9ed275da1a1a8f7ceffd8f0d2f5779b4e99c09ccd725c7babe7954e1d31226e85f21ae SHA512 60695a445608e2019ffc4f4ea4d7f6819849991bf2862e5648920abccea33990210554fcbf5a512659b513b27d3759fe3c1e64e96f02d9301463a48f2dbf04bf

diff --git a/sys-fs/cryptsetup/cryptsetup-2.3.5.ebuild b/sys-fs/cryptsetup/cryptsetup-2.3.5.ebuild
new file mode 100644
index 00000000000..af8bdea1118
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-2.3.5.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools linux-info libtool
+
+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 libressl nls pwquality reencrypt static static-libs +udev urandom"
+REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
+	libressl? ( openssl )
+	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:0=[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}
+	static? ( ${LIB_DEPEND} )"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.0.4-fix-static-pwquality-build.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
+	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 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 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
+		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}"/1.6.7-dmcrypt.confd dmcrypt
+	newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt
+}