Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
Date: Sat, 02 Apr 2016 05:07:28
Message-Id: 1459573597.470db86bf35977a176324617aec54eb36b625921.vapier@gentoo
1 commit: 470db86bf35977a176324617aec54eb36b625921
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 2 05:06:37 2016 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 2 05:06:37 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=470db86b
7
8 sys-fs/lvm2: drop old <2.02.116 versions
9
10 sys-fs/lvm2/Manifest | 3 -
11 sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2 | 111 ---------
12 sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2 | 46 ----
13 sys-fs/lvm2/files/lvm.rc-2.02.95-r2 | 96 --------
14 .../lvm2-2.02.100-selinux_and_udev_static.patch | 93 -------
15 .../lvm2-2.02.107-static-pkgconfig-libs.patch | 104 --------
16 .../lvm2/files/lvm2-2.02.99-example.conf.in.patch | 47 ----
17 sys-fs/lvm2/lvm2-2.02.103.ebuild | 235 ------------------
18 sys-fs/lvm2/lvm2-2.02.109-r1.ebuild | 270 --------------------
19 sys-fs/lvm2/lvm2-2.02.109.ebuild | 269 --------------------
20 sys-fs/lvm2/lvm2-2.02.110.ebuild | 272 ---------------------
21 11 files changed, 1546 deletions(-)
22
23 diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
24 index b448852..3ff8f23 100644
25 --- a/sys-fs/lvm2/Manifest
26 +++ b/sys-fs/lvm2/Manifest
27 @@ -1,6 +1,3 @@
28 -DIST LVM2.2.02.103.tgz 1343887 SHA256 71c5a2e8842ed2f13f52e02b44eb183110a3410dedd1e117348e4eecc29d3c2a SHA512 1a9920947312e3e248bff7ff5d5eb54dec3f3b05eb3388fa92f95369b26ae8e6838186f87d817b09e8c635ddc3cdf51bc1d07c2a9d65fd7eab33598998bb7afe WHIRLPOOL de96dd8b7fb46ec777f34169759852ee5ef03ccdc93e110bf63c92dddb9cf4f805635444ceeead6b581610d2a23217d3b4729c286f016623f73b99c0b35a42a0
29 -DIST LVM2.2.02.109.tgz 1482167 SHA256 7bc95ba5209c8aa5bd492167b2e2797f156852ed11cfc63fb783070ade8e65e7 SHA512 210645cccf297112ffdbc63e0336385c31b2d17d226ae10813ba8ffd4f01ce07af44a4134e60644283e4360e10e925113e867378502ae0166f3fc91258caea68 WHIRLPOOL 7f2d91446f502440b2ed73df0f2ce29069364bbb198e675223b61c17e5cc6e1c162ce60a977cb07b71e44d672c688bbbf0247380f1b9c5adf325cf324f4c4bb7
30 -DIST LVM2.2.02.110.tgz 1487448 SHA256 3dad1aa04a71b8420b15f44c53f041001436539d3f8073490c2d0c52f6fecd11 SHA512 5b4dfa5ed877d34efa5b109dc712e8fa9154b4954b267b0243f1925f9d2fa8c67f4ce8da36a85f3bba6c117f6153fdbf150e3753587ab90584a86d2654dc0812 WHIRLPOOL ea221ed3e9d3f79009d7c341a7a75b52eacc5be79e28f2498e7cdc0f4a97c2bebff405b032eb8086d3b5b5aaf79da2f281c5734562355bddbe6004058e114ced
31 DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c0262f3ed599f2c0fb6f0b767 SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d WHIRLPOOL 1e89ec941882fddba62c9649be46eb5bc6c9cb899669d4bbe4a4a1023c8bf7d8264c4815ef88bb39dedcb9637815411feb826aa102e629d77b80e45e099e398d
32 DIST LVM2.2.02.136.tgz 1891010 SHA256 c6af90097d8f7cd851d38c4f57bb3ad7039cfa123f1e336dba957814a298bd8c SHA512 ebda683e7dbeb2c4860a583d47e60756d18127e37a373ab2958af8e54b9bee0d2e3370b7803d88fa4b08564345c88af55bfbac317081160118ce4b3733b69f9d WHIRLPOOL 8020fdddac648e32084801ffaf9b00b8a683870c8dd8dd5969851fd081eb1efd578decd82cd4a7a24fb6150c55afafdd819a76eb7eb6926cdc057455cc1d1618
33 DIST LVM2.2.02.139.tgz 1897293 SHA256 f423b1f2eee70efd671afc0982caa92e9413a582404057244021314172ec3a07 SHA512 f112207d7447606915026495b931bffc4c0d68d36b9a8792fe4b7abf8b743bc4559da5c79145cb4d457337118e60552f9df511e31f2799001d29d006f7946cc0 WHIRLPOOL 8a1ca0bb6946b1f6761223a4a9e7c5e3e5247ff4b85bc08734258f4616fbabb0ea7a3b22b4a245367997ad810b4b304b747d8da0bd128c241fbafe645855b7f9
34
35 diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
36 deleted file mode 100644
37 index 4cd506a..0000000
38 --- a/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
39 +++ /dev/null
40 @@ -1,111 +0,0 @@
41 -#!/sbin/runscript
42 -# Copyright 1999-2013 Gentoo Foundation
43 -# Distributed under the terms of the GNU General Public License v2
44 -# $Id$
45 -
46 -depend() {
47 - # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
48 - # means dmeventd is NOT notified, as it cannot be safely running
49 - before dmeventd checkfs fsck
50 - after modules
51 -}
52 -
53 -dm_in_proc() {
54 - local retval=0
55 - for x in devices misc ; do
56 - grep -qs 'device-mapper' /proc/${x}
57 - retval=$((${retval} + $?))
58 - done
59 - return ${retval}
60 -}
61 -
62 -# char **get_new_dm_volumes(void)
63 -#
64 -# Return dmsetup commands to setup volumes
65 -get_new_dm_volumes() {
66 - local volume params
67 -
68 - # Filter comments and blank lines
69 - grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
70 - while read volume params ; do
71 - # If it exists, skip it
72 - dmvolume_exists "${volume%:}" && continue
73 - # Assemble the command to run to create volume
74 - echo "echo ${params} | /sbin/dmsetup create ${volume%:}"
75 - done
76 -
77 - return 0
78 -}
79 -
80 -# int dmvolume_exists(volume)
81 -#
82 -# Return true if volume exists in DM table
83 -dmvolume_exists() {
84 - local x line volume=$1
85 -
86 - [ -z "${volume}" ] && return 1
87 -
88 - /sbin/dmsetup ls 2>/dev/null | \
89 - while read line ; do
90 - for x in ${line} ; do
91 - # the following conditonal return only breaks out
92 - # of the while loop, as it is running in a pipe.
93 - [ "${x}" = "${volume}" ] && return 1
94 - # We only want to check the volume name
95 - break
96 - done
97 - done
98 -
99 - # if 1 was returned from the above loop, then indicate that
100 - # volume exists
101 - [ $? = 1 ] && return 0
102 -
103 - # otherwise the loop exited normally and the volume does not
104 - # exist
105 - return 1
106 -}
107 -
108 -# int is_empty_dm_volume(volume)
109 -#
110 -# Return true if the volume exists in DM table, but is empty/non-valid
111 -is_empty_dm_volume() {
112 - local table volume=$1
113 -
114 - set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:")
115 - [ "${volume}" = "$1" -a -z "$2" ]
116 -}
117 -
118 -
119 -start() {
120 - if [ -e /proc/modules ] && ! dm_in_proc ; then
121 - modprobe dm-mod 2>/dev/null
122 - fi
123 - # Ensure the dirs exist for locking and running
124 - checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm
125 -
126 - local x volume
127 -
128 - if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then
129 - [ -n "$(get_new_dm_volumes)" ] && \
130 - einfo " Setting up device-mapper volumes:"
131 -
132 - get_new_dm_volumes | \
133 - while read x ; do
134 - [ -n "${x}" ] || continue
135 -
136 - volume="${x##* }"
137 -
138 - ebegin " Creating volume: ${volume}"
139 - if ! eval "${x}" >/dev/null 2>/dev/null ; then
140 - eend 1 " Error creating volume: ${volume}"
141 - # dmsetup still adds an empty volume in some cases,
142 - # so lets remove it
143 - is_empty_dm_volume "${volume}" && \
144 - /sbin/dmsetup remove "${volume}" 2>/dev/null
145 - else
146 - eend 0
147 - fi
148 - done
149 - fi
150 -}
151 -
152
153 diff --git a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2 b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2
154 deleted file mode 100644
155 index 2a96706..0000000
156 --- a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2
157 +++ /dev/null
158 @@ -1,46 +0,0 @@
159 -#!/sbin/runscript
160 -# Copyright 1999-2013 Gentoo Foundation
161 -# Distributed under the terms of the GNU General Public License v2
162 -# $Id$
163 -
164 -# This script is based on upstream file
165 -# LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in
166 -
167 -depend() {
168 - # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
169 - # means dmeventd is NOT notified, as it cannot be safely running
170 - need lvm dmeventd
171 -}
172 -
173 -VGCHANGE=/sbin/vgchange
174 -VGS=/sbin/vgs
175 -
176 -start() {
177 - ret=0
178 - # TODO do we want to separate out already active groups only?
179 - VGSLIST=`$VGS --noheadings -o name 2> /dev/null`
180 - for vg in $VGSLIST
181 - do
182 - ebegin "Starting LVM monitoring for VG $vg:"
183 - $VGCHANGE --monitor y --poll y $vg
184 - ret2=$?
185 - eend $ret2
186 - [ $ret2 -ne 0 ] && ret=$ret2
187 - done
188 - return $ret
189 -}
190 -
191 -stop() {
192 - ret=0
193 - # TODO do we want to separate out already active groups only?
194 - VGSLIST=`$VGS --noheadings -o name 2> /dev/null`
195 - for vg in $VGSLIST
196 - do
197 - ebegin "Stopping LVM monitoring for VG $vg:"
198 - $VGCHANGE --monitor n $vg
199 - ret2=$?
200 - eend $ret2
201 - [ $ret2 -ne 0 ] && ret=$ret2
202 - done
203 - return $ret
204 -}
205
206 diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.95-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.95-r2
207 deleted file mode 100644
208 index d0d9e31..0000000
209 --- a/sys-fs/lvm2/files/lvm.rc-2.02.95-r2
210 +++ /dev/null
211 @@ -1,96 +0,0 @@
212 -#!/sbin/runscript
213 -# Copyright 1999-2013 Gentoo Foundation
214 -# Distributed under the terms of the GNU General Public License v2
215 -# $Id$
216 -
217 -depend() {
218 - use dmeventd
219 - before checkfs fsck
220 - after dmeventd modules device-mapper
221 -}
222 -
223 -config='global { locking_dir = "/run/lock/lvm" }'
224 -
225 -dm_in_proc() {
226 - local retval=0
227 - for x in devices misc ; do
228 - grep -qs 'device-mapper' /proc/${x}
229 - retval=$((${retval} + $?))
230 - done
231 - return ${retval}
232 -}
233 -
234 -start() {
235 - # LVM support for /usr, /home, /opt ....
236 - # This should be done *before* checking local
237 - # volumes, or they never get checked.
238 -
239 - # NOTE: Add needed modules for LVM or RAID, etc
240 - # to /etc/modules.autoload if needed
241 - for lvm_path in /bin/lvm /sbin/lvm ; do
242 - [ -x "$lvm_path" ] && break
243 - done
244 - if [ ! -x "$lvm_path" ]; then
245 - eerror "Cannot find lvm binary in /sbin or /bin!"
246 - return 1
247 - fi
248 - if [ -z "${CDBOOT}" ] ; then
249 - if [ -e /proc/modules ] && ! dm_in_proc ; then
250 - modprobe dm-mod 2>/dev/null
251 - fi
252 - if [ -d /proc/lvm ] || dm_in_proc ; then
253 - ebegin "Setting up the Logical Volume Manager"
254 - #still echo stderr for debugging
255 - lvm_commands="#! ${lvm_path} --config '${config}'\n"
256 - # Extra PV find pass because some devices might not have been available until very recently
257 - lvm_commands="${lvm_commands}pvscan\n"
258 - # Now make the nodes
259 - lvm_commands="${lvm_commands}vgscan --mknodes\n"
260 - # And turn them on!
261 - lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
262 - # Order of this is important, have to work around dash and LVM readline
263 - printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
264 - eend $? "Failed to setup the LVM"
265 - fi
266 - fi
267 -}
268 -
269 -stop() {
270 - for lvm_path in /bin/lvm /sbin/lvm ; do
271 - [ -x "$lvm_path" ] && break
272 - done
273 - if [ ! -x "$lvm_path" ]; then
274 - eerror "Cannot find lvm binary in /sbin or /bin!"
275 - return 1
276 - fi
277 -# Stop LVM2
278 -if [ -x /sbin/vgs ] && \
279 - [ -x /sbin/vgchange ] && \
280 - [ -x /sbin/lvchange ] && \
281 - [ -f /etc/lvmtab -o -d /etc/lvm ] && \
282 - [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
283 -then
284 - einfo "Shutting down the Logical Volume Manager"
285 -
286 -
287 - VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix 2> /dev/null)
288 -
289 - if [ "$VGS" ]
290 - then
291 - ebegin " Shutting Down LVs & VGs"
292 - #still echo stderr for debugging
293 - lvm_commands="#! ${lvm_path} --config '${config}'\n"
294 - # Extra PV find pass because some devices might not have been available until very recently
295 - lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
296 - # Now make the nodes
297 - lvm_commands="${lvm_commands}vgchange --sysinit -a ln\n"
298 - # Order of this is important, have to work around dash and LVM readline
299 - printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
300 - eend $? "Failed"
301 - fi
302 -
303 - einfo "Finished Shutting down the Logical Volume Manager"
304 -fi
305 -}
306 -
307 -# vim:ts=4
308
309 diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch b/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch
310 deleted file mode 100644
311 index d6c8e5f..0000000
312 --- a/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch
313 +++ /dev/null
314 @@ -1,93 +0,0 @@
315 -diff -ur LVM2.2.02.100.orig/configure.in LVM2.2.02.100/configure.in
316 ---- LVM2.2.02.100.orig/configure.in 2013-08-13 13:44:43.000000000 +0300
317 -+++ LVM2.2.02.100/configure.in 2013-09-12 23:23:19.365329440 +0300
318 -@@ -954,6 +954,7 @@
319 - pkg_config_init
320 - fi
321 - PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
322 -+ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
323 - AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
324 - fi
325 -
326 -@@ -1199,19 +1200,32 @@
327 - if test x$SELINUX = xyes; then
328 - AC_CHECK_LIB([sepol], [sepol_check_context], [
329 - AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
330 -- SELINUX_LIBS="-lsepol"])
331 -+ SEPOL_LIBS="-lsepol"])
332 -
333 -- AC_CHECK_LIB([selinux], [is_selinux_enabled], [
334 -- AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
335 -- AC_CHECK_HEADERS([selinux/label.h])
336 -- AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
337 -- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
338 -+ dnl -- init pkgconfig if required
339 -+ if test x$PKGCONFIG_INIT != x1; then
340 -+ pkg_config_init
341 -+ fi
342 -+ PKG_CHECK_MODULES(SELINUX, libselinux, [
343 - SELINUX_PC="libselinux"
344 -- HAVE_SELINUX=yes ], [
345 -- AC_MSG_WARN(Disabling selinux)
346 -- SELINUX_LIBS=
347 -- SELINUX_PC=
348 -- HAVE_SELINUX=no ])
349 -+ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
350 -+ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
351 -+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
352 -+ ],[
353 -+ dnl -- old non-pkgconfig method, is buggy with static builds
354 -+ AC_CHECK_LIB([selinux], [is_selinux_enabled], [
355 -+ AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
356 -+ AC_CHECK_HEADERS([selinux/label.h])
357 -+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
358 -+ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
359 -+ SELINUX_STATIC_LIBS="$SELINUX_LIBS"
360 -+ SELINUX_PC="libselinux"
361 -+ HAVE_SELINUX=yes ], [
362 -+ AC_MSG_WARN(Disabling selinux)
363 -+ SELINUX_LIBS=
364 -+ SELINUX_PC=
365 -+ HAVE_SELINUX=no ])
366 -+ ])
367 - fi
368 -
369 - ################################################################################
370 -@@ -1615,6 +1629,7 @@
371 - AC_SUBST(SALCK_CFLAGS)
372 - AC_SUBST(SALCK_LIBS)
373 - AC_SUBST(SELINUX_LIBS)
374 -+AC_SUBST(SELINUX_STATIC_LIBS)
375 - AC_SUBST(SELINUX_PC)
376 - AC_SUBST(SNAPSHOTS)
377 - AC_SUBST(STATICDIR)
378 -@@ -1625,6 +1640,7 @@
379 - AC_SUBST(THIN_DUMP_CMD)
380 - AC_SUBST(THIN_REPAIR_CMD)
381 - AC_SUBST(UDEV_LIBS)
382 -+AC_SUBST(UDEV_STATIC_LIBS)
383 - AC_SUBST(UDEV_PC)
384 - AC_SUBST(UDEV_RULES)
385 - AC_SUBST(UDEV_SYNC)
386 -diff -ur LVM2.2.02.100.orig/make.tmpl.in LVM2.2.02.100/make.tmpl.in
387 ---- LVM2.2.02.100.orig/make.tmpl.in 2013-08-13 13:44:43.000000000 +0300
388 -+++ LVM2.2.02.100/make.tmpl.in 2013-09-12 23:22:58.125328808 +0300
389 -@@ -32,7 +32,7 @@
390 -
391 - LIBS = @LIBS@
392 - # Extra libraries always linked with static binaries
393 --STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS)
394 -+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS)
395 - DEFS += @DEFS@
396 - # FIXME set this only where it's needed, not globally?
397 - CFLAGS += @CFLAGS@ @UDEV_CFLAGS@
398 -@@ -46,7 +46,9 @@
399 - PTHREAD_LIBS = @PTHREAD_LIBS@
400 - READLINE_LIBS = @READLINE_LIBS@
401 - SELINUX_LIBS = @SELINUX_LIBS@
402 -+SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
403 - UDEV_LIBS = @UDEV_LIBS@
404 -+UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
405 - TESTING = @TESTING@
406 -
407 - # Setup directory variables
408
409 diff --git a/sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch
410 deleted file mode 100644
411 index 723cd0e..0000000
412 --- a/sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch
413 +++ /dev/null
414 @@ -1,104 +0,0 @@
415 -diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/configure.in LVM2.2.02.107/configure.in
416 ---- LVM2.2.02.107.orig/configure.in 2014-07-15 12:57:55.867439868 -0700
417 -+++ LVM2.2.02.107/configure.in 2014-07-15 17:24:02.662666091 -0700
418 -@@ -997,6 +997,7 @@
419 - fi])
420 - if test "$BLKID_WIPING" = yes; then
421 - BLKID_PC="blkid"
422 -+ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
423 - AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
424 - fi
425 - fi
426 -@@ -1022,6 +1023,7 @@
427 - if test "$UDEV_SYNC" = yes; then
428 - pkg_config_init
429 - PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
430 -+ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
431 - AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
432 - fi
433 -
434 -@@ -1242,19 +1244,32 @@
435 - if test "$SELINUX" = yes; then
436 - AC_CHECK_LIB([sepol], [sepol_check_context], [
437 - AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
438 -- SELINUX_LIBS="-lsepol"])
439 -+ SEPOL_LIBS="-lsepol"])
440 -+
441 -+ dnl -- init pkgconfig if required
442 -+ if test x$PKGCONFIG_INIT != x1; then
443 -+ pkg_config_init
444 -+ fi
445 -+ PKG_CHECK_MODULES(SELINUX, libselinux, [
446 -+ SELINUX_PC="libselinux"
447 -+ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
448 -+ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
449 -+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
450 -+ ],[
451 -+ dnl -- old non-pkgconfig method, is buggy with static builds
452 -
453 - AC_CHECK_LIB([selinux], [is_selinux_enabled], [
454 - AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
455 - AC_CHECK_HEADERS([selinux/label.h])
456 - AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
457 -- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
458 -+ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
459 - SELINUX_PC="libselinux"
460 - HAVE_SELINUX=yes ], [
461 - AC_MSG_WARN(Disabling selinux)
462 - SELINUX_LIBS=
463 - SELINUX_PC=
464 - HAVE_SELINUX=no ])
465 -+ ])
466 - fi
467 -
468 - ################################################################################
469 -@@ -1556,6 +1571,7 @@
470 - ################################################################################
471 - AC_SUBST(APPLIB)
472 - AC_SUBST(AWK)
473 -+AC_SUBST(BLKID_STATIC_LIBS)
474 - AC_SUBST(BLKID_PC)
475 - AC_SUBST(BLKID_WIPING)
476 - AC_SUBST(BUILD_CMIRRORD)
477 -@@ -1651,6 +1667,7 @@
478 - AC_SUBST(SALCK_CFLAGS)
479 - AC_SUBST(SALCK_LIBS)
480 - AC_SUBST(SELINUX_LIBS)
481 -+AC_SUBST(SELINUX_STATIC_LIBS)
482 - AC_SUBST(SELINUX_PC)
483 - AC_SUBST(SNAPSHOTS)
484 - AC_SUBST(STATICDIR)
485 -@@ -1662,6 +1679,7 @@
486 - AC_SUBST(THIN_DUMP_CMD)
487 - AC_SUBST(THIN_REPAIR_CMD)
488 - AC_SUBST(THIN_RESTORE_CMD)
489 -+AC_SUBST(UDEV_STATIC_LIBS)
490 - AC_SUBST(UDEV_PC)
491 - AC_SUBST(UDEV_RULES)
492 - AC_SUBST(UDEV_SYNC)
493 -diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/make.tmpl.in LVM2.2.02.107/make.tmpl.in
494 ---- LVM2.2.02.107.orig/make.tmpl.in 2014-07-15 12:57:55.868439884 -0700
495 -+++ LVM2.2.02.107/make.tmpl.in 2014-07-15 17:23:24.060055838 -0700
496 -@@ -44,7 +44,7 @@
497 -
498 - LIBS = @LIBS@
499 - # Extra libraries always linked with static binaries
500 --STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
501 -+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
502 - DEFS += @DEFS@
503 - # FIXME set this only where it's needed, not globally?
504 - CFLAGS += @CFLAGS@
505 -@@ -59,10 +59,13 @@
506 - PTHREAD_LIBS = @PTHREAD_LIBS@
507 - READLINE_LIBS = @READLINE_LIBS@
508 - SELINUX_LIBS = @SELINUX_LIBS@
509 -+SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
510 - UDEV_CFLAGS = @UDEV_CFLAGS@
511 - UDEV_LIBS = @UDEV_LIBS@
512 -+UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
513 - BLKID_CFLAGS = @BLKID_CFLAGS@
514 - BLKID_LIBS = @BLKID_LIBS@
515 -+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
516 - TESTING = @TESTING@
517 -
518 - # Setup directory variables
519
520 diff --git a/sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch
521 deleted file mode 100644
522 index 38be5df..0000000
523 --- a/sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch
524 +++ /dev/null
525 @@ -1,47 +0,0 @@
526 ---- conf/example.conf.in
527 -+++ conf/example.conf.in
528 -@@ -50,7 +50,9 @@
529 -
530 -
531 - # By default we accept every block device:
532 -- filter = [ "a/.*/" ]
533 -+ # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
534 -+ # noise when you probed while not available.
535 -+ filter = [ "r|/dev/nbd.*|", "a/.*/" ]
536 -
537 - # Exclude the cdrom drive
538 - # filter = [ "r|/dev/cdrom|" ]
539 -@@ -259,6 +261,8 @@
540 - # the new lvm2 on-disk metadata format.
541 - # The default value is set when the tools are built.
542 - # fallback_to_lvm1 = 0
543 -+ # Gentoo: the LVM tools are a seperate package.
544 -+ fallback_to_lvm1 = 0
545 -
546 - # The default metadata format that commands should use - "lvm1" or "lvm2".
547 - # The command line override is -M1 or -M2.
548 -@@ -449,12 +453,12 @@
549 -
550 - # Metadata settings
551 - #
552 --# metadata {
553 -+metadata {
554 - # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
555 - # You might want to override it from the command line with 0
556 - # when running pvcreate on new PVs which are to be added to large VGs.
557 --
558 -- # pvmetadatacopies = 1
559 -+ # Gentoo: enable for data safety, but PV resize is then disabled.
560 -+ #pvmetadatacopies = 2
561 -
562 - # Approximate default size of on-disk metadata areas in sectors.
563 - # You should increase this if you have large volume groups or
564 -@@ -476,7 +480,7 @@
565 - # the supplied toolset to make changes (e.g. vgcfgrestore).
566 -
567 - # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
568 --#}
569 -+}
570 -
571 - # Event daemon
572 - #
573
574 diff --git a/sys-fs/lvm2/lvm2-2.02.103.ebuild b/sys-fs/lvm2/lvm2-2.02.103.ebuild
575 deleted file mode 100644
576 index a9e1ceb..0000000
577 --- a/sys-fs/lvm2/lvm2-2.02.103.ebuild
578 +++ /dev/null
579 @@ -1,235 +0,0 @@
580 -# Copyright 1999-2015 Gentoo Foundation
581 -# Distributed under the terms of the GNU General Public License v2
582 -# $Id$
583 -
584 -EAPI=5
585 -inherit autotools eutils linux-info multilib systemd toolchain-funcs udev
586 -
587 -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
588 -HOMEPAGE="https://sources.redhat.com/lvm2/"
589 -SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
590 - ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
591 -
592 -LICENSE="GPL-2"
593 -SLOT="0"
594 -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
595 -IUSE="readline static static-libs clvm cman +lvm1 lvm2create_initrd selinux +udev +thin"
596 -
597 -DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
598 - readline? ( sys-libs/readline:0= )
599 - udev? ( >=virtual/libudev-208:=[static-libs?] )"
600 -# /run is now required for locking during early boot. /var cannot be assumed to
601 -# be available -- thus, pull in recent enough baselayout for /run.
602 -# This version of LVM is incompatible with cryptsetup <1.1.2.
603 -RDEPEND="${DEPEND_COMMON}
604 - >=sys-apps/baselayout-2.2
605 - !<sys-apps/openrc-0.11
606 - !<sys-fs/cryptsetup-1.1.2
607 - !!sys-fs/clvm
608 - !!sys-fs/lvm-user
609 - >=sys-apps/util-linux-2.16
610 - lvm2create_initrd? ( sys-apps/makedev )
611 - thin? ( >=sys-block/thin-provisioning-tools-0.2.1 )"
612 -DEPEND="${DEPEND_COMMON}
613 - virtual/pkgconfig
614 - >=sys-devel/binutils-2.20.1-r1
615 - static? (
616 - selinux? ( sys-libs/libselinux[static-libs] )
617 - udev? ( >=virtual/libudev-208:=[static-libs] )
618 - )"
619 -
620 -S=${WORKDIR}/${PN/lvm/LVM}.${PV}
621 -
622 -pkg_setup() {
623 - local CONFIG_CHECK="~SYSVIPC"
624 -
625 - if use udev; then
626 - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
627 - if linux_config_exists; then
628 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
629 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
630 - ewarn "It's recommended to set an empty value to the following kernel config option:"
631 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
632 - fi
633 - fi
634 - fi
635 -
636 - check_extra_config
637 -
638 - # 1. Genkernel no longer copies /sbin/lvm blindly.
639 - if use static; then
640 - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
641 - elog "their static versions. If you need the static binaries,"
642 - elog "you must append .static to the filename!"
643 - fi
644 -}
645 -
646 -src_prepare() {
647 - # Gentoo specific modification(s):
648 - epatch "${FILESDIR}"/${PN}-2.02.99-example.conf.in.patch
649 -
650 - sed -i \
651 - -e "1iAR = $(tc-getAR)" \
652 - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
653 - make.tmpl.in || die #444082
654 -
655 - sed -i -e '/FLAG/s:-O2::' configure{,.in} || die #480212
656 -
657 - # For upstream -- review and forward:
658 - epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
659 - epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
660 - epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
661 - epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
662 - epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
663 - epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
664 - epatch "${FILESDIR}"/${PN}-2.02.100-selinux_and_udev_static.patch #370217, #439414
665 -
666 - eautoreconf
667 -}
668 -
669 -src_configure() {
670 - local myconf
671 - local buildmode
672 -
673 - myconf="${myconf} --enable-dmeventd"
674 - myconf="${myconf} --enable-cmdlib"
675 - myconf="${myconf} --enable-applib"
676 - myconf="${myconf} --enable-fsadm"
677 - myconf="${myconf} --enable-lvmetad"
678 -
679 - # Most of this package does weird stuff.
680 - # The build options are tristate, and --without is NOT supported
681 - # options: 'none', 'internal', 'shared'
682 - if use static; then
683 - buildmode="internal"
684 - # This only causes the .static versions to become available
685 - myconf="${myconf} --enable-static_link"
686 - else
687 - buildmode="shared"
688 - fi
689 -
690 - # dmeventd requires mirrors to be internal, and snapshot available
691 - # so we cannot disable them
692 - myconf="${myconf} --with-mirrors=internal"
693 - myconf="${myconf} --with-snapshots=internal"
694 - use thin \
695 - && myconf="${myconf} --with-thin=internal" \
696 - || myconf="${myconf} --with-thin=none"
697 -
698 - if use lvm1; then
699 - myconf="${myconf} --with-lvm1=${buildmode}"
700 - else
701 - myconf="${myconf} --with-lvm1=none"
702 - fi
703 -
704 - # disable O_DIRECT support on hppa, breaks pv detection (#99532)
705 - use hppa && myconf="${myconf} --disable-o_direct"
706 -
707 - if use clvm; then
708 - myconf="${myconf} --with-cluster=${buildmode}"
709 - # 4-state! Make sure we get it right, per bug 210879
710 - # Valid options are: none, cman, gulm, all
711 - #
712 - # 2009/02:
713 - # gulm is removed now, now dual-state:
714 - # cman, none
715 - # all still exists, but is not needed
716 - #
717 - # 2009/07:
718 - # TODO: add corosync and re-enable ALL
719 - local clvmd=""
720 - use cman && clvmd="cman"
721 - #clvmd="${clvmd/cmangulm/all}"
722 - [ -z "${clvmd}" ] && clvmd="none"
723 - myconf="${myconf} --with-clvmd=${clvmd}"
724 - myconf="${myconf} --with-pool=${buildmode}"
725 - else
726 - myconf="${myconf} --with-clvmd=none --with-cluster=none"
727 - fi
728 -
729 - econf \
730 - $(use_enable readline) \
731 - $(use_enable selinux) \
732 - --enable-pkgconfig \
733 - --with-confdir="${EPREFIX}"/etc \
734 - --exec-prefix="${EPREFIX}" \
735 - --sbindir="${EPREFIX}/sbin" \
736 - --with-staticdir="${EPREFIX}"/sbin \
737 - --libdir="${EPREFIX}/$(get_libdir)" \
738 - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
739 - --with-default-dm-run-dir=/run \
740 - --with-default-run-dir=/run/lvm \
741 - --with-default-locking-dir=/run/lock/lvm \
742 - --with-default-pid-dir=/run \
743 - $(use_enable udev udev_rules) \
744 - $(use_enable udev udev_sync) \
745 - $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
746 - "$(systemd_with_unitdir)" \
747 - ${myconf} \
748 - CLDFLAGS="${LDFLAGS}"
749 -}
750 -
751 -src_compile() {
752 - pushd include >/dev/null
753 - emake
754 - popd >/dev/null
755 -
756 - emake
757 - emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
758 -}
759 -
760 -src_install() {
761 - local inst
762 - for inst in install install_systemd_units install_systemd_generators install_tmpfiles_configuration; do
763 - emake DESTDIR="${D}" ${inst}
764 - done
765 -
766 - newinitd "${FILESDIR}"/lvm.rc-2.02.95-r2 lvm
767 - newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
768 -
769 - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring
770 -
771 - newinitd "${FILESDIR}"/device-mapper.rc-2.02.95-r2 device-mapper
772 - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
773 -
774 - newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
775 -
776 - if use clvm; then
777 - newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
778 - newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
779 - fi
780 -
781 - if use static-libs; then
782 - dolib.a libdm/ioctl/libdevmapper.a
783 - dolib.a libdaemon/client/libdaemonclient.a #462908
784 - #gen_usr_ldscript libdevmapper.so
785 - dolib.a daemons/dmeventd/libdevmapper-event.a
786 - #gen_usr_ldscript libdevmapper-event.so
787 - else
788 - rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
789 - fi
790 -
791 - if use lvm2create_initrd; then
792 - dosbin scripts/lvm2create_initrd/lvm2create_initrd
793 - doman scripts/lvm2create_initrd/lvm2create_initrd.8
794 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
795 - fi
796 -
797 - insinto /etc
798 - doins "${FILESDIR}"/dmtab
799 -
800 - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
801 -}
802 -
803 -pkg_postinst() {
804 - ewarn "Make sure the \"lvm\" init script is in the runlevels:"
805 - ewarn "# rc-update add lvm boot"
806 - ewarn
807 - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
808 - ewarn "to enable lvm autoactivation and metadata caching."
809 -}
810 -
811 -src_test() {
812 - einfo "Tests are disabled because of device-node mucking, if you want to"
813 - einfo "run tests, compile the package and see ${S}/tests"
814 -}
815
816 diff --git a/sys-fs/lvm2/lvm2-2.02.109-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.109-r1.ebuild
817 deleted file mode 100644
818 index 51ab306..0000000
819 --- a/sys-fs/lvm2/lvm2-2.02.109-r1.ebuild
820 +++ /dev/null
821 @@ -1,270 +0,0 @@
822 -# Copyright 1999-2015 Gentoo Foundation
823 -# Distributed under the terms of the GNU General Public License v2
824 -# $Id$
825 -
826 -EAPI=5
827 -inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
828 -
829 -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
830 -HOMEPAGE="https://sources.redhat.com/lvm2/"
831 -SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
832 - ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
833 -
834 -LICENSE="GPL-2"
835 -SLOT="0"
836 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
837 -IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
838 -REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
839 - static? ( !udev )" #520450
840 -
841 -DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
842 - readline? ( sys-libs/readline:0= )
843 - udev? ( >=virtual/libudev-208:=[static-libs?] )"
844 -# /run is now required for locking during early boot. /var cannot be assumed to
845 -# be available -- thus, pull in recent enough baselayout for /run.
846 -# This version of LVM is incompatible with cryptsetup <1.1.2.
847 -RDEPEND="${DEPEND_COMMON}
848 - >=sys-apps/baselayout-2.2
849 - !<sys-apps/openrc-0.11
850 - !<sys-fs/cryptsetup-1.1.2
851 - !!sys-fs/clvm
852 - !!sys-fs/lvm-user
853 - >=sys-apps/util-linux-2.16
854 - lvm2create_initrd? ( sys-apps/makedev )
855 - thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
856 -# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
857 -DEPEND="${DEPEND_COMMON}
858 - virtual/pkgconfig
859 - >=sys-devel/binutils-2.20.1-r1
860 - static? (
861 - selinux? ( sys-libs/libselinux[static-libs] )
862 - udev? ( >=virtual/libudev-208:=[static-libs] )
863 - >=sys-apps/util-linux-2.16[static-libs]
864 - )"
865 -
866 -S=${WORKDIR}/${PN/lvm/LVM}.${PV}
867 -
868 -pkg_setup() {
869 - local CONFIG_CHECK="~SYSVIPC"
870 -
871 - if use udev; then
872 - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
873 - if linux_config_exists; then
874 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
875 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
876 - ewarn "It's recommended to set an empty value to the following kernel config option:"
877 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
878 - fi
879 - fi
880 - fi
881 -
882 - check_extra_config
883 -
884 - # 1. Genkernel no longer copies /sbin/lvm blindly.
885 - if use static; then
886 - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
887 - elog "their static versions. If you need the static binaries,"
888 - elog "you must append .static to the filename!"
889 - fi
890 -}
891 -
892 -src_prepare() {
893 - # Gentoo specific modification(s):
894 - epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
895 -
896 - sed -i \
897 - -e "1iAR = $(tc-getAR)" \
898 - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
899 - make.tmpl.in || die #444082
900 -
901 - sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
902 -
903 - if use systemd && ! use device-mapper-only; then
904 - sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
905 - fi
906 -
907 - sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
908 -
909 - # For upstream -- review and forward:
910 - epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
911 - epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
912 - epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
913 - epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
914 - epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
915 - epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
916 - epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
917 - epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
918 -
919 - # Without thin-privision-tools, there is nothing to install for target install_man7:
920 - use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
921 -
922 - sed -i -e 's:|share):|shared):' configure.in || die #520640
923 -
924 - eautoreconf
925 -}
926 -
927 -src_configure() {
928 - filter-flags -flto
929 - local myconf
930 - local buildmode
931 -
932 - myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
933 - myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
934 - myconf="${myconf} $(use_enable !device-mapper-only applib)"
935 - myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
936 - myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
937 - use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
938 -
939 - # Most of this package does weird stuff.
940 - # The build options are tristate, and --without is NOT supported
941 - # options: 'none', 'internal', 'shared'
942 - if use static; then
943 - buildmode="internal"
944 - # This only causes the .static versions to become available
945 - myconf="${myconf} --enable-static_link"
946 - else
947 - buildmode="shared"
948 - fi
949 - dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
950 -
951 - # dmeventd requires mirrors to be internal, and snapshot available
952 - # so we cannot disable them
953 - myconf="${myconf} --with-mirrors=${dmbuildmode}"
954 - myconf="${myconf} --with-snapshots=${dmbuildmode}"
955 - if use thin; then
956 - myconf="${myconf} --with-thin=internal --with-cache=internal"
957 - local texec
958 - for texec in check dump repair restore; do
959 - myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
960 - myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
961 - done
962 - else
963 - myconf="${myconf} --with-thin=none --with-cache=none"
964 - fi
965 -
966 - if use lvm1; then
967 - myconf="${myconf} --with-lvm1=${buildmode}"
968 - else
969 - myconf="${myconf} --with-lvm1=none"
970 - fi
971 -
972 - # disable O_DIRECT support on hppa, breaks pv detection (#99532)
973 - use hppa && myconf="${myconf} --disable-o_direct"
974 -
975 - if use clvm; then
976 - myconf="${myconf} --with-cluster=${buildmode}"
977 - # 4-state! Make sure we get it right, per bug 210879
978 - # Valid options are: none, cman, gulm, all
979 - #
980 - # 2009/02:
981 - # gulm is removed now, now dual-state:
982 - # cman, none
983 - # all still exists, but is not needed
984 - #
985 - # 2009/07:
986 - # TODO: add corosync and re-enable ALL
987 - local clvmd=""
988 - use cman && clvmd="cman"
989 - #clvmd="${clvmd/cmangulm/all}"
990 - [ -z "${clvmd}" ] && clvmd="none"
991 - myconf="${myconf} --with-clvmd=${clvmd}"
992 - myconf="${myconf} --with-pool=${buildmode}"
993 - else
994 - myconf="${myconf} --with-clvmd=none --with-cluster=none"
995 - fi
996 -
997 - econf \
998 - $(use_enable readline) \
999 - $(use_enable selinux) \
1000 - --enable-pkgconfig \
1001 - --with-confdir="${EPREFIX}"/etc \
1002 - --exec-prefix="${EPREFIX}" \
1003 - --sbindir="${EPREFIX}/sbin" \
1004 - --with-staticdir="${EPREFIX}"/sbin \
1005 - --libdir="${EPREFIX}/$(get_libdir)" \
1006 - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
1007 - --with-default-dm-run-dir=/run \
1008 - --with-default-run-dir=/run/lvm \
1009 - --with-default-locking-dir=/run/lock/lvm \
1010 - --with-default-pid-dir=/run \
1011 - $(use_enable udev udev_rules) \
1012 - $(use_enable udev udev_sync) \
1013 - $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
1014 - $(use_enable systemd udev-systemd-background-jobs) \
1015 - "$(systemd_with_unitdir)" \
1016 - ${myconf} \
1017 - CLDFLAGS="${LDFLAGS}"
1018 -}
1019 -
1020 -src_compile() {
1021 - pushd include >/dev/null
1022 - emake
1023 - popd >/dev/null
1024 -
1025 - if use device-mapper-only ; then
1026 - emake device-mapper
1027 - else
1028 - emake
1029 - emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
1030 - fi
1031 -}
1032 -
1033 -src_install() {
1034 - local inst
1035 - INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
1036 - use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
1037 - for inst in ${INSTALL_TARGETS}; do
1038 - emake DESTDIR="${D}" ${inst}
1039 - done
1040 -
1041 - newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
1042 - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
1043 -
1044 - if use !device-mapper-only ; then
1045 - newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
1046 - newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
1047 - newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
1048 -
1049 - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
1050 - newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
1051 - fi
1052 -
1053 - if use clvm; then
1054 - newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
1055 - newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
1056 - fi
1057 -
1058 - if use static-libs; then
1059 - dolib.a libdm/ioctl/libdevmapper.a
1060 - dolib.a libdaemon/client/libdaemonclient.a #462908
1061 - #gen_usr_ldscript libdevmapper.so
1062 - dolib.a daemons/dmeventd/libdevmapper-event.a
1063 - #gen_usr_ldscript libdevmapper-event.so
1064 - else
1065 - rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
1066 - fi
1067 -
1068 - if use lvm2create_initrd; then
1069 - dosbin scripts/lvm2create_initrd/lvm2create_initrd
1070 - doman scripts/lvm2create_initrd/lvm2create_initrd.8
1071 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
1072 - fi
1073 -
1074 - insinto /etc
1075 - doins "${FILESDIR}"/dmtab
1076 -
1077 - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
1078 -}
1079 -
1080 -pkg_postinst() {
1081 - ewarn "Make sure the \"lvm\" init script is in the runlevels:"
1082 - ewarn "# rc-update add lvm boot"
1083 - ewarn
1084 - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
1085 - ewarn "to enable lvm autoactivation and metadata caching."
1086 -}
1087 -
1088 -src_test() {
1089 - einfo "Tests are disabled because of device-node mucking, if you want to"
1090 - einfo "run tests, compile the package and see ${S}/tests"
1091 -}
1092
1093 diff --git a/sys-fs/lvm2/lvm2-2.02.109.ebuild b/sys-fs/lvm2/lvm2-2.02.109.ebuild
1094 deleted file mode 100644
1095 index 29c6ad3..0000000
1096 --- a/sys-fs/lvm2/lvm2-2.02.109.ebuild
1097 +++ /dev/null
1098 @@ -1,269 +0,0 @@
1099 -# Copyright 1999-2015 Gentoo Foundation
1100 -# Distributed under the terms of the GNU General Public License v2
1101 -# $Id$
1102 -
1103 -EAPI=5
1104 -inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
1105 -
1106 -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
1107 -HOMEPAGE="https://sources.redhat.com/lvm2/"
1108 -SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
1109 - ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
1110 -
1111 -LICENSE="GPL-2"
1112 -SLOT="0"
1113 -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
1114 -IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
1115 -REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )"
1116 -
1117 -DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
1118 - readline? ( sys-libs/readline:0= )
1119 - udev? ( >=virtual/libudev-208:=[static-libs?] )"
1120 -# /run is now required for locking during early boot. /var cannot be assumed to
1121 -# be available -- thus, pull in recent enough baselayout for /run.
1122 -# This version of LVM is incompatible with cryptsetup <1.1.2.
1123 -RDEPEND="${DEPEND_COMMON}
1124 - >=sys-apps/baselayout-2.2
1125 - !<sys-apps/openrc-0.11
1126 - !<sys-fs/cryptsetup-1.1.2
1127 - !!sys-fs/clvm
1128 - !!sys-fs/lvm-user
1129 - >=sys-apps/util-linux-2.16
1130 - lvm2create_initrd? ( sys-apps/makedev )
1131 - thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
1132 -# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
1133 -DEPEND="${DEPEND_COMMON}
1134 - virtual/pkgconfig
1135 - >=sys-devel/binutils-2.20.1-r1
1136 - static? (
1137 - selinux? ( sys-libs/libselinux[static-libs] )
1138 - udev? ( >=virtual/libudev-208:=[static-libs] )
1139 - <sys-apps/util-linux-2.25[static-libs]
1140 - )"
1141 -
1142 -S=${WORKDIR}/${PN/lvm/LVM}.${PV}
1143 -
1144 -pkg_setup() {
1145 - local CONFIG_CHECK="~SYSVIPC"
1146 -
1147 - if use udev; then
1148 - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
1149 - if linux_config_exists; then
1150 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
1151 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
1152 - ewarn "It's recommended to set an empty value to the following kernel config option:"
1153 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
1154 - fi
1155 - fi
1156 - fi
1157 -
1158 - check_extra_config
1159 -
1160 - # 1. Genkernel no longer copies /sbin/lvm blindly.
1161 - if use static; then
1162 - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
1163 - elog "their static versions. If you need the static binaries,"
1164 - elog "you must append .static to the filename!"
1165 - fi
1166 -}
1167 -
1168 -src_prepare() {
1169 - # Gentoo specific modification(s):
1170 - epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
1171 -
1172 - sed -i \
1173 - -e "1iAR = $(tc-getAR)" \
1174 - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
1175 - make.tmpl.in || die #444082
1176 -
1177 - sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
1178 -
1179 - if use systemd && ! use device-mapper-only; then
1180 - sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
1181 - fi
1182 -
1183 - sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
1184 -
1185 - # For upstream -- review and forward:
1186 - epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
1187 - epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
1188 - epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
1189 - epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
1190 - epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
1191 - epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
1192 - epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
1193 - epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
1194 -
1195 - # Without thin-privision-tools, there is nothing to install for target install_man7:
1196 - use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
1197 -
1198 - sed -i -e 's:|share):|shared):' configure.in || die #520640
1199 -
1200 - eautoreconf
1201 -}
1202 -
1203 -src_configure() {
1204 - filter-flags -flto
1205 - local myconf
1206 - local buildmode
1207 -
1208 - myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
1209 - myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
1210 - myconf="${myconf} $(use_enable !device-mapper-only applib)"
1211 - myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
1212 - myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
1213 - use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
1214 -
1215 - # Most of this package does weird stuff.
1216 - # The build options are tristate, and --without is NOT supported
1217 - # options: 'none', 'internal', 'shared'
1218 - if use static; then
1219 - buildmode="internal"
1220 - # This only causes the .static versions to become available
1221 - myconf="${myconf} --enable-static_link"
1222 - else
1223 - buildmode="shared"
1224 - fi
1225 - dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
1226 -
1227 - # dmeventd requires mirrors to be internal, and snapshot available
1228 - # so we cannot disable them
1229 - myconf="${myconf} --with-mirrors=${dmbuildmode}"
1230 - myconf="${myconf} --with-snapshots=${dmbuildmode}"
1231 - if use thin; then
1232 - myconf="${myconf} --with-thin=internal --with-cache=internal"
1233 - local texec
1234 - for texec in check dump repair restore; do
1235 - myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
1236 - myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
1237 - done
1238 - else
1239 - myconf="${myconf} --with-thin=none --with-cache=none"
1240 - fi
1241 -
1242 - if use lvm1; then
1243 - myconf="${myconf} --with-lvm1=${buildmode}"
1244 - else
1245 - myconf="${myconf} --with-lvm1=none"
1246 - fi
1247 -
1248 - # disable O_DIRECT support on hppa, breaks pv detection (#99532)
1249 - use hppa && myconf="${myconf} --disable-o_direct"
1250 -
1251 - if use clvm; then
1252 - myconf="${myconf} --with-cluster=${buildmode}"
1253 - # 4-state! Make sure we get it right, per bug 210879
1254 - # Valid options are: none, cman, gulm, all
1255 - #
1256 - # 2009/02:
1257 - # gulm is removed now, now dual-state:
1258 - # cman, none
1259 - # all still exists, but is not needed
1260 - #
1261 - # 2009/07:
1262 - # TODO: add corosync and re-enable ALL
1263 - local clvmd=""
1264 - use cman && clvmd="cman"
1265 - #clvmd="${clvmd/cmangulm/all}"
1266 - [ -z "${clvmd}" ] && clvmd="none"
1267 - myconf="${myconf} --with-clvmd=${clvmd}"
1268 - myconf="${myconf} --with-pool=${buildmode}"
1269 - else
1270 - myconf="${myconf} --with-clvmd=none --with-cluster=none"
1271 - fi
1272 -
1273 - econf \
1274 - $(use_enable readline) \
1275 - $(use_enable selinux) \
1276 - --enable-pkgconfig \
1277 - --with-confdir="${EPREFIX}"/etc \
1278 - --exec-prefix="${EPREFIX}" \
1279 - --sbindir="${EPREFIX}/sbin" \
1280 - --with-staticdir="${EPREFIX}"/sbin \
1281 - --libdir="${EPREFIX}/$(get_libdir)" \
1282 - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
1283 - --with-default-dm-run-dir=/run \
1284 - --with-default-run-dir=/run/lvm \
1285 - --with-default-locking-dir=/run/lock/lvm \
1286 - --with-default-pid-dir=/run \
1287 - $(use_enable udev udev_rules) \
1288 - $(use_enable udev udev_sync) \
1289 - $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
1290 - $(use_enable systemd udev-systemd-background-jobs) \
1291 - "$(systemd_with_unitdir)" \
1292 - ${myconf} \
1293 - CLDFLAGS="${LDFLAGS}"
1294 -}
1295 -
1296 -src_compile() {
1297 - pushd include >/dev/null
1298 - emake
1299 - popd >/dev/null
1300 -
1301 - if use device-mapper-only ; then
1302 - emake device-mapper
1303 - else
1304 - emake
1305 - emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
1306 - fi
1307 -}
1308 -
1309 -src_install() {
1310 - local inst
1311 - INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
1312 - use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
1313 - for inst in ${INSTALL_TARGETS}; do
1314 - emake DESTDIR="${D}" ${inst}
1315 - done
1316 -
1317 - newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
1318 - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
1319 -
1320 - if use !device-mapper-only ; then
1321 - newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
1322 - newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
1323 - newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
1324 -
1325 - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
1326 - newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
1327 - fi
1328 -
1329 - if use clvm; then
1330 - newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
1331 - newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
1332 - fi
1333 -
1334 - if use static-libs; then
1335 - dolib.a libdm/ioctl/libdevmapper.a
1336 - dolib.a libdaemon/client/libdaemonclient.a #462908
1337 - #gen_usr_ldscript libdevmapper.so
1338 - dolib.a daemons/dmeventd/libdevmapper-event.a
1339 - #gen_usr_ldscript libdevmapper-event.so
1340 - else
1341 - rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
1342 - fi
1343 -
1344 - if use lvm2create_initrd; then
1345 - dosbin scripts/lvm2create_initrd/lvm2create_initrd
1346 - doman scripts/lvm2create_initrd/lvm2create_initrd.8
1347 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
1348 - fi
1349 -
1350 - insinto /etc
1351 - doins "${FILESDIR}"/dmtab
1352 -
1353 - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
1354 -}
1355 -
1356 -pkg_postinst() {
1357 - ewarn "Make sure the \"lvm\" init script is in the runlevels:"
1358 - ewarn "# rc-update add lvm boot"
1359 - ewarn
1360 - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
1361 - ewarn "to enable lvm autoactivation and metadata caching."
1362 -}
1363 -
1364 -src_test() {
1365 - einfo "Tests are disabled because of device-node mucking, if you want to"
1366 - einfo "run tests, compile the package and see ${S}/tests"
1367 -}
1368
1369 diff --git a/sys-fs/lvm2/lvm2-2.02.110.ebuild b/sys-fs/lvm2/lvm2-2.02.110.ebuild
1370 deleted file mode 100644
1371 index d90358a..0000000
1372 --- a/sys-fs/lvm2/lvm2-2.02.110.ebuild
1373 +++ /dev/null
1374 @@ -1,272 +0,0 @@
1375 -# Copyright 1999-2015 Gentoo Foundation
1376 -# Distributed under the terms of the GNU General Public License v2
1377 -# $Id$
1378 -
1379 -EAPI=5
1380 -inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
1381 -
1382 -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
1383 -HOMEPAGE="https://sources.redhat.com/lvm2/"
1384 -SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
1385 - ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
1386 -
1387 -LICENSE="GPL-2"
1388 -SLOT="0"
1389 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
1390 -IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
1391 -REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
1392 - systemd? ( udev )
1393 - static? ( !udev )" #520450
1394 -
1395 -DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
1396 - readline? ( sys-libs/readline:0= )
1397 - udev? ( >=virtual/libudev-208:=[static-libs?] )"
1398 -# /run is now required for locking during early boot. /var cannot be assumed to
1399 -# be available -- thus, pull in recent enough baselayout for /run.
1400 -# This version of LVM is incompatible with cryptsetup <1.1.2.
1401 -RDEPEND="${DEPEND_COMMON}
1402 - >=sys-apps/baselayout-2.2
1403 - !<sys-apps/openrc-0.11
1404 - !<sys-fs/cryptsetup-1.1.2
1405 - !!sys-fs/clvm
1406 - !!sys-fs/lvm-user
1407 - >=sys-apps/util-linux-2.16
1408 - lvm2create_initrd? ( sys-apps/makedev )
1409 - thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
1410 -# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
1411 -DEPEND="${DEPEND_COMMON}
1412 - virtual/pkgconfig
1413 - >=sys-devel/binutils-2.20.1-r1
1414 - static? (
1415 - selinux? ( sys-libs/libselinux[static-libs] )
1416 - udev? ( >=virtual/libudev-208:=[static-libs] )
1417 - >=sys-apps/util-linux-2.16[static-libs]
1418 - )"
1419 -
1420 -S=${WORKDIR}/${PN/lvm/LVM}.${PV}
1421 -
1422 -pkg_setup() {
1423 - local CONFIG_CHECK="~SYSVIPC"
1424 -
1425 - if use udev; then
1426 - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
1427 - if linux_config_exists; then
1428 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
1429 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
1430 - ewarn "It's recommended to set an empty value to the following kernel config option:"
1431 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
1432 - fi
1433 - fi
1434 - fi
1435 -
1436 - check_extra_config
1437 -
1438 - # 1. Genkernel no longer copies /sbin/lvm blindly.
1439 - if use static; then
1440 - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
1441 - elog "their static versions. If you need the static binaries,"
1442 - elog "you must append .static to the filename!"
1443 - fi
1444 -}
1445 -
1446 -src_prepare() {
1447 - # Gentoo specific modification(s):
1448 - epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
1449 -
1450 - sed -i \
1451 - -e "1iAR = $(tc-getAR)" \
1452 - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
1453 - make.tmpl.in || die #444082
1454 -
1455 - sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
1456 -
1457 - if use udev && ! use device-mapper-only; then
1458 - sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
1459 - elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
1460 - elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
1461 - elog "if it was previously disabled."
1462 - fi
1463 -
1464 - sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
1465 -
1466 - # For upstream -- review and forward:
1467 - epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
1468 - epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
1469 - epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
1470 - epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
1471 - epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
1472 - epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
1473 - epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
1474 - epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
1475 -
1476 - # Without thin-privision-tools, there is nothing to install for target install_man7:
1477 - use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
1478 -
1479 - eautoreconf
1480 -}
1481 -
1482 -src_configure() {
1483 - filter-flags -flto
1484 - local myconf
1485 - local buildmode
1486 -
1487 - myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
1488 - myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
1489 - myconf="${myconf} $(use_enable !device-mapper-only applib)"
1490 - myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
1491 - myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
1492 - use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
1493 -
1494 - # Most of this package does weird stuff.
1495 - # The build options are tristate, and --without is NOT supported
1496 - # options: 'none', 'internal', 'shared'
1497 - if use static; then
1498 - buildmode="internal"
1499 - # This only causes the .static versions to become available
1500 - myconf="${myconf} --enable-static_link"
1501 - else
1502 - buildmode="shared"
1503 - fi
1504 - dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
1505 -
1506 - # dmeventd requires mirrors to be internal, and snapshot available
1507 - # so we cannot disable them
1508 - myconf="${myconf} --with-mirrors=${dmbuildmode}"
1509 - myconf="${myconf} --with-snapshots=${dmbuildmode}"
1510 - if use thin; then
1511 - myconf="${myconf} --with-thin=internal --with-cache=internal"
1512 - local texec
1513 - for texec in check dump repair restore; do
1514 - myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
1515 - myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
1516 - done
1517 - else
1518 - myconf="${myconf} --with-thin=none --with-cache=none"
1519 - fi
1520 -
1521 - if use lvm1; then
1522 - myconf="${myconf} --with-lvm1=${buildmode}"
1523 - else
1524 - myconf="${myconf} --with-lvm1=none"
1525 - fi
1526 -
1527 - # disable O_DIRECT support on hppa, breaks pv detection (#99532)
1528 - use hppa && myconf="${myconf} --disable-o_direct"
1529 -
1530 - if use clvm; then
1531 - myconf="${myconf} --with-cluster=${buildmode}"
1532 - # 4-state! Make sure we get it right, per bug 210879
1533 - # Valid options are: none, cman, gulm, all
1534 - #
1535 - # 2009/02:
1536 - # gulm is removed now, now dual-state:
1537 - # cman, none
1538 - # all still exists, but is not needed
1539 - #
1540 - # 2009/07:
1541 - # TODO: add corosync and re-enable ALL
1542 - local clvmd=""
1543 - use cman && clvmd="cman"
1544 - #clvmd="${clvmd/cmangulm/all}"
1545 - [ -z "${clvmd}" ] && clvmd="none"
1546 - myconf="${myconf} --with-clvmd=${clvmd}"
1547 - myconf="${myconf} --with-pool=${buildmode}"
1548 - else
1549 - myconf="${myconf} --with-clvmd=none --with-cluster=none"
1550 - fi
1551 -
1552 - econf \
1553 - $(use_enable readline) \
1554 - $(use_enable selinux) \
1555 - --enable-pkgconfig \
1556 - --with-confdir="${EPREFIX}"/etc \
1557 - --exec-prefix="${EPREFIX}" \
1558 - --sbindir="${EPREFIX}/sbin" \
1559 - --with-staticdir="${EPREFIX}"/sbin \
1560 - --libdir="${EPREFIX}/$(get_libdir)" \
1561 - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
1562 - --with-default-dm-run-dir=/run \
1563 - --with-default-run-dir=/run/lvm \
1564 - --with-default-locking-dir=/run/lock/lvm \
1565 - --with-default-pid-dir=/run \
1566 - $(use_enable udev udev_rules) \
1567 - $(use_enable udev udev_sync) \
1568 - $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
1569 - $(use_enable systemd udev-systemd-background-jobs) \
1570 - "$(systemd_with_unitdir)" \
1571 - ${myconf} \
1572 - CLDFLAGS="${LDFLAGS}"
1573 -}
1574 -
1575 -src_compile() {
1576 - pushd include >/dev/null
1577 - emake
1578 - popd >/dev/null
1579 -
1580 - if use device-mapper-only ; then
1581 - emake device-mapper
1582 - else
1583 - emake
1584 - emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
1585 - fi
1586 -}
1587 -
1588 -src_install() {
1589 - local inst
1590 - INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
1591 - use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
1592 - for inst in ${INSTALL_TARGETS}; do
1593 - emake DESTDIR="${D}" ${inst}
1594 - done
1595 -
1596 - newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
1597 - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
1598 -
1599 - if use !device-mapper-only ; then
1600 - newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
1601 - newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
1602 - newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
1603 -
1604 - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
1605 - newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
1606 - fi
1607 -
1608 - if use clvm; then
1609 - newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
1610 - newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
1611 - fi
1612 -
1613 - if use static-libs; then
1614 - dolib.a libdm/ioctl/libdevmapper.a
1615 - dolib.a libdaemon/client/libdaemonclient.a #462908
1616 - #gen_usr_ldscript libdevmapper.so
1617 - dolib.a daemons/dmeventd/libdevmapper-event.a
1618 - #gen_usr_ldscript libdevmapper-event.so
1619 - else
1620 - rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
1621 - fi
1622 -
1623 - if use lvm2create_initrd; then
1624 - dosbin scripts/lvm2create_initrd/lvm2create_initrd
1625 - doman scripts/lvm2create_initrd/lvm2create_initrd.8
1626 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
1627 - fi
1628 -
1629 - insinto /etc
1630 - doins "${FILESDIR}"/dmtab
1631 -
1632 - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
1633 -}
1634 -
1635 -pkg_postinst() {
1636 - ewarn "Make sure the \"lvm\" init script is in the runlevels:"
1637 - ewarn "# rc-update add lvm boot"
1638 - ewarn
1639 - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
1640 - ewarn "to enable lvm autoactivation and metadata caching."
1641 -}
1642 -
1643 -src_test() {
1644 - einfo "Tests are disabled because of device-node mucking, if you want to"
1645 - einfo "run tests, compile the package and see ${S}/tests"
1646 -}