Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/
Date: Mon, 07 Aug 2017 19:41:34
Message-Id: 1502134886.d6915ed86bf72160e0ff203fb52f83bf4aa8d863.robbat2@gentoo
1 commit: d6915ed86bf72160e0ff203fb52f83bf4aa8d863
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 7 19:41:14 2017 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 7 19:41:26 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6915ed8
7
8 sys-fs/lvm2: bump.
9
10 Package-Manager: portage-2.3.6
11
12 sys-fs/lvm2/Manifest | 1 +
13 sys-fs/lvm2/lvm2-2.02.173.ebuild | 297 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 298 insertions(+)
15
16 diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
17 index cfbec6371c8..5e37aa936bb 100644
18 --- a/sys-fs/lvm2/Manifest
19 +++ b/sys-fs/lvm2/Manifest
20 @@ -5,3 +5,4 @@ DIST LVM2.2.02.145.tgz 1986370 SHA256 98b7c4c07c485a462c6a86e1a5265757133ceea362
21 DIST LVM2.2.02.166.tgz 2148324 SHA256 e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94 SHA512 8bebe9b474f791b5edf5366b0bd24861fbbaf8a83afa2a9e2a8e3917e05e4ecbf6877f018be03ffb4e9b4c8832208264165b85182bf79a07661adf35128b4a21 WHIRLPOOL a4c2e0b2e8da85301b2518b35193304436715fdf45cbc7bc28fd6f7b88af15e611134d5a530d2311b23544aa67c3a7f13fd3780d4d46fc10854e624fb8b27870
22 DIST LVM2.2.02.171.tgz 2333643 SHA256 b815a711a2fabaa5c3dc1a4a284df0268bf0f325f0fc0f5c9530c9bbb54b9964 SHA512 801adcc2ae483f81edf6bfba73090b6b8f710370e48764f08a62da71d617157075bea01593c2535ad5ba71dcb5e0cfe83cec9a65180a6e8b9e0d214bdee79883 WHIRLPOOL fedd62612c6bb4b7764277a0d4474ff3557f041858c71eb7bf2a1c06b646637fe719f91a12c1b5c58ccefa7f4d2daba6bf30409340c52fd3a1b8b01ce62467ab
23 DIST LVM2.2.02.172.tgz 2351684 SHA256 eab09d4132e6ade4db22249e554919045948efb908ffa40409e8e8e0c316f708 SHA512 402612667f279be5f1c682b9037022788e9b76e3157907a0832e8b7847c3aa96e4b44a3bd880657a7e577ab46db0e4f283ac6edbb52502e365617633c802ae40 WHIRLPOOL 618123038cbfce1cba7e90e22e5ffccc9d92ddad4b60dd92dedc46ea26729700c6c7003e701c4f2a511f4a34a834ea277f619c557e2865540e4dd9826a8aa76b
24 +DIST LVM2.2.02.173.tgz 2363504 SHA256 ceb9168c7e009ef487f96a1fe969b23cbb07d920ffb71769affdbdf30fea8d64 SHA512 c2ea8beafe006abf9282f51ec98600fd0ebff816d53c10ecbb19bbf336ada4825135cf9c92ccd364afb18f8b1d7e163eff5bdec8dfdd70dfb9ba45db2f6bdd5e WHIRLPOOL fcafa785bb6c9223b52e31c09570bc68bae9495431b947265e31a2b680b549f76f2fe1d2ccc56420ceec50e8b55ef9314706d9bc50348b3c449192d9fe03c4d0
25
26 diff --git a/sys-fs/lvm2/lvm2-2.02.173.ebuild b/sys-fs/lvm2/lvm2-2.02.173.ebuild
27 new file mode 100644
28 index 00000000000..4de31e3cbcc
29 --- /dev/null
30 +++ b/sys-fs/lvm2/lvm2-2.02.173.ebuild
31 @@ -0,0 +1,297 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
37 +
38 +DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
39 +HOMEPAGE="https://sourceware.org/lvm2/"
40 +SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
41 + ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
46 +IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais sanlock selinux +udev +thin device-mapper-only"
47 +REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !sanlock !thin )
48 + systemd? ( udev )
49 + clvm? ( !systemd )"
50 +
51 +DEPEND_COMMON="
52 + clvm? (
53 + cman? ( =sys-cluster/cman-3* )
54 + corosync? ( sys-cluster/corosync )
55 + openais? ( sys-cluster/openais )
56 + =sys-cluster/libdlm-3*
57 + )
58 +
59 + readline? ( sys-libs/readline:0= )
60 + sanlock? ( sys-cluster/sanlock )
61 + systemd? ( >=sys-apps/systemd-205:0= )
62 + udev? ( >=virtual/libudev-208:=[static-libs?] )"
63 +# /run is now required for locking during early boot. /var cannot be assumed to
64 +# be available -- thus, pull in recent enough baselayout for /run.
65 +# This version of LVM is incompatible with cryptsetup <1.1.2.
66 +RDEPEND="${DEPEND_COMMON}
67 + >=sys-apps/baselayout-2.2
68 + !<sys-apps/openrc-0.11
69 + !<sys-fs/cryptsetup-1.1.2
70 + !!sys-fs/clvm
71 + !!sys-fs/lvm-user
72 + >=sys-apps/util-linux-2.16
73 + lvm2create_initrd? ( sys-apps/makedev )
74 + thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
75 +# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
76 +# USE 'static' currently only works with eudev, bug 520450
77 +DEPEND="${DEPEND_COMMON}
78 + virtual/pkgconfig
79 + >=sys-devel/binutils-2.20.1-r1
80 + sys-devel/autoconf-archive
81 + static? (
82 + selinux? ( sys-libs/libselinux[static-libs] )
83 + udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
84 + >=sys-apps/util-linux-2.16[static-libs]
85 + )"
86 +
87 +S=${WORKDIR}/${PN/lvm/LVM}.${PV}
88 +
89 +PATCHES=(
90 + # Gentoo specific modification(s):
91 + "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
92 +
93 + # For upstream -- review and forward:
94 + "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
95 + "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
96 + "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
97 + "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
98 + "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
99 + "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
100 + "${FILESDIR}"/${PN}-2.02.172-static-pkgconfig-libs.patch #370217, #439414 + blkid
101 + "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
102 + #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
103 +)
104 +
105 +pkg_setup() {
106 + local CONFIG_CHECK="~SYSVIPC"
107 +
108 + if use udev; then
109 + local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
110 + if linux_config_exists; then
111 + local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
112 + if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
113 + ewarn "It's recommended to set an empty value to the following kernel config option:"
114 + ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
115 + fi
116 + fi
117 + fi
118 +
119 + check_extra_config
120 +
121 + # 1. Genkernel no longer copies /sbin/lvm blindly.
122 + if use static; then
123 + elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
124 + elog "their static versions. If you need the static binaries,"
125 + elog "you must append .static to the filename!"
126 + fi
127 +}
128 +
129 +src_prepare() {
130 + default
131 +
132 + sed -i \
133 + -e "1iAR = $(tc-getAR)" \
134 + -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
135 + make.tmpl.in || die #444082
136 +
137 + sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
138 +
139 + if use udev && ! use device-mapper-only; then
140 + sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
141 + elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
142 + elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
143 + elog "if it was previously disabled."
144 + fi
145 +
146 + sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
147 +
148 + # Without thin-privision-tools, there is nothing to install for target install_man7:
149 + use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
150 +
151 + eautoreconf
152 +}
153 +
154 +src_configure() {
155 + filter-flags -flto
156 + local myconf=()
157 + local buildmode
158 +
159 + myconf+=( $(use_enable !device-mapper-only dmeventd) )
160 + myconf+=( $(use_enable !device-mapper-only cmdlib) )
161 + myconf+=( $(use_enable !device-mapper-only applib) )
162 + myconf+=( $(use_enable !device-mapper-only fsadm) )
163 + myconf+=( $(use_enable !device-mapper-only lvmetad) )
164 + use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
165 +
166 + # Most of this package does weird stuff.
167 + # The build options are tristate, and --without is NOT supported
168 + # options: 'none', 'internal', 'shared'
169 + if use static; then
170 + buildmode="internal"
171 + # This only causes the .static versions to become available
172 + myconf+=( --enable-static_link )
173 + else
174 + buildmode="shared"
175 + fi
176 + dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
177 +
178 + # dmeventd requires mirrors to be internal, and snapshot available
179 + # so we cannot disable them
180 + myconf+=( --with-mirrors=${dmbuildmode} )
181 + myconf+=( --with-snapshots=${dmbuildmode} )
182 + if use thin; then
183 + myconf+=( --with-thin=internal --with-cache=internal )
184 + local texec
185 + for texec in check dump repair restore; do
186 + myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
187 + myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
188 + done
189 + else
190 + myconf+=( --with-thin=none --with-cache=none )
191 + fi
192 +
193 + if use lvm1; then
194 + myconf+=( --with-lvm1=${buildmode} )
195 + else
196 + myconf+=( --with-lvm1=none )
197 + fi
198 +
199 + # disable O_DIRECT support on hppa, breaks pv detection (#99532)
200 + use hppa && myconf+=( --disable-o_direct )
201 +
202 + if use clvm; then
203 + myconf+=( --with-cluster=${buildmode} )
204 + # 4-state! Make sure we get it right, per bug 210879
205 + # Valid options are: none, cman, gulm, all
206 + #
207 + # 2009/02:
208 + # gulm is removed now, now dual-state:
209 + # cman, none
210 + # all still exists, but is not needed
211 + #
212 + # 2009/07:
213 + # TODO: add corosync and re-enable ALL
214 + local clvmd=""
215 + use cman && clvmd="cman"
216 + #clvmd="${clvmd/cmangulm/all}"
217 + use corosync && clvmd="${clvmd:+$clvmd,}corosync"
218 + use openais && clvmd="${clvmd:+$clvmd,}openais"
219 + [ -z "${clvmd}" ] && clvmd="none"
220 + myconf+=( --with-clvmd=${clvmd} )
221 + myconf+=( --with-pool=${buildmode} )
222 + myconf+=( --enable-lvmlockd-dlm )
223 + else
224 + myconf+=( --with-clvmd=none --with-cluster=none )
225 + fi
226 +
227 + econf \
228 + $(use_enable readline) \
229 + $(use_enable selinux) \
230 + --enable-pkgconfig \
231 + --with-confdir="${EPREFIX}"/etc \
232 + --exec-prefix="${EPREFIX}" \
233 + --sbindir="${EPREFIX}/sbin" \
234 + --with-staticdir="${EPREFIX}"/sbin \
235 + --libdir="${EPREFIX}/$(get_libdir)" \
236 + --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
237 + --with-default-dm-run-dir=/run \
238 + --with-default-run-dir=/run/lvm \
239 + --with-default-locking-dir=/run/lock/lvm \
240 + --with-default-pid-dir=/run \
241 + $(use_enable udev udev_rules) \
242 + $(use_enable udev udev_sync) \
243 + $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
244 + $(use_enable sanlock lvmlockd-sanlock) \
245 + $(use_enable systemd udev-systemd-background-jobs) \
246 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
247 + ${myconf[@]} \
248 + CLDFLAGS="${LDFLAGS}"
249 +}
250 +
251 +src_compile() {
252 + pushd include >/dev/null
253 + emake
254 + popd >/dev/null
255 +
256 + if use device-mapper-only ; then
257 + emake device-mapper
258 + else
259 + emake
260 + emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
261 + fi
262 +}
263 +
264 +src_install() {
265 + local inst
266 + INSTALL_TARGETS="install install_tmpfiles_configuration"
267 + # install systemd related files only when requested, bug #522430
268 + use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
269 + use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
270 + for inst in ${INSTALL_TARGETS}; do
271 + emake DESTDIR="${D}" ${inst}
272 + done
273 +
274 + newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
275 + newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
276 +
277 + if use !device-mapper-only ; then
278 + newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
279 + newinitd "${FILESDIR}"/lvm.rc-2.02.172 lvm
280 + newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
281 +
282 + newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
283 + newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
284 + fi
285 +
286 + if use sanlock; then
287 + newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
288 + fi
289 +
290 + if use clvm; then
291 + newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
292 + newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
293 + fi
294 +
295 + if use static-libs; then
296 + dolib.a libdm/ioctl/libdevmapper.a
297 + dolib.a libdaemon/client/libdaemonclient.a #462908
298 + #gen_usr_ldscript libdevmapper.so
299 + dolib.a daemons/dmeventd/libdevmapper-event.a
300 + #gen_usr_ldscript libdevmapper-event.so
301 + else
302 + rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
303 + fi
304 +
305 + if use lvm2create_initrd; then
306 + dosbin scripts/lvm2create_initrd/lvm2create_initrd
307 + doman scripts/lvm2create_initrd/lvm2create_initrd.8
308 + newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
309 + fi
310 +
311 + insinto /etc
312 + doins "${FILESDIR}"/dmtab
313 +
314 + dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
315 +}
316 +
317 +pkg_postinst() {
318 + ewarn "Make sure the \"lvm\" init script is in the runlevels:"
319 + ewarn "# rc-update add lvm boot"
320 + ewarn
321 + ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
322 + ewarn "to enable lvm autoactivation and metadata caching."
323 +}
324 +
325 +src_test() {
326 + einfo "Tests are disabled because of device-node mucking, if you want to"
327 + einfo "run tests, compile the package and see ${S}/tests"
328 +}