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: Fri, 06 Sep 2019 18:07:23
Message-Id: 1567793014.5ed56f95ed47f4c9187cbf0e80fe2465be5a61cf.polynomial-c@gentoo
1 commit: 5ed56f95ed47f4c9187cbf0e80fe2465be5a61cf
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 6 18:03:34 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 6 18:03:34 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ed56f95
7
8 sys-fs/cryptsetup: Bump to version 2.2.1
9
10 Package-Manager: Portage-2.3.75, Repoman-2.3.17
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.1.ebuild | 135 ++++++++++++++++++++++++++++++
15 2 files changed, 136 insertions(+)
16
17 diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
18 index 11ac83f31f5..1f8ca4e9018 100644
19 --- a/sys-fs/cryptsetup/Manifest
20 +++ b/sys-fs/cryptsetup/Manifest
21 @@ -3,3 +3,4 @@ DIST cryptsetup-2.0.5.tar.xz 10476304 BLAKE2B cf1e335fce48a7bf835b2008dfc0a96ef3
22 DIST cryptsetup-2.0.6.tar.xz 10621424 BLAKE2B ecda2cb3c0a8a46b69519ab9ea9a1ece44fb21602cbce0751e52a16e5e493c7772fdc62c1151b95a783a847d9afd5a64f64bcac6673acba4bb90a417047c93cb SHA512 1fdb9068fe2b5825cef65323a9b788b5e043c1000e614e47e2b21ab3969e416653580aba639755ba936718ad612b986768029df5e07f3fa191db2bf29d2501ef
23 DIST cryptsetup-2.1.0.tar.xz 10662576 BLAKE2B c79b24c986d5925aed31eddf8f271c3d0f12c89b3f99f953cfa39fe0d9dca2ab3dd2f6ea22141aca0148d6d533d197378b011561075ca26a14ca2e90500a1689 SHA512 f1b68e4d9d0ca2361fe9bdd51c60630dd4ab7a689b7be7756edf4dee12929d2356dd0658c9b940ffe27c033ef289efaf49daf21d250d37fdfa15394b5d821928
24 DIST cryptsetup-2.2.0.tar.xz 10763072 BLAKE2B 0ffc228bde15e3427f38402b7411207d1402dcd648903d9c1565689462103c07ab23c4d5c1439674693cf7ed6d14cf62c8a2d19e266da60658c91a37549ba74e SHA512 903ef5811999ce3836bc348334192a432a971f94aa9c850491c8ba856a2c87385f75abc9296b0913ee6785149b8a7bd40457ad07e01f4ac7a1e62e97c7b18e6e
25 +DIST cryptsetup-2.2.1.tar.xz 10803072 BLAKE2B 00ee2eff11e3054a40a4d9036c1786422288ff4c61ff497cb7039721dde80ca337cab067faa4f70721de3aded465f612e9328a6b533ff7c9b67d1069fe435bed SHA512 e4b45b24ad63cc4c22cb816f04cf4af71431e15134a8208af1a24e64ded54c07aba6c43521c063f03429304e0610b6cce849332564d69a46934fb7bae8e99718
26
27 diff --git a/sys-fs/cryptsetup/cryptsetup-2.2.1.ebuild b/sys-fs/cryptsetup/cryptsetup-2.2.1.ebuild
28 new file mode 100644
29 index 00000000000..8cb062389bc
30 --- /dev/null
31 +++ b/sys-fs/cryptsetup/cryptsetup-2.2.1.ebuild
32 @@ -0,0 +1,135 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit autotools linux-info libtool
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 + libressl? ( openssl )
54 + static? ( !gcrypt )" #496612
55 +
56 +LIB_DEPEND="
57 + dev-libs/json-c:=[static-libs(+)]
58 + dev-libs/libgpg-error[static-libs(+)]
59 + dev-libs/popt[static-libs(+)]
60 + >=sys-apps/util-linux-2.31-r1[static-libs(+)]
61 + argon2? ( app-crypt/argon2:=[static-libs(+)] )
62 + gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
63 + nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
64 + openssl? (
65 + !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
66 + libressl? ( dev-libs/libressl:0=[static-libs(+)] )
67 + )
68 + pwquality? ( dev-libs/libpwquality[static-libs(+)] )
69 + sys-fs/lvm2[static-libs(+)]
70 + udev? ( virtual/libudev[static-libs(+)] )"
71 +# We have to always depend on ${LIB_DEPEND} rather than put behind
72 +# !static? () because we provide a shared library which links against
73 +# these other packages. #414665
74 +RDEPEND="static-libs? ( ${LIB_DEPEND} )
75 + ${LIB_DEPEND//\[static-libs\(+\)\]}"
76 +DEPEND="${RDEPEND}
77 + static? ( ${LIB_DEPEND} )"
78 +BDEPEND="
79 + virtual/pkgconfig
80 +"
81 +
82 +S="${WORKDIR}/${P/_/-}"
83 +
84 +PATCHES=( "${FILESDIR}"/${PN}-2.0.4-fix-static-pwquality-build.patch )
85 +
86 +pkg_pretend() {
87 + if ! use luks1_default ; then
88 + ewarn "WARNING! WARNING! WARNING!"
89 + ewarn "You have chosen LUKS2 as your default format."
90 + ewarn "This can break LUKS1 backwards compatibility."
91 + ewarn "Enable \"luks1_default\" USE flag if you need backwards compatibility."
92 + fi
93 +}
94 +
95 +pkg_setup() {
96 + local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256"
97 + local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
98 + local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n"
99 + local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
100 + local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
101 + check_extra_config
102 +}
103 +
104 +src_prepare() {
105 + sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
106 + default
107 + eautoreconf
108 +}
109 +
110 +src_configure() {
111 + if use kernel ; then
112 + ewarn "Note that kernel backend is very slow for this type of operation"
113 + ewarn "and is provided mainly for embedded systems wanting to avoid"
114 + ewarn "userspace crypto libraries."
115 + fi
116 +
117 + local myeconfargs=(
118 + --disable-internal-argon2
119 + --enable-shared
120 + --sbindir=/sbin
121 + # for later use
122 + --with-default-luks-format=LUKS$(usex luks1_default 1 2)
123 + --with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d"
124 + --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
125 + $(use_enable argon2 libargon2)
126 + $(use_enable nls)
127 + $(use_enable pwquality)
128 + $(use_enable reencrypt cryptsetup-reencrypt)
129 + $(use_enable static static-cryptsetup)
130 + $(use_enable static-libs static)
131 + $(use_enable udev)
132 + $(use_enable !urandom dev-random)
133 + )
134 + econf "${myeconfargs[@]}"
135 +}
136 +
137 +src_test() {
138 + if [[ ! -e /dev/mapper/control ]] ; then
139 + ewarn "No /dev/mapper/control found -- skipping tests"
140 + return 0
141 + fi
142 +
143 + local p
144 + for p in /dev/mapper /dev/loop* ; do
145 + addwrite ${p}
146 + done
147 +
148 + default
149 +}
150 +
151 +src_install() {
152 + default
153 +
154 + if use static ; then
155 + mv "${ED}"/sbin/cryptsetup{.static,} || die
156 + mv "${ED}"/sbin/veritysetup{.static,} || die
157 + if use reencrypt ; then
158 + mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die
159 + fi
160 + fi
161 + find "${ED}" -type f -name "*.la" -delete || die
162 +
163 + dodoc docs/v*ReleaseNotes
164 +
165 + newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt
166 + newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt
167 +}