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: Sat, 04 Aug 2018 08:08:05
Message-Id: 1533370067.a57732f765d2c0df458b8c511922f984ab65a699.polynomial-c@gentoo
1 commit: a57732f765d2c0df458b8c511922f984ab65a699
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 4 07:48:01 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 4 08:07:47 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a57732f7
7
8 sys-fs/cryptsetup: Bump to version 2.0.4
9
10 Package-Manager: Portage-2.3.44, Repoman-2.3.10
11
12 sys-fs/cryptsetup/Manifest | 1 +
13 sys-fs/cryptsetup/cryptsetup-2.0.4.ebuild | 128 ++++++++++++++++++++++++++++++
14 2 files changed, 129 insertions(+)
15
16 diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
17 index 7787d912e28..bab2fdedc6d 100644
18 --- a/sys-fs/cryptsetup/Manifest
19 +++ b/sys-fs/cryptsetup/Manifest
20 @@ -1,2 +1,3 @@
21 DIST cryptsetup-1.7.5.tar.xz 1232696 BLAKE2B 1bd62b186564e0b902480d66f623074f8d2f06ea09f11788566e33d58f7d0dc8c79d5827e5966e1a20a5597c2cbdec76da49c8f54c0538a1ac3f869d8ef55456 SHA512 d473f7b06d705a3868a70f3767fafc664436b5897ba59025ea1268f815cb80a9076841ff9ff96cc130fb83ba18b03c1eee38cfaf1b471fdd883a3e126b771439
22 DIST cryptsetup-2.0.3.tar.xz 10125548 BLAKE2B 871df4c248151394f5abc907209b6df636049e5a1ff72161af091d36963ef68adee14e5e1867d779c9419e489aa9bea7562608b239a8fe361b769f0cc14daaf0 SHA512 f5ac54aa9614b234f2d1e84758a98914d283b669f4ab5cbe0ed7cdf25ce77f2d1abdf1e5b5010d803971f0e29120954110ee4fcc538137b04fbdc13b7804385e
23 +DIST cryptsetup-2.0.4.tar.xz 10444544 BLAKE2B 95c18eefe99c27d05e347440d77e4ff53dcc110822dc706e2284e3203da9069acbd8afedb8d596a0f832bdadea0597b75af58a22af712818a3e0aae2824e51b7 SHA512 74d442c7c7837da719a14aefa8bf0b5dffbb050acd6fbd140c50d43470c828f79fdcf7cd6acf1c149a4e1129a100059df6216b7d8ca04eb0b070cb8d4ca33e61
24
25 diff --git a/sys-fs/cryptsetup/cryptsetup-2.0.4.ebuild b/sys-fs/cryptsetup/cryptsetup-2.0.4.ebuild
26 new file mode 100644
27 index 00000000000..a0458bbe4f6
28 --- /dev/null
29 +++ b/sys-fs/cryptsetup/cryptsetup-2.0.4.ebuild
30 @@ -0,0 +1,128 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} )
37 +
38 +inherit autotools python-single-r1 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="~amd64 ~arm64 ~mips ~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 nls pwquality python reencrypt static static-libs +udev urandom"
52 +REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
53 + python? ( ${PYTHON_REQUIRED_USE} )
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:=[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 + python? ( ${PYTHON_DEPS} )"
77 +DEPEND="${RDEPEND}
78 + virtual/pkgconfig
79 + static? ( ${LIB_DEPEND} )"
80 +
81 +S="${WORKDIR}/${P/_/-}"
82 +
83 +pkg_setup() {
84 + local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256"
85 + local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
86 + local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n"
87 + local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
88 + local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
89 + check_extra_config
90 +}
91 +
92 +src_prepare() {
93 + sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
94 + default
95 + eautoreconf
96 +}
97 +
98 +src_configure() {
99 + if use kernel ; then
100 + ewarn "Note that kernel backend is very slow for this type of operation"
101 + ewarn "and is provided mainly for embedded systems wanting to avoid"
102 + ewarn "userspace crypto libraries."
103 + fi
104 +
105 + use python && python_setup
106 +
107 + # We disable autotool python integration so we can use eclasses
108 + # for proper integration with multiple python versions.
109 + local myeconfargs=(
110 + --disable-internal-argon2
111 + --enable-shared
112 + --sbindir=/sbin
113 + # for later use
114 + # --with-default-luks-format=LUKS2
115 + --with-tmpfilesdir="${EPREFIX%/}/usr/lib/tmpfiles.d"
116 + --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
117 + $(use_enable argon2 libargon2)
118 + $(use_enable nls)
119 + $(use_enable pwquality)
120 + $(use_enable python)
121 + $(use_enable reencrypt cryptsetup-reencrypt)
122 + $(use_enable static static-cryptsetup)
123 + $(use_enable static-libs static)
124 + $(use_enable udev)
125 + $(use_enable !urandom dev-random)
126 + )
127 + econf "${myeconfargs[@]}"
128 +}
129 +
130 +src_test() {
131 + if [[ ! -e /dev/mapper/control ]] ; then
132 + ewarn "No /dev/mapper/control found -- skipping tests"
133 + return 0
134 + fi
135 +
136 + local p
137 + for p in /dev/mapper /dev/loop* ; do
138 + addwrite ${p}
139 + done
140 +
141 + default
142 +}
143 +
144 +src_install() {
145 + default
146 +
147 + if use static ; then
148 + mv "${ED%}"/sbin/cryptsetup{.static,} || die
149 + mv "${ED%}"/sbin/veritysetup{.static,} || die
150 + use reencrypt && { mv "${ED%}"/sbin/cryptsetup-reencrypt{.static,} || die ; }
151 + fi
152 + find "${ED}" -name "*.la" -delete || die
153 +
154 + dodoc docs/v*ReleaseNotes
155 +
156 + newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt
157 + newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt
158 +}