Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
Date: Mon, 27 Apr 2020 00:50:30
Message-Id: 1587948564.1881836d0d33dcd9636e8ce903e3f4c46ef01f3f.whissi@gentoo
1 commit: 1881836d0d33dcd9636e8ce903e3f4c46ef01f3f
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 27 00:46:57 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 27 00:49:24 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1881836d
7
8 sys-fs/lvm2: security cleanup
9
10 Bug: https://bugs.gentoo.org/709686
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 sys-fs/lvm2/Manifest | 2 -
15 sys-fs/lvm2/files/lvm.rc-2.02.184-r3 | 154 -------------------
16 sys-fs/lvm2/lvm2-2.02.184-r5.ebuild | 273 ----------------------------------
17 sys-fs/lvm2/lvm2-2.02.186-r2.ebuild | 279 -----------------------------------
18 sys-fs/lvm2/lvm2-2.02.187.ebuild | 279 -----------------------------------
19 5 files changed, 987 deletions(-)
20
21 diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
22 index 70cf42f7af5..b6e98da43b4 100644
23 --- a/sys-fs/lvm2/Manifest
24 +++ b/sys-fs/lvm2/Manifest
25 @@ -1,4 +1,2 @@
26 -DIST LVM2.2.02.184.tgz 2383698 BLAKE2B b6e308d76d541b9461dfcc6e82db256a175ccdabfae9c9d57d84eabd0d5ea50e3e09954b34741903e027412c2c26f72a5005fe934261576337a810738139deb8 SHA512 9db74f675e7c58f663a39afb79b6f33a33ad2cfbda63e9783ef5027f33977b4a1262a2e6754aa67c586eed083ee119a2e837c32a7746dcc53f13877c9d65c390
27 -DIST LVM2.2.02.186.tgz 2389759 BLAKE2B e094c0135d455386ea5789208899d4dbdd5e78bebf52e49ab5587f881fbc2b94c6accecacf1b4ed182b0c87046402c00a47a1b724795a94fe3ec998b580a77ae SHA512 06a1c00142ee41d8a576a5e06a5beae70baced3020e753ce3b612355cc4d9e33be4acf58569d49436c4ee1118d288d884c7301b7d886074eaf9f2fa6b0248c03
28 DIST LVM2.2.02.187.tgz 2405544 BLAKE2B be804be3c64927a8848e8ea8de228fb563b6f8c22628b785aabb33fc993629e5370788216bd814246aeb3a5546fd5446383ce24342e716579887556edf2bbed2 SHA512 3ce56f0c0d2e7dbcdae5be263199f73ee5c4c052599d53cde9b16500a326d0340893344f4671839be06b5b4225d592175d01c9974db14f2dc220d6e9a1d47e91
29 DIST LVM2.2.03.09.tgz 2476346 BLAKE2B 0987b19bc39ef218fe5a79d6035d6e3d5b59fc75ee94e401148f91437faedfa73295fcaefd97a7606ae9d158b000fa5de4e2a72e89da1e1ad27759f7b821489b SHA512 8540e46a6025ab14b592ccd9493b3224ffc0f962739a0a8de6d7b25c65c6ad96fc83ddb0e3d877b123a5e1b104476d0c20ccee2ead6d322257ec82ad1e3362d4
30
31 diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.184-r3 b/sys-fs/lvm2/files/lvm.rc-2.02.184-r3
32 deleted file mode 100644
33 index b48efb0c99a..00000000000
34 --- a/sys-fs/lvm2/files/lvm.rc-2.02.184-r3
35 +++ /dev/null
36 @@ -1,154 +0,0 @@
37 -#!/sbin/openrc-run
38 -# Copyright 1999-2019 Gentoo Authors
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -_get_lvm_path() {
42 - local lvm_path=
43 - for lvm_path in /bin/lvm /sbin/lvm ; do
44 - [ -x "$lvm_path" ] && break
45 - done
46 - echo "${lvm_path}"
47 -}
48 -
49 -_need_lvmetad()
50 -{
51 - local lvm_path="$(_get_lvm_path)"
52 - [ ! -x "${lvm_path}" ] && return 1
53 - ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
54 -}
55 -
56 -_need_lvmlockd()
57 -{
58 - local lvm_path="$(_get_lvm_path)"
59 - [ ! -x "${lvm_path}" ] && return 1
60 - ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
61 -}
62 -
63 -depend() {
64 - before checkfs fsck
65 - after modules device-mapper
66 - # We may use lvmetad based on the configuration. If we added lvmetad
67 - # support while lvm2 is running then we aren't dependent on it. For the
68 - # more common case, if its disabled in the config we aren't dependent
69 - # on it.
70 - config /etc/lvm/lvm.conf
71 - local _need=
72 - if service_started; then
73 - _need=$(service_get_value need)
74 - else
75 - if _need_lvmetad; then
76 - _need="${_need} lvmetad"
77 - fi
78 - if _need_lvmlockd; then
79 - _need="${_need} lvmlockd"
80 - fi
81 - fi
82 - # Make sure you review /etc/conf.d/lvm as well!
83 - # Depending on your system, it might also introduce udev & mdraid
84 - need sysfs ${_need}
85 -}
86 -
87 -config='global { locking_dir = "/run/lock/lvm" }'
88 -
89 -dm_in_proc() {
90 - local retval=0
91 - for x in devices misc ; do
92 - grep -qs 'device-mapper' /proc/${x}
93 - retval=$((${retval} + $?))
94 - done
95 - return ${retval}
96 -}
97 -
98 -start() {
99 - # LVM support for /usr, /home, /opt ....
100 - # This should be done *before* checking local
101 - # volumes, or they never get checked.
102 -
103 - # NOTE: Add needed modules for LVM or RAID, etc
104 - # to /etc/modules.autoload if needed
105 - lvm_path="$(_get_lvm_path)"
106 - for lvm_path in /bin/lvm /sbin/lvm ; do
107 - [ -x "$lvm_path" ] && break
108 - done
109 - if [ ! -x "$lvm_path" ]; then
110 - eerror "Cannot find lvm binary in /sbin or /bin!"
111 - return 1
112 - fi
113 - if [ -z "${CDBOOT}" ] ; then
114 - if [ -e /proc/modules ] && ! dm_in_proc ; then
115 - modprobe dm-mod 2>/dev/null
116 - fi
117 - if [ -d /proc/lvm ] || dm_in_proc ; then
118 - ebegin "Setting up the Logical Volume Manager"
119 - #still echo stderr for debugging
120 - lvm_commands="#!${lvm_path}\n"
121 - # Extra PV find pass because some devices might not have been available until very recently
122 - lvm_commands="${lvm_commands}pvscan --config '${config}'\n"
123 - # Now make the nodes
124 - lvm_commands="${lvm_commands}vgscan --config '${config}' --mknodes\n"
125 - # And turn them on!
126 - lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ly\n"
127 - if _need_lvmlockd; then
128 - # Start lockd VGs as required
129 - lvm_commands="${lvm_commands}vgchange --config '${config}' --lock-start --lock-opt auto\n"
130 - fi
131 - # Order of this is important, have to work around dash and LVM readline
132 - printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 >/dev/null
133 - eend $? "Failed to setup the LVM"
134 - fi
135 - fi
136 -}
137 -
138 -start_post()
139 -{
140 - # Save if we needed lvmetad
141 - if _need_lvmetad; then
142 - service_set_value need lvmetad
143 - fi
144 -}
145 -
146 -stop() {
147 - for lvm_path in /bin/lvm /sbin/lvm ; do
148 - [ -x "$lvm_path" ] && break
149 - done
150 - if [ ! -x "$lvm_path" ]; then
151 - eerror "Cannot find lvm binary in /sbin or /bin!"
152 - return 1
153 - fi
154 -
155 - # Stop LVM2
156 - if [ -x /sbin/vgs ] && \
157 - [ -x /sbin/vgchange ] && \
158 - [ -x /sbin/lvchange ] && \
159 - [ -f /etc/lvmtab -o -d /etc/lvm ] && \
160 - [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
161 - then
162 - einfo "Shutting down the Logical Volume Manager"
163 -
164 - VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
165 -
166 - if [ "$VGS" ]
167 - then
168 - local _ending="eend"
169 - [ "$RC_RUNLEVEL" = shutdown ] && _ending="ewend"
170 - ebegin " Shutting Down LVs & VGs"
171 - #still echo stderr for debugging
172 - lvm_commands="#!${lvm_path}\n"
173 - # Extra PV find pass because some devices might not have been available until very recently
174 - lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n"
175 - # Now make the nodes
176 - lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n"
177 - # Order of this is important, have to work around dash and LVM readline
178 - printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
179 - rc=$?
180 - msg="Failed (possibly some LVs still needed for /usr or root)"
181 - [ "$RC_RUNLEVEL" = shutdown ] && msg="${msg} [rc=$rc]" && rc=0
182 - ${_ending} $rc "${msg}"
183 - fi
184 -
185 - einfo "Finished shutting down the Logical Volume Manager"
186 - return 0
187 - fi
188 -}
189 -
190 -# vim:ts=4
191
192 diff --git a/sys-fs/lvm2/lvm2-2.02.184-r5.ebuild b/sys-fs/lvm2/lvm2-2.02.184-r5.ebuild
193 deleted file mode 100644
194 index 474d4866558..00000000000
195 --- a/sys-fs/lvm2/lvm2-2.02.184-r5.ebuild
196 +++ /dev/null
197 @@ -1,273 +0,0 @@
198 -# Copyright 1999-2020 Gentoo Authors
199 -# Distributed under the terms of the GNU General Public License v2
200 -
201 -EAPI=6
202 -inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic
203 -
204 -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
205 -HOMEPAGE="https://sourceware.org/lvm2/"
206 -SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
207 - ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
208 -
209 -LICENSE="GPL-2"
210 -SLOT="0"
211 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
212 -IUSE="readline static static-libs systemd lvm2create_initrd sanlock selinux +udev +thin device-mapper-only"
213 -REQUIRED_USE="device-mapper-only? ( !lvm2create_initrd !sanlock !thin )
214 - systemd? ( udev )"
215 -
216 -DEPEND_COMMON="
217 - dev-libs/libaio[static-libs?]
218 - static? ( dev-libs/libaio[static-libs] )
219 - !static? ( dev-libs/libaio[static-libs?] )
220 - readline? ( sys-libs/readline:0= )
221 - sanlock? ( sys-cluster/sanlock )
222 - systemd? ( >=sys-apps/systemd-205:0= )
223 - udev? ( >=virtual/libudev-208:=[static-libs(-)?] )"
224 -# /run is now required for locking during early boot. /var cannot be assumed to
225 -# be available -- thus, pull in recent enough baselayout for /run.
226 -# This version of LVM is incompatible with cryptsetup <1.1.2.
227 -RDEPEND="${DEPEND_COMMON}
228 - >=sys-apps/baselayout-2.2
229 - !<sys-apps/openrc-0.11
230 - !<sys-fs/cryptsetup-1.1.2
231 - !!sys-fs/lvm-user
232 - >=sys-apps/util-linux-2.16
233 - lvm2create_initrd? ( sys-apps/makedev )
234 - thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
235 -# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
236 -# USE 'static' currently only works with eudev, bug 520450
237 -DEPEND="${DEPEND_COMMON}
238 - virtual/pkgconfig
239 - >=sys-devel/binutils-2.20.1-r1
240 - sys-devel/autoconf-archive
241 - static? (
242 - selinux? ( sys-libs/libselinux[static-libs] )
243 - udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
244 - >=sys-apps/util-linux-2.16[static-libs]
245 - )"
246 -
247 -S=${WORKDIR}/${PN/lvm/LVM}.${PV}
248 -
249 -PATCHES=(
250 - # Gentoo specific modification(s):
251 - "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
252 -
253 - # For upstream -- review and forward:
254 - "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
255 - "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
256 - "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
257 - "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
258 - "${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
259 - "${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
260 - "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
261 - "${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
262 - "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
263 - "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
264 - #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
265 - "${FILESDIR}"/${PN}-2.02.184-dmeventd-no-idle-exit.patch
266 - "${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380
267 -)
268 -
269 -pkg_setup() {
270 - local CONFIG_CHECK="~SYSVIPC"
271 -
272 - if use udev; then
273 - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
274 - if linux_config_exists; then
275 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
276 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
277 - ewarn "It's recommended to set an empty value to the following kernel config option:"
278 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
279 - fi
280 - fi
281 - fi
282 -
283 - check_extra_config
284 -
285 - # 1. Genkernel no longer copies /sbin/lvm blindly.
286 - if use static; then
287 - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
288 - elog "their static versions. If you need the static binaries,"
289 - elog "you must append .static to the filename!"
290 - fi
291 -}
292 -
293 -src_prepare() {
294 - default
295 -
296 - sed -i \
297 - -e "1iAR = $(tc-getAR)" \
298 - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
299 - make.tmpl.in || die #444082
300 -
301 - sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212
302 -
303 - if use udev && ! use device-mapper-only; then
304 - sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
305 - elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
306 - elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
307 - elog "if it was previously disabled."
308 - fi
309 -
310 - sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
311 -
312 - # Without thin-privision-tools, there is nothing to install for target install_man7:
313 - if ! use thin ; then
314 - sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die
315 - fi
316 -
317 - eautoreconf
318 -}
319 -
320 -src_configure() {
321 - filter-flags -flto
322 - local myeconfargs=()
323 -
324 - # Most of this package does weird stuff.
325 - # The build options are tristate, and --without is NOT supported
326 - # options: 'none', 'internal', 'shared'
327 - myeconfargs+=(
328 - $(use_enable !device-mapper-only dmfilemapd)
329 - $(use_enable !device-mapper-only dmeventd)
330 - $(use_enable !device-mapper-only cmdlib)
331 - $(use_enable !device-mapper-only applib)
332 - $(use_enable !device-mapper-only fsadm)
333 - $(use_enable !device-mapper-only lvmetad)
334 - $(use_enable !device-mapper-only lvmpolld)
335 - $(usex device-mapper-only --disable-udev-systemd-background-jobs '')
336 -
337 - # This only causes the .static versions to become available
338 - $(usex static --enable-static_link '')
339 -
340 - # dmeventd requires mirrors to be internal, and snapshot available
341 - # so we cannot disable them
342 - --with-mirrors="$(usex device-mapper-only none internal)"
343 - --with-snapshots="$(usex device-mapper-only none internal)"
344 -
345 - # disable O_DIRECT support on hppa, breaks pv detection (#99532)
346 - $(usex hppa --disable-o_direct '')
347 - )
348 -
349 - if use thin; then
350 - myeconfargs+=( --with-thin=internal --with-cache=internal )
351 - local texec
352 - for texec in check dump repair restore; do
353 - myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
354 - myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
355 - done
356 - else
357 - myeconfargs+=( --with-thin=none --with-cache=none )
358 - fi
359 -
360 - myeconfargs+=( --with-clvmd=none --with-cluster=none )
361 -
362 - myeconfargs+=(
363 - $(use_enable readline)
364 - $(use_enable selinux)
365 - --enable-pkgconfig
366 - --with-confdir="${EPREFIX}"/etc
367 - --exec-prefix="${EPREFIX}"
368 - --sbindir="${EPREFIX}/sbin"
369 - --with-staticdir="${EPREFIX}"/sbin
370 - --libdir="${EPREFIX}/$(get_libdir)"
371 - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)"
372 - --with-default-dm-run-dir=/run
373 - --with-default-run-dir=/run/lvm
374 - --with-default-locking-dir=/run/lock/lvm
375 - --with-default-pid-dir=/run
376 - $(use_enable udev udev_rules)
377 - $(use_enable udev udev_sync)
378 - $(use_with udev udevdir "$(get_udevdir)"/rules.d)
379 - $(use_enable sanlock lvmlockd-sanlock)
380 - $(use_enable systemd udev-systemd-background-jobs)
381 - $(use_enable systemd notify-dbus)
382 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
383 - CLDFLAGS="${LDFLAGS}"
384 - )
385 - # Hard-wire this to bash as some shells (dash) don't know
386 - # "-o pipefail" #682404
387 - CONFIG_SHELL="/bin/bash" \
388 - econf "${myeconfargs[@]}"
389 -}
390 -
391 -src_compile() {
392 - pushd include >/dev/null
393 - emake
394 - popd >/dev/null
395 -
396 - if use device-mapper-only ; then
397 - emake device-mapper
398 - else
399 - emake
400 - emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
401 - fi
402 -}
403 -
404 -src_install() {
405 - local inst INSTALL_TARGETS
406 - INSTALL_TARGETS=( install install_tmpfiles_configuration )
407 - # install systemd related files only when requested, bug #522430
408 - use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators )
409 - use device-mapper-only && INSTALL_TARGETS=( install_device-mapper )
410 - for inst in ${INSTALL_TARGETS[@]}; do
411 - emake DESTDIR="${D}" ${inst}
412 - done
413 -
414 - newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
415 - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
416 -
417 - if use !device-mapper-only ; then
418 - newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd
419 - newinitd "${FILESDIR}"/lvm.rc-2.02.184-r3 lvm
420 - newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm
421 - if ! use udev ; then
422 - # We keep the variable but remove udev from it.
423 - sed -r -i \
424 - -e '/^rc_need=/s/\<udev\>//g' \
425 - "${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need"
426 - fi
427 -
428 - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
429 - newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
430 - newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld
431 - fi
432 -
433 - if use sanlock; then
434 - newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
435 - fi
436 -
437 - if use static-libs; then
438 - dolib.a libdm/ioctl/libdevmapper.a
439 - if use !device-mapper-only ; then
440 - dolib.a libdaemon/client/libdaemonclient.a #462908
441 - dolib.a daemons/dmeventd/libdevmapper-event.a
442 - fi
443 - else
444 - rm -f "${ED%/}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
445 - fi
446 -
447 - if use lvm2create_initrd; then
448 - dosbin scripts/lvm2create_initrd/lvm2create_initrd
449 - doman scripts/lvm2create_initrd/lvm2create_initrd.8
450 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
451 - fi
452 -
453 - insinto /etc
454 - doins "${FILESDIR}"/dmtab
455 -
456 - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
457 -}
458 -
459 -pkg_postinst() {
460 - ewarn "Make sure the \"lvm\" init script is in the runlevels:"
461 - ewarn "# rc-update add lvm boot"
462 - ewarn
463 - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
464 - ewarn "to enable lvm autoactivation and metadata caching."
465 -}
466 -
467 -src_test() {
468 - einfo "Tests are disabled because of device-node mucking, if you want to"
469 - einfo "run tests, compile the package and see ${S}/tests"
470 -}
471
472 diff --git a/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild
473 deleted file mode 100644
474 index b8abffaea8a..00000000000
475 --- a/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild
476 +++ /dev/null
477 @@ -1,279 +0,0 @@
478 -# Copyright 1999-2020 Gentoo Authors
479 -# Distributed under the terms of the GNU General Public License v2
480 -
481 -EAPI=7
482 -inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic
483 -
484 -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
485 -HOMEPAGE="https://sourceware.org/lvm2/"
486 -SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
487 - ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
488 -
489 -LICENSE="GPL-2"
490 -SLOT="0"
491 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
492 -IUSE="readline static static-libs systemd lvm2create_initrd sanlock selinux +udev +thin device-mapper-only"
493 -REQUIRED_USE="device-mapper-only? ( !lvm2create_initrd !sanlock !thin )
494 - systemd? ( udev )"
495 -
496 -DEPEND_COMMON="
497 - dev-libs/libaio[static-libs?]
498 - static? ( dev-libs/libaio[static-libs] )
499 - !static? ( dev-libs/libaio[static-libs?] )
500 - readline? ( sys-libs/readline:0= )
501 - sanlock? ( sys-cluster/sanlock )
502 - systemd? ( >=sys-apps/systemd-205:0= )
503 - udev? ( >=virtual/libudev-208:=[static-libs(-)?] )"
504 -# /run is now required for locking during early boot. /var cannot be assumed to
505 -# be available -- thus, pull in recent enough baselayout for /run.
506 -# This version of LVM is incompatible with cryptsetup <1.1.2.
507 -RDEPEND="${DEPEND_COMMON}
508 - >=sys-apps/baselayout-2.2
509 - !<sys-apps/openrc-0.11
510 - !<sys-fs/cryptsetup-1.1.2
511 - !!sys-fs/lvm-user
512 - >=sys-apps/util-linux-2.16
513 - lvm2create_initrd? ( sys-apps/makedev )
514 - thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
515 -# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
516 -# USE 'static' currently only works with eudev, bug 520450
517 -DEPEND="${DEPEND_COMMON}
518 - >=sys-devel/binutils-2.20.1-r1
519 - static? (
520 - selinux? ( sys-libs/libselinux[static-libs] )
521 - udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
522 - >=sys-apps/util-linux-2.16[static-libs]
523 - )"
524 -BDEPEND="
525 - sys-devel/autoconf-archive
526 - virtual/pkgconfig
527 -"
528 -
529 -S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
530 -
531 -PATCHES=(
532 - # Gentoo specific modification(s):
533 - "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
534 -
535 - # For upstream -- review and forward:
536 - "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
537 - "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
538 - "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
539 - "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
540 - "${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
541 - "${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
542 - "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
543 - "${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
544 - "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
545 - "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
546 - #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
547 - "${FILESDIR}"/${PN}-2.02.184-dmeventd-no-idle-exit.patch
548 - #"${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380 # merged upstream
549 - "${FILESDIR}"/${PN}-2.02.184-mksh_build.patch #686652
550 - "${FILESDIR}"/${PN}-2.02.186-udev_remove_unsupported_option.patch #700160
551 -)
552 -
553 -pkg_setup() {
554 - local CONFIG_CHECK="~SYSVIPC"
555 -
556 - if use udev; then
557 - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
558 - if linux_config_exists; then
559 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
560 - if [[ -n "${uevent_helper_path}" ]] && [[ "${uevent_helper_path}" != '""' ]]; then
561 - ewarn "It's recommended to set an empty value to the following kernel config option:"
562 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
563 - fi
564 - fi
565 - fi
566 -
567 - check_extra_config
568 -
569 - # 1. Genkernel no longer copies /sbin/lvm blindly.
570 - if use static; then
571 - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
572 - elog "their static versions. If you need the static binaries,"
573 - elog "you must append .static to the filename!"
574 - fi
575 -}
576 -
577 -src_prepare() {
578 - default
579 -
580 - sed -i \
581 - -e "1iAR = $(tc-getAR)" \
582 - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
583 - make.tmpl.in || die #444082
584 -
585 - sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212
586 -
587 - if use udev && ! use device-mapper-only; then
588 - sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
589 - elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
590 - elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
591 - elog "if it was previously disabled."
592 - fi
593 -
594 - sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
595 -
596 - # Don't install thin man page when not requested
597 - if ! use thin ; then
598 - sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' man/Makefile.in || die
599 - fi
600 -
601 - eautoreconf
602 -}
603 -
604 -src_configure() {
605 - filter-flags -flto
606 - local myeconfargs=()
607 -
608 - # Most of this package does weird stuff.
609 - # The build options are tristate, and --without is NOT supported
610 - # options: 'none', 'internal', 'shared'
611 - myeconfargs+=(
612 - $(use_enable !device-mapper-only dmfilemapd)
613 - $(use_enable !device-mapper-only dmeventd)
614 - $(use_enable !device-mapper-only cmdlib)
615 - $(use_enable !device-mapper-only applib)
616 - $(use_enable !device-mapper-only fsadm)
617 - $(use_enable !device-mapper-only lvmetad)
618 - $(use_enable !device-mapper-only lvmpolld)
619 - $(usex device-mapper-only --disable-udev-systemd-background-jobs '')
620 -
621 - # This only causes the .static versions to become available
622 - $(usex static --enable-static_link '')
623 -
624 - # dmeventd requires mirrors to be internal, and snapshot available
625 - # so we cannot disable them
626 - --with-mirrors="$(usex device-mapper-only none internal)"
627 - --with-snapshots="$(usex device-mapper-only none internal)"
628 -
629 - # disable O_DIRECT support on hppa, breaks pv detection (#99532)
630 - $(usex hppa --disable-o_direct '')
631 - )
632 -
633 - if use thin; then
634 - myeconfargs+=( --with-thin=internal --with-cache=internal )
635 - local texec
636 - for texec in check dump repair restore; do
637 - myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
638 - myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
639 - done
640 - else
641 - myeconfargs+=( --with-thin=none --with-cache=none )
642 - fi
643 -
644 - myeconfargs+=( --with-clvmd=none --with-cluster=none )
645 -
646 - myeconfargs+=(
647 - $(use_enable readline)
648 - $(use_enable selinux)
649 - --enable-pkgconfig
650 - --with-confdir="${EPREFIX}"/etc
651 - --exec-prefix="${EPREFIX}"
652 - --sbindir="${EPREFIX}/sbin"
653 - --with-staticdir="${EPREFIX}"/sbin
654 - --libdir="${EPREFIX}/$(get_libdir)"
655 - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)"
656 - --with-default-dm-run-dir=/run
657 - --with-default-run-dir=/run/lvm
658 - --with-default-locking-dir=/run/lock/lvm
659 - --with-default-pid-dir=/run
660 - $(use_enable udev udev_rules)
661 - $(use_enable udev udev_sync)
662 - $(use_with udev udevdir "$(get_udevdir)"/rules.d)
663 - $(use_enable sanlock lvmlockd-sanlock)
664 - $(use_enable systemd udev-systemd-background-jobs)
665 - $(use_enable systemd notify-dbus)
666 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
667 - CLDFLAGS="${LDFLAGS}"
668 - )
669 - # Hard-wire this to bash as some shells (dash) don't know
670 - # "-o pipefail" #682404
671 - CONFIG_SHELL="/bin/bash" \
672 - econf "${myeconfargs[@]}"
673 -}
674 -
675 -src_compile() {
676 - pushd include >/dev/null
677 - emake V=1
678 - popd >/dev/null
679 -
680 - if use device-mapper-only ; then
681 - emake V=1 device-mapper
682 - else
683 - emake V=1
684 - emake V=1 CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
685 - fi
686 -}
687 -
688 -src_install() {
689 - local inst INSTALL_TARGETS
690 - INSTALL_TARGETS=( install install_tmpfiles_configuration )
691 - # install systemd related files only when requested, bug #522430
692 - use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators )
693 - use device-mapper-only && INSTALL_TARGETS=( install_device-mapper )
694 - for inst in ${INSTALL_TARGETS[@]}; do
695 - emake V=1 DESTDIR="${D}" ${inst}
696 - done
697 -
698 - newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
699 - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
700 -
701 - if use !device-mapper-only ; then
702 - newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd
703 - newinitd "${FILESDIR}"/lvm.rc-2.02.184-r3 lvm
704 - newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm
705 - if ! use udev ; then
706 - # We keep the variable but remove udev from it.
707 - sed -r -i \
708 - -e '/^rc_need=/s/\<udev\>//g' \
709 - "${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need"
710 - fi
711 -
712 - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
713 - newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
714 - newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld
715 - fi
716 -
717 - if use sanlock; then
718 - newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
719 - fi
720 -
721 - if use static-libs; then
722 - dolib.a libdm/ioctl/libdevmapper.a
723 - if use !device-mapper-only; then
724 - # depends on lvmetad
725 - dolib.a libdaemon/client/libdaemonclient.a #462908
726 - # depends on dmeventd
727 - dolib.a daemons/dmeventd/libdevmapper-event.a
728 - fi
729 - else
730 - rm -f "${ED}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
731 - fi
732 -
733 - if use lvm2create_initrd; then
734 - dosbin scripts/lvm2create_initrd/lvm2create_initrd
735 - doman scripts/lvm2create_initrd/lvm2create_initrd.8
736 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
737 - fi
738 -
739 - insinto /etc
740 - doins "${FILESDIR}"/dmtab
741 -
742 - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
743 -}
744 -
745 -pkg_postinst() {
746 - ewarn "Make sure the \"lvm\" init script is in the runlevels:"
747 - ewarn "# rc-update add lvm boot"
748 - ewarn
749 - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
750 - ewarn "to enable lvm autoactivation and metadata caching."
751 -}
752 -
753 -src_test() {
754 - einfo "Tests are disabled because of device-node mucking, if you want to"
755 - einfo "run tests, compile the package and see ${S}/tests"
756 -}
757
758 diff --git a/sys-fs/lvm2/lvm2-2.02.187.ebuild b/sys-fs/lvm2/lvm2-2.02.187.ebuild
759 deleted file mode 100644
760 index 687e69b34e6..00000000000
761 --- a/sys-fs/lvm2/lvm2-2.02.187.ebuild
762 +++ /dev/null
763 @@ -1,279 +0,0 @@
764 -# Copyright 1999-2020 Gentoo Authors
765 -# Distributed under the terms of the GNU General Public License v2
766 -
767 -EAPI=7
768 -inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic
769 -
770 -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
771 -HOMEPAGE="https://sourceware.org/lvm2/"
772 -SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
773 - ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
774 -
775 -LICENSE="GPL-2"
776 -SLOT="0"
777 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
778 -IUSE="readline static static-libs systemd lvm2create_initrd sanlock selinux +udev +thin device-mapper-only"
779 -REQUIRED_USE="device-mapper-only? ( !lvm2create_initrd !sanlock !thin )
780 - systemd? ( udev )"
781 -
782 -DEPEND_COMMON="
783 - dev-libs/libaio[static-libs?]
784 - static? ( dev-libs/libaio[static-libs] )
785 - !static? ( dev-libs/libaio[static-libs?] )
786 - readline? ( sys-libs/readline:0= )
787 - sanlock? ( sys-cluster/sanlock )
788 - systemd? ( >=sys-apps/systemd-205:0= )
789 - udev? ( >=virtual/libudev-208:=[static-libs(-)?] )"
790 -# /run is now required for locking during early boot. /var cannot be assumed to
791 -# be available -- thus, pull in recent enough baselayout for /run.
792 -# This version of LVM is incompatible with cryptsetup <1.1.2.
793 -RDEPEND="${DEPEND_COMMON}
794 - >=sys-apps/baselayout-2.2
795 - !<sys-apps/openrc-0.11
796 - !<sys-fs/cryptsetup-1.1.2
797 - !!sys-fs/lvm-user
798 - >=sys-apps/util-linux-2.16
799 - lvm2create_initrd? ( sys-apps/makedev )
800 - thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
801 -# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
802 -# USE 'static' currently only works with eudev, bug 520450
803 -DEPEND="${DEPEND_COMMON}
804 - >=sys-devel/binutils-2.20.1-r1
805 - static? (
806 - selinux? ( sys-libs/libselinux[static-libs] )
807 - udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
808 - >=sys-apps/util-linux-2.16[static-libs]
809 - )"
810 -BDEPEND="
811 - sys-devel/autoconf-archive
812 - virtual/pkgconfig
813 -"
814 -
815 -S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
816 -
817 -PATCHES=(
818 - # Gentoo specific modification(s):
819 - "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
820 -
821 - # For upstream -- review and forward:
822 - "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
823 - "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
824 - "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
825 - "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
826 - "${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
827 - "${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
828 - "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
829 - "${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
830 - "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
831 - "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
832 - #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
833 - "${FILESDIR}"/${PN}-2.02.184-dmeventd-no-idle-exit.patch
834 - #"${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380 # merged upstream
835 - "${FILESDIR}"/${PN}-2.02.184-mksh_build.patch #686652
836 - "${FILESDIR}"/${PN}-2.02.186-udev_remove_unsupported_option.patch #700160
837 -)
838 -
839 -pkg_setup() {
840 - local CONFIG_CHECK="~SYSVIPC"
841 -
842 - if use udev; then
843 - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
844 - if linux_config_exists; then
845 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
846 - if [[ -n "${uevent_helper_path}" ]] && [[ "${uevent_helper_path}" != '""' ]]; then
847 - ewarn "It's recommended to set an empty value to the following kernel config option:"
848 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
849 - fi
850 - fi
851 - fi
852 -
853 - check_extra_config
854 -
855 - # 1. Genkernel no longer copies /sbin/lvm blindly.
856 - if use static; then
857 - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
858 - elog "their static versions. If you need the static binaries,"
859 - elog "you must append .static to the filename!"
860 - fi
861 -}
862 -
863 -src_prepare() {
864 - default
865 -
866 - sed -i \
867 - -e "1iAR = $(tc-getAR)" \
868 - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
869 - make.tmpl.in || die #444082
870 -
871 - sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212
872 -
873 - if use udev && ! use device-mapper-only; then
874 - sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
875 - elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
876 - elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
877 - elog "if it was previously disabled."
878 - fi
879 -
880 - sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
881 -
882 - # Don't install thin man page when not requested
883 - if ! use thin ; then
884 - sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' man/Makefile.in || die
885 - fi
886 -
887 - eautoreconf
888 -}
889 -
890 -src_configure() {
891 - filter-flags -flto
892 - local myeconfargs=()
893 -
894 - # Most of this package does weird stuff.
895 - # The build options are tristate, and --without is NOT supported
896 - # options: 'none', 'internal', 'shared'
897 - myeconfargs+=(
898 - $(use_enable !device-mapper-only dmfilemapd)
899 - $(use_enable !device-mapper-only dmeventd)
900 - $(use_enable !device-mapper-only cmdlib)
901 - $(use_enable !device-mapper-only applib)
902 - $(use_enable !device-mapper-only fsadm)
903 - $(use_enable !device-mapper-only lvmetad)
904 - $(use_enable !device-mapper-only lvmpolld)
905 - $(usex device-mapper-only --disable-udev-systemd-background-jobs '')
906 -
907 - # This only causes the .static versions to become available
908 - $(usex static --enable-static_link '')
909 -
910 - # dmeventd requires mirrors to be internal, and snapshot available
911 - # so we cannot disable them
912 - --with-mirrors="$(usex device-mapper-only none internal)"
913 - --with-snapshots="$(usex device-mapper-only none internal)"
914 -
915 - # disable O_DIRECT support on hppa, breaks pv detection (#99532)
916 - $(usex hppa --disable-o_direct '')
917 - )
918 -
919 - if use thin; then
920 - myeconfargs+=( --with-thin=internal --with-cache=internal )
921 - local texec
922 - for texec in check dump repair restore; do
923 - myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
924 - myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
925 - done
926 - else
927 - myeconfargs+=( --with-thin=none --with-cache=none )
928 - fi
929 -
930 - myeconfargs+=( --with-clvmd=none --with-cluster=none )
931 -
932 - myeconfargs+=(
933 - $(use_enable readline)
934 - $(use_enable selinux)
935 - --enable-pkgconfig
936 - --with-confdir="${EPREFIX}"/etc
937 - --exec-prefix="${EPREFIX}"
938 - --sbindir="${EPREFIX}/sbin"
939 - --with-staticdir="${EPREFIX}"/sbin
940 - --libdir="${EPREFIX}/$(get_libdir)"
941 - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)"
942 - --with-default-dm-run-dir=/run
943 - --with-default-run-dir=/run/lvm
944 - --with-default-locking-dir=/run/lock/lvm
945 - --with-default-pid-dir=/run
946 - $(use_enable udev udev_rules)
947 - $(use_enable udev udev_sync)
948 - $(use_with udev udevdir "$(get_udevdir)"/rules.d)
949 - $(use_enable sanlock lvmlockd-sanlock)
950 - $(use_enable systemd udev-systemd-background-jobs)
951 - $(use_enable systemd notify-dbus)
952 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
953 - CLDFLAGS="${LDFLAGS}"
954 - )
955 - # Hard-wire this to bash as some shells (dash) don't know
956 - # "-o pipefail" #682404
957 - CONFIG_SHELL="/bin/bash" \
958 - econf "${myeconfargs[@]}"
959 -}
960 -
961 -src_compile() {
962 - pushd include >/dev/null
963 - emake V=1
964 - popd >/dev/null
965 -
966 - if use device-mapper-only ; then
967 - emake V=1 device-mapper
968 - else
969 - emake V=1
970 - emake V=1 CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
971 - fi
972 -}
973 -
974 -src_install() {
975 - local inst INSTALL_TARGETS
976 - INSTALL_TARGETS=( install install_tmpfiles_configuration )
977 - # install systemd related files only when requested, bug #522430
978 - use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators )
979 - use device-mapper-only && INSTALL_TARGETS=( install_device-mapper )
980 - for inst in ${INSTALL_TARGETS[@]}; do
981 - emake V=1 DESTDIR="${D}" ${inst}
982 - done
983 -
984 - newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
985 - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
986 -
987 - if use !device-mapper-only ; then
988 - newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd
989 - newinitd "${FILESDIR}"/lvm.rc-2.02.184-r3 lvm
990 - newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm
991 - if ! use udev ; then
992 - # We keep the variable but remove udev from it.
993 - sed -r -i \
994 - -e '/^rc_need=/s/\<udev\>//g' \
995 - "${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need"
996 - fi
997 -
998 - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
999 - newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
1000 - newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld
1001 - fi
1002 -
1003 - if use sanlock; then
1004 - newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
1005 - fi
1006 -
1007 - if use static-libs; then
1008 - dolib.a libdm/ioctl/libdevmapper.a
1009 - if use !device-mapper-only; then
1010 - # depends on lvmetad
1011 - dolib.a libdaemon/client/libdaemonclient.a #462908
1012 - # depends on dmeventd
1013 - dolib.a daemons/dmeventd/libdevmapper-event.a
1014 - fi
1015 - else
1016 - rm -f "${ED}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
1017 - fi
1018 -
1019 - if use lvm2create_initrd; then
1020 - dosbin scripts/lvm2create_initrd/lvm2create_initrd
1021 - doman scripts/lvm2create_initrd/lvm2create_initrd.8
1022 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
1023 - fi
1024 -
1025 - insinto /etc
1026 - doins "${FILESDIR}"/dmtab
1027 -
1028 - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
1029 -}
1030 -
1031 -pkg_postinst() {
1032 - ewarn "Make sure the \"lvm\" init script is in the runlevels:"
1033 - ewarn "# rc-update add lvm boot"
1034 - ewarn
1035 - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
1036 - ewarn "to enable lvm autoactivation and metadata caching."
1037 -}
1038 -
1039 -src_test() {
1040 - einfo "Tests are disabled because of device-node mucking, if you want to"
1041 - einfo "run tests, compile the package and see ${S}/tests"
1042 -}