Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/lvm2: lvm2-2.02.109-r1.ebuild ChangeLog
Date: Wed, 27 Aug 2014 07:26:21
Message-Id: 20140827072617.705513F67@oystercatcher.gentoo.org
1 ssuominen 14/08/27 07:26:17
2
3 Modified: ChangeLog
4 Added: lvm2-2.02.109-r1.ebuild
5 Log:
6 Revision bump for last correction in files/lvm2-2.02.106-pthread-pkgconfig.patch and to have ~arch version with REQUIRED_USE blocking usage of USE="static udev" wrt #520450.
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
9
10 Revision Changes Path
11 1.368 sys-fs/lvm2/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.368&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.368&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?r1=1.367&r2=1.368
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v
20 retrieving revision 1.367
21 retrieving revision 1.368
22 diff -u -r1.367 -r1.368
23 --- ChangeLog 24 Aug 2014 17:24:16 -0000 1.367
24 +++ ChangeLog 27 Aug 2014 07:26:17 -0000 1.368
25 @@ -1,6 +1,13 @@
26 # ChangeLog for sys-fs/lvm2
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.367 2014/08/24 17:24:16 ssuominen Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.368 2014/08/27 07:26:17 ssuominen Exp $
30 +
31 +*lvm2-2.02.109-r1 (27 Aug 2014)
32 +
33 + 27 Aug 2014; Samuli Suominen <ssuominen@g.o> +lvm2-2.02.109-r1.ebuild:
34 + Revision bump for last correction in files/lvm2-2.02.106-pthread-
35 + pkgconfig.patch and to have ~arch version with REQUIRED_USE blocking usage of
36 + USE="static udev" wrt #520450.
37
38 24 Aug 2014; Samuli Suominen <ssuominen@g.o>
39 files/lvm2-2.02.106-pthread-pkgconfig.patch:
40
41
42
43 1.1 sys-fs/lvm2/lvm2-2.02.109-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.109-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.109-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: lvm2-2.02.109-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.109-r1.ebuild,v 1.1 2014/08/27 07:26:17 ssuominen Exp $
53
54 EAPI=5
55 inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
56
57 DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
58 HOMEPAGE="http://sources.redhat.com/lvm2/"
59 SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
60 ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
61
62 LICENSE="GPL-2"
63 SLOT="0"
64 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
65 IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
66 REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
67 static? ( !udev )" #520450
68
69 DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
70 readline? ( sys-libs/readline )
71 udev? ( >=virtual/libudev-208:=[static-libs?] )"
72 # /run is now required for locking during early boot. /var cannot be assumed to
73 # be available -- thus, pull in recent enough baselayout for /run.
74 # This version of LVM is incompatible with cryptsetup <1.1.2.
75 RDEPEND="${DEPEND_COMMON}
76 >=sys-apps/baselayout-2.2
77 !<sys-apps/openrc-0.11
78 !<sys-fs/cryptsetup-1.1.2
79 !!sys-fs/clvm
80 !!sys-fs/lvm-user
81 >=sys-apps/util-linux-2.16
82 lvm2create_initrd? ( sys-apps/makedev )
83 thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
84 # note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
85 DEPEND="${DEPEND_COMMON}
86 virtual/pkgconfig
87 >=sys-devel/binutils-2.20.1-r1
88 static? (
89 selinux? ( sys-libs/libselinux[static-libs] )
90 udev? ( >=virtual/libudev-208:=[static-libs] )
91 >=sys-apps/util-linux-2.16[static-libs]
92 )"
93
94 S=${WORKDIR}/${PN/lvm/LVM}.${PV}
95
96 pkg_setup() {
97 local CONFIG_CHECK="~SYSVIPC"
98
99 if use udev; then
100 local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
101 if linux_config_exists; then
102 local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
103 if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
104 ewarn "It's recommended to set an empty value to the following kernel config option:"
105 ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
106 fi
107 fi
108 fi
109
110 check_extra_config
111
112 # 1. Genkernel no longer copies /sbin/lvm blindly.
113 if use static; then
114 elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
115 elog "their static versions. If you need the static binaries,"
116 elog "you must append .static to the filename!"
117 fi
118 }
119
120 src_prepare() {
121 # Gentoo specific modification(s):
122 epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
123
124 sed -i \
125 -e "1iAR = $(tc-getAR)" \
126 -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
127 make.tmpl.in || die #444082
128
129 sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
130
131 if use systemd && ! use device-mapper-only; then
132 sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
133 fi
134
135 sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
136
137 # For upstream -- review and forward:
138 epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
139 epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
140 epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
141 epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
142 epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
143 epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
144 epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
145 epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
146
147 # Without thin-privision-tools, there is nothing to install for target install_man7:
148 use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
149
150 sed -i -e 's:|share):|shared):' configure.in || die #520640
151
152 eautoreconf
153 }
154
155 src_configure() {
156 filter-flags -flto
157 local myconf
158 local buildmode
159
160 myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
161 myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
162 myconf="${myconf} $(use_enable !device-mapper-only applib)"
163 myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
164 myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
165 use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
166
167 # Most of this package does weird stuff.
168 # The build options are tristate, and --without is NOT supported
169 # options: 'none', 'internal', 'shared'
170 if use static; then
171 buildmode="internal"
172 # This only causes the .static versions to become available
173 myconf="${myconf} --enable-static_link"
174 else
175 buildmode="shared"
176 fi
177 dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
178
179 # dmeventd requires mirrors to be internal, and snapshot available
180 # so we cannot disable them
181 myconf="${myconf} --with-mirrors=${dmbuildmode}"
182 myconf="${myconf} --with-snapshots=${dmbuildmode}"
183 if use thin; then
184 myconf="${myconf} --with-thin=internal --with-cache=internal"
185 local texec
186 for texec in check dump repair restore; do
187 myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
188 myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
189 done
190 else
191 myconf="${myconf} --with-thin=none --with-cache=none"
192 fi
193
194 if use lvm1; then
195 myconf="${myconf} --with-lvm1=${buildmode}"
196 else
197 myconf="${myconf} --with-lvm1=none"
198 fi
199
200 # disable O_DIRECT support on hppa, breaks pv detection (#99532)
201 use hppa && myconf="${myconf} --disable-o_direct"
202
203 if use clvm; then
204 myconf="${myconf} --with-cluster=${buildmode}"
205 # 4-state! Make sure we get it right, per bug 210879
206 # Valid options are: none, cman, gulm, all
207 #
208 # 2009/02:
209 # gulm is removed now, now dual-state:
210 # cman, none
211 # all still exists, but is not needed
212 #
213 # 2009/07:
214 # TODO: add corosync and re-enable ALL
215 local clvmd=""
216 use cman && clvmd="cman"
217 #clvmd="${clvmd/cmangulm/all}"
218 [ -z "${clvmd}" ] && clvmd="none"
219 myconf="${myconf} --with-clvmd=${clvmd}"
220 myconf="${myconf} --with-pool=${buildmode}"
221 else
222 myconf="${myconf} --with-clvmd=none --with-cluster=none"
223 fi
224
225 econf \
226 $(use_enable readline) \
227 $(use_enable selinux) \
228 --enable-pkgconfig \
229 --with-confdir="${EPREFIX}"/etc \
230 --exec-prefix="${EPREFIX}" \
231 --sbindir="${EPREFIX}/sbin" \
232 --with-staticdir="${EPREFIX}"/sbin \
233 --libdir="${EPREFIX}/$(get_libdir)" \
234 --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
235 --with-default-dm-run-dir=/run \
236 --with-default-run-dir=/run/lvm \
237 --with-default-locking-dir=/run/lock/lvm \
238 --with-default-pid-dir=/run \
239 $(use_enable udev udev_rules) \
240 $(use_enable udev udev_sync) \
241 $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
242 $(use_enable systemd udev-systemd-background-jobs) \
243 "$(systemd_with_unitdir)" \
244 ${myconf} \
245 CLDFLAGS="${LDFLAGS}"
246 }
247
248 src_compile() {
249 pushd include >/dev/null
250 emake
251 popd >/dev/null
252
253 if use device-mapper-only ; then
254 emake device-mapper
255 else
256 emake
257 emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
258 fi
259 }
260
261 src_install() {
262 local inst
263 INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
264 use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
265 for inst in ${INSTALL_TARGETS}; do
266 emake DESTDIR="${D}" ${inst}
267 done
268
269 newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
270 newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
271
272 if use !device-mapper-only ; then
273 newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
274 newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
275 newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
276
277 newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
278 newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
279 fi
280
281 if use clvm; then
282 newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
283 newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
284 fi
285
286 if use static-libs; then
287 dolib.a libdm/ioctl/libdevmapper.a
288 dolib.a libdaemon/client/libdaemonclient.a #462908
289 #gen_usr_ldscript libdevmapper.so
290 dolib.a daemons/dmeventd/libdevmapper-event.a
291 #gen_usr_ldscript libdevmapper-event.so
292 else
293 rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
294 fi
295
296 if use lvm2create_initrd; then
297 dosbin scripts/lvm2create_initrd/lvm2create_initrd
298 doman scripts/lvm2create_initrd/lvm2create_initrd.8
299 newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
300 fi
301
302 insinto /etc
303 doins "${FILESDIR}"/dmtab
304
305 dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
306 }
307
308 pkg_postinst() {
309 ewarn "Make sure the \"lvm\" init script is in the runlevels:"
310 ewarn "# rc-update add lvm boot"
311 ewarn
312 ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
313 ewarn "to enable lvm autoactivation and metadata caching."
314 }
315
316 src_test() {
317 einfo "Tests are disabled because of device-node mucking, if you want to"
318 einfo "run tests, compile the package and see ${S}/tests"
319 }