1 |
commit: 9eac70cf66bbca67d8a770b6b19c880ecefd9f1d |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 2 09:54:34 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 2 10:17:15 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9eac70cf |
7 |
|
8 |
sys-fs/cryptsetup: Bump to version 2.2.2 |
9 |
|
10 |
Package-Manager: Portage-2.3.78, 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.2.ebuild | 135 ++++++++++++++++++++++++++++++ |
15 |
2 files changed, 136 insertions(+) |
16 |
|
17 |
diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest |
18 |
index b9bb64d1c54..f38b94aec6a 100644 |
19 |
--- a/sys-fs/cryptsetup/Manifest |
20 |
+++ b/sys-fs/cryptsetup/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST cryptsetup-1.7.5.tar.xz 1232696 BLAKE2B 1bd62b186564e0b902480d66f623074f8d2f06ea09f11788566e33d58f7d0dc8c79d5827e5966e1a20a5597c2cbdec76da49c8f54c0538a1ac3f869d8ef55456 SHA512 d473f7b06d705a3868a70f3767fafc664436b5897ba59025ea1268f815cb80a9076841ff9ff96cc130fb83ba18b03c1eee38cfaf1b471fdd883a3e126b771439 |
23 |
DIST cryptsetup-2.2.1.tar.xz 10803072 BLAKE2B 00ee2eff11e3054a40a4d9036c1786422288ff4c61ff497cb7039721dde80ca337cab067faa4f70721de3aded465f612e9328a6b533ff7c9b67d1069fe435bed SHA512 e4b45b24ad63cc4c22cb816f04cf4af71431e15134a8208af1a24e64ded54c07aba6c43521c063f03429304e0610b6cce849332564d69a46934fb7bae8e99718 |
24 |
+DIST cryptsetup-2.2.2.tar.xz 10808684 BLAKE2B d8d864d9ec2a5d646706d3ba003a21aa83d2373ca7afed5663c5167172116ea9342704483559f49c06979cbe0f6ac5670f4e9baae88ab908423b793043ba4a68 SHA512 d04123a622438ecbee28145cbdc71886b6f13db87df1c67522bff6e6e3cba817e895e2d085bdb08c78f9cafba557b1203177811a0c316ccd9b7c19939f3fc851 |
25 |
|
26 |
diff --git a/sys-fs/cryptsetup/cryptsetup-2.2.2.ebuild b/sys-fs/cryptsetup/cryptsetup-2.2.2.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..9c8f2b10834 |
29 |
--- /dev/null |
30 |
+++ b/sys-fs/cryptsetup/cryptsetup-2.2.2.ebuild |
31 |
@@ -0,0 +1,135 @@ |
32 |
+# Copyright 1999-2019 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+inherit autotools linux-info libtool |
38 |
+ |
39 |
+DESCRIPTION="Tool to setup encrypted devices with dm-crypt" |
40 |
+HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md" |
41 |
+SRC_URI="https://www.kernel.org/pub/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz" |
42 |
+ |
43 |
+LICENSE="GPL-2+" |
44 |
+SLOT="0/12" # libcryptsetup.so version |
45 |
+[[ ${PV} != *_rc* ]] && \ |
46 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
47 |
+CRYPTO_BACKENDS="gcrypt kernel nettle +openssl" |
48 |
+# we don't support nss since it doesn't allow cryptsetup to be built statically |
49 |
+# and it's missing ripemd160 support so it can't provide full backward compatibility |
50 |
+IUSE="${CRYPTO_BACKENDS} +argon2 libressl +luks1_default nls pwquality reencrypt static static-libs +udev urandom" |
51 |
+REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} ) |
52 |
+ libressl? ( openssl ) |
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:0=[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 |
+ static? ( ${LIB_DEPEND} )" |
77 |
+BDEPEND=" |
78 |
+ virtual/pkgconfig |
79 |
+" |
80 |
+ |
81 |
+S="${WORKDIR}/${P/_/-}" |
82 |
+ |
83 |
+PATCHES=( "${FILESDIR}"/${PN}-2.0.4-fix-static-pwquality-build.patch ) |
84 |
+ |
85 |
+pkg_pretend() { |
86 |
+ if ! use luks1_default ; then |
87 |
+ ewarn "WARNING! WARNING! WARNING!" |
88 |
+ ewarn "You have chosen LUKS2 as your default format." |
89 |
+ ewarn "This can break LUKS1 backwards compatibility." |
90 |
+ ewarn "Enable \"luks1_default\" USE flag if you need backwards compatibility." |
91 |
+ fi |
92 |
+} |
93 |
+ |
94 |
+pkg_setup() { |
95 |
+ local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256" |
96 |
+ local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n" |
97 |
+ local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n" |
98 |
+ local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n" |
99 |
+ local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n" |
100 |
+ check_extra_config |
101 |
+} |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die |
105 |
+ default |
106 |
+ eautoreconf |
107 |
+} |
108 |
+ |
109 |
+src_configure() { |
110 |
+ if use kernel ; then |
111 |
+ ewarn "Note that kernel backend is very slow for this type of operation" |
112 |
+ ewarn "and is provided mainly for embedded systems wanting to avoid" |
113 |
+ ewarn "userspace crypto libraries." |
114 |
+ fi |
115 |
+ |
116 |
+ local myeconfargs=( |
117 |
+ --disable-internal-argon2 |
118 |
+ --enable-shared |
119 |
+ --sbindir=/sbin |
120 |
+ # for later use |
121 |
+ --with-default-luks-format=LUKS$(usex luks1_default 1 2) |
122 |
+ --with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d" |
123 |
+ --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done) |
124 |
+ $(use_enable argon2 libargon2) |
125 |
+ $(use_enable nls) |
126 |
+ $(use_enable pwquality) |
127 |
+ $(use_enable reencrypt cryptsetup-reencrypt) |
128 |
+ $(use_enable static static-cryptsetup) |
129 |
+ $(use_enable static-libs static) |
130 |
+ $(use_enable udev) |
131 |
+ $(use_enable !urandom dev-random) |
132 |
+ ) |
133 |
+ econf "${myeconfargs[@]}" |
134 |
+} |
135 |
+ |
136 |
+src_test() { |
137 |
+ if [[ ! -e /dev/mapper/control ]] ; then |
138 |
+ ewarn "No /dev/mapper/control found -- skipping tests" |
139 |
+ return 0 |
140 |
+ fi |
141 |
+ |
142 |
+ local p |
143 |
+ for p in /dev/mapper /dev/loop* ; do |
144 |
+ addwrite ${p} |
145 |
+ done |
146 |
+ |
147 |
+ default |
148 |
+} |
149 |
+ |
150 |
+src_install() { |
151 |
+ default |
152 |
+ |
153 |
+ if use static ; then |
154 |
+ mv "${ED}"/sbin/cryptsetup{.static,} || die |
155 |
+ mv "${ED}"/sbin/veritysetup{.static,} || die |
156 |
+ if use reencrypt ; then |
157 |
+ mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die |
158 |
+ fi |
159 |
+ fi |
160 |
+ find "${ED}" -type f -name "*.la" -delete || die |
161 |
+ |
162 |
+ dodoc docs/v*ReleaseNotes |
163 |
+ |
164 |
+ newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt |
165 |
+ newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt |
166 |
+} |