Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/cryptsetup/
Date: Mon, 06 May 2019 07:48:44
Message-Id: 1557128692.624103934e4d30f64b5cbfdddb7bcaa8ddb8d0bd.polynomial-c@gentoo
1 commit: 624103934e4d30f64b5cbfdddb7bcaa8ddb8d0bd
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 6 07:44:52 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon May 6 07:44:52 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62410393
7
8 sys-fs/cryptsetup: Bump to version 2.2.0_rc0
9
10 Package-Manager: Portage-2.3.66, Repoman-2.3.12
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-fs/cryptsetup/Manifest | 1 +
14 sys-fs/cryptsetup/cryptsetup-2.2.0_rc0.ebuild | 130 ++++++++++++++++++++++++++
15 2 files changed, 131 insertions(+)
16
17 diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
18 index ac52db49dce..2aaa143e9df 100644
19 --- a/sys-fs/cryptsetup/Manifest
20 +++ b/sys-fs/cryptsetup/Manifest
21 @@ -2,3 +2,4 @@ DIST cryptsetup-1.7.5.tar.xz 1232696 BLAKE2B 1bd62b186564e0b902480d66f623074f8d2
22 DIST cryptsetup-2.0.5.tar.xz 10476304 BLAKE2B cf1e335fce48a7bf835b2008dfc0a96ef35d344e2c9f6a0a5a2ff45644f9015311e99b8f9e05b0b23cad69d74f91dd1b7cdd766560fb6504e7453d6e46bea186 SHA512 bac3f5fde1be02d325c097f85e77aef44ce764c1bca7f0554cedd69b9444e5a5529f11b9ae74d36dc1977e88e11422a58dfa17e48559eac7f5e6c4ce332409ae
23 DIST cryptsetup-2.0.6.tar.xz 10621424 BLAKE2B ecda2cb3c0a8a46b69519ab9ea9a1ece44fb21602cbce0751e52a16e5e493c7772fdc62c1151b95a783a847d9afd5a64f64bcac6673acba4bb90a417047c93cb SHA512 1fdb9068fe2b5825cef65323a9b788b5e043c1000e614e47e2b21ab3969e416653580aba639755ba936718ad612b986768029df5e07f3fa191db2bf29d2501ef
24 DIST cryptsetup-2.1.0.tar.xz 10662576 BLAKE2B c79b24c986d5925aed31eddf8f271c3d0f12c89b3f99f953cfa39fe0d9dca2ab3dd2f6ea22141aca0148d6d533d197378b011561075ca26a14ca2e90500a1689 SHA512 f1b68e4d9d0ca2361fe9bdd51c60630dd4ab7a689b7be7756edf4dee12929d2356dd0658c9b940ffe27c033ef289efaf49daf21d250d37fdfa15394b5d821928
25 +DIST cryptsetup-2.2.0-rc0.tar.xz 10710468 BLAKE2B a65da89995c548af6de116b300dfde120f84e5e08e037f9b7d0b34d024ce4d1f1ab7599cedd45975a100fca90967ccc9a085023e2d453951816ce51cad0ca8e7 SHA512 ef168ee8757b7f9f6e7ffd5c310f2699ad4461c9886583b9a610f06c67996d688db060913c053da2f1f17090caaa07425ea735b7fcae50b2e1f32aa62f48e1a1
26
27 diff --git a/sys-fs/cryptsetup/cryptsetup-2.2.0_rc0.ebuild b/sys-fs/cryptsetup/cryptsetup-2.2.0_rc0.ebuild
28 new file mode 100644
29 index 00000000000..457a33aa1fb
30 --- /dev/null
31 +++ b/sys-fs/cryptsetup/cryptsetup-2.2.0_rc0.ebuild
32 @@ -0,0 +1,130 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +inherit autotools linux-info libtool eapi7-ver
39 +
40 +DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
41 +HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md"
42 +SRC_URI="mirror://kernel/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz"
43 +
44 +LICENSE="GPL-2+"
45 +SLOT="0/12" # libcryptsetup.so version
46 +[[ ${PV} != *_rc* ]] && \
47 +KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
48 +CRYPTO_BACKENDS="gcrypt kernel nettle +openssl"
49 +# we don't support nss since it doesn't allow cryptsetup to be built statically
50 +# and it's missing ripemd160 support so it can't provide full backward compatibility
51 +IUSE="${CRYPTO_BACKENDS} +argon2 libressl +luks1_default nls pwquality reencrypt static static-libs +udev urandom"
52 +REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
53 + static? ( !gcrypt )" #496612
54 +
55 +LIB_DEPEND="
56 + dev-libs/json-c:=[static-libs(+)]
57 + dev-libs/libgpg-error[static-libs(+)]
58 + dev-libs/popt[static-libs(+)]
59 + >=sys-apps/util-linux-2.31-r1[static-libs(+)]
60 + argon2? ( app-crypt/argon2:=[static-libs(+)] )
61 + gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
62 + nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
63 + openssl? (
64 + !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
65 + libressl? ( dev-libs/libressl:=[static-libs(+)] )
66 + )
67 + pwquality? ( dev-libs/libpwquality[static-libs(+)] )
68 + sys-fs/lvm2[static-libs(+)]
69 + udev? ( virtual/libudev[static-libs(+)] )"
70 +# We have to always depend on ${LIB_DEPEND} rather than put behind
71 +# !static? () because we provide a shared library which links against
72 +# these other packages. #414665
73 +RDEPEND="static-libs? ( ${LIB_DEPEND} )
74 + ${LIB_DEPEND//\[static-libs\(+\)\]}"
75 +DEPEND="${RDEPEND}
76 + virtual/pkgconfig
77 + static? ( ${LIB_DEPEND} )"
78 +
79 +S="${WORKDIR}/${P/_/-}"
80 +
81 +PATCHES=( "${FILESDIR}"/${PN}-2.0.4-fix-static-pwquality-build.patch )
82 +
83 +pkg_pretend() {
84 + if ! use luks1_default ; then
85 + ewarn "WARNING! WARNING! WARNING!"
86 + ewarn "You have chosen LUKS2 as your default format."
87 + ewarn "This can break LUKS1 backwards compatibility."
88 + ewarn "Enable \"luks1_default\" USE flag if you need backwards compatibility."
89 + fi
90 +}
91 +
92 +pkg_setup() {
93 + local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256"
94 + local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
95 + local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n"
96 + local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
97 + local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
98 + check_extra_config
99 +}
100 +
101 +src_prepare() {
102 + sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
103 + default
104 + eautoreconf
105 +}
106 +
107 +src_configure() {
108 + if use kernel ; then
109 + ewarn "Note that kernel backend is very slow for this type of operation"
110 + ewarn "and is provided mainly for embedded systems wanting to avoid"
111 + ewarn "userspace crypto libraries."
112 + fi
113 +
114 + local myeconfargs=(
115 + --disable-internal-argon2
116 + --enable-shared
117 + --sbindir=/sbin
118 + # for later use
119 + --with-default-luks-format=LUKS$(usex luks1_default 1 2)
120 + --with-tmpfilesdir="${EPREFIX%/}/usr/lib/tmpfiles.d"
121 + --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
122 + $(use_enable argon2 libargon2)
123 + $(use_enable nls)
124 + $(use_enable pwquality)
125 + $(use_enable reencrypt cryptsetup-reencrypt)
126 + $(use_enable static static-cryptsetup)
127 + $(use_enable static-libs static)
128 + $(use_enable udev)
129 + $(use_enable !urandom dev-random)
130 + )
131 + econf "${myeconfargs[@]}"
132 +}
133 +
134 +src_test() {
135 + if [[ ! -e /dev/mapper/control ]] ; then
136 + ewarn "No /dev/mapper/control found -- skipping tests"
137 + return 0
138 + fi
139 +
140 + local p
141 + for p in /dev/mapper /dev/loop* ; do
142 + addwrite ${p}
143 + done
144 +
145 + default
146 +}
147 +
148 +src_install() {
149 + default
150 +
151 + if use static ; then
152 + mv "${ED%}"/sbin/cryptsetup{.static,} || die
153 + mv "${ED%}"/sbin/veritysetup{.static,} || die
154 + use reencrypt && { mv "${ED%}"/sbin/cryptsetup-reencrypt{.static,} || die ; }
155 + fi
156 + find "${ED}" -name "*.la" -delete || die
157 +
158 + dodoc docs/v*ReleaseNotes
159 +
160 + newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt
161 + newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt
162 +}