1 |
commit: a51e6715937b32acc2e33ca76d54897b0fe05966 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 29 20:06:10 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 29 20:06:10 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=a51e6715 |
7 |
|
8 |
sys-fs/lvm2: sync with upstream |
9 |
|
10 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
sys-fs/lvm2/Manifest | 5 +- |
14 |
sys-fs/lvm2/files/lvm.rc-2.02.116-r4 | 132 --------- |
15 |
.../files/{lvm.rc-2.02.166-r2 => lvm.rc-2.02.172} | 68 ++--- |
16 |
.../lvm2-2.02.129-dynamic-static-ldflags.patch | 59 ++++ |
17 |
.../files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch | 12 + |
18 |
.../lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch | 53 ---- |
19 |
sys-fs/lvm2/files/lvm2-2.02.166-portability.patch | 40 --- |
20 |
sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch | 13 + |
21 |
.../files/lvm2-2.02.176-pthread-pkgconfig.patch | 29 ++ |
22 |
sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch | 15 + |
23 |
.../lvm2-2.02.178-dynamic-static-ldflags.patch | 59 ++++ |
24 |
.../lvm2/files/lvm2-2.02.178-example.conf.in.patch | 50 ++++ |
25 |
.../lvm2-2.02.178-static-pkgconfig-libs.patch | 102 +++++++ |
26 |
sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch | 71 ----- |
27 |
sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch | 111 -------- |
28 |
sys-fs/lvm2/files/lvm2-musl-fixes.patch | 33 --- |
29 |
sys-fs/lvm2/lvm2-2.02.116-r4.ebuild | 285 ------------------- |
30 |
sys-fs/lvm2/lvm2-2.02.116.ebuild | 275 ------------------- |
31 |
sys-fs/lvm2/lvm2-2.02.145-r2.ebuild | 58 +--- |
32 |
sys-fs/lvm2/lvm2-2.02.166-r2.ebuild | 301 --------------------- |
33 |
sys-fs/lvm2/lvm2-2.02.171.ebuild | 301 --------------------- |
34 |
sys-fs/lvm2/metadata.xml | 5 - |
35 |
22 files changed, 388 insertions(+), 1689 deletions(-) |
36 |
|
37 |
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest |
38 |
index ab4e667..353cb66 100644 |
39 |
--- a/sys-fs/lvm2/Manifest |
40 |
+++ b/sys-fs/lvm2/Manifest |
41 |
@@ -1,4 +1 @@ |
42 |
-DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c0262f3ed599f2c0fb6f0b767 SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d WHIRLPOOL 1e89ec941882fddba62c9649be46eb5bc6c9cb899669d4bbe4a4a1023c8bf7d8264c4815ef88bb39dedcb9637815411feb826aa102e629d77b80e45e099e398d |
43 |
-DIST LVM2.2.02.145.tgz 1986370 SHA256 98b7c4c07c485a462c6a86e1a5265757133ceea36289ead8a419af29ef39560b SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27 WHIRLPOOL b8c6f4b737625547d4c2994d055f3334e2954f160d10840f1405b6a78f25fc17ba1d270f574408c151140e2afceb007cbfa1c146ed105bbdeca001a03368d549 |
44 |
-DIST LVM2.2.02.166.tgz 2148324 SHA256 e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94 SHA512 8bebe9b474f791b5edf5366b0bd24861fbbaf8a83afa2a9e2a8e3917e05e4ecbf6877f018be03ffb4e9b4c8832208264165b85182bf79a07661adf35128b4a21 WHIRLPOOL a4c2e0b2e8da85301b2518b35193304436715fdf45cbc7bc28fd6f7b88af15e611134d5a530d2311b23544aa67c3a7f13fd3780d4d46fc10854e624fb8b27870 |
45 |
-DIST LVM2.2.02.171.tgz 2333643 SHA256 b815a711a2fabaa5c3dc1a4a284df0268bf0f325f0fc0f5c9530c9bbb54b9964 SHA512 801adcc2ae483f81edf6bfba73090b6b8f710370e48764f08a62da71d617157075bea01593c2535ad5ba71dcb5e0cfe83cec9a65180a6e8b9e0d214bdee79883 WHIRLPOOL fedd62612c6bb4b7764277a0d4474ff3557f041858c71eb7bf2a1c06b646637fe719f91a12c1b5c58ccefa7f4d2daba6bf30409340c52fd3a1b8b01ce62467ab |
46 |
+DIST LVM2.2.02.145.tgz 1986370 BLAKE2B 0c9e5efae17f26ff86152cecbf0b11a74e85007b2fa9491f44dec03ac8c11375bacf6685213b4be19037c8fbf70e13549516716ecf8fa262919a44625e6aab34 SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27 |
47 |
|
48 |
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 |
49 |
deleted file mode 100644 |
50 |
index 74b4a41..0000000 |
51 |
--- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 |
52 |
+++ /dev/null |
53 |
@@ -1,132 +0,0 @@ |
54 |
-#!/sbin/openrc-run |
55 |
-# Copyright 1999-2016 Gentoo Foundation |
56 |
-# Distributed under the terms of the GNU General Public License v2 |
57 |
- |
58 |
-_get_lvm_path() { |
59 |
- local lvm_path= |
60 |
- for lvm_path in /bin/lvm /sbin/lvm ; do |
61 |
- [ -x "$lvm_path" ] && break |
62 |
- done |
63 |
- echo "${lvm_path}" |
64 |
-} |
65 |
- |
66 |
-_need_lvmetad() |
67 |
-{ |
68 |
- local lvm_path="$(_get_lvm_path)" |
69 |
- [ ! -x "${lvm_path}" ] && return 1 |
70 |
- ${lvm_path} dumpconfig global | grep -q 'use_lvmetad=1' |
71 |
-} |
72 |
- |
73 |
-depend() { |
74 |
- before checkfs fsck |
75 |
- after modules device-mapper |
76 |
- # We may use lvmetad based on the configuration. If we added lvmetad |
77 |
- # support while lvm2 is running then we aren't dependent on it. For the |
78 |
- # more common case, if its disabled in the config we aren't dependent |
79 |
- # on it. |
80 |
- config /etc/lvm/lvm.conf |
81 |
- local _need= |
82 |
- if service_started; then |
83 |
- _need=$(service_get_value need) |
84 |
- else |
85 |
- if _need_lvmetad; then |
86 |
- _need="${_need} lvmetad" |
87 |
- fi |
88 |
- fi |
89 |
- need sysfs ${_need} |
90 |
-} |
91 |
- |
92 |
-config='global { locking_dir = "/run/lock/lvm" }' |
93 |
- |
94 |
-dm_in_proc() { |
95 |
- local retval=0 |
96 |
- for x in devices misc ; do |
97 |
- grep -qs 'device-mapper' /proc/${x} |
98 |
- retval=$((${retval} + $?)) |
99 |
- done |
100 |
- return ${retval} |
101 |
-} |
102 |
- |
103 |
-start() { |
104 |
- # LVM support for /usr, /home, /opt .... |
105 |
- # This should be done *before* checking local |
106 |
- # volumes, or they never get checked. |
107 |
- |
108 |
- # NOTE: Add needed modules for LVM or RAID, etc |
109 |
- # to /etc/modules.autoload if needed |
110 |
- lvm_path="$(_get_lvm_path)" |
111 |
- for lvm_path in /bin/lvm /sbin/lvm ; do |
112 |
- [ -x "$lvm_path" ] && break |
113 |
- done |
114 |
- if [ ! -x "$lvm_path" ]; then |
115 |
- eerror "Cannot find lvm binary in /sbin or /bin!" |
116 |
- return 1 |
117 |
- fi |
118 |
- if [ -z "${CDBOOT}" ] ; then |
119 |
- if [ -e /proc/modules ] && ! dm_in_proc ; then |
120 |
- modprobe dm-mod 2>/dev/null |
121 |
- fi |
122 |
- if [ -d /proc/lvm ] || dm_in_proc ; then |
123 |
- ebegin "Setting up the Logical Volume Manager" |
124 |
- #still echo stderr for debugging |
125 |
- lvm_commands="#! ${lvm_path} --config '${config}'\n" |
126 |
- # Extra PV find pass because some devices might not have been available until very recently |
127 |
- lvm_commands="${lvm_commands}pvscan\n" |
128 |
- # Now make the nodes |
129 |
- lvm_commands="${lvm_commands}vgscan --mknodes\n" |
130 |
- # And turn them on! |
131 |
- lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n" |
132 |
- # Order of this is important, have to work around dash and LVM readline |
133 |
- printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null |
134 |
- eend $? "Failed to setup the LVM" |
135 |
- fi |
136 |
- fi |
137 |
-} |
138 |
- |
139 |
-start_post() |
140 |
-{ |
141 |
- # Save if we needed lvmetad |
142 |
- if _need_lvmetad; then |
143 |
- service_set_value need lvmetad |
144 |
- fi |
145 |
-} |
146 |
- |
147 |
-stop() { |
148 |
- for lvm_path in /bin/lvm /sbin/lvm ; do |
149 |
- [ -x "$lvm_path" ] && break |
150 |
- done |
151 |
- if [ ! -x "$lvm_path" ]; then |
152 |
- eerror "Cannot find lvm binary in /sbin or /bin!" |
153 |
- return 1 |
154 |
- fi |
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 |
- ebegin " Shutting Down LVs & VGs" |
169 |
- #still echo stderr for debugging |
170 |
- lvm_commands="#! ${lvm_path} --config '${config}'\n" |
171 |
- # Extra PV find pass because some devices might not have been available until very recently |
172 |
- lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n" |
173 |
- # Now make the nodes |
174 |
- lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n" |
175 |
- # Order of this is important, have to work around dash and LVM readline |
176 |
- printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null |
177 |
- eend $? "Failed (possibly some LVs still needed for /usr or root)" |
178 |
- fi |
179 |
- |
180 |
- einfo "Finished shutting down the Logical Volume Manager" |
181 |
- return 0 |
182 |
-fi |
183 |
-} |
184 |
- |
185 |
-# vim:ts=4 |
186 |
|
187 |
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.166-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.172 |
188 |
similarity index 61% |
189 |
rename from sys-fs/lvm2/files/lvm.rc-2.02.166-r2 |
190 |
rename to sys-fs/lvm2/files/lvm.rc-2.02.172 |
191 |
index 11329bb..4bc363c 100644 |
192 |
--- a/sys-fs/lvm2/files/lvm.rc-2.02.166-r2 |
193 |
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.172 |
194 |
@@ -1,5 +1,5 @@ |
195 |
#!/sbin/openrc-run |
196 |
-# Copyright 1999-2017 Gentoo Foundation |
197 |
+# Copyright 1999-2018 Gentoo Authors |
198 |
# Distributed under the terms of the GNU General Public License v2 |
199 |
|
200 |
_get_lvm_path() { |
201 |
@@ -23,6 +23,7 @@ _need_lvmlockd() |
202 |
[ ! -x "${lvm_path}" ] && return 1 |
203 |
${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1' |
204 |
} |
205 |
+ |
206 |
depend() { |
207 |
before checkfs fsck |
208 |
after modules device-mapper |
209 |
@@ -78,19 +79,19 @@ start() { |
210 |
if [ -d /proc/lvm ] || dm_in_proc ; then |
211 |
ebegin "Setting up the Logical Volume Manager" |
212 |
#still echo stderr for debugging |
213 |
- lvm_commands="#! ${lvm_path} --config '${config}'\n" |
214 |
+ lvm_commands="#!${lvm_path}\n" |
215 |
# Extra PV find pass because some devices might not have been available until very recently |
216 |
- lvm_commands="${lvm_commands}pvscan\n" |
217 |
+ lvm_commands="${lvm_commands}pvscan --config '${config}'\n" |
218 |
# Now make the nodes |
219 |
- lvm_commands="${lvm_commands}vgscan --mknodes\n" |
220 |
+ lvm_commands="${lvm_commands}vgscan --config '${config}' --mknodes\n" |
221 |
# And turn them on! |
222 |
- lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n" |
223 |
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ly\n" |
224 |
if _need_lvmlockd; then |
225 |
# Start lockd VGs as required |
226 |
- lvm_commands="${lvm_commands}vgchange --lock-start --lock-opt auto\n" |
227 |
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --lock-start --lock-opt auto\n" |
228 |
fi |
229 |
# Order of this is important, have to work around dash and LVM readline |
230 |
- printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null |
231 |
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 >/dev/null |
232 |
eend $? "Failed to setup the LVM" |
233 |
fi |
234 |
fi |
235 |
@@ -112,34 +113,37 @@ stop() { |
236 |
eerror "Cannot find lvm binary in /sbin or /bin!" |
237 |
return 1 |
238 |
fi |
239 |
-# Stop LVM2 |
240 |
-if [ -x /sbin/vgs ] && \ |
241 |
- [ -x /sbin/vgchange ] && \ |
242 |
- [ -x /sbin/lvchange ] && \ |
243 |
- [ -f /etc/lvmtab -o -d /etc/lvm ] && \ |
244 |
- [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ] |
245 |
-then |
246 |
- einfo "Shutting down the Logical Volume Manager" |
247 |
|
248 |
- VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null) |
249 |
+ # Stop LVM2 |
250 |
+ if [ -x /sbin/vgs ] && \ |
251 |
+ [ -x /sbin/vgchange ] && \ |
252 |
+ [ -x /sbin/lvchange ] && \ |
253 |
+ [ -f /etc/lvmtab -o -d /etc/lvm ] && \ |
254 |
+ [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ] |
255 |
+ then |
256 |
+ einfo "Shutting down the Logical Volume Manager" |
257 |
|
258 |
- if [ "$VGS" ] |
259 |
- then |
260 |
- ebegin " Shutting Down LVs & VGs" |
261 |
- #still echo stderr for debugging |
262 |
- lvm_commands="#! ${lvm_path} --config '${config}'\n" |
263 |
- # Extra PV find pass because some devices might not have been available until very recently |
264 |
- lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n" |
265 |
- # Now make the nodes |
266 |
- lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n" |
267 |
- # Order of this is important, have to work around dash and LVM readline |
268 |
- printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null |
269 |
- eend $? "Failed (possibly some LVs still needed for /usr or root)" |
270 |
- fi |
271 |
+ VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null) |
272 |
+ |
273 |
+ if [ "$VGS" ] |
274 |
+ then |
275 |
+ local _ending="eend" |
276 |
+ [ "$RC_RUNLEVEL" = shutdown ] && _ending="ewend" |
277 |
+ ebegin " Shutting Down LVs & VGs" |
278 |
+ #still echo stderr for debugging |
279 |
+ lvm_commands="#!${lvm_path}\n" |
280 |
+ # Extra PV find pass because some devices might not have been available until very recently |
281 |
+ lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n" |
282 |
+ # Now make the nodes |
283 |
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n" |
284 |
+ # Order of this is important, have to work around dash and LVM readline |
285 |
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null |
286 |
+ ${_ending} $? "Failed (possibly some LVs still needed for /usr or root)" |
287 |
+ fi |
288 |
|
289 |
- einfo "Finished shutting down the Logical Volume Manager" |
290 |
- return 0 |
291 |
-fi |
292 |
+ einfo "Finished shutting down the Logical Volume Manager" |
293 |
+ return 0 |
294 |
+ fi |
295 |
} |
296 |
|
297 |
# vim:ts=4 |
298 |
|
299 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch |
300 |
new file mode 100644 |
301 |
index 0000000..efdfb81 |
302 |
--- /dev/null |
303 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch |
304 |
@@ -0,0 +1,59 @@ |
305 |
+--- LVM2.2.02.129/configure.in |
306 |
++++ LVM2.2.02.129/configure.in |
307 |
+@@ -31,6 +31,7 @@ |
308 |
+ linux*) |
309 |
+ CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" |
310 |
+ ELDFLAGS="-Wl,--export-dynamic" |
311 |
++ STATIC_LDFLAGS="-Wl,--no-export-dynamic" |
312 |
+ # FIXME Generate list and use --dynamic-list=.dlopen.sym |
313 |
+ CLDWHOLEARCHIVE="-Wl,-whole-archive" |
314 |
+ CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" |
315 |
+@@ -2008,6 +2009,7 @@ |
316 |
+ AC_SUBST(SELINUX_PC) |
317 |
+ AC_SUBST(SNAPSHOTS) |
318 |
+ AC_SUBST(STATICDIR) |
319 |
++AC_SUBST(STATIC_LDFLAGS) |
320 |
+ AC_SUBST(STATIC_LINK) |
321 |
+ AC_SUBST(TESTING) |
322 |
+ AC_SUBST(TESTSUITE_DATA) |
323 |
+--- LVM2.2.02.129/daemons/dmeventd/Makefile.in |
324 |
++++ LVM2.2.02.129/daemons/dmeventd/Makefile.in |
325 |
+@@ -66,7 +66,7 @@ |
326 |
+ $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic |
327 |
+ |
328 |
+ dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a |
329 |
+- $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \ |
330 |
++ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \ |
331 |
+ dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS) |
332 |
+ |
333 |
+ ifeq ("@PKGCONFIG@", "yes") |
334 |
+--- LVM2.2.02.129/make.tmpl.in |
335 |
++++ LVM2.2.02.129/make.tmpl.in |
336 |
+@@ -48,6 +48,7 @@ |
337 |
+ # FIXME set this only where it's needed, not globally? |
338 |
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ |
339 |
+ LDFLAGS ?= @COPTIMISE_FLAG@ @LDFLAGS@ |
340 |
++STATIC_LDFLAGS += @STATIC_LDFLAGS@ |
341 |
+ CLDFLAGS += @CLDFLAGS@ |
342 |
+ ELDFLAGS += @ELDFLAGS@ |
343 |
+ LDDEPS += @LDDEPS@ |
344 |
+--- LVM2.2.02.129/tools/Makefile.in |
345 |
++++ LVM2.2.02.129/tools/Makefile.in |
346 |
+@@ -129,7 +129,7 @@ |
347 |
+ -o $@ dmsetup.o -ldevmapper $(LIBS) |
348 |
+ |
349 |
+ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a |
350 |
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \ |
351 |
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \ |
352 |
+ -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS) |
353 |
+ |
354 |
+ all: device-mapper |
355 |
+@@ -146,7 +146,7 @@ |
356 |
+ endif |
357 |
+ |
358 |
+ lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a |
359 |
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \ |
360 |
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \ |
361 |
+ $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS) |
362 |
+ |
363 |
+ liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o |
364 |
|
365 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch b/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch |
366 |
new file mode 100644 |
367 |
index 0000000..0f830e4 |
368 |
--- /dev/null |
369 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch |
370 |
@@ -0,0 +1,12 @@ |
371 |
+--- a/lib/device/dev-io.c |
372 |
++++ b/lib/device/dev-io.c |
373 |
+@@ -505,7 +505,9 @@ |
374 |
+ dev->flags |= DEV_NOT_O_NOATIME; |
375 |
+ if ((dev->fd = open(name, flags, 0777)) >= 0) { |
376 |
+ log_debug_devs("%s: Not using O_NOATIME", name); |
377 |
++#ifdef O_DIRECT_SUPPORT |
378 |
+ goto opened; |
379 |
++#endif |
380 |
+ } |
381 |
+ } |
382 |
+ #endif |
383 |
|
384 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch |
385 |
deleted file mode 100644 |
386 |
index 43964e2..0000000 |
387 |
--- a/sys-fs/lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch |
388 |
+++ /dev/null |
389 |
@@ -1,53 +0,0 @@ |
390 |
-diff -Naur LVM2.2.02.166.orig/lib/log/log.c LVM2.2.02.166/lib/log/log.c |
391 |
---- LVM2.2.02.166.orig/lib/log/log.c 2016-09-26 06:21:54.000000000 -0700 |
392 |
-+++ LVM2.2.02.166/lib/log/log.c 2016-10-23 15:54:11.538608214 -0700 |
393 |
-@@ -161,6 +161,7 @@ |
394 |
- * Close and reopen standard stream on file descriptor fd. |
395 |
- */ |
396 |
- int reopen_standard_stream(FILE **stream, const char *mode) |
397 |
-+#if defined(__GLIBC__) |
398 |
- { |
399 |
- int fd, fd_copy, new_fd; |
400 |
- const char *name; |
401 |
-@@ -207,6 +208,11 @@ |
402 |
- *stream = new_stream; |
403 |
- return 1; |
404 |
- } |
405 |
-+#else |
406 |
-+{ |
407 |
-+ return freopen(NULL, mode, *stream) != NULL; |
408 |
-+} |
409 |
-+#endif |
410 |
- |
411 |
- void init_log_fn(lvm2_log_fn_t log_fn) |
412 |
- { |
413 |
-diff -Naur LVM2.2.02.166.orig/tools/lvmcmdline.c LVM2.2.02.166/tools/lvmcmdline.c |
414 |
---- LVM2.2.02.166.orig/tools/lvmcmdline.c 2016-09-26 06:21:55.000000000 -0700 |
415 |
-+++ LVM2.2.02.166/tools/lvmcmdline.c 2016-10-23 15:49:07.910610692 -0700 |
416 |
-@@ -1818,7 +1818,7 @@ |
417 |
- int err = is_valid_fd(STDERR_FILENO); |
418 |
- |
419 |
- if (!is_valid_fd(STDIN_FILENO) && |
420 |
-- !(stdin = fopen(_PATH_DEVNULL, "r"))) { |
421 |
-+ !(freopen(_PATH_DEVNULL, "r", stdin))) { |
422 |
- if (err) |
423 |
- perror("stdin stream open"); |
424 |
- else |
425 |
-@@ -1828,7 +1828,7 @@ |
426 |
- } |
427 |
- |
428 |
- if (!is_valid_fd(STDOUT_FILENO) && |
429 |
-- !(stdout = fopen(_PATH_DEVNULL, "w"))) { |
430 |
-+ !(freopen(_PATH_DEVNULL, "w", stdout))) { |
431 |
- if (err) |
432 |
- perror("stdout stream open"); |
433 |
- /* else no stdout */ |
434 |
-@@ -1836,7 +1836,7 @@ |
435 |
- } |
436 |
- |
437 |
- if (!is_valid_fd(STDERR_FILENO) && |
438 |
-- !(stderr = fopen(_PATH_DEVNULL, "w"))) { |
439 |
-+ !(freopen(_PATH_DEVNULL, "w", stderr))) { |
440 |
- printf("stderr stream open: %s\n", |
441 |
- strerror(errno)); |
442 |
- return 0; |
443 |
|
444 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.166-portability.patch b/sys-fs/lvm2/files/lvm2-2.02.166-portability.patch |
445 |
deleted file mode 100644 |
446 |
index 5957aef..0000000 |
447 |
--- a/sys-fs/lvm2/files/lvm2-2.02.166-portability.patch |
448 |
+++ /dev/null |
449 |
@@ -1,40 +0,0 @@ |
450 |
-diff -Naur LVM2.2.02.166.orig/lib/mm/memlock.c LVM2.2.02.166/lib/mm/memlock.c |
451 |
---- LVM2.2.02.166.orig/lib/mm/memlock.c 2016-09-26 06:21:54.000000000 -0700 |
452 |
-+++ LVM2.2.02.166/lib/mm/memlock.c 2016-10-23 15:43:03.957002700 -0700 |
453 |
-@@ -173,6 +173,7 @@ |
454 |
- * MMAP'd memory directly. Since MMAP-as-MORECORE does not munmap the |
455 |
- * memory on free(), this is good enough for our purposes. |
456 |
- */ |
457 |
-+#ifdef __GLIBC__ |
458 |
- while (missing > 0) { |
459 |
- struct mallinfo inf = mallinfo(); |
460 |
- hblks = inf.hblks; |
461 |
-@@ -200,14 +201,17 @@ |
462 |
- break; |
463 |
- } |
464 |
- } |
465 |
-+#endif |
466 |
- |
467 |
- if ((_malloc_mem = malloc(_size_malloc))) |
468 |
- _touch_memory(_malloc_mem, _size_malloc); |
469 |
- |
470 |
-+#ifdef __GLIBC__ |
471 |
- /* free up the reserves so subsequent malloc's can use that memory */ |
472 |
- for (i = 0; i < area; ++i) |
473 |
- free(areas[i]); |
474 |
- #endif |
475 |
-+#endif |
476 |
- } |
477 |
- |
478 |
- static void _release_memory(void) |
479 |
-diff -Naur LVM2.2.02.166.orig/libdaemon/server/daemon-server.c LVM2.2.02.166/libdaemon/server/daemon-server.c |
480 |
---- LVM2.2.02.166.orig/libdaemon/server/daemon-server.c 2016-09-26 06:21:55.000000000 -0700 |
481 |
-+++ LVM2.2.02.166/libdaemon/server/daemon-server.c 2016-10-23 15:43:25.962220845 -0700 |
482 |
-@@ -18,6 +18,7 @@ |
483 |
- #include "daemon-server.h" |
484 |
- #include "daemon-log.h" |
485 |
- |
486 |
-+#include <fcntl.h> |
487 |
- #include <dlfcn.h> |
488 |
- #include <errno.h> |
489 |
- #include <pthread.h> |
490 |
|
491 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch b/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch |
492 |
new file mode 100644 |
493 |
index 0000000..1cbf956 |
494 |
--- /dev/null |
495 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch |
496 |
@@ -0,0 +1,13 @@ |
497 |
+diff --git a/make.tmpl.in b/make.tmpl.in |
498 |
+index a40eaaa15..7eea943aa 100644 |
499 |
+--- a/make.tmpl.in |
500 |
++++ b/make.tmpl.in |
501 |
+@@ -53,7 +53,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile |
502 |
+ |
503 |
+ LIBS = @LIBS@ |
504 |
+ # Extra libraries always linked with static binaries |
505 |
+-STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) |
506 |
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS) |
507 |
+ DEFS += @DEFS@ |
508 |
+ # FIXME set this only where it's needed, not globally? |
509 |
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ |
510 |
|
511 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch |
512 |
new file mode 100644 |
513 |
index 0000000..c0265e8 |
514 |
--- /dev/null |
515 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch |
516 |
@@ -0,0 +1,29 @@ |
517 |
+--- LVM2.2.02.176/libdm/libdevmapper.pc.in |
518 |
++++ LVM2.2.02.176/libdm/libdevmapper.pc.in |
519 |
+@@ -9,4 +9,4 @@ |
520 |
+ Cflags: -I${includedir} |
521 |
+ Libs: -L${libdir} -ldevmapper |
522 |
+ Requires.private: @SELINUX_PC@ @UDEV_PC@ |
523 |
+-Libs.private: -lm @RT_LIBS@ |
524 |
++Libs.private: -lm @RT_LIBS@ @PTHREAD_LIBS@ |
525 |
+--- LVM2.2.02.176/tools/Makefile.in |
526 |
++++ LVM2.2.02.176/tools/Makefile.in |
527 |
+@@ -93,6 +93,7 @@ |
528 |
+ INSTALL_LVM_TARGETS += install_tools_static |
529 |
+ INSTALL_DMSETUP_TARGETS += install_dmsetup_static |
530 |
+ INSTALL_CMDLIB_TARGETS += install_cmdlib_static |
531 |
++ STATIC_LIBS += @PTHREAD_LIBS@ |
532 |
+ endif |
533 |
+ |
534 |
+ LVMLIBS = $(LVMINTERNAL_LIBS) -ldevmapper |
535 |
+@@ -118,6 +119,10 @@ |
536 |
+ |
537 |
+ include $(top_builddir)/make.tmpl |
538 |
+ |
539 |
++ifeq ("@STATIC_LINK@", "yes") |
540 |
++ STATIC_LIBS += @PTHREAD_LIBS@ |
541 |
++endif |
542 |
++ |
543 |
+ device-mapper: $(TARGETS_DM) |
544 |
+ |
545 |
+ CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS) |
546 |
|
547 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch b/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch |
548 |
new file mode 100644 |
549 |
index 0000000..c831c6d |
550 |
--- /dev/null |
551 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch |
552 |
@@ -0,0 +1,15 @@ |
553 |
+http://bugs.gentoo.org/330255 |
554 |
+ |
555 |
+liblvm2app.so: undefined reference to `floor' |
556 |
+ |
557 |
+--- LVM2.2.02.178/liblvm/Makefile.in |
558 |
++++ LVM2.2.02.178/liblvm/Makefile.in |
559 |
+@@ -43,7 +43,7 @@ |
560 |
+ include $(top_builddir)/make.tmpl |
561 |
+ |
562 |
+ LDFLAGS += -L$(top_builddir)/lib -L$(top_builddir)/daemons/dmeventd |
563 |
+-LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio |
564 |
++LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio -lm |
565 |
+ |
566 |
+ .PHONY: install_dynamic install_static install_include install_pkgconfig |
567 |
+ |
568 |
|
569 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch |
570 |
new file mode 100644 |
571 |
index 0000000..0a0e732 |
572 |
--- /dev/null |
573 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch |
574 |
@@ -0,0 +1,59 @@ |
575 |
+--- LVM2.2.02.178/configure.ac |
576 |
++++ LVM2.2.02.178/configure.ac |
577 |
+@@ -33,6 +33,7 @@ |
578 |
+ CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" |
579 |
+ # equivalent to -rdynamic |
580 |
+ ELDFLAGS="-Wl,--export-dynamic" |
581 |
++ STATIC_LDFLAGS="-Wl,--no-export-dynamic" |
582 |
+ # FIXME Generate list and use --dynamic-list=.dlopen.sym |
583 |
+ CLDWHOLEARCHIVE="-Wl,-whole-archive" |
584 |
+ CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" |
585 |
+@@ -2042,6 +2043,7 @@ |
586 |
+ AC_SUBST(SYSTEMD_LIBS) |
587 |
+ AC_SUBST(SNAPSHOTS) |
588 |
+ AC_SUBST(STATICDIR) |
589 |
++AC_SUBST(STATIC_LDFLAGS) |
590 |
+ AC_SUBST(STATIC_LINK) |
591 |
+ AC_SUBST(TESTSUITE_DATA) |
592 |
+ AC_SUBST(THIN) |
593 |
+--- LVM2.2.02.178/daemons/dmeventd/Makefile.in |
594 |
++++ LVM2.2.02.178/daemons/dmeventd/Makefile.in |
595 |
+@@ -64,7 +64,7 @@ |
596 |
+ -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) |
597 |
+ |
598 |
+ dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a |
599 |
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ |
600 |
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ |
601 |
+ -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS) |
602 |
+ |
603 |
+ ifeq ("@PKGCONFIG@", "yes") |
604 |
+--- LVM2.2.02.178/make.tmpl.in |
605 |
++++ LVM2.2.02.178/make.tmpl.in |
606 |
+@@ -64,6 +64,7 @@ |
607 |
+ # FIXME set this only where it's needed, not globally? |
608 |
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ |
609 |
+ LDFLAGS ?= @LDFLAGS@ |
610 |
++STATIC_LDFLAGS += @STATIC_LDFLAGS@ |
611 |
+ CLDFLAGS += @CLDFLAGS@ |
612 |
+ ELDFLAGS += @ELDFLAGS@ |
613 |
+ LDDEPS += @LDDEPS@ |
614 |
+--- LVM2.2.02.178/tools/Makefile.in |
615 |
++++ LVM2.2.02.178/tools/Makefile.in |
616 |
+@@ -129,7 +129,7 @@ |
617 |
+ |
618 |
+ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a |
619 |
+ @echo " [CC] $@" |
620 |
+- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \ |
621 |
++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \ |
622 |
+ -o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS) |
623 |
+ |
624 |
+ all: device-mapper |
625 |
+@@ -159,7 +159,7 @@ |
626 |
+ |
627 |
+ lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a |
628 |
+ @echo " [CC] $@" |
629 |
+- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \ |
630 |
++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \ |
631 |
+ $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS) |
632 |
+ |
633 |
+ liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o |
634 |
|
635 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch |
636 |
new file mode 100644 |
637 |
index 0000000..34c710d |
638 |
--- /dev/null |
639 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch |
640 |
@@ -0,0 +1,50 @@ |
641 |
+--- LVM2.2.02.178/conf/example.conf.in |
642 |
++++ LVM2.2.02.178/conf/example.conf.in |
643 |
+@@ -128,6 +128,9 @@ |
644 |
+ # Example |
645 |
+ # Accept every block device: |
646 |
+ # filter = [ "a|.*/|" ] |
647 |
++ # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel |
648 |
++ # noise when you probed while not available. |
649 |
++ filter = [ "r|/dev/nbd.*|", "a/.*/" ] |
650 |
+ # Reject the cdrom drive: |
651 |
+ # filter = [ "r|/dev/cdrom|" ] |
652 |
+ # Work with just loopback devices, e.g. for testing: |
653 |
+@@ -704,7 +707,8 @@ |
654 |
+ # Configuration option global/fallback_to_lvm1. |
655 |
+ # This setting is no longer used. |
656 |
+ # This configuration option has an automatic default value. |
657 |
+- # fallback_to_lvm1 = 0 |
658 |
++ # Gentoo: the LVM tools are a seperate package. |
659 |
++ fallback_to_lvm1 = 0 |
660 |
+ |
661 |
+ # Configuration option global/format. |
662 |
+ # This setting is no longer used. |
663 |
+@@ -1508,7 +1512,7 @@ |
664 |
+ |
665 |
+ # Configuration section metadata. |
666 |
+ # This configuration section has an automatic default value. |
667 |
+-# metadata { |
668 |
++metadata { |
669 |
+ |
670 |
+ # Configuration option metadata/check_pv_device_sizes. |
671 |
+ # Check device sizes are not smaller than corresponding PV sizes. |
672 |
+@@ -1553,7 +1557,8 @@ |
673 |
+ # |
674 |
+ # This configuration option is advanced. |
675 |
+ # This configuration option has an automatic default value. |
676 |
+- # pvmetadatacopies = 1 |
677 |
++ # Gentoo: enable for data safety, but PV resize is then disabled. |
678 |
++ # pvmetadatacopies = 2 |
679 |
+ |
680 |
+ # Configuration option metadata/vgmetadatacopies. |
681 |
+ # Number of copies of metadata to maintain for each VG. |
682 |
+@@ -1608,7 +1613,7 @@ |
683 |
+ # |
684 |
+ # This configuration option is advanced. |
685 |
+ # This configuration option does not have a default value defined. |
686 |
+-# } |
687 |
++} |
688 |
+ |
689 |
+ # Configuration section report. |
690 |
+ # LVM report command output formatting. |
691 |
|
692 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch |
693 |
new file mode 100644 |
694 |
index 0000000..989b308 |
695 |
--- /dev/null |
696 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch |
697 |
@@ -0,0 +1,102 @@ |
698 |
+--- LVM2.2.02.178/configure.ac |
699 |
++++ LVM2.2.02.178/configure.ac |
700 |
+@@ -1238,6 +1238,7 @@ |
701 |
+ PKG_CHECK_MODULES(BLKID, blkid >= 2.24, |
702 |
+ [ BLKID_WIPING=yes |
703 |
+ BLKID_PC="blkid" |
704 |
++ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC` |
705 |
+ DEFAULT_USE_BLKID_WIPING=1 |
706 |
+ AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.]) |
707 |
+ ], [if test "$BLKID_WIPING" = maybe; then |
708 |
+@@ -1286,6 +1287,7 @@ |
709 |
+ if test "$UDEV_SYNC" = yes; then |
710 |
+ pkg_config_init |
711 |
+ PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"]) |
712 |
++ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev` |
713 |
+ AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.]) |
714 |
+ |
715 |
+ AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1, |
716 |
+@@ -1564,19 +1566,32 @@ |
717 |
+ if test "$SELINUX" = yes; then |
718 |
+ AC_CHECK_LIB([sepol], [sepol_check_context], [ |
719 |
+ AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.]) |
720 |
+- SELINUX_LIBS="-lsepol"]) |
721 |
++ SEPOL_LIBS="-lsepol"]) |
722 |
++ |
723 |
++ dnl -- init pkgconfig if required |
724 |
++ if test x$PKGCONFIG_INIT != x1; then |
725 |
++ pkg_config_init |
726 |
++ fi |
727 |
++ PKG_CHECK_MODULES(SELINUX, libselinux, [ |
728 |
++ SELINUX_PC="libselinux" |
729 |
++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux` |
730 |
++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS" |
731 |
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) |
732 |
++ ],[ |
733 |
++ dnl -- old non-pkgconfig method, is buggy with static builds |
734 |
+ |
735 |
+ AC_CHECK_LIB([selinux], [is_selinux_enabled], [ |
736 |
+ AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout) |
737 |
+ AC_CHECK_HEADERS([selinux/label.h]) |
738 |
+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) |
739 |
+- SELINUX_LIBS="-lselinux $SELINUX_LIBS" |
740 |
++ SELINUX_LIBS="-lselinux $SEPOL_LIBS" |
741 |
+ SELINUX_PC="libselinux" |
742 |
+ HAVE_SELINUX=yes ], [ |
743 |
+ AC_MSG_WARN(Disabling selinux) |
744 |
+ SELINUX_LIBS= |
745 |
+ SELINUX_PC= |
746 |
+ HAVE_SELINUX=no ]) |
747 |
++ ]) |
748 |
+ fi |
749 |
+ |
750 |
+ ################################################################################ |
751 |
+@@ -1927,6 +1942,7 @@ |
752 |
+ ################################################################################ |
753 |
+ AC_SUBST(APPLIB) |
754 |
+ AC_SUBST(AWK) |
755 |
++AC_SUBST(BLKID_STATIC_LIBS) |
756 |
+ AC_SUBST(BLKID_PC) |
757 |
+ AC_SUBST(BUILD_CMIRRORD) |
758 |
+ AC_SUBST(BUILD_DMEVENTD) |
759 |
+@@ -2037,6 +2053,7 @@ |
760 |
+ AC_SUBST(SALCK_LIBS) |
761 |
+ AC_SUBST(SBINDIR) |
762 |
+ AC_SUBST(SELINUX_LIBS) |
763 |
++AC_SUBST(SELINUX_STATIC_LIBS) |
764 |
+ AC_SUBST(SELINUX_PC) |
765 |
+ AC_SUBST(SYSCONFDIR) |
766 |
+ AC_SUBST(SYSTEMD_LIBS) |
767 |
+@@ -2053,6 +2070,7 @@ |
768 |
+ AC_SUBST(CACHE_DUMP_CMD) |
769 |
+ AC_SUBST(CACHE_REPAIR_CMD) |
770 |
+ AC_SUBST(CACHE_RESTORE_CMD) |
771 |
++AC_SUBST(UDEV_STATIC_LIBS) |
772 |
+ AC_SUBST(UDEV_PC) |
773 |
+ AC_SUBST(UDEV_RULES) |
774 |
+ AC_SUBST(UDEV_SYNC) |
775 |
+--- LVM2.2.02.178/make.tmpl.in |
776 |
++++ LVM2.2.02.178/make.tmpl.in |
777 |
+@@ -59,7 +59,7 @@ |
778 |
+ |
779 |
+ LIBS = @LIBS@ |
780 |
+ # Extra libraries always linked with static binaries |
781 |
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS) |
782 |
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) |
783 |
+ DEFS += @DEFS@ |
784 |
+ # FIXME set this only where it's needed, not globally? |
785 |
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ |
786 |
+@@ -75,10 +75,13 @@ |
787 |
+ PTHREAD_LIBS = @PTHREAD_LIBS@ |
788 |
+ READLINE_LIBS = @READLINE_LIBS@ |
789 |
+ SELINUX_LIBS = @SELINUX_LIBS@ |
790 |
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@ |
791 |
+ UDEV_CFLAGS = @UDEV_CFLAGS@ |
792 |
+ UDEV_LIBS = @UDEV_LIBS@ |
793 |
++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@ |
794 |
+ BLKID_CFLAGS = @BLKID_CFLAGS@ |
795 |
+ BLKID_LIBS = @BLKID_LIBS@ |
796 |
++BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@ |
797 |
+ SYSTEMD_LIBS = @SYSTEMD_LIBS@ |
798 |
+ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ |
799 |
+ |
800 |
|
801 |
diff --git a/sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch b/sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch |
802 |
deleted file mode 100644 |
803 |
index b7da941..0000000 |
804 |
--- a/sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch |
805 |
+++ /dev/null |
806 |
@@ -1,71 +0,0 @@ |
807 |
-File lvm2-2.02.116-r99.orig/.ipc_in is a fifo while file lvm2-2.02.116-r99/.ipc_in is a fifo |
808 |
-File lvm2-2.02.116-r99.orig/.ipc_out is a fifo while file lvm2-2.02.116-r99/.ipc_out is a fifo |
809 |
-diff -Naur lvm2-2.02.116-r99.orig/work/LVM2.2.02.116/lib/mm/memlock.c lvm2-2.02.116-r99/work/LVM2.2.02.116/lib/mm/memlock.c |
810 |
---- lvm2-2.02.116-r99.orig/work/LVM2.2.02.116/lib/mm/memlock.c 2015-01-30 16:19:53.000000000 +0000 |
811 |
-+++ lvm2-2.02.116-r99/work/LVM2.2.02.116/lib/mm/memlock.c 2015-10-13 21:02:49.385224386 +0000 |
812 |
-@@ -134,10 +134,8 @@ |
813 |
- static void _allocate_memory(void) |
814 |
- { |
815 |
- #ifndef VALGRIND_POOL |
816 |
-- void *stack_mem; |
817 |
-+ void *stack_mem, *temp_malloc_mem; |
818 |
- struct rlimit limit; |
819 |
-- int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks; |
820 |
-- char *areas[max_areas]; |
821 |
- |
822 |
- /* Check if we could preallocate requested stack */ |
823 |
- if ((getrlimit (RLIMIT_STACK, &limit) == 0) && |
824 |
-@@ -146,50 +144,13 @@ |
825 |
- _touch_memory(stack_mem, _size_stack); |
826 |
- /* FIXME else warn user setting got ignored */ |
827 |
- |
828 |
-- /* |
829 |
-- * When a brk() fails due to fragmented address space (which sometimes |
830 |
-- * happens when we try to grab 8M or so), glibc will make a new |
831 |
-- * arena. In this arena, the rules for using “direct” mmap are relaxed, |
832 |
-- * circumventing the MAX_MMAPs and MMAP_THRESHOLD settings. We can, |
833 |
-- * however, detect when this happens with mallinfo() and try to co-opt |
834 |
-- * malloc into using MMAP as a MORECORE substitute instead of returning |
835 |
-- * MMAP'd memory directly. Since MMAP-as-MORECORE does not munmap the |
836 |
-- * memory on free(), this is good enough for our purposes. |
837 |
-- */ |
838 |
-- while (missing > 0) { |
839 |
-- struct mallinfo inf = mallinfo(); |
840 |
-- hblks = inf.hblks; |
841 |
-- |
842 |
-- if ((areas[area] = malloc(_size_malloc_tmp))) |
843 |
-- _touch_memory(areas[area], _size_malloc_tmp); |
844 |
-- |
845 |
-- inf = mallinfo(); |
846 |
-- |
847 |
-- if (hblks < inf.hblks) { |
848 |
-- /* malloc cheated and used mmap, even though we told it |
849 |
-- not to; we try with twice as many areas, each half |
850 |
-- the size, to circumvent the faulty logic in glibc */ |
851 |
-- free(areas[area]); |
852 |
-- _size_malloc_tmp /= 2; |
853 |
-- } else { |
854 |
-- ++ area; |
855 |
-- missing -= _size_malloc_tmp; |
856 |
-- } |
857 |
-- |
858 |
-- if (area == max_areas && missing > 0) { |
859 |
-- /* Too bad. Warn the user and proceed, as things are |
860 |
-- * most likely going to work out anyway. */ |
861 |
-- log_warn("WARNING: Failed to reserve memory, %d bytes missing.", missing); |
862 |
-- break; |
863 |
-- } |
864 |
-- } |
865 |
-+ if ((temp_malloc_mem = malloc(_size_malloc_tmp))) |
866 |
-+ _touch_memory(temp_malloc_mem, _size_malloc_tmp); |
867 |
- |
868 |
- if ((_malloc_mem = malloc(_size_malloc))) |
869 |
- _touch_memory(_malloc_mem, _size_malloc); |
870 |
- |
871 |
-- /* free up the reserves so subsequent malloc's can use that memory */ |
872 |
-- for (i = 0; i < area; ++i) |
873 |
-- free(areas[i]); |
874 |
-+ free(temp_malloc_mem); |
875 |
- #endif |
876 |
- } |
877 |
- |
878 |
|
879 |
diff --git a/sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch |
880 |
deleted file mode 100644 |
881 |
index 71fa5bf..0000000 |
882 |
--- a/sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch |
883 |
+++ /dev/null |
884 |
@@ -1,111 +0,0 @@ |
885 |
---- LVM2.2.02.103.orig/lib/commands/toolcontext.c |
886 |
-+++ LVM2.2.02.103/lib/commands/toolcontext.c |
887 |
-@@ -1336,7 +1336,10 @@ |
888 |
- /* |
889 |
- * Close and reopen stream on file descriptor fd. |
890 |
- */ |
891 |
--static int _reopen_stream(FILE *stream, int fd, const char *mode, const char *name, FILE **new_stream) |
892 |
-+#ifdef __GLIBC__ |
893 |
-+#define _reopen_stream(stream, fd, mode, name) __reopen_stream(stream, fd, mode, name, &stream) |
894 |
-+ |
895 |
-+static int __reopen_stream(FILE *stream, int fd, const char *mode, const char *name, FILE **new_stream) |
896 |
- { |
897 |
- int fd_copy, new_fd; |
898 |
- |
899 |
-@@ -1363,6 +1366,9 @@ |
900 |
- |
901 |
- return 1; |
902 |
- } |
903 |
-+#else |
904 |
-+#define _reopen_stream(stream, fd, mode, name) (freopen(NULL, mode, stream) != NULL) |
905 |
-+#endif |
906 |
- |
907 |
- /* Entry point */ |
908 |
- struct cmd_context *create_toolcontext(unsigned is_long_lived, |
909 |
-@@ -1371,7 +1377,6 @@ |
910 |
- unsigned threaded) |
911 |
- { |
912 |
- struct cmd_context *cmd; |
913 |
-- FILE *new_stream; |
914 |
- int flags; |
915 |
- |
916 |
- #ifdef M_MMAP_MAX |
917 |
-@@ -1421,9 +1426,8 @@ |
918 |
- if (is_valid_fd(STDIN_FILENO) && |
919 |
- ((flags = fcntl(STDIN_FILENO, F_GETFL)) > 0) && |
920 |
- (flags & O_ACCMODE) != O_WRONLY) { |
921 |
-- if (!_reopen_stream(stdin, STDIN_FILENO, "r", "stdin", &new_stream)) |
922 |
-+ if (!_reopen_stream(stdin, STDIN_FILENO, "r", "stdin")) |
923 |
- goto_out; |
924 |
-- stdin = new_stream; |
925 |
- if (setvbuf(stdin, cmd->linebuffer, _IOLBF, linebuffer_size)) { |
926 |
- log_sys_error("setvbuf", ""); |
927 |
- goto out; |
928 |
-@@ -1433,9 +1437,8 @@ |
929 |
- if (is_valid_fd(STDOUT_FILENO) && |
930 |
- ((flags = fcntl(STDOUT_FILENO, F_GETFL)) > 0) && |
931 |
- (flags & O_ACCMODE) != O_RDONLY) { |
932 |
-- if (!_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout", &new_stream)) |
933 |
-+ if (!_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout")) |
934 |
- goto_out; |
935 |
-- stdout = new_stream; |
936 |
- if (setvbuf(stdout, cmd->linebuffer + linebuffer_size, |
937 |
- _IOLBF, linebuffer_size)) { |
938 |
- log_sys_error("setvbuf", ""); |
939 |
-@@ -1715,7 +1718,6 @@ |
940 |
- void destroy_toolcontext(struct cmd_context *cmd) |
941 |
- { |
942 |
- struct dm_config_tree *cft_cmdline; |
943 |
-- FILE *new_stream; |
944 |
- int flags; |
945 |
- |
946 |
- if (cmd->dump_filter && cmd->filter && cmd->filter->dump && |
947 |
-@@ -1752,8 +1754,7 @@ |
948 |
- if (is_valid_fd(STDIN_FILENO) && |
949 |
- ((flags = fcntl(STDIN_FILENO, F_GETFL)) > 0) && |
950 |
- (flags & O_ACCMODE) != O_WRONLY) { |
951 |
-- if (_reopen_stream(stdin, STDIN_FILENO, "r", "stdin", &new_stream)) { |
952 |
-- stdin = new_stream; |
953 |
-+ if (_reopen_stream(stdin, STDIN_FILENO, "r", "stdin")) { |
954 |
- setlinebuf(stdin); |
955 |
- } else |
956 |
- cmd->linebuffer = NULL; /* Leave buffer in place (deliberate leak) */ |
957 |
-@@ -1762,8 +1763,7 @@ |
958 |
- if (is_valid_fd(STDOUT_FILENO) && |
959 |
- ((flags = fcntl(STDOUT_FILENO, F_GETFL)) > 0) && |
960 |
- (flags & O_ACCMODE) != O_RDONLY) { |
961 |
-- if (_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout", &new_stream)) { |
962 |
-- stdout = new_stream; |
963 |
-+ if (_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout")) { |
964 |
- setlinebuf(stdout); |
965 |
- } else |
966 |
- cmd->linebuffer = NULL; /* Leave buffer in place (deliberate leak) */ |
967 |
---- LVM2.2.02.103.orig/tools/lvmcmdline.c |
968 |
-+++ LVM2.2.02.103/tools/lvmcmdline.c |
969 |
-@@ -1252,7 +1252,7 @@ |
970 |
- int err = is_valid_fd(STDERR_FILENO); |
971 |
- |
972 |
- if (!is_valid_fd(STDIN_FILENO) && |
973 |
-- !(stdin = fopen(_PATH_DEVNULL, "r"))) { |
974 |
-+ !freopen(_PATH_DEVNULL, "r", stdin)) { |
975 |
- if (err) |
976 |
- perror("stdin stream open"); |
977 |
- else |
978 |
-@@ -1262,7 +1262,7 @@ |
979 |
- } |
980 |
- |
981 |
- if (!is_valid_fd(STDOUT_FILENO) && |
982 |
-- !(stdout = fopen(_PATH_DEVNULL, "w"))) { |
983 |
-+ !freopen(_PATH_DEVNULL, "w", stdout)) { |
984 |
- if (err) |
985 |
- perror("stdout stream open"); |
986 |
- /* else no stdout */ |
987 |
-@@ -1270,7 +1270,7 @@ |
988 |
- } |
989 |
- |
990 |
- if (!is_valid_fd(STDERR_FILENO) && |
991 |
-- !(stderr = fopen(_PATH_DEVNULL, "w"))) { |
992 |
-+ !freopen(_PATH_DEVNULL, "w", stderr)) { |
993 |
- printf("stderr stream open: %s\n", |
994 |
- strerror(errno)); |
995 |
- return 0; |
996 |
|
997 |
diff --git a/sys-fs/lvm2/files/lvm2-musl-fixes.patch b/sys-fs/lvm2/files/lvm2-musl-fixes.patch |
998 |
deleted file mode 100644 |
999 |
index b62e80a..0000000 |
1000 |
--- a/sys-fs/lvm2/files/lvm2-musl-fixes.patch |
1001 |
+++ /dev/null |
1002 |
@@ -1,33 +0,0 @@ |
1003 |
-diff -uar LVM2.2.02.110-old/daemons/lvmetad/lvmetad-core.c LVM2.2.02.110/daemons/lvmetad/lvmetad-core.c |
1004 |
---- LVM2.2.02.110-old/daemons/lvmetad/lvmetad-core.c 2015-05-14 21:37:01.226755157 +0000 |
1005 |
-+++ LVM2.2.02.110/daemons/lvmetad/lvmetad-core.c 2015-05-14 21:44:08.098585801 +0000 |
1006 |
-@@ -124,7 +124,7 @@ |
1007 |
- if (!(vg = dm_hash_lookup(s->lock.vg, id))) { |
1008 |
- if (!(vg = malloc(sizeof(pthread_mutex_t))) || |
1009 |
- pthread_mutexattr_init(&rec) || |
1010 |
-- pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE_NP) || |
1011 |
-+ pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE) || |
1012 |
- pthread_mutex_init(vg, &rec)) |
1013 |
- goto bad; |
1014 |
- if (!dm_hash_insert(s->lock.vg, id, vg)) { |
1015 |
-@@ -1152,7 +1152,7 @@ |
1016 |
- ls->log = s->log; |
1017 |
- |
1018 |
- pthread_mutexattr_init(&rec); |
1019 |
-- pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE_NP); |
1020 |
-+ pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE); |
1021 |
- pthread_mutex_init(&ls->lock.pvid_to_pvmeta, &rec); |
1022 |
- pthread_mutex_init(&ls->lock.vgid_to_metadata, &rec); |
1023 |
- pthread_mutex_init(&ls->lock.pvid_to_vgid, NULL); |
1024 |
-Only in LVM2.2.02.110/lib/commands: toolcontext.c.orig |
1025 |
-diff -uar LVM2.2.02.110-old/libdaemon/server/daemon-server.c LVM2.2.02.110/libdaemon/server/daemon-server.c |
1026 |
---- LVM2.2.02.110-old/libdaemon/server/daemon-server.c 2015-05-14 21:37:01.256755555 +0000 |
1027 |
-+++ LVM2.2.02.110/libdaemon/server/daemon-server.c 2015-05-14 21:37:51.108437752 +0000 |
1028 |
-@@ -26,6 +26,7 @@ |
1029 |
- #include <sys/un.h> |
1030 |
- #include <unistd.h> |
1031 |
- #include <signal.h> |
1032 |
-+#include <fcntl.h> |
1033 |
- |
1034 |
- #include <syslog.h> /* FIXME. For the global closelog(). */ |
1035 |
- |
1036 |
|
1037 |
diff --git a/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild |
1038 |
deleted file mode 100644 |
1039 |
index ac14fae..0000000 |
1040 |
--- a/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild |
1041 |
+++ /dev/null |
1042 |
@@ -1,285 +0,0 @@ |
1043 |
-# Copyright 1999-2016 Gentoo Foundation |
1044 |
-# Distributed under the terms of the GNU General Public License v2 |
1045 |
- |
1046 |
-EAPI=5 |
1047 |
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic |
1048 |
- |
1049 |
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software" |
1050 |
-HOMEPAGE="https://sourceware.org/lvm2/" |
1051 |
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz |
1052 |
- ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz" |
1053 |
- |
1054 |
-LICENSE="GPL-2" |
1055 |
-SLOT="0" |
1056 |
-KEYWORDS="amd64 arm arm64 ~mips ppc ~x86" |
1057 |
-IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only" |
1058 |
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin ) |
1059 |
- systemd? ( udev ) |
1060 |
- clvm? ( !systemd )" |
1061 |
- |
1062 |
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* ) |
1063 |
- readline? ( sys-libs/readline:0= ) |
1064 |
- udev? ( >=virtual/libudev-208:=[static-libs?] )" |
1065 |
-# /run is now required for locking during early boot. /var cannot be assumed to |
1066 |
-# be available -- thus, pull in recent enough baselayout for /run. |
1067 |
-# This version of LVM is incompatible with cryptsetup <1.1.2. |
1068 |
-RDEPEND="${DEPEND_COMMON} |
1069 |
- >=sys-apps/baselayout-2.2 |
1070 |
- !<sys-apps/openrc-0.11 |
1071 |
- !<sys-fs/cryptsetup-1.1.2 |
1072 |
- !!sys-fs/clvm |
1073 |
- !!sys-fs/lvm-user |
1074 |
- >=sys-apps/util-linux-2.16 |
1075 |
- lvm2create_initrd? ( |
1076 |
- app-arch/cpio |
1077 |
- sys-apps/makedev |
1078 |
- ) |
1079 |
- thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )" |
1080 |
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check |
1081 |
-# USE 'static' currently only works with eudev, bug 520450 |
1082 |
-DEPEND="${DEPEND_COMMON} |
1083 |
- virtual/pkgconfig |
1084 |
- >=sys-devel/binutils-2.20.1-r1 |
1085 |
- static? ( |
1086 |
- selinux? ( sys-libs/libselinux[static-libs] ) |
1087 |
- udev? ( >=sys-fs/eudev-3.1.2[static-libs] ) |
1088 |
- >=sys-apps/util-linux-2.16[static-libs] |
1089 |
- )" |
1090 |
- |
1091 |
-S=${WORKDIR}/${PN/lvm/LVM}.${PV} |
1092 |
- |
1093 |
-pkg_setup() { |
1094 |
- local CONFIG_CHECK="~SYSVIPC" |
1095 |
- |
1096 |
- if use udev; then |
1097 |
- local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n" |
1098 |
- if linux_config_exists; then |
1099 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
1100 |
- if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then |
1101 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
1102 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
1103 |
- fi |
1104 |
- fi |
1105 |
- fi |
1106 |
- |
1107 |
- check_extra_config |
1108 |
- |
1109 |
- # 1. Genkernel no longer copies /sbin/lvm blindly. |
1110 |
- if use static; then |
1111 |
- elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with" |
1112 |
- elog "their static versions. If you need the static binaries," |
1113 |
- elog "you must append .static to the filename!" |
1114 |
- fi |
1115 |
-} |
1116 |
- |
1117 |
-src_prepare() { |
1118 |
- # Gentoo specific modification(s): |
1119 |
- epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch |
1120 |
- |
1121 |
- sed -i \ |
1122 |
- -e "1iAR = $(tc-getAR)" \ |
1123 |
- -e "s:CC ?= @CC@:CC = $(tc-getCC):" \ |
1124 |
- make.tmpl.in || die #444082 |
1125 |
- |
1126 |
- sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212 |
1127 |
- |
1128 |
- if use udev && ! use device-mapper-only; then |
1129 |
- sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196 |
1130 |
- elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in" |
1131 |
- elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad" |
1132 |
- elog "if it was previously disabled." |
1133 |
- fi |
1134 |
- |
1135 |
- sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514 |
1136 |
- |
1137 |
- # For upstream -- review and forward: |
1138 |
- epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch |
1139 |
- epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch |
1140 |
- epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331 |
1141 |
- epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373 |
1142 |
- epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed |
1143 |
- epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905 |
1144 |
- epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid |
1145 |
- epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450 |
1146 |
- # Patches for musl |
1147 |
- epatch "${FILESDIR}"/${PN}-fix-stdio-usage.patch # Patch from alpine linux |
1148 |
- epatch "${FILESDIR}"/${PN}-musl-fixes.patch |
1149 |
- epatch "${FILESDIR}"/${PN}-avoid-mallinfo.patch |
1150 |
- |
1151 |
- # Without thin-privision-tools, there is nothing to install for target install_man7: |
1152 |
- use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; } |
1153 |
- |
1154 |
- eautoreconf |
1155 |
-} |
1156 |
- |
1157 |
-src_configure() { |
1158 |
- filter-flags -flto |
1159 |
- local myconf |
1160 |
- local buildmode |
1161 |
- |
1162 |
- myconf="${myconf} $(use_enable !device-mapper-only dmeventd)" |
1163 |
- myconf="${myconf} $(use_enable !device-mapper-only cmdlib)" |
1164 |
- myconf="${myconf} $(use_enable !device-mapper-only applib)" |
1165 |
- myconf="${myconf} $(use_enable !device-mapper-only fsadm)" |
1166 |
- myconf="${myconf} $(use_enable !device-mapper-only lvmetad)" |
1167 |
- use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs" |
1168 |
- |
1169 |
- # Most of this package does weird stuff. |
1170 |
- # The build options are tristate, and --without is NOT supported |
1171 |
- # options: 'none', 'internal', 'shared' |
1172 |
- if use static; then |
1173 |
- buildmode="internal" |
1174 |
- # This only causes the .static versions to become available |
1175 |
- myconf="${myconf} --enable-static_link" |
1176 |
- else |
1177 |
- buildmode="shared" |
1178 |
- fi |
1179 |
- dmbuildmode=$(use !device-mapper-only && echo internal || echo none) |
1180 |
- |
1181 |
- # dmeventd requires mirrors to be internal, and snapshot available |
1182 |
- # so we cannot disable them |
1183 |
- myconf="${myconf} --with-mirrors=${dmbuildmode}" |
1184 |
- myconf="${myconf} --with-snapshots=${dmbuildmode}" |
1185 |
- if use thin; then |
1186 |
- myconf="${myconf} --with-thin=internal --with-cache=internal" |
1187 |
- local texec |
1188 |
- for texec in check dump repair restore; do |
1189 |
- myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}" |
1190 |
- myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}" |
1191 |
- done |
1192 |
- else |
1193 |
- myconf="${myconf} --with-thin=none --with-cache=none" |
1194 |
- fi |
1195 |
- |
1196 |
- if use lvm1; then |
1197 |
- myconf="${myconf} --with-lvm1=${buildmode}" |
1198 |
- else |
1199 |
- myconf="${myconf} --with-lvm1=none" |
1200 |
- fi |
1201 |
- |
1202 |
- # disable O_DIRECT support on hppa, breaks pv detection (#99532) |
1203 |
- use hppa && myconf="${myconf} --disable-o_direct" |
1204 |
- |
1205 |
- if use clvm; then |
1206 |
- myconf="${myconf} --with-cluster=${buildmode}" |
1207 |
- # 4-state! Make sure we get it right, per bug 210879 |
1208 |
- # Valid options are: none, cman, gulm, all |
1209 |
- # |
1210 |
- # 2009/02: |
1211 |
- # gulm is removed now, now dual-state: |
1212 |
- # cman, none |
1213 |
- # all still exists, but is not needed |
1214 |
- # |
1215 |
- # 2009/07: |
1216 |
- # TODO: add corosync and re-enable ALL |
1217 |
- local clvmd="" |
1218 |
- use cman && clvmd="cman" |
1219 |
- #clvmd="${clvmd/cmangulm/all}" |
1220 |
- [ -z "${clvmd}" ] && clvmd="none" |
1221 |
- myconf="${myconf} --with-clvmd=${clvmd}" |
1222 |
- myconf="${myconf} --with-pool=${buildmode}" |
1223 |
- else |
1224 |
- myconf="${myconf} --with-clvmd=none --with-cluster=none" |
1225 |
- fi |
1226 |
- |
1227 |
- econf \ |
1228 |
- $(use_enable readline) \ |
1229 |
- $(use_enable selinux) \ |
1230 |
- --enable-pkgconfig \ |
1231 |
- --with-confdir="${EPREFIX}"/etc \ |
1232 |
- --exec-prefix="${EPREFIX}" \ |
1233 |
- --sbindir="${EPREFIX}/sbin" \ |
1234 |
- --with-staticdir="${EPREFIX}"/sbin \ |
1235 |
- --libdir="${EPREFIX}/$(get_libdir)" \ |
1236 |
- --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \ |
1237 |
- --with-default-dm-run-dir=/run \ |
1238 |
- --with-default-run-dir=/run/lvm \ |
1239 |
- --with-default-locking-dir=/run/lock/lvm \ |
1240 |
- --with-default-pid-dir=/run \ |
1241 |
- $(use_enable udev udev_rules) \ |
1242 |
- $(use_enable udev udev_sync) \ |
1243 |
- $(use_with udev udevdir "$(get_udevdir)"/rules.d) \ |
1244 |
- $(use_enable systemd udev-systemd-background-jobs) \ |
1245 |
- "$(systemd_with_unitdir)" \ |
1246 |
- ${myconf} \ |
1247 |
- CLDFLAGS="${LDFLAGS}" |
1248 |
-} |
1249 |
- |
1250 |
-src_compile() { |
1251 |
- pushd include >/dev/null |
1252 |
- emake |
1253 |
- popd >/dev/null |
1254 |
- |
1255 |
- if use device-mapper-only ; then |
1256 |
- emake device-mapper |
1257 |
- else |
1258 |
- emake |
1259 |
- emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat |
1260 |
- fi |
1261 |
-} |
1262 |
- |
1263 |
-src_install() { |
1264 |
- local inst |
1265 |
- INSTALL_TARGETS="install install_tmpfiles_configuration" |
1266 |
- # install systemd related files only when requested, bug #522430 |
1267 |
- use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators" |
1268 |
- use device-mapper-only && INSTALL_TARGETS="install_device-mapper" |
1269 |
- for inst in ${INSTALL_TARGETS}; do |
1270 |
- emake DESTDIR="${D}" ${inst} |
1271 |
- done |
1272 |
- |
1273 |
- newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper |
1274 |
- newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper |
1275 |
- |
1276 |
- if use !device-mapper-only ; then |
1277 |
- newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd |
1278 |
- newinitd "${FILESDIR}"/lvm.rc-2.02.116-r4 lvm |
1279 |
- newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm |
1280 |
- |
1281 |
- newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring |
1282 |
- newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad |
1283 |
- fi |
1284 |
- |
1285 |
- if use clvm; then |
1286 |
- newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd |
1287 |
- newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd |
1288 |
- fi |
1289 |
- |
1290 |
- if use static-libs; then |
1291 |
- dolib.a libdm/ioctl/libdevmapper.a |
1292 |
- dolib.a libdaemon/client/libdaemonclient.a #462908 |
1293 |
- #gen_usr_ldscript libdevmapper.so |
1294 |
- dolib.a daemons/dmeventd/libdevmapper-event.a |
1295 |
- #gen_usr_ldscript libdevmapper-event.so |
1296 |
- else |
1297 |
- rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a |
1298 |
- fi |
1299 |
- |
1300 |
- if use lvm2create_initrd; then |
1301 |
- dosbin scripts/lvm2create_initrd/lvm2create_initrd |
1302 |
- doman scripts/lvm2create_initrd/lvm2create_initrd.8 |
1303 |
- newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd |
1304 |
- fi |
1305 |
- |
1306 |
- insinto /etc |
1307 |
- doins "${FILESDIR}"/dmtab |
1308 |
- |
1309 |
- dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf |
1310 |
-} |
1311 |
- |
1312 |
-pkg_postinst() { |
1313 |
- ewarn "Make sure the \"lvm\" init script is in the runlevels:" |
1314 |
- ewarn "# rc-update add lvm boot" |
1315 |
- ewarn |
1316 |
- ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" |
1317 |
- ewarn "to enable lvm autoactivation and metadata caching." |
1318 |
- ewarn |
1319 |
- ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must" |
1320 |
- ewarn "run the following to update the init script dependencies: " |
1321 |
- ewarn "# rc-update -u" |
1322 |
-} |
1323 |
- |
1324 |
-src_test() { |
1325 |
- einfo "Tests are disabled because of device-node mucking, if you want to" |
1326 |
- einfo "run tests, compile the package and see ${S}/tests" |
1327 |
-} |
1328 |
|
1329 |
diff --git a/sys-fs/lvm2/lvm2-2.02.116.ebuild b/sys-fs/lvm2/lvm2-2.02.116.ebuild |
1330 |
deleted file mode 100644 |
1331 |
index 3d573a8..0000000 |
1332 |
--- a/sys-fs/lvm2/lvm2-2.02.116.ebuild |
1333 |
+++ /dev/null |
1334 |
@@ -1,275 +0,0 @@ |
1335 |
-# Copyright 1999-2016 Gentoo Foundation |
1336 |
-# Distributed under the terms of the GNU General Public License v2 |
1337 |
- |
1338 |
-EAPI=5 |
1339 |
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic |
1340 |
- |
1341 |
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software" |
1342 |
-HOMEPAGE="https://sourceware.org/lvm2/" |
1343 |
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz |
1344 |
- ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz" |
1345 |
- |
1346 |
-LICENSE="GPL-2" |
1347 |
-SLOT="0" |
1348 |
-KEYWORDS="amd64 arm arm64 ~mips ppc x86" |
1349 |
-IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only" |
1350 |
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin ) |
1351 |
- systemd? ( udev ) |
1352 |
- static? ( !udev )" #520450 |
1353 |
- |
1354 |
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* ) |
1355 |
- readline? ( sys-libs/readline:0= ) |
1356 |
- udev? ( >=virtual/libudev-208:=[static-libs?] )" |
1357 |
-# /run is now required for locking during early boot. /var cannot be assumed to |
1358 |
-# be available -- thus, pull in recent enough baselayout for /run. |
1359 |
-# This version of LVM is incompatible with cryptsetup <1.1.2. |
1360 |
-RDEPEND="${DEPEND_COMMON} |
1361 |
- >=sys-apps/baselayout-2.2 |
1362 |
- !<sys-apps/openrc-0.11 |
1363 |
- !<sys-fs/cryptsetup-1.1.2 |
1364 |
- !!sys-fs/clvm |
1365 |
- !!sys-fs/lvm-user |
1366 |
- >=sys-apps/util-linux-2.16 |
1367 |
- lvm2create_initrd? ( sys-apps/makedev ) |
1368 |
- thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )" |
1369 |
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check |
1370 |
-DEPEND="${DEPEND_COMMON} |
1371 |
- virtual/pkgconfig |
1372 |
- >=sys-devel/binutils-2.20.1-r1 |
1373 |
- static? ( |
1374 |
- selinux? ( sys-libs/libselinux[static-libs] ) |
1375 |
- udev? ( >=virtual/libudev-208:=[static-libs] ) |
1376 |
- >=sys-apps/util-linux-2.16[static-libs] |
1377 |
- )" |
1378 |
- |
1379 |
-S=${WORKDIR}/${PN/lvm/LVM}.${PV} |
1380 |
- |
1381 |
-pkg_setup() { |
1382 |
- local CONFIG_CHECK="~SYSVIPC" |
1383 |
- |
1384 |
- if use udev; then |
1385 |
- local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n" |
1386 |
- if linux_config_exists; then |
1387 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
1388 |
- if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then |
1389 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
1390 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
1391 |
- fi |
1392 |
- fi |
1393 |
- fi |
1394 |
- |
1395 |
- check_extra_config |
1396 |
- |
1397 |
- # 1. Genkernel no longer copies /sbin/lvm blindly. |
1398 |
- if use static; then |
1399 |
- elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with" |
1400 |
- elog "their static versions. If you need the static binaries," |
1401 |
- elog "you must append .static to the filename!" |
1402 |
- fi |
1403 |
-} |
1404 |
- |
1405 |
-src_prepare() { |
1406 |
- # Gentoo specific modification(s): |
1407 |
- epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch |
1408 |
- |
1409 |
- sed -i \ |
1410 |
- -e "1iAR = $(tc-getAR)" \ |
1411 |
- -e "s:CC ?= @CC@:CC = $(tc-getCC):" \ |
1412 |
- make.tmpl.in || die #444082 |
1413 |
- |
1414 |
- sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212 |
1415 |
- |
1416 |
- if use udev && ! use device-mapper-only; then |
1417 |
- sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196 |
1418 |
- elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in" |
1419 |
- elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad" |
1420 |
- elog "if it was previously disabled." |
1421 |
- fi |
1422 |
- |
1423 |
- sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514 |
1424 |
- |
1425 |
- # For upstream -- review and forward: |
1426 |
- epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch |
1427 |
- epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch |
1428 |
- epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331 |
1429 |
- epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373 |
1430 |
- epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed |
1431 |
- epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905 |
1432 |
- epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid |
1433 |
- epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450 |
1434 |
- # Patches for musl |
1435 |
- epatch "${FILESDIR}"/${PN}-fix-stdio-usage.patch # Patch from alpine linux |
1436 |
- epatch "${FILESDIR}"/${PN}-musl-fixes.patch |
1437 |
- epatch "${FILESDIR}"/${PN}-avoid-mallinfo.patch |
1438 |
- |
1439 |
- # Without thin-privision-tools, there is nothing to install for target install_man7: |
1440 |
- use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; } |
1441 |
- |
1442 |
- eautoreconf |
1443 |
-} |
1444 |
- |
1445 |
-src_configure() { |
1446 |
- filter-flags -flto |
1447 |
- local myconf |
1448 |
- local buildmode |
1449 |
- |
1450 |
- myconf="${myconf} $(use_enable !device-mapper-only dmeventd)" |
1451 |
- myconf="${myconf} $(use_enable !device-mapper-only cmdlib)" |
1452 |
- myconf="${myconf} $(use_enable !device-mapper-only applib)" |
1453 |
- myconf="${myconf} $(use_enable !device-mapper-only fsadm)" |
1454 |
- myconf="${myconf} $(use_enable !device-mapper-only lvmetad)" |
1455 |
- use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs" |
1456 |
- |
1457 |
- # Most of this package does weird stuff. |
1458 |
- # The build options are tristate, and --without is NOT supported |
1459 |
- # options: 'none', 'internal', 'shared' |
1460 |
- if use static; then |
1461 |
- buildmode="internal" |
1462 |
- # This only causes the .static versions to become available |
1463 |
- myconf="${myconf} --enable-static_link" |
1464 |
- else |
1465 |
- buildmode="shared" |
1466 |
- fi |
1467 |
- dmbuildmode=$(use !device-mapper-only && echo internal || echo none) |
1468 |
- |
1469 |
- # dmeventd requires mirrors to be internal, and snapshot available |
1470 |
- # so we cannot disable them |
1471 |
- myconf="${myconf} --with-mirrors=${dmbuildmode}" |
1472 |
- myconf="${myconf} --with-snapshots=${dmbuildmode}" |
1473 |
- if use thin; then |
1474 |
- myconf="${myconf} --with-thin=internal --with-cache=internal" |
1475 |
- local texec |
1476 |
- for texec in check dump repair restore; do |
1477 |
- myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}" |
1478 |
- myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}" |
1479 |
- done |
1480 |
- else |
1481 |
- myconf="${myconf} --with-thin=none --with-cache=none" |
1482 |
- fi |
1483 |
- |
1484 |
- if use lvm1; then |
1485 |
- myconf="${myconf} --with-lvm1=${buildmode}" |
1486 |
- else |
1487 |
- myconf="${myconf} --with-lvm1=none" |
1488 |
- fi |
1489 |
- |
1490 |
- # disable O_DIRECT support on hppa, breaks pv detection (#99532) |
1491 |
- use hppa && myconf="${myconf} --disable-o_direct" |
1492 |
- |
1493 |
- if use clvm; then |
1494 |
- myconf="${myconf} --with-cluster=${buildmode}" |
1495 |
- # 4-state! Make sure we get it right, per bug 210879 |
1496 |
- # Valid options are: none, cman, gulm, all |
1497 |
- # |
1498 |
- # 2009/02: |
1499 |
- # gulm is removed now, now dual-state: |
1500 |
- # cman, none |
1501 |
- # all still exists, but is not needed |
1502 |
- # |
1503 |
- # 2009/07: |
1504 |
- # TODO: add corosync and re-enable ALL |
1505 |
- local clvmd="" |
1506 |
- use cman && clvmd="cman" |
1507 |
- #clvmd="${clvmd/cmangulm/all}" |
1508 |
- [ -z "${clvmd}" ] && clvmd="none" |
1509 |
- myconf="${myconf} --with-clvmd=${clvmd}" |
1510 |
- myconf="${myconf} --with-pool=${buildmode}" |
1511 |
- else |
1512 |
- myconf="${myconf} --with-clvmd=none --with-cluster=none" |
1513 |
- fi |
1514 |
- |
1515 |
- econf \ |
1516 |
- $(use_enable readline) \ |
1517 |
- $(use_enable selinux) \ |
1518 |
- --enable-pkgconfig \ |
1519 |
- --with-confdir="${EPREFIX}"/etc \ |
1520 |
- --exec-prefix="${EPREFIX}" \ |
1521 |
- --sbindir="${EPREFIX}/sbin" \ |
1522 |
- --with-staticdir="${EPREFIX}"/sbin \ |
1523 |
- --libdir="${EPREFIX}/$(get_libdir)" \ |
1524 |
- --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \ |
1525 |
- --with-default-dm-run-dir=/run \ |
1526 |
- --with-default-run-dir=/run/lvm \ |
1527 |
- --with-default-locking-dir=/run/lock/lvm \ |
1528 |
- --with-default-pid-dir=/run \ |
1529 |
- $(use_enable udev udev_rules) \ |
1530 |
- $(use_enable udev udev_sync) \ |
1531 |
- $(use_with udev udevdir "$(get_udevdir)"/rules.d) \ |
1532 |
- $(use_enable systemd udev-systemd-background-jobs) \ |
1533 |
- "$(systemd_with_unitdir)" \ |
1534 |
- ${myconf} \ |
1535 |
- CLDFLAGS="${LDFLAGS}" |
1536 |
-} |
1537 |
- |
1538 |
-src_compile() { |
1539 |
- pushd include >/dev/null |
1540 |
- emake |
1541 |
- popd >/dev/null |
1542 |
- |
1543 |
- if use device-mapper-only ; then |
1544 |
- emake device-mapper |
1545 |
- else |
1546 |
- emake |
1547 |
- emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat |
1548 |
- fi |
1549 |
-} |
1550 |
- |
1551 |
-src_install() { |
1552 |
- local inst |
1553 |
- INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration" |
1554 |
- use device-mapper-only && INSTALL_TARGETS="install_device-mapper" |
1555 |
- for inst in ${INSTALL_TARGETS}; do |
1556 |
- emake DESTDIR="${D}" ${inst} |
1557 |
- done |
1558 |
- |
1559 |
- newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper |
1560 |
- newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper |
1561 |
- |
1562 |
- if use !device-mapper-only ; then |
1563 |
- newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd |
1564 |
- newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm |
1565 |
- newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm |
1566 |
- |
1567 |
- newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring |
1568 |
- newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad |
1569 |
- fi |
1570 |
- |
1571 |
- if use clvm; then |
1572 |
- newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd |
1573 |
- newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd |
1574 |
- fi |
1575 |
- |
1576 |
- if use static-libs; then |
1577 |
- dolib.a libdm/ioctl/libdevmapper.a |
1578 |
- dolib.a libdaemon/client/libdaemonclient.a #462908 |
1579 |
- #gen_usr_ldscript libdevmapper.so |
1580 |
- dolib.a daemons/dmeventd/libdevmapper-event.a |
1581 |
- #gen_usr_ldscript libdevmapper-event.so |
1582 |
- else |
1583 |
- rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a |
1584 |
- fi |
1585 |
- |
1586 |
- if use lvm2create_initrd; then |
1587 |
- dosbin scripts/lvm2create_initrd/lvm2create_initrd |
1588 |
- doman scripts/lvm2create_initrd/lvm2create_initrd.8 |
1589 |
- newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd |
1590 |
- fi |
1591 |
- |
1592 |
- insinto /etc |
1593 |
- doins "${FILESDIR}"/dmtab |
1594 |
- |
1595 |
- dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf |
1596 |
-} |
1597 |
- |
1598 |
-pkg_postinst() { |
1599 |
- ewarn "Make sure the \"lvm\" init script is in the runlevels:" |
1600 |
- ewarn "# rc-update add lvm boot" |
1601 |
- ewarn |
1602 |
- ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" |
1603 |
- ewarn "to enable lvm autoactivation and metadata caching." |
1604 |
-} |
1605 |
- |
1606 |
-src_test() { |
1607 |
- einfo "Tests are disabled because of device-node mucking, if you want to" |
1608 |
- einfo "run tests, compile the package and see ${S}/tests" |
1609 |
-} |
1610 |
|
1611 |
diff --git a/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild |
1612 |
index f0fb589..80210ff 100644 |
1613 |
--- a/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild |
1614 |
+++ b/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild |
1615 |
@@ -1,4 +1,4 @@ |
1616 |
-# Copyright 1999-2017 Gentoo Foundation |
1617 |
+# Copyright 1999-2018 Gentoo Authors |
1618 |
# Distributed under the terms of the GNU General Public License v2 |
1619 |
|
1620 |
EAPI=6 |
1621 |
@@ -11,20 +11,12 @@ SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz |
1622 |
|
1623 |
LICENSE="GPL-2" |
1624 |
SLOT="0" |
1625 |
-KEYWORDS="amd64 arm arm64 ~mips ppc x86" |
1626 |
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only" |
1627 |
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin ) |
1628 |
- systemd? ( udev ) |
1629 |
- clvm? ( !systemd )" |
1630 |
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux" |
1631 |
+IUSE="readline static static-libs systemd lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only" |
1632 |
+REQUIRED_USE="device-mapper-only? ( !lvm1 !lvm2create_initrd !thin ) |
1633 |
+ systemd? ( udev )" |
1634 |
|
1635 |
DEPEND_COMMON=" |
1636 |
- clvm? ( |
1637 |
- cman? ( =sys-cluster/cman-3* ) |
1638 |
- corosync? ( sys-cluster/corosync ) |
1639 |
- openais? ( sys-cluster/openais ) |
1640 |
- =sys-cluster/libdlm-3* |
1641 |
- ) |
1642 |
- |
1643 |
readline? ( sys-libs/readline:0= ) |
1644 |
systemd? ( >=sys-apps/systemd-205:0= ) |
1645 |
udev? ( >=virtual/libudev-208:=[static-libs?] )" |
1646 |
@@ -35,7 +27,6 @@ RDEPEND="${DEPEND_COMMON} |
1647 |
>=sys-apps/baselayout-2.2 |
1648 |
!<sys-apps/openrc-0.11 |
1649 |
!<sys-fs/cryptsetup-1.1.2 |
1650 |
- !!sys-fs/clvm |
1651 |
!!sys-fs/lvm-user |
1652 |
>=sys-apps/util-linux-2.16 |
1653 |
lvm2create_initrd? ( sys-apps/makedev ) |
1654 |
@@ -171,29 +162,7 @@ src_configure() { |
1655 |
# disable O_DIRECT support on hppa, breaks pv detection (#99532) |
1656 |
use hppa && myconf+=( --disable-o_direct ) |
1657 |
|
1658 |
- if use clvm; then |
1659 |
- myconf+=( --with-cluster=${buildmode} ) |
1660 |
- # 4-state! Make sure we get it right, per bug 210879 |
1661 |
- # Valid options are: none, cman, gulm, all |
1662 |
- # |
1663 |
- # 2009/02: |
1664 |
- # gulm is removed now, now dual-state: |
1665 |
- # cman, none |
1666 |
- # all still exists, but is not needed |
1667 |
- # |
1668 |
- # 2009/07: |
1669 |
- # TODO: add corosync and re-enable ALL |
1670 |
- local clvmd="" |
1671 |
- use cman && clvmd="cman" |
1672 |
- #clvmd="${clvmd/cmangulm/all}" |
1673 |
- use corosync && clvmd="${clvmd:+$clvmd,}corosync" |
1674 |
- use openais && clvmd="${clvmd:+$clvmd,}openais" |
1675 |
- [ -z "${clvmd}" ] && clvmd="none" |
1676 |
- myconf+=( --with-clvmd=${clvmd} ) |
1677 |
- myconf+=( --with-pool=${buildmode} ) |
1678 |
- else |
1679 |
- myconf+=( --with-clvmd=none --with-cluster=none ) |
1680 |
- fi |
1681 |
+ myconf+=( --with-clvmd=none --with-cluster=none ) |
1682 |
|
1683 |
econf \ |
1684 |
$(use_enable readline) \ |
1685 |
@@ -253,17 +222,14 @@ src_install() { |
1686 |
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad |
1687 |
fi |
1688 |
|
1689 |
- if use clvm; then |
1690 |
- newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd |
1691 |
- newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd |
1692 |
- fi |
1693 |
- |
1694 |
if use static-libs; then |
1695 |
dolib.a libdm/ioctl/libdevmapper.a |
1696 |
- dolib.a libdaemon/client/libdaemonclient.a #462908 |
1697 |
- #gen_usr_ldscript libdevmapper.so |
1698 |
- dolib.a daemons/dmeventd/libdevmapper-event.a |
1699 |
- #gen_usr_ldscript libdevmapper-event.so |
1700 |
+ if use !device-mapper-only ; then |
1701 |
+ dolib.a libdaemon/client/libdaemonclient.a #462908 |
1702 |
+ #gen_usr_ldscript libdevmapper.so |
1703 |
+ dolib.a daemons/dmeventd/libdevmapper-event.a |
1704 |
+ #gen_usr_ldscript libdevmapper-event.so |
1705 |
+ fi |
1706 |
else |
1707 |
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a |
1708 |
fi |
1709 |
|
1710 |
diff --git a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild |
1711 |
deleted file mode 100644 |
1712 |
index 212f396..0000000 |
1713 |
--- a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild |
1714 |
+++ /dev/null |
1715 |
@@ -1,301 +0,0 @@ |
1716 |
-# Copyright 1999-2017 Gentoo Foundation |
1717 |
-# Distributed under the terms of the GNU General Public License v2 |
1718 |
- |
1719 |
-EAPI=6 |
1720 |
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic |
1721 |
- |
1722 |
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software" |
1723 |
-HOMEPAGE="https://sourceware.org/lvm2/" |
1724 |
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz |
1725 |
- ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz" |
1726 |
- |
1727 |
-LICENSE="GPL-2" |
1728 |
-SLOT="0" |
1729 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" |
1730 |
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais sanlock selinux +udev +thin device-mapper-only" |
1731 |
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !sanlock !thin ) |
1732 |
- systemd? ( udev ) |
1733 |
- clvm? ( !systemd )" |
1734 |
- |
1735 |
-DEPEND_COMMON=" |
1736 |
- clvm? ( |
1737 |
- cman? ( =sys-cluster/cman-3* ) |
1738 |
- corosync? ( sys-cluster/corosync ) |
1739 |
- openais? ( sys-cluster/openais ) |
1740 |
- =sys-cluster/libdlm-3* |
1741 |
- ) |
1742 |
- |
1743 |
- readline? ( sys-libs/readline:0= ) |
1744 |
- sanlock? ( sys-cluster/sanlock ) |
1745 |
- systemd? ( >=sys-apps/systemd-205:0= ) |
1746 |
- udev? ( >=virtual/libudev-208:=[static-libs?] )" |
1747 |
-# /run is now required for locking during early boot. /var cannot be assumed to |
1748 |
-# be available -- thus, pull in recent enough baselayout for /run. |
1749 |
-# This version of LVM is incompatible with cryptsetup <1.1.2. |
1750 |
-RDEPEND="${DEPEND_COMMON} |
1751 |
- >=sys-apps/baselayout-2.2 |
1752 |
- !<sys-apps/openrc-0.11 |
1753 |
- !<sys-fs/cryptsetup-1.1.2 |
1754 |
- !!sys-fs/clvm |
1755 |
- !!sys-fs/lvm-user |
1756 |
- >=sys-apps/util-linux-2.16 |
1757 |
- lvm2create_initrd? ( sys-apps/makedev ) |
1758 |
- thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )" |
1759 |
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check |
1760 |
-# USE 'static' currently only works with eudev, bug 520450 |
1761 |
-DEPEND="${DEPEND_COMMON} |
1762 |
- virtual/pkgconfig |
1763 |
- >=sys-devel/binutils-2.20.1-r1 |
1764 |
- sys-devel/autoconf-archive |
1765 |
- static? ( |
1766 |
- selinux? ( sys-libs/libselinux[static-libs] ) |
1767 |
- udev? ( >=sys-fs/eudev-3.1.2[static-libs] ) |
1768 |
- >=sys-apps/util-linux-2.16[static-libs] |
1769 |
- )" |
1770 |
- |
1771 |
-S=${WORKDIR}/${PN/lvm/LVM}.${PV} |
1772 |
- |
1773 |
-PATCHES=( |
1774 |
- # Gentoo specific modification(s): |
1775 |
- "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch |
1776 |
- |
1777 |
- # Musl fixes |
1778 |
- "${FILESDIR}"/${PN}-2.02.166-fix-stdio-usage.patch |
1779 |
- "${FILESDIR}"/${PN}-2.02.166-portability.patch |
1780 |
- |
1781 |
- # For upstream -- review and forward: |
1782 |
- "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch |
1783 |
- "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch |
1784 |
- "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331 |
1785 |
- "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373 |
1786 |
- "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed |
1787 |
- "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905 |
1788 |
- "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid |
1789 |
- "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450 |
1790 |
- #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream |
1791 |
-) |
1792 |
- |
1793 |
-pkg_setup() { |
1794 |
- local CONFIG_CHECK="~SYSVIPC" |
1795 |
- |
1796 |
- if use udev; then |
1797 |
- local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n" |
1798 |
- if linux_config_exists; then |
1799 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
1800 |
- if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then |
1801 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
1802 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
1803 |
- fi |
1804 |
- fi |
1805 |
- fi |
1806 |
- |
1807 |
- check_extra_config |
1808 |
- |
1809 |
- # 1. Genkernel no longer copies /sbin/lvm blindly. |
1810 |
- if use static; then |
1811 |
- elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with" |
1812 |
- elog "their static versions. If you need the static binaries," |
1813 |
- elog "you must append .static to the filename!" |
1814 |
- fi |
1815 |
-} |
1816 |
- |
1817 |
-src_prepare() { |
1818 |
- default |
1819 |
- |
1820 |
- sed -i \ |
1821 |
- -e "1iAR = $(tc-getAR)" \ |
1822 |
- -e "s:CC ?= @CC@:CC = $(tc-getCC):" \ |
1823 |
- make.tmpl.in || die #444082 |
1824 |
- |
1825 |
- sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212 |
1826 |
- |
1827 |
- if use udev && ! use device-mapper-only; then |
1828 |
- sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196 |
1829 |
- elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in" |
1830 |
- elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad" |
1831 |
- elog "if it was previously disabled." |
1832 |
- fi |
1833 |
- |
1834 |
- sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514 |
1835 |
- |
1836 |
- # Without thin-privision-tools, there is nothing to install for target install_man7: |
1837 |
- use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; } |
1838 |
- |
1839 |
- eautoreconf |
1840 |
-} |
1841 |
- |
1842 |
-src_configure() { |
1843 |
- filter-flags -flto |
1844 |
- local myconf=() |
1845 |
- local buildmode |
1846 |
- |
1847 |
- myconf+=( $(use_enable !device-mapper-only dmeventd) ) |
1848 |
- myconf+=( $(use_enable !device-mapper-only cmdlib) ) |
1849 |
- myconf+=( $(use_enable !device-mapper-only applib) ) |
1850 |
- myconf+=( $(use_enable !device-mapper-only fsadm) ) |
1851 |
- myconf+=( $(use_enable !device-mapper-only lvmetad) ) |
1852 |
- use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs ) |
1853 |
- |
1854 |
- # Most of this package does weird stuff. |
1855 |
- # The build options are tristate, and --without is NOT supported |
1856 |
- # options: 'none', 'internal', 'shared' |
1857 |
- if use static; then |
1858 |
- buildmode="internal" |
1859 |
- # This only causes the .static versions to become available |
1860 |
- myconf+=( --enable-static_link ) |
1861 |
- else |
1862 |
- buildmode="shared" |
1863 |
- fi |
1864 |
- dmbuildmode=$(use !device-mapper-only && echo internal || echo none) |
1865 |
- |
1866 |
- # dmeventd requires mirrors to be internal, and snapshot available |
1867 |
- # so we cannot disable them |
1868 |
- myconf+=( --with-mirrors=${dmbuildmode} ) |
1869 |
- myconf+=( --with-snapshots=${dmbuildmode} ) |
1870 |
- if use thin; then |
1871 |
- myconf+=( --with-thin=internal --with-cache=internal ) |
1872 |
- local texec |
1873 |
- for texec in check dump repair restore; do |
1874 |
- myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} ) |
1875 |
- myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} ) |
1876 |
- done |
1877 |
- else |
1878 |
- myconf+=( --with-thin=none --with-cache=none ) |
1879 |
- fi |
1880 |
- |
1881 |
- if use lvm1; then |
1882 |
- myconf+=( --with-lvm1=${buildmode} ) |
1883 |
- else |
1884 |
- myconf+=( --with-lvm1=none ) |
1885 |
- fi |
1886 |
- |
1887 |
- # disable O_DIRECT support on hppa, breaks pv detection (#99532) |
1888 |
- use hppa && myconf+=( --disable-o_direct ) |
1889 |
- |
1890 |
- if use clvm; then |
1891 |
- myconf+=( --with-cluster=${buildmode} ) |
1892 |
- # 4-state! Make sure we get it right, per bug 210879 |
1893 |
- # Valid options are: none, cman, gulm, all |
1894 |
- # |
1895 |
- # 2009/02: |
1896 |
- # gulm is removed now, now dual-state: |
1897 |
- # cman, none |
1898 |
- # all still exists, but is not needed |
1899 |
- # |
1900 |
- # 2009/07: |
1901 |
- # TODO: add corosync and re-enable ALL |
1902 |
- local clvmd="" |
1903 |
- use cman && clvmd="cman" |
1904 |
- #clvmd="${clvmd/cmangulm/all}" |
1905 |
- use corosync && clvmd="${clvmd:+$clvmd,}corosync" |
1906 |
- use openais && clvmd="${clvmd:+$clvmd,}openais" |
1907 |
- [ -z "${clvmd}" ] && clvmd="none" |
1908 |
- myconf+=( --with-clvmd=${clvmd} ) |
1909 |
- myconf+=( --with-pool=${buildmode} ) |
1910 |
- |
1911 |
- else |
1912 |
- myconf+=( --with-clvmd=none --with-cluster=none ) |
1913 |
- fi |
1914 |
- |
1915 |
- econf \ |
1916 |
- $(use_enable readline) \ |
1917 |
- $(use_enable selinux) \ |
1918 |
- --enable-pkgconfig \ |
1919 |
- --with-confdir="${EPREFIX}"/etc \ |
1920 |
- --exec-prefix="${EPREFIX}" \ |
1921 |
- --sbindir="${EPREFIX}/sbin" \ |
1922 |
- --with-staticdir="${EPREFIX}"/sbin \ |
1923 |
- --libdir="${EPREFIX}/$(get_libdir)" \ |
1924 |
- --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \ |
1925 |
- --with-default-dm-run-dir=/run \ |
1926 |
- --with-default-run-dir=/run/lvm \ |
1927 |
- --with-default-locking-dir=/run/lock/lvm \ |
1928 |
- --with-default-pid-dir=/run \ |
1929 |
- $(use_enable udev udev_rules) \ |
1930 |
- $(use_enable udev udev_sync) \ |
1931 |
- $(use_with udev udevdir "$(get_udevdir)"/rules.d) \ |
1932 |
- $(use_enable sanlock lockd-sanlock) \ |
1933 |
- $(use_enable systemd udev-systemd-background-jobs) \ |
1934 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
1935 |
- ${myconf[@]} \ |
1936 |
- CLDFLAGS="${LDFLAGS}" |
1937 |
-} |
1938 |
- |
1939 |
-src_compile() { |
1940 |
- pushd include >/dev/null |
1941 |
- emake |
1942 |
- popd >/dev/null |
1943 |
- |
1944 |
- if use device-mapper-only ; then |
1945 |
- emake device-mapper |
1946 |
- else |
1947 |
- emake |
1948 |
- emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat |
1949 |
- fi |
1950 |
-} |
1951 |
- |
1952 |
-src_install() { |
1953 |
- local inst |
1954 |
- INSTALL_TARGETS="install install_tmpfiles_configuration" |
1955 |
- # install systemd related files only when requested, bug #522430 |
1956 |
- use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators" |
1957 |
- use device-mapper-only && INSTALL_TARGETS="install_device-mapper" |
1958 |
- for inst in ${INSTALL_TARGETS}; do |
1959 |
- emake DESTDIR="${D}" ${inst} |
1960 |
- done |
1961 |
- |
1962 |
- newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper |
1963 |
- newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper |
1964 |
- |
1965 |
- if use !device-mapper-only ; then |
1966 |
- newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd |
1967 |
- newinitd "${FILESDIR}"/lvm.rc-2.02.166-r2 lvm |
1968 |
- newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm |
1969 |
- |
1970 |
- newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring |
1971 |
- newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad |
1972 |
- fi |
1973 |
- |
1974 |
- if use sanlock; then |
1975 |
- newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd |
1976 |
- fi |
1977 |
- |
1978 |
- if use clvm; then |
1979 |
- newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd |
1980 |
- newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd |
1981 |
- fi |
1982 |
- |
1983 |
- if use static-libs; then |
1984 |
- dolib.a libdm/ioctl/libdevmapper.a |
1985 |
- dolib.a libdaemon/client/libdaemonclient.a #462908 |
1986 |
- #gen_usr_ldscript libdevmapper.so |
1987 |
- dolib.a daemons/dmeventd/libdevmapper-event.a |
1988 |
- #gen_usr_ldscript libdevmapper-event.so |
1989 |
- else |
1990 |
- rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a |
1991 |
- fi |
1992 |
- |
1993 |
- if use lvm2create_initrd; then |
1994 |
- dosbin scripts/lvm2create_initrd/lvm2create_initrd |
1995 |
- doman scripts/lvm2create_initrd/lvm2create_initrd.8 |
1996 |
- newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd |
1997 |
- fi |
1998 |
- |
1999 |
- insinto /etc |
2000 |
- doins "${FILESDIR}"/dmtab |
2001 |
- |
2002 |
- dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf |
2003 |
-} |
2004 |
- |
2005 |
-pkg_postinst() { |
2006 |
- ewarn "Make sure the \"lvm\" init script is in the runlevels:" |
2007 |
- ewarn "# rc-update add lvm boot" |
2008 |
- ewarn |
2009 |
- ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" |
2010 |
- ewarn "to enable lvm autoactivation and metadata caching." |
2011 |
-} |
2012 |
- |
2013 |
-src_test() { |
2014 |
- einfo "Tests are disabled because of device-node mucking, if you want to" |
2015 |
- einfo "run tests, compile the package and see ${S}/tests" |
2016 |
-} |
2017 |
|
2018 |
diff --git a/sys-fs/lvm2/lvm2-2.02.171.ebuild b/sys-fs/lvm2/lvm2-2.02.171.ebuild |
2019 |
deleted file mode 100644 |
2020 |
index 9397471..0000000 |
2021 |
--- a/sys-fs/lvm2/lvm2-2.02.171.ebuild |
2022 |
+++ /dev/null |
2023 |
@@ -1,301 +0,0 @@ |
2024 |
-# Copyright 1999-2017 Gentoo Foundation |
2025 |
-# Distributed under the terms of the GNU General Public License v2 |
2026 |
- |
2027 |
-EAPI=6 |
2028 |
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic |
2029 |
- |
2030 |
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software" |
2031 |
-HOMEPAGE="https://sourceware.org/lvm2/" |
2032 |
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz |
2033 |
- ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz" |
2034 |
- |
2035 |
-LICENSE="GPL-2" |
2036 |
-SLOT="0" |
2037 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" |
2038 |
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais sanlock selinux +udev +thin device-mapper-only" |
2039 |
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !sanlock !thin ) |
2040 |
- systemd? ( udev ) |
2041 |
- clvm? ( !systemd )" |
2042 |
- |
2043 |
-DEPEND_COMMON=" |
2044 |
- clvm? ( |
2045 |
- cman? ( =sys-cluster/cman-3* ) |
2046 |
- corosync? ( sys-cluster/corosync ) |
2047 |
- openais? ( sys-cluster/openais ) |
2048 |
- =sys-cluster/libdlm-3* |
2049 |
- ) |
2050 |
- |
2051 |
- readline? ( sys-libs/readline:0= ) |
2052 |
- sanlock? ( sys-cluster/sanlock ) |
2053 |
- systemd? ( >=sys-apps/systemd-205:0= ) |
2054 |
- udev? ( >=virtual/libudev-208:=[static-libs?] )" |
2055 |
-# /run is now required for locking during early boot. /var cannot be assumed to |
2056 |
-# be available -- thus, pull in recent enough baselayout for /run. |
2057 |
-# This version of LVM is incompatible with cryptsetup <1.1.2. |
2058 |
-RDEPEND="${DEPEND_COMMON} |
2059 |
- >=sys-apps/baselayout-2.2 |
2060 |
- !<sys-apps/openrc-0.11 |
2061 |
- !<sys-fs/cryptsetup-1.1.2 |
2062 |
- !!sys-fs/clvm |
2063 |
- !!sys-fs/lvm-user |
2064 |
- >=sys-apps/util-linux-2.16 |
2065 |
- lvm2create_initrd? ( sys-apps/makedev ) |
2066 |
- thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )" |
2067 |
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check |
2068 |
-# USE 'static' currently only works with eudev, bug 520450 |
2069 |
-DEPEND="${DEPEND_COMMON} |
2070 |
- virtual/pkgconfig |
2071 |
- >=sys-devel/binutils-2.20.1-r1 |
2072 |
- sys-devel/autoconf-archive |
2073 |
- static? ( |
2074 |
- selinux? ( sys-libs/libselinux[static-libs] ) |
2075 |
- udev? ( >=sys-fs/eudev-3.1.2[static-libs] ) |
2076 |
- >=sys-apps/util-linux-2.16[static-libs] |
2077 |
- )" |
2078 |
- |
2079 |
-S=${WORKDIR}/${PN/lvm/LVM}.${PV} |
2080 |
- |
2081 |
-PATCHES=( |
2082 |
- # Gentoo specific modification(s): |
2083 |
- "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch |
2084 |
- |
2085 |
- # Musl fixes |
2086 |
- "${FILESDIR}"/${PN}-2.02.166-fix-stdio-usage.patch |
2087 |
- "${FILESDIR}"/${PN}-2.02.166-portability.patch |
2088 |
- |
2089 |
- # For upstream -- review and forward: |
2090 |
- "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch |
2091 |
- "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch |
2092 |
- "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331 |
2093 |
- "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373 |
2094 |
- "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed |
2095 |
- "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905 |
2096 |
- "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid |
2097 |
- "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450 |
2098 |
- #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream |
2099 |
-) |
2100 |
- |
2101 |
-pkg_setup() { |
2102 |
- local CONFIG_CHECK="~SYSVIPC" |
2103 |
- |
2104 |
- if use udev; then |
2105 |
- local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n" |
2106 |
- if linux_config_exists; then |
2107 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
2108 |
- if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then |
2109 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
2110 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
2111 |
- fi |
2112 |
- fi |
2113 |
- fi |
2114 |
- |
2115 |
- check_extra_config |
2116 |
- |
2117 |
- # 1. Genkernel no longer copies /sbin/lvm blindly. |
2118 |
- if use static; then |
2119 |
- elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with" |
2120 |
- elog "their static versions. If you need the static binaries," |
2121 |
- elog "you must append .static to the filename!" |
2122 |
- fi |
2123 |
-} |
2124 |
- |
2125 |
-src_prepare() { |
2126 |
- default |
2127 |
- |
2128 |
- sed -i \ |
2129 |
- -e "1iAR = $(tc-getAR)" \ |
2130 |
- -e "s:CC ?= @CC@:CC = $(tc-getCC):" \ |
2131 |
- make.tmpl.in || die #444082 |
2132 |
- |
2133 |
- sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212 |
2134 |
- |
2135 |
- if use udev && ! use device-mapper-only; then |
2136 |
- sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196 |
2137 |
- elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in" |
2138 |
- elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad" |
2139 |
- elog "if it was previously disabled." |
2140 |
- fi |
2141 |
- |
2142 |
- sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514 |
2143 |
- |
2144 |
- # Without thin-privision-tools, there is nothing to install for target install_man7: |
2145 |
- use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; } |
2146 |
- |
2147 |
- eautoreconf |
2148 |
-} |
2149 |
- |
2150 |
-src_configure() { |
2151 |
- filter-flags -flto |
2152 |
- local myconf=() |
2153 |
- local buildmode |
2154 |
- |
2155 |
- myconf+=( $(use_enable !device-mapper-only dmeventd) ) |
2156 |
- myconf+=( $(use_enable !device-mapper-only cmdlib) ) |
2157 |
- myconf+=( $(use_enable !device-mapper-only applib) ) |
2158 |
- myconf+=( $(use_enable !device-mapper-only fsadm) ) |
2159 |
- myconf+=( $(use_enable !device-mapper-only lvmetad) ) |
2160 |
- use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs ) |
2161 |
- |
2162 |
- # Most of this package does weird stuff. |
2163 |
- # The build options are tristate, and --without is NOT supported |
2164 |
- # options: 'none', 'internal', 'shared' |
2165 |
- if use static; then |
2166 |
- buildmode="internal" |
2167 |
- # This only causes the .static versions to become available |
2168 |
- myconf+=( --enable-static_link ) |
2169 |
- else |
2170 |
- buildmode="shared" |
2171 |
- fi |
2172 |
- dmbuildmode=$(use !device-mapper-only && echo internal || echo none) |
2173 |
- |
2174 |
- # dmeventd requires mirrors to be internal, and snapshot available |
2175 |
- # so we cannot disable them |
2176 |
- myconf+=( --with-mirrors=${dmbuildmode} ) |
2177 |
- myconf+=( --with-snapshots=${dmbuildmode} ) |
2178 |
- if use thin; then |
2179 |
- myconf+=( --with-thin=internal --with-cache=internal ) |
2180 |
- local texec |
2181 |
- for texec in check dump repair restore; do |
2182 |
- myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} ) |
2183 |
- myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} ) |
2184 |
- done |
2185 |
- else |
2186 |
- myconf+=( --with-thin=none --with-cache=none ) |
2187 |
- fi |
2188 |
- |
2189 |
- if use lvm1; then |
2190 |
- myconf+=( --with-lvm1=${buildmode} ) |
2191 |
- else |
2192 |
- myconf+=( --with-lvm1=none ) |
2193 |
- fi |
2194 |
- |
2195 |
- # disable O_DIRECT support on hppa, breaks pv detection (#99532) |
2196 |
- use hppa && myconf+=( --disable-o_direct ) |
2197 |
- |
2198 |
- if use clvm; then |
2199 |
- myconf+=( --with-cluster=${buildmode} ) |
2200 |
- # 4-state! Make sure we get it right, per bug 210879 |
2201 |
- # Valid options are: none, cman, gulm, all |
2202 |
- # |
2203 |
- # 2009/02: |
2204 |
- # gulm is removed now, now dual-state: |
2205 |
- # cman, none |
2206 |
- # all still exists, but is not needed |
2207 |
- # |
2208 |
- # 2009/07: |
2209 |
- # TODO: add corosync and re-enable ALL |
2210 |
- local clvmd="" |
2211 |
- use cman && clvmd="cman" |
2212 |
- #clvmd="${clvmd/cmangulm/all}" |
2213 |
- use corosync && clvmd="${clvmd:+$clvmd,}corosync" |
2214 |
- use openais && clvmd="${clvmd:+$clvmd,}openais" |
2215 |
- [ -z "${clvmd}" ] && clvmd="none" |
2216 |
- myconf+=( --with-clvmd=${clvmd} ) |
2217 |
- myconf+=( --with-pool=${buildmode} ) |
2218 |
- myconf+=( --enable-lvmlockd-dlm ) |
2219 |
- else |
2220 |
- myconf+=( --with-clvmd=none --with-cluster=none ) |
2221 |
- fi |
2222 |
- |
2223 |
- econf \ |
2224 |
- $(use_enable readline) \ |
2225 |
- $(use_enable selinux) \ |
2226 |
- --enable-pkgconfig \ |
2227 |
- --with-confdir="${EPREFIX}"/etc \ |
2228 |
- --exec-prefix="${EPREFIX}" \ |
2229 |
- --sbindir="${EPREFIX}/sbin" \ |
2230 |
- --with-staticdir="${EPREFIX}"/sbin \ |
2231 |
- --libdir="${EPREFIX}/$(get_libdir)" \ |
2232 |
- --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \ |
2233 |
- --with-default-dm-run-dir=/run \ |
2234 |
- --with-default-run-dir=/run/lvm \ |
2235 |
- --with-default-locking-dir=/run/lock/lvm \ |
2236 |
- --with-default-pid-dir=/run \ |
2237 |
- $(use_enable udev udev_rules) \ |
2238 |
- $(use_enable udev udev_sync) \ |
2239 |
- $(use_with udev udevdir "$(get_udevdir)"/rules.d) \ |
2240 |
- $(use_enable sanlock lvmlockd-sanlock) \ |
2241 |
- $(use_enable systemd udev-systemd-background-jobs) \ |
2242 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
2243 |
- ${myconf[@]} \ |
2244 |
- CLDFLAGS="${LDFLAGS}" |
2245 |
-} |
2246 |
- |
2247 |
-src_compile() { |
2248 |
- pushd include >/dev/null |
2249 |
- emake |
2250 |
- popd >/dev/null |
2251 |
- |
2252 |
- if use device-mapper-only ; then |
2253 |
- emake device-mapper |
2254 |
- else |
2255 |
- emake |
2256 |
- emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat |
2257 |
- fi |
2258 |
-} |
2259 |
- |
2260 |
-src_install() { |
2261 |
- local inst |
2262 |
- INSTALL_TARGETS="install install_tmpfiles_configuration" |
2263 |
- # install systemd related files only when requested, bug #522430 |
2264 |
- use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators" |
2265 |
- use device-mapper-only && INSTALL_TARGETS="install_device-mapper" |
2266 |
- for inst in ${INSTALL_TARGETS}; do |
2267 |
- emake DESTDIR="${D}" ${inst} |
2268 |
- done |
2269 |
- |
2270 |
- newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper |
2271 |
- newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper |
2272 |
- |
2273 |
- if use !device-mapper-only ; then |
2274 |
- newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd |
2275 |
- newinitd "${FILESDIR}"/lvm.rc-2.02.166-r2 lvm |
2276 |
- newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm |
2277 |
- |
2278 |
- newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring |
2279 |
- newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad |
2280 |
- fi |
2281 |
- |
2282 |
- if use sanlock; then |
2283 |
- newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd |
2284 |
- fi |
2285 |
- |
2286 |
- if use clvm; then |
2287 |
- newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd |
2288 |
- newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd |
2289 |
- fi |
2290 |
- |
2291 |
- if use static-libs; then |
2292 |
- dolib.a libdm/ioctl/libdevmapper.a |
2293 |
- dolib.a libdaemon/client/libdaemonclient.a #462908 |
2294 |
- #gen_usr_ldscript libdevmapper.so |
2295 |
- dolib.a daemons/dmeventd/libdevmapper-event.a |
2296 |
- #gen_usr_ldscript libdevmapper-event.so |
2297 |
- else |
2298 |
- rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a |
2299 |
- fi |
2300 |
- |
2301 |
- if use lvm2create_initrd; then |
2302 |
- dosbin scripts/lvm2create_initrd/lvm2create_initrd |
2303 |
- doman scripts/lvm2create_initrd/lvm2create_initrd.8 |
2304 |
- newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd |
2305 |
- fi |
2306 |
- |
2307 |
- insinto /etc |
2308 |
- doins "${FILESDIR}"/dmtab |
2309 |
- |
2310 |
- dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf |
2311 |
-} |
2312 |
- |
2313 |
-pkg_postinst() { |
2314 |
- ewarn "Make sure the \"lvm\" init script is in the runlevels:" |
2315 |
- ewarn "# rc-update add lvm boot" |
2316 |
- ewarn |
2317 |
- ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" |
2318 |
- ewarn "to enable lvm autoactivation and metadata caching." |
2319 |
-} |
2320 |
- |
2321 |
-src_test() { |
2322 |
- einfo "Tests are disabled because of device-node mucking, if you want to" |
2323 |
- einfo "run tests, compile the package and see ${S}/tests" |
2324 |
-} |
2325 |
|
2326 |
diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml |
2327 |
index cca547c..7d493c0 100644 |
2328 |
--- a/sys-fs/lvm2/metadata.xml |
2329 |
+++ b/sys-fs/lvm2/metadata.xml |
2330 |
@@ -16,15 +16,10 @@ |
2331 |
<description>Backup to Robin. Please CC on bugs.</description> |
2332 |
</maintainer> |
2333 |
<use> |
2334 |
- <flag name="clvm">Allow users to build clustered lvm2</flag> |
2335 |
- <flag name="cman">Cman support for clustered lvm</flag> |
2336 |
- <flag name="corosync">Corosync support for clustered lvm</flag> |
2337 |
<flag name="lvm1">Allow users to build lvm2 with lvm1 support</flag> |
2338 |
<flag name="lvm2create_initrd">Install lvm2create_initrd script and pull in <pkg>sys-apps/makedev</pkg> for the /sbin/MAKEDEV command</flag> |
2339 |
- <flag name="openais">Openais support for clustered lvm</flag> |
2340 |
<flag name="thin">Support for thin volumes</flag> |
2341 |
<flag name="device-mapper-only">Build only device-mapper and not the rest of LVM2 (UNSUPPORTED)</flag> |
2342 |
- <flag name="sanlock">Enable lvmlockd with support for sanlock</flag> |
2343 |
</use> |
2344 |
<upstream> |
2345 |
<remote-id type="cpe">cpe:/a:heinz_mauelshagen:lvm2</remote-id> |