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