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: Sun, 28 Feb 2016 20:37:51
Message-Id: 1456691858.aebbaaad7e267df0afa04fb999d49e19144d66a3.polynomial-c@gentoo
1 commit: aebbaaad7e267df0afa04fb999d49e19144d66a3
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 28 20:35:46 2016 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 28 20:37:38 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aebbaaad
7
8 sys-fs/cryptsetup: Bump to version 1.7.1
9
10 Package-Manager: portage-2.2.27
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-fs/cryptsetup/Manifest | 1 +
14 sys-fs/cryptsetup/cryptsetup-1.7.1.ebuild | 124 ++++++++++++++++++++++++++++++
15 2 files changed, 125 insertions(+)
16
17 diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
18 index 8521e7d..00222c5 100644
19 --- a/sys-fs/cryptsetup/Manifest
20 +++ b/sys-fs/cryptsetup/Manifest
21 @@ -1,3 +1,4 @@
22 DIST cryptsetup-1.6.5.tar.xz 1136892 SHA256 267973f20be43f9d685f7193aa23954b60768c74a1d330243114d4b8bc17ca9a SHA512 c77ac590d28954e7bd430d1069b820a288c4668857a7ced7f81546ea39676f2b536abbcda06f20440e31c205b7ada68bcfa5aab220b102a2b62198a788d9b65e WHIRLPOOL 74a597abbdcc1225bb811597e53737eab2348a328f3ba30e7eb519a0621b06e6c898e320db8e24a16decfd4706b6a2e68b06894dde91124e4c089e952dbff9c1
23 DIST cryptsetup-1.6.8.tar.xz 1221232 SHA256 45a6ccd3c65b7d904e58e1cb3656a7e997190b6a05b5ff7c6887e4a41c5f19bc SHA512 db189a98da6329f4d4c2ae92dbdc08ccffdf6ae41c964186ebf48a612bf0aa9731653ef6b7549b5feee0043edfa171874c3609418499902e6339b48481c621d7 WHIRLPOOL 8873d14fc2a54d97ed7d065ad4a0c63b057d9085c2cfd99c0b97aba78d49566bd7c9b47e56033992ac1f3892369bebf2165aaccc6ca3f933c0c33c2e6ef8c1e4
24 DIST cryptsetup-1.7.0.tar.xz 1224616 SHA256 075524a7cc0db36d12119fa79116750accb1c6c8825d5faa2534b74b8ce3d148 SHA512 3c1732c8f1c18f0497c84c81777f54c398eea9300cd82a18691bf323d303687f4dfdd76010fb86114414f78193630cae4de5b665ce417dbf307f7fef4fa1bef6 WHIRLPOOL 4706317a6f2fe24e5c56df934ee3b0fb64cca2544885ce11ad567369ede1215e8a624b3f4c1e445aa4b59dbf9f644aed461ec422f627f37af4569f74b9f2a1ab
25 +DIST cryptsetup-1.7.1.tar.xz 1244648 SHA256 73dc8a63cc984b56aa6a3c99f355262471bcfe78b3240b8b9d0caa8002911fec SHA512 02fb87871dc3729883a1c17748470c21dd58263741c82d42bce5b1789c419f8a75e36ac9415304986001b4ce0db22ee437566fb7f5e3584e4b566aba9a76950d WHIRLPOOL 5f89122f6d9a8acc74b5c1ab71e151f2e4acce313646cd0f61733c39ce6b3a9e57927846cb6cd4183845e146c4f6c2a4ff3b4dd3c57ef04497a21d34b927f159
26
27 diff --git a/sys-fs/cryptsetup/cryptsetup-1.7.1.ebuild b/sys-fs/cryptsetup/cryptsetup-1.7.1.ebuild
28 new file mode 100644
29 index 0000000..dd735e2
30 --- /dev/null
31 +++ b/sys-fs/cryptsetup/cryptsetup-1.7.1.ebuild
32 @@ -0,0 +1,124 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=5
38 +
39 +DISTUTILS_OPTIONAL=1
40 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
41 +
42 +inherit autotools distutils-r1 linux-info libtool eutils versionator
43 +
44 +DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
45 +HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md"
46 +SRC_URI="mirror://kernel/linux/utils/${PN}/v$(get_version_component_range 1-2)/${P}.tar.xz"
47 +
48 +LICENSE="GPL-2+"
49 +SLOT="0"
50 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
51 +CRYPTO_BACKENDS="+gcrypt kernel nettle openssl"
52 +# we don't support nss since it doesn't allow cryptsetup to be built statically
53 +# and it's missing ripemd160 support so it can't provide full backward compatibility
54 +IUSE="${CRYPTO_BACKENDS} libressl nls pwquality python reencrypt static static-libs udev urandom"
55 +REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
56 + python? ( ${PYTHON_REQUIRED_USE} )
57 + static? ( !gcrypt )" #496612
58 +
59 +LIB_DEPEND="dev-libs/libgpg-error[static-libs(+)]
60 + dev-libs/popt[static-libs(+)]
61 + sys-apps/util-linux[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 +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_user && eautoreconf
93 +
94 + if use python ; then
95 + cd python
96 + cp "${FILESDIR}"/setup-1.7.0.py setup.py || die
97 + distutils-r1_src_prepare
98 + fi
99 +}
100 +
101 +src_configure() {
102 + if use kernel ; then
103 + ewarn "Note that kernel backend is very slow for this type of operation"
104 + ewarn "and is provided mainly for embedded systems wanting to avoid"
105 + ewarn "userspace crypto libraries."
106 + fi
107 +
108 + # We disable autotool python integration so we can use eclasses
109 + # for proper integration with multiple python versions.
110 + econf \
111 + --sbindir=/sbin \
112 + --enable-shared \
113 + --disable-python \
114 + $(use_enable static static-cryptsetup) \
115 + $(use_enable static-libs static) \
116 + $(use_enable nls) \
117 + $(use_enable pwquality) \
118 + $(use_enable reencrypt cryptsetup-reencrypt) \
119 + $(use_enable udev) \
120 + $(use_enable !urandom dev-random) \
121 + --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
122 +
123 + use python && cd python && distutils-r1_src_configure
124 +}
125 +
126 +src_compile() {
127 + default
128 + use python && cd python && distutils-r1_src_compile
129 +}
130 +
131 +src_test() {
132 + if [[ ! -e /dev/mapper/control ]] ; then
133 + ewarn "No /dev/mapper/control found -- skipping tests"
134 + return 0
135 + fi
136 + local p
137 + for p in /dev/mapper /dev/loop* ; do
138 + addwrite ${p}
139 + done
140 + default
141 +}
142 +
143 +src_install() {
144 + default
145 + if use static ; then
146 + mv "${ED}"/sbin/cryptsetup{.static,} || die
147 + mv "${ED}"/sbin/veritysetup{.static,} || die
148 + use reencrypt && { mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die ; }
149 + fi
150 + prune_libtool_files --modules
151 +
152 + newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt
153 + newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt
154 +
155 + use python && cd python && distutils-r1_src_install
156 +}