1 |
commit: 42db1db01c7354108dd9d59dfa15915de8fd8928 |
2 |
Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com> |
3 |
AuthorDate: Sun Jan 20 02:45:09 2019 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 20 02:55:47 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=42db1db0 |
7 |
|
8 |
sys-fs/lvm2: version bump to 2.02.183 |
9 |
|
10 |
Package-Manager: Portage-2.3.56, Repoman-2.3.12 |
11 |
Signed-off-by: Marty E. Plummer <hanetzer <AT> startmail.com> |
12 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
13 |
|
14 |
sys-fs/lvm2/Manifest | 1 + |
15 |
.../lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch | 29 +++ |
16 |
sys-fs/lvm2/files/lvm2-2.02.183-portability.patch | 21 ++ |
17 |
sys-fs/lvm2/lvm2-2.02.183.ebuild | 262 +++++++++++++++++++++ |
18 |
sys-fs/lvm2/metadata.xml | 1 + |
19 |
5 files changed, 314 insertions(+) |
20 |
|
21 |
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest |
22 |
index 353cb66..bcbab95 100644 |
23 |
--- a/sys-fs/lvm2/Manifest |
24 |
+++ b/sys-fs/lvm2/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST LVM2.2.02.145.tgz 1986370 BLAKE2B 0c9e5efae17f26ff86152cecbf0b11a74e85007b2fa9491f44dec03ac8c11375bacf6685213b4be19037c8fbf70e13549516716ecf8fa262919a44625e6aab34 SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27 |
27 |
+DIST LVM2.2.02.183.tgz 2380574 BLAKE2B b1fe71b6cdb8ee20dd53d0ad3399c553487baafa12657ec81a794c84ad161988afdb8693ac247877a2645d693a0740c74c8b991047ed2ba4adc9ec75f1c261a9 SHA512 3947523c6b0862ada40677ed171ed0cf95e070119e377296fc5ccb153e9c4212d34c0b16a887dbd68ccf265525345dabfed2aa59fb3604555429a7e2ecfff4d7 |
28 |
|
29 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch |
30 |
new file mode 100644 |
31 |
index 0000000..8564d08 |
32 |
--- /dev/null |
33 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch |
34 |
@@ -0,0 +1,29 @@ |
35 |
+--- a/tools/lvmcmdline.c |
36 |
++++ b/tools/lvmcmdline.c |
37 |
+@@ -3110,7 +3110,7 @@ static int _check_standard_fds(void) |
38 |
+ int err = is_valid_fd(STDERR_FILENO); |
39 |
+ |
40 |
+ if (!is_valid_fd(STDIN_FILENO) && |
41 |
+- !(stdin = fopen(_PATH_DEVNULL, "r"))) { |
42 |
++ !freopen(_PATH_DEVNULL, "r", stdin)) { |
43 |
+ if (err) |
44 |
+ perror("stdin stream open"); |
45 |
+ else |
46 |
+@@ -3120,7 +3120,7 @@ static int _check_standard_fds(void) |
47 |
+ } |
48 |
+ |
49 |
+ if (!is_valid_fd(STDOUT_FILENO) && |
50 |
+- !(stdout = fopen(_PATH_DEVNULL, "w"))) { |
51 |
++ !freopen(_PATH_DEVNULL, "r", stdout)) { |
52 |
+ if (err) |
53 |
+ perror("stdout stream open"); |
54 |
+ /* else no stdout */ |
55 |
+@@ -3128,7 +3128,7 @@ static int _check_standard_fds(void) |
56 |
+ } |
57 |
+ |
58 |
+ if (!is_valid_fd(STDERR_FILENO) && |
59 |
+- !(stderr = fopen(_PATH_DEVNULL, "w"))) { |
60 |
++ !freopen(_PATH_DEVNULL, "w", stderr)) { |
61 |
+ printf("stderr stream open: %s\n", |
62 |
+ strerror(errno)); |
63 |
+ return 0; |
64 |
|
65 |
diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch b/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch |
66 |
new file mode 100644 |
67 |
index 0000000..ecdcb1c |
68 |
--- /dev/null |
69 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch |
70 |
@@ -0,0 +1,21 @@ |
71 |
+--- a/lib/mm/memlock.c |
72 |
++++ b/lib/mm/memlock.c |
73 |
+@@ -159,7 +159,7 @@ static void _touch_memory(void *mem, siz |
74 |
+ |
75 |
+ static void _allocate_memory(void) |
76 |
+ { |
77 |
+-#ifndef VALGRIND_POOL |
78 |
++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) |
79 |
+ void *stack_mem; |
80 |
+ struct rlimit limit; |
81 |
+ int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks; |
82 |
+--- a/libdaemon/server/daemon-server.c |
83 |
++++ b/libdaemon/server/daemon-server.c |
84 |
+@@ -18,6 +18,7 @@ |
85 |
+ #include "daemon-server.h" |
86 |
+ #include "daemon-log.h" |
87 |
+ |
88 |
++#include <fcntl.h> |
89 |
+ #include <dlfcn.h> |
90 |
+ #include <errno.h> |
91 |
+ #include <pthread.h> |
92 |
|
93 |
diff --git a/sys-fs/lvm2/lvm2-2.02.183.ebuild b/sys-fs/lvm2/lvm2-2.02.183.ebuild |
94 |
new file mode 100644 |
95 |
index 0000000..1a2fab5 |
96 |
--- /dev/null |
97 |
+++ b/sys-fs/lvm2/lvm2-2.02.183.ebuild |
98 |
@@ -0,0 +1,262 @@ |
99 |
+# Copyright 1999-2019 Gentoo Authors |
100 |
+# Distributed under the terms of the GNU General Public License v2 |
101 |
+ |
102 |
+EAPI=6 |
103 |
+inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic |
104 |
+ |
105 |
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software" |
106 |
+HOMEPAGE="https://sourceware.org/lvm2/" |
107 |
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz |
108 |
+ ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz" |
109 |
+ |
110 |
+LICENSE="GPL-2" |
111 |
+SLOT="0" |
112 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
113 |
+IUSE="readline static static-libs systemd lvm2create_initrd sanlock selinux +udev +thin device-mapper-only" |
114 |
+REQUIRED_USE="device-mapper-only? ( !lvm2create_initrd !sanlock !thin ) |
115 |
+ systemd? ( udev )" |
116 |
+ |
117 |
+DEPEND_COMMON=" |
118 |
+ dev-libs/libaio[static-libs?] |
119 |
+ static? ( dev-libs/libaio[static-libs] ) |
120 |
+ !static? ( dev-libs/libaio[static-libs?] ) |
121 |
+ readline? ( sys-libs/readline:0= ) |
122 |
+ sanlock? ( sys-cluster/sanlock ) |
123 |
+ systemd? ( >=sys-apps/systemd-205:0= ) |
124 |
+ udev? ( >=virtual/libudev-208:=[static-libs?] )" |
125 |
+# /run is now required for locking during early boot. /var cannot be assumed to |
126 |
+# be available -- thus, pull in recent enough baselayout for /run. |
127 |
+# This version of LVM is incompatible with cryptsetup <1.1.2. |
128 |
+RDEPEND="${DEPEND_COMMON} |
129 |
+ >=sys-apps/baselayout-2.2 |
130 |
+ !<sys-apps/openrc-0.11 |
131 |
+ !<sys-fs/cryptsetup-1.1.2 |
132 |
+ !!sys-fs/lvm-user |
133 |
+ >=sys-apps/util-linux-2.16 |
134 |
+ lvm2create_initrd? ( sys-apps/makedev ) |
135 |
+ thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )" |
136 |
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check |
137 |
+# USE 'static' currently only works with eudev, bug 520450 |
138 |
+DEPEND="${DEPEND_COMMON} |
139 |
+ virtual/pkgconfig |
140 |
+ >=sys-devel/binutils-2.20.1-r1 |
141 |
+ sys-devel/autoconf-archive |
142 |
+ static? ( |
143 |
+ selinux? ( sys-libs/libselinux[static-libs] ) |
144 |
+ udev? ( >=sys-fs/eudev-3.1.2[static-libs] ) |
145 |
+ >=sys-apps/util-linux-2.16[static-libs] |
146 |
+ )" |
147 |
+ |
148 |
+S=${WORKDIR}/${PN/lvm/LVM}.${PV} |
149 |
+ |
150 |
+PATCHES=( |
151 |
+ # Gentoo specific modification(s): |
152 |
+ "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch |
153 |
+ |
154 |
+ # Musl fixes |
155 |
+ "${FILESDIR}"/${PN}-2.02.183-fix-stdio-usage.patch |
156 |
+ "${FILESDIR}"/${PN}-2.02.183-portability.patch |
157 |
+ |
158 |
+ # For upstream -- review and forward: |
159 |
+ "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch |
160 |
+ "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch |
161 |
+ "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331 |
162 |
+ "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373 |
163 |
+ "${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed |
164 |
+ "${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905 |
165 |
+ "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid |
166 |
+ "${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450 |
167 |
+ "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756 |
168 |
+ "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446 |
169 |
+ #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream |
170 |
+) |
171 |
+ |
172 |
+pkg_setup() { |
173 |
+ local CONFIG_CHECK="~SYSVIPC" |
174 |
+ |
175 |
+ if use udev; then |
176 |
+ local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n" |
177 |
+ if linux_config_exists; then |
178 |
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
179 |
+ if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then |
180 |
+ ewarn "It's recommended to set an empty value to the following kernel config option:" |
181 |
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
182 |
+ fi |
183 |
+ fi |
184 |
+ fi |
185 |
+ |
186 |
+ check_extra_config |
187 |
+ |
188 |
+ # 1. Genkernel no longer copies /sbin/lvm blindly. |
189 |
+ if use static; then |
190 |
+ elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with" |
191 |
+ elog "their static versions. If you need the static binaries," |
192 |
+ elog "you must append .static to the filename!" |
193 |
+ fi |
194 |
+} |
195 |
+ |
196 |
+src_prepare() { |
197 |
+ default |
198 |
+ |
199 |
+ sed -i \ |
200 |
+ -e "1iAR = $(tc-getAR)" \ |
201 |
+ -e "s:CC ?= @CC@:CC = $(tc-getCC):" \ |
202 |
+ make.tmpl.in || die #444082 |
203 |
+ |
204 |
+ sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212 |
205 |
+ |
206 |
+ if use udev && ! use device-mapper-only; then |
207 |
+ sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196 |
208 |
+ elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in" |
209 |
+ elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad" |
210 |
+ elog "if it was previously disabled." |
211 |
+ fi |
212 |
+ |
213 |
+ sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514 |
214 |
+ |
215 |
+ # Without thin-privision-tools, there is nothing to install for target install_man7: |
216 |
+ if ! use thin ; then |
217 |
+ sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die |
218 |
+ fi |
219 |
+ |
220 |
+ eautoreconf |
221 |
+} |
222 |
+ |
223 |
+src_configure() { |
224 |
+ filter-flags -flto |
225 |
+ local myeconfargs=() |
226 |
+ |
227 |
+ # Most of this package does weird stuff. |
228 |
+ # The build options are tristate, and --without is NOT supported |
229 |
+ # options: 'none', 'internal', 'shared' |
230 |
+ myeconfargs+=( |
231 |
+ $(use_enable !device-mapper-only dmeventd) |
232 |
+ $(use_enable !device-mapper-only cmdlib) |
233 |
+ $(use_enable !device-mapper-only applib) |
234 |
+ $(use_enable !device-mapper-only fsadm) |
235 |
+ $(use_enable !device-mapper-only lvmetad) |
236 |
+ $(usex device-mapper-only --disable-udev-systemd-background-jobs '') |
237 |
+ |
238 |
+ # This only causes the .static versions to become available |
239 |
+ $(usex static --enable-static_link '') |
240 |
+ |
241 |
+ # dmeventd requires mirrors to be internal, and snapshot available |
242 |
+ # so we cannot disable them |
243 |
+ --with-mirrors="$(usex device-mapper-only none internal)" |
244 |
+ --with-snapshots="$(usex device-mapper-only none internal)" |
245 |
+ |
246 |
+ # disable O_DIRECT support on hppa, breaks pv detection (#99532) |
247 |
+ $(usex hppa --disable-o_direct '') |
248 |
+ ) |
249 |
+ |
250 |
+ if use thin; then |
251 |
+ myeconfargs+=( --with-thin=internal --with-cache=internal ) |
252 |
+ local texec |
253 |
+ for texec in check dump repair restore; do |
254 |
+ myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} ) |
255 |
+ myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} ) |
256 |
+ done |
257 |
+ else |
258 |
+ myeconfargs+=( --with-thin=none --with-cache=none ) |
259 |
+ fi |
260 |
+ |
261 |
+ myeconfargs+=( --with-clvmd=none --with-cluster=none ) |
262 |
+ |
263 |
+ myeconfargs+=( |
264 |
+ $(use_enable readline) |
265 |
+ $(use_enable selinux) |
266 |
+ --enable-pkgconfig |
267 |
+ --with-confdir="${EPREFIX}"/etc |
268 |
+ --exec-prefix="${EPREFIX}" |
269 |
+ --sbindir="${EPREFIX}/sbin" |
270 |
+ --with-staticdir="${EPREFIX}"/sbin |
271 |
+ --libdir="${EPREFIX}/$(get_libdir)" |
272 |
+ --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" |
273 |
+ --with-default-dm-run-dir=/run |
274 |
+ --with-default-run-dir=/run/lvm |
275 |
+ --with-default-locking-dir=/run/lock/lvm |
276 |
+ --with-default-pid-dir=/run |
277 |
+ $(use_enable udev udev_rules) |
278 |
+ $(use_enable udev udev_sync) |
279 |
+ $(use_with udev udevdir "$(get_udevdir)"/rules.d) |
280 |
+ $(use_enable sanlock lvmlockd-sanlock) |
281 |
+ $(use_enable systemd udev-systemd-background-jobs) |
282 |
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
283 |
+ CLDFLAGS="${LDFLAGS}" |
284 |
+ ) |
285 |
+ econf "${myeconfargs[@]}" |
286 |
+} |
287 |
+ |
288 |
+src_compile() { |
289 |
+ pushd include >/dev/null |
290 |
+ emake |
291 |
+ popd >/dev/null |
292 |
+ |
293 |
+ if use device-mapper-only ; then |
294 |
+ emake device-mapper |
295 |
+ else |
296 |
+ emake |
297 |
+ emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat |
298 |
+ fi |
299 |
+} |
300 |
+ |
301 |
+src_install() { |
302 |
+ local inst INSTALL_TARGETS |
303 |
+ INSTALL_TARGETS=( install install_tmpfiles_configuration ) |
304 |
+ # install systemd related files only when requested, bug #522430 |
305 |
+ use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators ) |
306 |
+ use device-mapper-only && INSTALL_TARGETS=( install_device-mapper ) |
307 |
+ for inst in ${INSTALL_TARGETS[@]}; do |
308 |
+ emake DESTDIR="${D}" ${inst} |
309 |
+ done |
310 |
+ |
311 |
+ newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper |
312 |
+ newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper |
313 |
+ |
314 |
+ if use !device-mapper-only ; then |
315 |
+ newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd |
316 |
+ newinitd "${FILESDIR}"/lvm.rc-2.02.172 lvm |
317 |
+ newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm |
318 |
+ |
319 |
+ newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring |
320 |
+ newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad |
321 |
+ fi |
322 |
+ |
323 |
+ if use sanlock; then |
324 |
+ newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd |
325 |
+ fi |
326 |
+ |
327 |
+ if use static-libs; then |
328 |
+ dolib.a libdm/ioctl/libdevmapper.a |
329 |
+ dolib.a libdaemon/client/libdaemonclient.a #462908 |
330 |
+ #gen_usr_ldscript libdevmapper.so |
331 |
+ dolib.a daemons/dmeventd/libdevmapper-event.a |
332 |
+ #gen_usr_ldscript libdevmapper-event.so |
333 |
+ else |
334 |
+ rm -f "${ED%/}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a |
335 |
+ fi |
336 |
+ |
337 |
+ if use lvm2create_initrd; then |
338 |
+ dosbin scripts/lvm2create_initrd/lvm2create_initrd |
339 |
+ doman scripts/lvm2create_initrd/lvm2create_initrd.8 |
340 |
+ newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd |
341 |
+ fi |
342 |
+ |
343 |
+ insinto /etc |
344 |
+ doins "${FILESDIR}"/dmtab |
345 |
+ |
346 |
+ dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf |
347 |
+} |
348 |
+ |
349 |
+pkg_postinst() { |
350 |
+ ewarn "Make sure the \"lvm\" init script is in the runlevels:" |
351 |
+ ewarn "# rc-update add lvm boot" |
352 |
+ ewarn |
353 |
+ ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" |
354 |
+ ewarn "to enable lvm autoactivation and metadata caching." |
355 |
+} |
356 |
+ |
357 |
+src_test() { |
358 |
+ einfo "Tests are disabled because of device-node mucking, if you want to" |
359 |
+ einfo "run tests, compile the package and see ${S}/tests" |
360 |
+} |
361 |
|
362 |
diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml |
363 |
index 7d493c0..c1a65d7 100644 |
364 |
--- a/sys-fs/lvm2/metadata.xml |
365 |
+++ b/sys-fs/lvm2/metadata.xml |
366 |
@@ -20,6 +20,7 @@ |
367 |
<flag name="lvm2create_initrd">Install lvm2create_initrd script and pull in <pkg>sys-apps/makedev</pkg> for the /sbin/MAKEDEV command</flag> |
368 |
<flag name="thin">Support for thin volumes</flag> |
369 |
<flag name="device-mapper-only">Build only device-mapper and not the rest of LVM2 (UNSUPPORTED)</flag> |
370 |
+ <flag name="sanlock">Enable lvmlockd with support for sanlock</flag> |
371 |
</use> |
372 |
<upstream> |
373 |
<remote-id type="cpe">cpe:/a:heinz_mauelshagen:lvm2</remote-id> |