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: Wed, 03 May 2017 08:49:05
Message-Id: 1493801332.0fc36263405968c7f8804370c949239d78201790.polynomial-c@gentoo
1 commit: 0fc36263405968c7f8804370c949239d78201790
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 3 08:42:27 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed May 3 08:48:52 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fc36263
7
8 sys-fs/cryptsetup: Bump to version 1.7.5
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 sys-fs/cryptsetup/Manifest | 1 +
13 sys-fs/cryptsetup/cryptsetup-1.7.5.ebuild | 126 ++++++++++++++++++++++++++++++
14 2 files changed, 127 insertions(+)
15
16 diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
17 index dac92b48dfb..a6ee8fb1d96 100644
18 --- a/sys-fs/cryptsetup/Manifest
19 +++ b/sys-fs/cryptsetup/Manifest
20 @@ -1,3 +1,4 @@
21 DIST cryptsetup-1.7.2.tar.xz 1222688 SHA256 dbb35dbf5f0c1749168c86c913fe98e872247bfc8425314b494c2423e7e43342 SHA512 ff761bd0c5e9a7941fd27d55839804f2ce96145a45a9689d234954fc43c6172c913c59c83b37ef6cc5459ccecff63212c369077fdea70c14326372076eae7f86 WHIRLPOOL b78d91b449ea7ba325f05dc00b2005e8f6def91703cd982900682bc965eec0992a0cc21c4f44335c03dda885d4505bcf26d1bf58f991c9f60096927bcf582963
22 DIST cryptsetup-1.7.3.tar.xz 1228432 SHA256 af2b04e8475cf40b8d9ffd97a1acfa73aa787c890430afd89804fb544d6adc02 SHA512 616bac2ce272b8e9d1de6b71ba23f6260dfdb17e3969ff4950c3221fc9fa1b9a0a1081327d2806868045395a407452a8c8bcf4ce0faaf2bd2d51a7c9f844a767 WHIRLPOOL 82a70877abbe674cca9f97585cd54535a60191a019028907a7a7187964260f754020dc1351de48480944cb3701cb8d83a543d8ffd7c2594342d1e244d4026e3d
23 DIST cryptsetup-1.7.4.tar.xz 1232068 SHA256 7ccf893ef79a38fb92d61f03c17b964982119f5319cdaa85a1335b8558cca016 SHA512 c5f58227b38dcc2e2858c4bbcb641acead3b6bcdad0d8d76e5f46936669e4aff4dbc20a2980040341320d35d39f029725a9f20607753cad44f64ac0443b64b71 WHIRLPOOL f00d0e529a5d34460733e8110584266b42011055d81d94b0ae8d47a1f11f1639c4b658a55415241e72c431c615d896a94ae444a518a0b56f971b888a5ab7cc09
24 +DIST cryptsetup-1.7.5.tar.xz 1232696 SHA256 2b30cd1d0dd606a53ac77b406e1d37798d4b0762fa89de6ea546201906a251bd SHA512 d473f7b06d705a3868a70f3767fafc664436b5897ba59025ea1268f815cb80a9076841ff9ff96cc130fb83ba18b03c1eee38cfaf1b471fdd883a3e126b771439 WHIRLPOOL cd2fe15a08f3202c89055e334a3c56fcb60a19bda8135c7d833f384e9beb7fcd6f31fbbd4ac29572f46199f05bd6055b89b3d6733828354d9c985b3e55da4e14
25
26 diff --git a/sys-fs/cryptsetup/cryptsetup-1.7.5.ebuild b/sys-fs/cryptsetup/cryptsetup-1.7.5.ebuild
27 new file mode 100644
28 index 00000000000..531ebe57322
29 --- /dev/null
30 +++ b/sys-fs/cryptsetup/cryptsetup-1.7.5.ebuild
31 @@ -0,0 +1,126 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=5
36 +
37 +DISTUTILS_OPTIONAL=1
38 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
39 +
40 +inherit autotools distutils-r1 linux-info libtool eutils versionator
41 +
42 +DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
43 +HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md"
44 +SRC_URI="mirror://kernel/linux/utils/${PN}/v$(get_version_component_range 1-2)/${P}.tar.xz"
45 +
46 +LICENSE="GPL-2+"
47 +SLOT="0"
48 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
49 +CRYPTO_BACKENDS="+gcrypt kernel nettle openssl"
50 +# we don't support nss since it doesn't allow cryptsetup to be built statically
51 +# and it's missing ripemd160 support so it can't provide full backward compatibility
52 +IUSE="${CRYPTO_BACKENDS} libressl nls pwquality python reencrypt static static-libs udev urandom"
53 +REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
54 + python? ( ${PYTHON_REQUIRED_USE} )
55 + static? ( !gcrypt )" #496612
56 +
57 +LIB_DEPEND="dev-libs/libgpg-error[static-libs(+)]
58 + dev-libs/popt[static-libs(+)]
59 + sys-apps/util-linux[static-libs(+)]
60 + gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
61 + nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
62 + openssl? (
63 + !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
64 + libressl? ( dev-libs/libressl:=[static-libs(+)] )
65 + )
66 + pwquality? ( dev-libs/libpwquality[static-libs(+)] )
67 + sys-fs/lvm2[static-libs(+)]
68 + udev? ( virtual/libudev[static-libs(+)] )"
69 +# We have to always depend on ${LIB_DEPEND} rather than put behind
70 +# !static? () because we provide a shared library which links against
71 +# these other packages. #414665
72 +RDEPEND="static-libs? ( ${LIB_DEPEND} )
73 + ${LIB_DEPEND//\[static-libs\(+\)\]}
74 + python? ( ${PYTHON_DEPS} )"
75 +DEPEND="${RDEPEND}
76 + virtual/pkgconfig
77 + static? ( ${LIB_DEPEND} )"
78 +
79 +#PATCHES=( )
80 +
81 +pkg_setup() {
82 + local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256"
83 + local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
84 + local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n"
85 + local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
86 + local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
87 + check_extra_config
88 +}
89 +
90 +src_prepare() {
91 + sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
92 + #epatch "${PATCHES[@]}"
93 + epatch_user && eautoreconf
94 +
95 + if use python ; then
96 + cd python
97 + cp "${FILESDIR}"/setup-1.7.0.py setup.py || die
98 + distutils-r1_src_prepare
99 + fi
100 +}
101 +
102 +src_configure() {
103 + if use kernel ; then
104 + ewarn "Note that kernel backend is very slow for this type of operation"
105 + ewarn "and is provided mainly for embedded systems wanting to avoid"
106 + ewarn "userspace crypto libraries."
107 + fi
108 +
109 + # We disable autotool python integration so we can use eclasses
110 + # for proper integration with multiple python versions.
111 + econf \
112 + --sbindir=/sbin \
113 + --enable-shared \
114 + --disable-python \
115 + $(use_enable static static-cryptsetup) \
116 + $(use_enable static-libs static) \
117 + $(use_enable nls) \
118 + $(use_enable pwquality) \
119 + $(use_enable reencrypt cryptsetup-reencrypt) \
120 + $(use_enable udev) \
121 + $(use_enable !urandom dev-random) \
122 + --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
123 +
124 + use python && cd python && distutils-r1_src_configure
125 +}
126 +
127 +src_compile() {
128 + default
129 + use python && cd python && distutils-r1_src_compile
130 +}
131 +
132 +src_test() {
133 + if [[ ! -e /dev/mapper/control ]] ; then
134 + ewarn "No /dev/mapper/control found -- skipping tests"
135 + return 0
136 + fi
137 + local p
138 + for p in /dev/mapper /dev/loop* ; do
139 + addwrite ${p}
140 + done
141 + default
142 +}
143 +
144 +src_install() {
145 + default
146 + if use static ; then
147 + mv "${ED}"/sbin/cryptsetup{.static,} || die
148 + mv "${ED}"/sbin/veritysetup{.static,} || die
149 + use reencrypt && { mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die ; }
150 + fi
151 + prune_libtool_files --modules
152 +
153 + newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt
154 + newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt
155 +
156 + use python && cd python && distutils-r1_src_install
157 +}