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: Sun, 05 Aug 2018 05:50:43
Message-Id: 1533448156.88839d25fefbdf36300c0e906647d69af3e63a7a.robbat2@gentoo
1 commit: 88839d25fefbdf36300c0e906647d69af3e63a7a
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 5 05:48:44 2018 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 5 05:49:16 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88839d25
7
8 sys-fs/lvm2: drop broken 2.02.17[12] versions
9
10 Fixed in 2.02.173 & newer.
11
12 Fixes: https://bugs.gentoo.org/617578
13 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
14 Package-Manager: Portage-2.3.40, Repoman-2.3.9
15
16 sys-fs/lvm2/Manifest | 2 -
17 sys-fs/lvm2/lvm2-2.02.171.ebuild | 299 ---------------------------------------
18 sys-fs/lvm2/lvm2-2.02.172.ebuild | 299 ---------------------------------------
19 3 files changed, 600 deletions(-)
20
21 diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
22 index c7ab460dfd3..93b881c90a8 100644
23 --- a/sys-fs/lvm2/Manifest
24 +++ b/sys-fs/lvm2/Manifest
25 @@ -3,7 +3,5 @@ DIST LVM2.2.02.136.tgz 1891010 BLAKE2B 606900337eec96a5a124518b1cc20712763f0c79b
26 DIST LVM2.2.02.139.tgz 1897293 BLAKE2B cad5f37a9190c40147e80edcec6af1717f87c2cce01e6e4cbd8cf8b594d995a08b52070b0d45dd9f1f8b5120c2babaf0ced158e70227dde516fca838369f7664 SHA512 f112207d7447606915026495b931bffc4c0d68d36b9a8792fe4b7abf8b743bc4559da5c79145cb4d457337118e60552f9df511e31f2799001d29d006f7946cc0
27 DIST LVM2.2.02.145.tgz 1986370 BLAKE2B 0c9e5efae17f26ff86152cecbf0b11a74e85007b2fa9491f44dec03ac8c11375bacf6685213b4be19037c8fbf70e13549516716ecf8fa262919a44625e6aab34 SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27
28 DIST LVM2.2.02.166.tgz 2148324 BLAKE2B a57ad21b1f31a6e78c56e4cf77e0d6fd99262c95a0093fe3eb9d6b0a82b675c0d39c3337af4a4bea87cba0c0a816bc98f7052afda6b850dc4712f5539942b7d5 SHA512 8bebe9b474f791b5edf5366b0bd24861fbbaf8a83afa2a9e2a8e3917e05e4ecbf6877f018be03ffb4e9b4c8832208264165b85182bf79a07661adf35128b4a21
29 -DIST LVM2.2.02.171.tgz 2333643 BLAKE2B 169155354ba1de7f97a4f9e9156f3f7ba8553a2313883152371637986e8c3355906831368cd2e2c8c30d85045865c24667dc624fdbd36ae6a632a1a678c5cd23 SHA512 801adcc2ae483f81edf6bfba73090b6b8f710370e48764f08a62da71d617157075bea01593c2535ad5ba71dcb5e0cfe83cec9a65180a6e8b9e0d214bdee79883
30 -DIST LVM2.2.02.172.tgz 2351684 BLAKE2B d303bceab0f30ac726563cbf6491439b0528223c1cb0351aff348b08502912b53b6df449b261ead011c3c40c63603840bfcbc8432f79d047733b7da673ff2b76 SHA512 402612667f279be5f1c682b9037022788e9b76e3157907a0832e8b7847c3aa96e4b44a3bd880657a7e577ab46db0e4f283ac6edbb52502e365617633c802ae40
31 DIST LVM2.2.02.173.tgz 2363504 BLAKE2B a516bc9b68b7b7529f4436d8849ca741eb3ca1b5ac2eb2fb2915507935bdd28b5e234e74c1bce827e5761f57b5936510d08107e0dc1c320190f952c706f128d3 SHA512 c2ea8beafe006abf9282f51ec98600fd0ebff816d53c10ecbb19bbf336ada4825135cf9c92ccd364afb18f8b1d7e163eff5bdec8dfdd70dfb9ba45db2f6bdd5e
32 DIST LVM2.2.02.181.tgz 2375093 BLAKE2B 4e4e7c65511af5902e765254a4316a9f887a6ec5c079333d78f19bff71ed3ed9d0e2e2367b0bb5e619ec6778adc9ddf944156921cec67af4d73aafc08196b73e SHA512 599d992823510e27f3ec3ceaf0d2332402b731afc0d2df88096ab55ed98dba8c3bdc5408d51b9f5b0ffbbb9ac3760ee37b878a0f36ab379449dc076c58e59511
33
34 diff --git a/sys-fs/lvm2/lvm2-2.02.171.ebuild b/sys-fs/lvm2/lvm2-2.02.171.ebuild
35 deleted file mode 100644
36 index dc1aedc9517..00000000000
37 --- a/sys-fs/lvm2/lvm2-2.02.171.ebuild
38 +++ /dev/null
39 @@ -1,299 +0,0 @@
40 -# Copyright 1999-2018 Gentoo Foundation
41 -# Distributed under the terms of the GNU General Public License v2
42 -
43 -EAPI=6
44 -inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
45 -
46 -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
47 -HOMEPAGE="https://sourceware.org/lvm2/"
48 -SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
49 - ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
50 -
51 -LICENSE="GPL-2"
52 -SLOT="0"
53 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
54 -IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais sanlock selinux +udev +thin device-mapper-only"
55 -REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !sanlock !thin )
56 - systemd? ( udev )
57 - clvm? ( !systemd )"
58 -
59 -DEPEND_COMMON="
60 - clvm? (
61 - cman? ( =sys-cluster/cman-3* )
62 - corosync? ( sys-cluster/corosync )
63 - openais? ( sys-cluster/openais )
64 - =sys-cluster/libdlm-3*
65 - )
66 -
67 - readline? ( sys-libs/readline:0= )
68 - sanlock? ( sys-cluster/sanlock )
69 - systemd? ( >=sys-apps/systemd-205:0= )
70 - udev? ( >=virtual/libudev-208:=[static-libs?] )"
71 -# /run is now required for locking during early boot. /var cannot be assumed to
72 -# be available -- thus, pull in recent enough baselayout for /run.
73 -# This version of LVM is incompatible with cryptsetup <1.1.2.
74 -RDEPEND="${DEPEND_COMMON}
75 - >=sys-apps/baselayout-2.2
76 - !<sys-apps/openrc-0.11
77 - !<sys-fs/cryptsetup-1.1.2
78 - !!sys-fs/clvm
79 - !!sys-fs/lvm-user
80 - >=sys-apps/util-linux-2.16
81 - lvm2create_initrd? ( sys-apps/makedev )
82 - thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
83 -# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
84 -# USE 'static' currently only works with eudev, bug 520450
85 -DEPEND="${DEPEND_COMMON}
86 - virtual/pkgconfig
87 - >=sys-devel/binutils-2.20.1-r1
88 - sys-devel/autoconf-archive
89 - static? (
90 - selinux? ( sys-libs/libselinux[static-libs] )
91 - udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
92 - >=sys-apps/util-linux-2.16[static-libs]
93 - )"
94 -
95 -S=${WORKDIR}/${PN/lvm/LVM}.${PV}
96 -
97 -PATCHES=(
98 - # Gentoo specific modification(s):
99 - "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
100 -
101 - # For upstream -- review and forward:
102 - "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
103 - "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
104 - "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
105 - "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
106 - "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
107 - "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
108 - "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
109 - "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
110 - "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
111 - "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
112 - #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
113 -)
114 -
115 -pkg_setup() {
116 - local CONFIG_CHECK="~SYSVIPC"
117 -
118 - if use udev; then
119 - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
120 - if linux_config_exists; then
121 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
122 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
123 - ewarn "It's recommended to set an empty value to the following kernel config option:"
124 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
125 - fi
126 - fi
127 - fi
128 -
129 - check_extra_config
130 -
131 - # 1. Genkernel no longer copies /sbin/lvm blindly.
132 - if use static; then
133 - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
134 - elog "their static versions. If you need the static binaries,"
135 - elog "you must append .static to the filename!"
136 - fi
137 -}
138 -
139 -src_prepare() {
140 - default
141 -
142 - sed -i \
143 - -e "1iAR = $(tc-getAR)" \
144 - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
145 - make.tmpl.in || die #444082
146 -
147 - sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
148 -
149 - if use udev && ! use device-mapper-only; then
150 - sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
151 - elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
152 - elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
153 - elog "if it was previously disabled."
154 - fi
155 -
156 - sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
157 -
158 - # Without thin-privision-tools, there is nothing to install for target install_man7:
159 - use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
160 -
161 - eautoreconf
162 -}
163 -
164 -src_configure() {
165 - filter-flags -flto
166 - local myconf=()
167 - local buildmode
168 -
169 - myconf+=( $(use_enable !device-mapper-only dmeventd) )
170 - myconf+=( $(use_enable !device-mapper-only cmdlib) )
171 - myconf+=( $(use_enable !device-mapper-only applib) )
172 - myconf+=( $(use_enable !device-mapper-only fsadm) )
173 - myconf+=( $(use_enable !device-mapper-only lvmetad) )
174 - use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
175 -
176 - # Most of this package does weird stuff.
177 - # The build options are tristate, and --without is NOT supported
178 - # options: 'none', 'internal', 'shared'
179 - if use static; then
180 - buildmode="internal"
181 - # This only causes the .static versions to become available
182 - myconf+=( --enable-static_link )
183 - else
184 - buildmode="shared"
185 - fi
186 - dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
187 -
188 - # dmeventd requires mirrors to be internal, and snapshot available
189 - # so we cannot disable them
190 - myconf+=( --with-mirrors=${dmbuildmode} )
191 - myconf+=( --with-snapshots=${dmbuildmode} )
192 - if use thin; then
193 - myconf+=( --with-thin=internal --with-cache=internal )
194 - local texec
195 - for texec in check dump repair restore; do
196 - myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
197 - myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
198 - done
199 - else
200 - myconf+=( --with-thin=none --with-cache=none )
201 - fi
202 -
203 - if use lvm1; then
204 - myconf+=( --with-lvm1=${buildmode} )
205 - else
206 - myconf+=( --with-lvm1=none )
207 - fi
208 -
209 - # disable O_DIRECT support on hppa, breaks pv detection (#99532)
210 - use hppa && myconf+=( --disable-o_direct )
211 -
212 - if use clvm; then
213 - myconf+=( --with-cluster=${buildmode} )
214 - # 4-state! Make sure we get it right, per bug 210879
215 - # Valid options are: none, cman, gulm, all
216 - #
217 - # 2009/02:
218 - # gulm is removed now, now dual-state:
219 - # cman, none
220 - # all still exists, but is not needed
221 - #
222 - # 2009/07:
223 - # TODO: add corosync and re-enable ALL
224 - local clvmd=""
225 - use cman && clvmd="cman"
226 - #clvmd="${clvmd/cmangulm/all}"
227 - use corosync && clvmd="${clvmd:+$clvmd,}corosync"
228 - use openais && clvmd="${clvmd:+$clvmd,}openais"
229 - [ -z "${clvmd}" ] && clvmd="none"
230 - myconf+=( --with-clvmd=${clvmd} )
231 - myconf+=( --with-pool=${buildmode} )
232 - myconf+=( --enable-lvmlockd-dlm )
233 - else
234 - myconf+=( --with-clvmd=none --with-cluster=none )
235 - fi
236 -
237 - econf \
238 - $(use_enable readline) \
239 - $(use_enable selinux) \
240 - --enable-pkgconfig \
241 - --with-confdir="${EPREFIX}"/etc \
242 - --exec-prefix="${EPREFIX}" \
243 - --sbindir="${EPREFIX}/sbin" \
244 - --with-staticdir="${EPREFIX}"/sbin \
245 - --libdir="${EPREFIX}/$(get_libdir)" \
246 - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
247 - --with-default-dm-run-dir=/run \
248 - --with-default-run-dir=/run/lvm \
249 - --with-default-locking-dir=/run/lock/lvm \
250 - --with-default-pid-dir=/run \
251 - $(use_enable udev udev_rules) \
252 - $(use_enable udev udev_sync) \
253 - $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
254 - $(use_enable sanlock lvmlockd-sanlock) \
255 - $(use_enable systemd udev-systemd-background-jobs) \
256 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
257 - ${myconf[@]} \
258 - CLDFLAGS="${LDFLAGS}"
259 -}
260 -
261 -src_compile() {
262 - pushd include >/dev/null
263 - emake
264 - popd >/dev/null
265 -
266 - if use device-mapper-only ; then
267 - emake device-mapper
268 - else
269 - emake
270 - emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
271 - fi
272 -}
273 -
274 -src_install() {
275 - local inst
276 - INSTALL_TARGETS="install install_tmpfiles_configuration"
277 - # install systemd related files only when requested, bug #522430
278 - use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
279 - use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
280 - for inst in ${INSTALL_TARGETS}; do
281 - emake DESTDIR="${D}" ${inst}
282 - done
283 -
284 - newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
285 - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
286 -
287 - if use !device-mapper-only ; then
288 - newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
289 - newinitd "${FILESDIR}"/lvm.rc-2.02.166-r2 lvm
290 - newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
291 -
292 - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
293 - newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
294 - fi
295 -
296 - if use sanlock; then
297 - newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
298 - fi
299 -
300 - if use clvm; then
301 - newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
302 - newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
303 - fi
304 -
305 - if use static-libs; then
306 - dolib.a libdm/ioctl/libdevmapper.a
307 - dolib.a libdaemon/client/libdaemonclient.a #462908
308 - #gen_usr_ldscript libdevmapper.so
309 - dolib.a daemons/dmeventd/libdevmapper-event.a
310 - #gen_usr_ldscript libdevmapper-event.so
311 - else
312 - rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
313 - fi
314 -
315 - if use lvm2create_initrd; then
316 - dosbin scripts/lvm2create_initrd/lvm2create_initrd
317 - doman scripts/lvm2create_initrd/lvm2create_initrd.8
318 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
319 - fi
320 -
321 - insinto /etc
322 - doins "${FILESDIR}"/dmtab
323 -
324 - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
325 -}
326 -
327 -pkg_postinst() {
328 - ewarn "Make sure the \"lvm\" init script is in the runlevels:"
329 - ewarn "# rc-update add lvm boot"
330 - ewarn
331 - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
332 - ewarn "to enable lvm autoactivation and metadata caching."
333 -}
334 -
335 -src_test() {
336 - einfo "Tests are disabled because of device-node mucking, if you want to"
337 - einfo "run tests, compile the package and see ${S}/tests"
338 -}
339
340 diff --git a/sys-fs/lvm2/lvm2-2.02.172.ebuild b/sys-fs/lvm2/lvm2-2.02.172.ebuild
341 deleted file mode 100644
342 index 64a75336d32..00000000000
343 --- a/sys-fs/lvm2/lvm2-2.02.172.ebuild
344 +++ /dev/null
345 @@ -1,299 +0,0 @@
346 -# Copyright 1999-2018 Gentoo Foundation
347 -# Distributed under the terms of the GNU General Public License v2
348 -
349 -EAPI=6
350 -inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
351 -
352 -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
353 -HOMEPAGE="https://sourceware.org/lvm2/"
354 -SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
355 - ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
356 -
357 -LICENSE="GPL-2"
358 -SLOT="0"
359 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
360 -IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais sanlock selinux +udev +thin device-mapper-only"
361 -REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !sanlock !thin )
362 - systemd? ( udev )
363 - clvm? ( !systemd )"
364 -
365 -DEPEND_COMMON="
366 - clvm? (
367 - cman? ( =sys-cluster/cman-3* )
368 - corosync? ( sys-cluster/corosync )
369 - openais? ( sys-cluster/openais )
370 - =sys-cluster/libdlm-3*
371 - )
372 -
373 - readline? ( sys-libs/readline:0= )
374 - sanlock? ( sys-cluster/sanlock )
375 - systemd? ( >=sys-apps/systemd-205:0= )
376 - udev? ( >=virtual/libudev-208:=[static-libs?] )"
377 -# /run is now required for locking during early boot. /var cannot be assumed to
378 -# be available -- thus, pull in recent enough baselayout for /run.
379 -# This version of LVM is incompatible with cryptsetup <1.1.2.
380 -RDEPEND="${DEPEND_COMMON}
381 - >=sys-apps/baselayout-2.2
382 - !<sys-apps/openrc-0.11
383 - !<sys-fs/cryptsetup-1.1.2
384 - !!sys-fs/clvm
385 - !!sys-fs/lvm-user
386 - >=sys-apps/util-linux-2.16
387 - lvm2create_initrd? ( sys-apps/makedev )
388 - thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
389 -# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
390 -# USE 'static' currently only works with eudev, bug 520450
391 -DEPEND="${DEPEND_COMMON}
392 - virtual/pkgconfig
393 - >=sys-devel/binutils-2.20.1-r1
394 - sys-devel/autoconf-archive
395 - static? (
396 - selinux? ( sys-libs/libselinux[static-libs] )
397 - udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
398 - >=sys-apps/util-linux-2.16[static-libs]
399 - )"
400 -
401 -S=${WORKDIR}/${PN/lvm/LVM}.${PV}
402 -
403 -PATCHES=(
404 - # Gentoo specific modification(s):
405 - "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
406 -
407 - # For upstream -- review and forward:
408 - "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
409 - "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
410 - "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
411 - "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
412 - "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
413 - "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
414 - "${FILESDIR}"/${PN}-2.02.172-static-pkgconfig-libs.patch #370217, #439414 + blkid
415 - "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
416 - "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
417 - "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
418 - #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
419 -)
420 -
421 -pkg_setup() {
422 - local CONFIG_CHECK="~SYSVIPC"
423 -
424 - if use udev; then
425 - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
426 - if linux_config_exists; then
427 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
428 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
429 - ewarn "It's recommended to set an empty value to the following kernel config option:"
430 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
431 - fi
432 - fi
433 - fi
434 -
435 - check_extra_config
436 -
437 - # 1. Genkernel no longer copies /sbin/lvm blindly.
438 - if use static; then
439 - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
440 - elog "their static versions. If you need the static binaries,"
441 - elog "you must append .static to the filename!"
442 - fi
443 -}
444 -
445 -src_prepare() {
446 - default
447 -
448 - sed -i \
449 - -e "1iAR = $(tc-getAR)" \
450 - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
451 - make.tmpl.in || die #444082
452 -
453 - sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
454 -
455 - if use udev && ! use device-mapper-only; then
456 - sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
457 - elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
458 - elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
459 - elog "if it was previously disabled."
460 - fi
461 -
462 - sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
463 -
464 - # Without thin-privision-tools, there is nothing to install for target install_man7:
465 - use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
466 -
467 - eautoreconf
468 -}
469 -
470 -src_configure() {
471 - filter-flags -flto
472 - local myconf=()
473 - local buildmode
474 -
475 - myconf+=( $(use_enable !device-mapper-only dmeventd) )
476 - myconf+=( $(use_enable !device-mapper-only cmdlib) )
477 - myconf+=( $(use_enable !device-mapper-only applib) )
478 - myconf+=( $(use_enable !device-mapper-only fsadm) )
479 - myconf+=( $(use_enable !device-mapper-only lvmetad) )
480 - use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
481 -
482 - # Most of this package does weird stuff.
483 - # The build options are tristate, and --without is NOT supported
484 - # options: 'none', 'internal', 'shared'
485 - if use static; then
486 - buildmode="internal"
487 - # This only causes the .static versions to become available
488 - myconf+=( --enable-static_link )
489 - else
490 - buildmode="shared"
491 - fi
492 - dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
493 -
494 - # dmeventd requires mirrors to be internal, and snapshot available
495 - # so we cannot disable them
496 - myconf+=( --with-mirrors=${dmbuildmode} )
497 - myconf+=( --with-snapshots=${dmbuildmode} )
498 - if use thin; then
499 - myconf+=( --with-thin=internal --with-cache=internal )
500 - local texec
501 - for texec in check dump repair restore; do
502 - myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
503 - myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
504 - done
505 - else
506 - myconf+=( --with-thin=none --with-cache=none )
507 - fi
508 -
509 - if use lvm1; then
510 - myconf+=( --with-lvm1=${buildmode} )
511 - else
512 - myconf+=( --with-lvm1=none )
513 - fi
514 -
515 - # disable O_DIRECT support on hppa, breaks pv detection (#99532)
516 - use hppa && myconf+=( --disable-o_direct )
517 -
518 - if use clvm; then
519 - myconf+=( --with-cluster=${buildmode} )
520 - # 4-state! Make sure we get it right, per bug 210879
521 - # Valid options are: none, cman, gulm, all
522 - #
523 - # 2009/02:
524 - # gulm is removed now, now dual-state:
525 - # cman, none
526 - # all still exists, but is not needed
527 - #
528 - # 2009/07:
529 - # TODO: add corosync and re-enable ALL
530 - local clvmd=""
531 - use cman && clvmd="cman"
532 - #clvmd="${clvmd/cmangulm/all}"
533 - use corosync && clvmd="${clvmd:+$clvmd,}corosync"
534 - use openais && clvmd="${clvmd:+$clvmd,}openais"
535 - [ -z "${clvmd}" ] && clvmd="none"
536 - myconf+=( --with-clvmd=${clvmd} )
537 - myconf+=( --with-pool=${buildmode} )
538 - myconf+=( --enable-lvmlockd-dlm )
539 - else
540 - myconf+=( --with-clvmd=none --with-cluster=none )
541 - fi
542 -
543 - econf \
544 - $(use_enable readline) \
545 - $(use_enable selinux) \
546 - --enable-pkgconfig \
547 - --with-confdir="${EPREFIX}"/etc \
548 - --exec-prefix="${EPREFIX}" \
549 - --sbindir="${EPREFIX}/sbin" \
550 - --with-staticdir="${EPREFIX}"/sbin \
551 - --libdir="${EPREFIX}/$(get_libdir)" \
552 - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
553 - --with-default-dm-run-dir=/run \
554 - --with-default-run-dir=/run/lvm \
555 - --with-default-locking-dir=/run/lock/lvm \
556 - --with-default-pid-dir=/run \
557 - $(use_enable udev udev_rules) \
558 - $(use_enable udev udev_sync) \
559 - $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
560 - $(use_enable sanlock lvmlockd-sanlock) \
561 - $(use_enable systemd udev-systemd-background-jobs) \
562 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
563 - ${myconf[@]} \
564 - CLDFLAGS="${LDFLAGS}"
565 -}
566 -
567 -src_compile() {
568 - pushd include >/dev/null
569 - emake
570 - popd >/dev/null
571 -
572 - if use device-mapper-only ; then
573 - emake device-mapper
574 - else
575 - emake
576 - emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
577 - fi
578 -}
579 -
580 -src_install() {
581 - local inst
582 - INSTALL_TARGETS="install install_tmpfiles_configuration"
583 - # install systemd related files only when requested, bug #522430
584 - use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
585 - use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
586 - for inst in ${INSTALL_TARGETS}; do
587 - emake DESTDIR="${D}" ${inst}
588 - done
589 -
590 - newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
591 - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
592 -
593 - if use !device-mapper-only ; then
594 - newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
595 - newinitd "${FILESDIR}"/lvm.rc-2.02.172 lvm
596 - newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
597 -
598 - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
599 - newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
600 - fi
601 -
602 - if use sanlock; then
603 - newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
604 - fi
605 -
606 - if use clvm; then
607 - newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
608 - newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
609 - fi
610 -
611 - if use static-libs; then
612 - dolib.a libdm/ioctl/libdevmapper.a
613 - dolib.a libdaemon/client/libdaemonclient.a #462908
614 - #gen_usr_ldscript libdevmapper.so
615 - dolib.a daemons/dmeventd/libdevmapper-event.a
616 - #gen_usr_ldscript libdevmapper-event.so
617 - else
618 - rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
619 - fi
620 -
621 - if use lvm2create_initrd; then
622 - dosbin scripts/lvm2create_initrd/lvm2create_initrd
623 - doman scripts/lvm2create_initrd/lvm2create_initrd.8
624 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
625 - fi
626 -
627 - insinto /etc
628 - doins "${FILESDIR}"/dmtab
629 -
630 - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
631 -}
632 -
633 -pkg_postinst() {
634 - ewarn "Make sure the \"lvm\" init script is in the runlevels:"
635 - ewarn "# rc-update add lvm boot"
636 - ewarn
637 - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
638 - ewarn "to enable lvm autoactivation and metadata caching."
639 -}
640 -
641 -src_test() {
642 - einfo "Tests are disabled because of device-node mucking, if you want to"
643 - einfo "run tests, compile the package and see ${S}/tests"
644 -}