1 |
commit: 8ba4e2ca4f1e360d6bf8f630064161db8b41993c |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 29 08:46:43 2020 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 29 08:51:18 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ba4e2ca |
7 |
|
8 |
sys-fs/cryptsetup: Bump to version 2.3.3 |
9 |
|
10 |
Package-Manager: Portage-2.3.100, Repoman-2.3.22 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
sys-fs/cryptsetup/Manifest | 1 + |
14 |
sys-fs/cryptsetup/cryptsetup-2.3.3.ebuild | 135 ++++++++++++++++++++++++++++++ |
15 |
2 files changed, 136 insertions(+) |
16 |
|
17 |
diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest |
18 |
index 26ee1beefbc..07e55781c5d 100644 |
19 |
--- a/sys-fs/cryptsetup/Manifest |
20 |
+++ b/sys-fs/cryptsetup/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST cryptsetup-1.7.5.tar.xz 1232696 BLAKE2B 1bd62b186564e0b902480d66f623074f8d2f06ea09f11788566e33d58f7d0dc8c79d5827e5966e1a20a5597c2cbdec76da49c8f54c0538a1ac3f869d8ef55456 SHA512 d473f7b06d705a3868a70f3767fafc664436b5897ba59025ea1268f815cb80a9076841ff9ff96cc130fb83ba18b03c1eee38cfaf1b471fdd883a3e126b771439 |
23 |
DIST cryptsetup-2.2.2.tar.xz 10808684 BLAKE2B d8d864d9ec2a5d646706d3ba003a21aa83d2373ca7afed5663c5167172116ea9342704483559f49c06979cbe0f6ac5670f4e9baae88ab908423b793043ba4a68 SHA512 d04123a622438ecbee28145cbdc71886b6f13db87df1c67522bff6e6e3cba817e895e2d085bdb08c78f9cafba557b1203177811a0c316ccd9b7c19939f3fc851 |
24 |
DIST cryptsetup-2.3.2.tar.xz 11037076 BLAKE2B b0f8a1a274e6b95b12aa7172dbdd41e512aea2c87a98d62b8b4d4cbb898b2d4b82e250368e385c4d4acc8e77046ea4b4f7be730750587569572c4b9490815bc1 SHA512 c5eb41751ca64ff906187f40805705570c261816b014dfcdbf2777f42e53668e32966197092a2235b8f6a7a4e7f9c3f301d82f17c45cfbcff96b9818631d7e5f |
25 |
+DIST cryptsetup-2.3.3.tar.xz 11104768 BLAKE2B 54aa6f087c5366e843c1f9b649fd77ec8be8c4e65c783a2a84a036b4ef460c9d070bdd8aff72f87a7a3136f13581e84534940b435f0b49eb1951d1a755cab47a SHA512 d613efb80e003364a21832da3fefe3891d36a891119cc0efa970aad40ba135dfcd42b32a0c19c31ad879d4eddf27864beccbea1d4b31a47a4e075bc0f756365c |
26 |
|
27 |
diff --git a/sys-fs/cryptsetup/cryptsetup-2.3.3.ebuild b/sys-fs/cryptsetup/cryptsetup-2.3.3.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..e9301bd4133 |
30 |
--- /dev/null |
31 |
+++ b/sys-fs/cryptsetup/cryptsetup-2.3.3.ebuild |
32 |
@@ -0,0 +1,135 @@ |
33 |
+# Copyright 1999-2020 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="https://www.kernel.org/pub/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 ~riscv ~s390 ~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 |
+} |