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.108.ebuild ChangeLog
Date: Wed, 30 Jul 2014 17:11:35
Message-Id: 20140730171128.901B42004F@flycatcher.gentoo.org
1 ssuominen 14/07/30 17:11:27
2
3 Modified: ChangeLog
4 Added: lvm2-2.02.108.ebuild
5 Log:
6 Version bump. Fix configure logic for cache since it's tied to thin-provisioning-tools.
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
9
10 Revision Changes Path
11 1.357 sys-fs/lvm2/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.357&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.357&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?r1=1.356&r2=1.357
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v
20 retrieving revision 1.356
21 retrieving revision 1.357
22 diff -u -r1.356 -r1.357
23 --- ChangeLog 25 Jul 2014 19:50:59 -0000 1.356
24 +++ ChangeLog 30 Jul 2014 17:11:27 -0000 1.357
25 @@ -1,6 +1,14 @@
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.356 2014/07/25 19:50:59 ssuominen Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.357 2014/07/30 17:11:27 ssuominen Exp $
30 +
31 +*lvm2-2.02.108 (30 Jul 2014)
32 +
33 + 30 Jul 2014; Samuli Suominen <ssuominen@g.o>
34 + +files/lvm2-2.02.108-example.conf.in.patch,
35 + +files/lvm2-2.02.108-static-pkgconfig-libs.patch, +lvm2-2.02.108.ebuild:
36 + Version bump. Fix configure logic for cache since it's tied to thin-
37 + provisioning-tools.
38
39 25 Jul 2014; Samuli Suominen <ssuominen@g.o> lvm2-2.02.103.ebuild,
40 lvm2-2.02.105-r2.ebuild, lvm2-2.02.106.ebuild, lvm2-2.02.107.ebuild:
41
42
43
44 1.1 sys-fs/lvm2/lvm2-2.02.108.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.108.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.108.ebuild?rev=1.1&content-type=text/plain
48
49 Index: lvm2-2.02.108.ebuild
50 ===================================================================
51 # Copyright 1999-2014 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.108.ebuild,v 1.1 2014/07/30 17:11:27 ssuominen Exp $
54
55 EAPI=5
56 inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
57
58 DESCRIPTION="User-land utilities for LVM2 (device-mapper) software."
59 HOMEPAGE="http://sources.redhat.com/lvm2/"
60 SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
61 ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
62
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
66 IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
67 REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )"
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 # For upstream -- review and forward:
132 epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
133 epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
134 epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
135 epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
136 epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
137 epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
138 epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
139 epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
140 # Upstream never tested with USE="-thin" wrt #510202
141 sed -i -e 's|_man7: $(MAN8)|_man7: $(MAN7)|' man/Makefile.in || die
142 use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
143
144 eautoreconf
145 }
146
147 src_configure() {
148 filter-flags -flto
149 local myconf
150 local buildmode
151
152 myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
153 myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
154 myconf="${myconf} $(use_enable !device-mapper-only applib)"
155 myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
156 myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
157 use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
158
159 # Most of this package does weird stuff.
160 # The build options are tristate, and --without is NOT supported
161 # options: 'none', 'internal', 'shared'
162 if use static; then
163 buildmode="internal"
164 # This only causes the .static versions to become available
165 myconf="${myconf} --enable-static_link"
166 else
167 buildmode="shared"
168 fi
169 dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
170
171 # dmeventd requires mirrors to be internal, and snapshot available
172 # so we cannot disable them
173 myconf="${myconf} --with-mirrors=${dmbuildmode}"
174 myconf="${myconf} --with-snapshots=${dmbuildmode}"
175 if use thin; then
176 myconf="${myconf} --with-thin=internal --with-cache=internal"
177 local texec
178 for texec in check dump repair restore; do
179 myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
180 myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
181 done
182 else
183 myconf="${myconf} --with-thin=none --with-cache=none"
184 fi
185
186 if use lvm1; then
187 myconf="${myconf} --with-lvm1=${buildmode}"
188 else
189 myconf="${myconf} --with-lvm1=none"
190 fi
191
192 # disable O_DIRECT support on hppa, breaks pv detection (#99532)
193 use hppa && myconf="${myconf} --disable-o_direct"
194
195 if use clvm; then
196 myconf="${myconf} --with-cluster=${buildmode}"
197 # 4-state! Make sure we get it right, per bug 210879
198 # Valid options are: none, cman, gulm, all
199 #
200 # 2009/02:
201 # gulm is removed now, now dual-state:
202 # cman, none
203 # all still exists, but is not needed
204 #
205 # 2009/07:
206 # TODO: add corosync and re-enable ALL
207 local clvmd=""
208 use cman && clvmd="cman"
209 #clvmd="${clvmd/cmangulm/all}"
210 [ -z "${clvmd}" ] && clvmd="none"
211 myconf="${myconf} --with-clvmd=${clvmd}"
212 myconf="${myconf} --with-pool=${buildmode}"
213 else
214 myconf="${myconf} --with-clvmd=none --with-cluster=none"
215 fi
216
217 econf \
218 $(use_enable readline) \
219 $(use_enable selinux) \
220 --enable-pkgconfig \
221 --with-confdir="${EPREFIX}"/etc \
222 --exec-prefix="${EPREFIX}" \
223 --sbindir="${EPREFIX}/sbin" \
224 --with-staticdir="${EPREFIX}"/sbin \
225 --libdir="${EPREFIX}/$(get_libdir)" \
226 --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
227 --with-default-dm-run-dir=/run \
228 --with-default-run-dir=/run/lvm \
229 --with-default-locking-dir=/run/lock/lvm \
230 --with-default-pid-dir=/run \
231 $(use_enable udev udev_rules) \
232 $(use_enable udev udev_sync) \
233 $(use_with udev udevdir "$(get_udevdir)"/rules.d) \
234 $(use_enable systemd udev-systemd-background-jobs) \
235 "$(systemd_with_unitdir)" \
236 ${myconf} \
237 CLDFLAGS="${LDFLAGS}"
238 }
239
240 src_compile() {
241 pushd include >/dev/null
242 emake
243 popd >/dev/null
244
245 if use device-mapper-only ; then
246 emake device-mapper
247 else
248 emake
249 emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
250 fi
251 }
252
253 src_install() {
254 local inst
255 INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
256 use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
257 for inst in ${INSTALL_TARGETS}; do
258 emake DESTDIR="${D}" ${inst}
259 done
260
261 newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
262 newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
263
264 if use !device-mapper-only ; then
265 newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
266 newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
267 newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
268
269 newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
270 newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
271 fi
272
273 if use clvm; then
274 newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
275 newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
276 fi
277
278 if use static-libs; then
279 dolib.a libdm/ioctl/libdevmapper.a
280 dolib.a libdaemon/client/libdaemonclient.a #462908
281 #gen_usr_ldscript libdevmapper.so
282 dolib.a daemons/dmeventd/libdevmapper-event.a
283 #gen_usr_ldscript libdevmapper-event.so
284 else
285 rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
286 fi
287
288 if use lvm2create_initrd; then
289 dosbin scripts/lvm2create_initrd/lvm2create_initrd
290 doman scripts/lvm2create_initrd/lvm2create_initrd.8
291 newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
292 fi
293
294 insinto /etc
295 doins "${FILESDIR}"/dmtab
296
297 dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
298 }
299
300 pkg_postinst() {
301 ewarn "Make sure the \"lvm\" init script is in the runlevels:"
302 ewarn "# rc-update add lvm boot"
303 ewarn
304 ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
305 ewarn "to enable lvm autoactivation and metadata caching."
306 }
307
308 src_test() {
309 einfo "Tests are disabled because of device-node mucking, if you want to"
310 einfo "run tests, compile the package and see ${S}/tests"
311 }