Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/
Date: Mon, 08 Apr 2019 18:34:42
Message-Id: 1554748467.53d8205ff9f4533c17a265a88e44363fd9fd66ed.polynomial-c@gentoo
1 commit: 53d8205ff9f4533c17a265a88e44363fd9fd66ed
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 8 18:34:13 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 8 18:34:27 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53d8205f
7
8 sys-fs/lvm2: Bump to version 2.02.184
9
10 this should fix udev related issues as well as scan_lvs issues.
11
12 Bug: https://bugs.gentoo.org/682578
13 Bug: https://bugs.gentoo.org/682380
14 Package-Manager: Portage-2.3.62, Repoman-2.3.12
15 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
16
17 sys-fs/lvm2/Manifest | 1 +
18 sys-fs/lvm2/lvm2-2.02.184.ebuild | 258 +++++++++++++++++++++++++++++++++++++++
19 2 files changed, 259 insertions(+)
20
21 diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
22 index cc17619d9c9..fa9cdc1b27e 100644
23 --- a/sys-fs/lvm2/Manifest
24 +++ b/sys-fs/lvm2/Manifest
25 @@ -1,3 +1,4 @@
26 DIST LVM2.2.02.116.tgz 1538340 BLAKE2B 718261b60626f2eca5ba13011646bf551523ed8e59aaceceb9097221c000268b7533ac43151ff1d9229911d87e764fbdb29ffa1d305f2aae99220a68e301559a SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d
27 DIST LVM2.2.02.145.tgz 1986370 BLAKE2B 0c9e5efae17f26ff86152cecbf0b11a74e85007b2fa9491f44dec03ac8c11375bacf6685213b4be19037c8fbf70e13549516716ecf8fa262919a44625e6aab34 SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27
28 DIST LVM2.2.02.183.tgz 2380574 BLAKE2B b1fe71b6cdb8ee20dd53d0ad3399c553487baafa12657ec81a794c84ad161988afdb8693ac247877a2645d693a0740c74c8b991047ed2ba4adc9ec75f1c261a9 SHA512 3947523c6b0862ada40677ed171ed0cf95e070119e377296fc5ccb153e9c4212d34c0b16a887dbd68ccf265525345dabfed2aa59fb3604555429a7e2ecfff4d7
29 +DIST LVM2.2.02.184.tgz 2383698 BLAKE2B b6e308d76d541b9461dfcc6e82db256a175ccdabfae9c9d57d84eabd0d5ea50e3e09954b34741903e027412c2c26f72a5005fe934261576337a810738139deb8 SHA512 9db74f675e7c58f663a39afb79b6f33a33ad2cfbda63e9783ef5027f33977b4a1262a2e6754aa67c586eed083ee119a2e837c32a7746dcc53f13877c9d65c390
30
31 diff --git a/sys-fs/lvm2/lvm2-2.02.184.ebuild b/sys-fs/lvm2/lvm2-2.02.184.ebuild
32 new file mode 100644
33 index 00000000000..19b3acffaf8
34 --- /dev/null
35 +++ b/sys-fs/lvm2/lvm2-2.02.184.ebuild
36 @@ -0,0 +1,258 @@
37 +# Copyright 1999-2019 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic
42 +
43 +DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
44 +HOMEPAGE="https://sourceware.org/lvm2/"
45 +SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
46 + ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
47 +
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
51 +IUSE="readline static static-libs systemd lvm2create_initrd sanlock selinux +udev +thin device-mapper-only"
52 +REQUIRED_USE="device-mapper-only? ( !lvm2create_initrd !sanlock !thin )
53 + systemd? ( udev )"
54 +
55 +DEPEND_COMMON="
56 + dev-libs/libaio[static-libs?]
57 + static? ( dev-libs/libaio[static-libs] )
58 + !static? ( dev-libs/libaio[static-libs?] )
59 + readline? ( sys-libs/readline:0= )
60 + sanlock? ( sys-cluster/sanlock )
61 + systemd? ( >=sys-apps/systemd-205:0= )
62 + udev? ( >=virtual/libudev-208:=[static-libs?] )"
63 +# /run is now required for locking during early boot. /var cannot be assumed to
64 +# be available -- thus, pull in recent enough baselayout for /run.
65 +# This version of LVM is incompatible with cryptsetup <1.1.2.
66 +RDEPEND="${DEPEND_COMMON}
67 + >=sys-apps/baselayout-2.2
68 + !<sys-apps/openrc-0.11
69 + !<sys-fs/cryptsetup-1.1.2
70 + !!sys-fs/lvm-user
71 + >=sys-apps/util-linux-2.16
72 + lvm2create_initrd? ( sys-apps/makedev )
73 + thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
74 +# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
75 +# USE 'static' currently only works with eudev, bug 520450
76 +DEPEND="${DEPEND_COMMON}
77 + virtual/pkgconfig
78 + >=sys-devel/binutils-2.20.1-r1
79 + sys-devel/autoconf-archive
80 + static? (
81 + selinux? ( sys-libs/libselinux[static-libs] )
82 + udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
83 + >=sys-apps/util-linux-2.16[static-libs]
84 + )"
85 +
86 +S=${WORKDIR}/${PN/lvm/LVM}.${PV}
87 +
88 +PATCHES=(
89 + # Gentoo specific modification(s):
90 + "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
91 +
92 + # For upstream -- review and forward:
93 + "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
94 + "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
95 + "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
96 + "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
97 + "${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
98 + "${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
99 + "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
100 + "${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
101 + "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
102 + "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
103 + #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
104 +)
105 +
106 +pkg_setup() {
107 + local CONFIG_CHECK="~SYSVIPC"
108 +
109 + if use udev; then
110 + local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
111 + if linux_config_exists; then
112 + local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
113 + if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
114 + ewarn "It's recommended to set an empty value to the following kernel config option:"
115 + ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
116 + fi
117 + fi
118 + fi
119 +
120 + check_extra_config
121 +
122 + # 1. Genkernel no longer copies /sbin/lvm blindly.
123 + if use static; then
124 + elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
125 + elog "their static versions. If you need the static binaries,"
126 + elog "you must append .static to the filename!"
127 + fi
128 +}
129 +
130 +src_prepare() {
131 + default
132 +
133 + sed -i \
134 + -e "1iAR = $(tc-getAR)" \
135 + -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
136 + make.tmpl.in || die #444082
137 +
138 + sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212
139 +
140 + if use udev && ! use device-mapper-only; then
141 + sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
142 + elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
143 + elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
144 + elog "if it was previously disabled."
145 + fi
146 +
147 + sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
148 +
149 + # Without thin-privision-tools, there is nothing to install for target install_man7:
150 + if ! use thin ; then
151 + sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die
152 + fi
153 +
154 + eautoreconf
155 +}
156 +
157 +src_configure() {
158 + filter-flags -flto
159 + local myeconfargs=()
160 +
161 + # Most of this package does weird stuff.
162 + # The build options are tristate, and --without is NOT supported
163 + # options: 'none', 'internal', 'shared'
164 + myeconfargs+=(
165 + $(use_enable !device-mapper-only dmeventd)
166 + $(use_enable !device-mapper-only cmdlib)
167 + $(use_enable !device-mapper-only applib)
168 + $(use_enable !device-mapper-only fsadm)
169 + $(use_enable !device-mapper-only lvmetad)
170 + $(usex device-mapper-only --disable-udev-systemd-background-jobs '')
171 +
172 + # This only causes the .static versions to become available
173 + $(usex static --enable-static_link '')
174 +
175 + # dmeventd requires mirrors to be internal, and snapshot available
176 + # so we cannot disable them
177 + --with-mirrors="$(usex device-mapper-only none internal)"
178 + --with-snapshots="$(usex device-mapper-only none internal)"
179 +
180 + # disable O_DIRECT support on hppa, breaks pv detection (#99532)
181 + $(usex hppa --disable-o_direct '')
182 + )
183 +
184 + if use thin; then
185 + myeconfargs+=( --with-thin=internal --with-cache=internal )
186 + local texec
187 + for texec in check dump repair restore; do
188 + myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
189 + myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
190 + done
191 + else
192 + myeconfargs+=( --with-thin=none --with-cache=none )
193 + fi
194 +
195 + myeconfargs+=( --with-clvmd=none --with-cluster=none )
196 +
197 + myeconfargs+=(
198 + $(use_enable readline)
199 + $(use_enable selinux)
200 + --enable-pkgconfig
201 + --with-confdir="${EPREFIX}"/etc
202 + --exec-prefix="${EPREFIX}"
203 + --sbindir="${EPREFIX}/sbin"
204 + --with-staticdir="${EPREFIX}"/sbin
205 + --libdir="${EPREFIX}/$(get_libdir)"
206 + --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)"
207 + --with-default-dm-run-dir=/run
208 + --with-default-run-dir=/run/lvm
209 + --with-default-locking-dir=/run/lock/lvm
210 + --with-default-pid-dir=/run
211 + $(use_enable udev udev_rules)
212 + $(use_enable udev udev_sync)
213 + $(use_with udev udevdir "$(get_udevdir)"/rules.d)
214 + $(use_enable sanlock lvmlockd-sanlock)
215 + $(use_enable systemd udev-systemd-background-jobs)
216 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
217 + CLDFLAGS="${LDFLAGS}"
218 + )
219 + econf "${myeconfargs[@]}"
220 +}
221 +
222 +src_compile() {
223 + pushd include >/dev/null
224 + emake
225 + popd >/dev/null
226 +
227 + if use device-mapper-only ; then
228 + emake device-mapper
229 + else
230 + emake
231 + emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
232 + fi
233 +}
234 +
235 +src_install() {
236 + local inst INSTALL_TARGETS
237 + INSTALL_TARGETS=( install install_tmpfiles_configuration )
238 + # install systemd related files only when requested, bug #522430
239 + use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators )
240 + use device-mapper-only && INSTALL_TARGETS=( install_device-mapper )
241 + for inst in ${INSTALL_TARGETS[@]}; do
242 + emake DESTDIR="${D}" ${inst}
243 + done
244 +
245 + newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
246 + newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
247 +
248 + if use !device-mapper-only ; then
249 + newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
250 + newinitd "${FILESDIR}"/lvm.rc-2.02.172 lvm
251 + newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
252 +
253 + newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
254 + newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
255 + fi
256 +
257 + if use sanlock; then
258 + newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
259 + fi
260 +
261 + if use static-libs; then
262 + dolib.a libdm/ioctl/libdevmapper.a
263 + dolib.a libdaemon/client/libdaemonclient.a #462908
264 + #gen_usr_ldscript libdevmapper.so
265 + dolib.a daemons/dmeventd/libdevmapper-event.a
266 + #gen_usr_ldscript libdevmapper-event.so
267 + else
268 + rm -f "${ED%/}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
269 + fi
270 +
271 + if use lvm2create_initrd; then
272 + dosbin scripts/lvm2create_initrd/lvm2create_initrd
273 + doman scripts/lvm2create_initrd/lvm2create_initrd.8
274 + newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
275 + fi
276 +
277 + insinto /etc
278 + doins "${FILESDIR}"/dmtab
279 +
280 + dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
281 +}
282 +
283 +pkg_postinst() {
284 + ewarn "Make sure the \"lvm\" init script is in the runlevels:"
285 + ewarn "# rc-update add lvm boot"
286 + ewarn
287 + ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
288 + ewarn "to enable lvm autoactivation and metadata caching."
289 +}
290 +
291 +src_test() {
292 + einfo "Tests are disabled because of device-node mucking, if you want to"
293 + einfo "run tests, compile the package and see ${S}/tests"
294 +}