Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/lvm2: lvm2-2.02.97-r1.ebuild ChangeLog
Date: Sat, 24 Nov 2012 08:45:22
Message-Id: 20121124084509.0116B20C65@flycatcher.gentoo.org
1 pacho 12/11/24 08:45:08
2
3 Modified: ChangeLog
4 Added: lvm2-2.02.97-r1.ebuild
5 Log:
6 Fix strict aliasing bug (#444328 by MJJoker, Alexander Tsoy and Vicente Olivert Riera), fix AR being called directly (#444082 by Vicente Olivert Riera).
7
8 (Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
9
10 Revision Changes Path
11 1.277 sys-fs/lvm2/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.277&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.277&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?r1=1.276&r2=1.277
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v
20 retrieving revision 1.276
21 retrieving revision 1.277
22 diff -u -r1.276 -r1.277
23 --- ChangeLog 12 Aug 2012 21:11:49 -0000 1.276
24 +++ ChangeLog 24 Nov 2012 08:45:08 -0000 1.277
25 @@ -1,6 +1,13 @@
26 # ChangeLog for sys-fs/lvm2
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.276 2012/08/12 21:11:49 robbat2 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.277 2012/11/24 08:45:08 pacho Exp $
30 +
31 +*lvm2-2.02.97-r1 (24 Nov 2012)
32 +
33 + 24 Nov 2012; Pacho Ramos <pacho@g.o> +lvm2-2.02.97-r1.ebuild:
34 + Fix strict aliasing bug (#444328 by MJJoker, Alexander Tsoy and Vicente
35 + Olivert Riera), fix AR being called directly (#444082 by Vicente Olivert
36 + Riera).
37
38 *lvm2-2.02.97 (12 Aug 2012)
39
40
41
42
43 1.1 sys-fs/lvm2/lvm2-2.02.97-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.97-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.97-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: lvm2-2.02.97-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2012 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.97-r1.ebuild,v 1.1 2012/11/24 08:45:08 pacho Exp $
53
54 EAPI=5
55 inherit eutils multilib toolchain-funcs autotools linux-info
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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
65
66 IUSE="readline static static-libs clvm cman +lvm1 selinux +udev +thin"
67
68 DEPEND_COMMON="!!sys-fs/device-mapper
69 readline? ( sys-libs/readline )
70 clvm? ( =sys-cluster/libdlm-3*
71 cman? ( =sys-cluster/cman-3* ) )
72 udev? ( >=sys-fs/udev-151-r4 )"
73
74 # /run is now required for locking during early boot. /var cannot be assumed to
75 # be available.
76 RDEPEND="${DEPEND_COMMON}
77 !<sys-apps/openrc-0.10.1
78 >=sys-apps/baselayout-2.1-r1
79 !!sys-fs/lvm-user
80 !!sys-fs/clvm
81 >=sys-apps/util-linux-2.16
82 thin? ( sys-block/thin-provisioning-tools )"
83
84 # Upgrading to this LVM will break older cryptsetup
85 RDEPEND="${RDEPEND}
86 !<sys-fs/cryptsetup-1.1.2"
87
88 DEPEND="${DEPEND_COMMON}
89 virtual/pkgconfig
90 >=sys-devel/binutils-2.20.1-r1
91 static? ( || ( >=sys-fs/udev-181[static-libs] <sys-fs/udev-181 ) )"
92
93 S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
94
95 pkg_setup() {
96 local CONFIG_CHECK="~SYSVIPC"
97 use udev && local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
98 check_extra_config
99 # 1. Genkernel no longer copies /sbin/lvm blindly.
100 if use static; then
101 elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
102 elog "their static versions. If you need the static binaries,"
103 elog "you must append .static to the filename!"
104 fi
105 }
106
107 src_unpack() {
108 unpack ${A}
109 }
110
111 src_prepare() {
112 epatch "${FILESDIR}"/lvm.conf-2.02.67.patch
113
114 # Should not be needed due to upstream re-arrangement of build
115 #epatch "${FILESDIR}"/${PN}-2.02.56-dmeventd.patch
116 # Should not be need with new upstream udev rules
117 #epatch "${FILESDIR}"/${PN}-2.02.56-device-mapper-export-format.patch
118
119 # Merged upstream:
120 #epatch "${FILESDIR}"/${PN}-2.02.51-as-needed.patch
121 # Merged upstream:
122 #epatch "${FILESDIR}"/${PN}-2.02.48-fix-pkgconfig.patch
123 # Merged upstream:
124 #epatch "${FILESDIR}"/${PN}-2.02.51-fix-pvcreate.patch
125 # Fixed differently upstream:
126 #epatch "${FILESDIR}"/${PN}-2.02.51-dmsetup-selinux-linking-fix-r3.patch
127
128 epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
129 epatch "${FILESDIR}"/lvm2-2.02.56-lvm2create_initrd.patch
130 # bug 318513 - merged upstream
131 #epatch "${FILESDIR}"/${PN}-2.02.64-dmeventd-libs.patch
132 # bug 301331
133 epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch
134 # bug 330373
135 epatch "${FILESDIR}"/${PN}-2.02.92-locale-muck.patch
136 # --as-needed
137 epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch
138 # bug 332905
139 epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch
140 # bug 361429 - merged upstream in .85
141 #epatch "${FILESDIR}"/${PN}-2.02.84-udev-pkgconfig.patch
142
143 # Merged upstream
144 #epatch "${FILESDIR}"/${PN}-2.02.73-asneeded.patch
145
146 epatch "${FILESDIR}"/${PN}-2.02.88-respect-cc.patch
147
148 # Upstream bug of LVM path
149 # Merged upstream
150 #epatch "${FILESDIR}"/${PN}-2.02.95-lvmpath.patch
151
152 # Upstream patch for http://bugs.gentoo.org/424810
153 # Merged upstream
154 #epatch "${FILESDIR}"/${PN}-2.02.95-udev185.patch
155
156 # Upstream patch for https://bugs.gentoo.org/444328
157 epatch "${FILESDIR}"/${P}-strict-aliasing.patch
158
159 # Fix calling AR directly with USE static, bug #444082
160 if use static ; then
161 sed -i -e "s:\$(AR) rs \$@ \$(OBJECTS) lvmcmdlib.o lvm2cmd-static.o:$(tc-getAR) rs \$@ \$(OBJECTS) lvmcmdlib.o lvm2cmd-static.o:" \
162 tools/Makefile.in || die "sed failed"
163 fi
164
165 eautoreconf
166 }
167
168 src_configure() {
169 local myconf
170 local buildmode
171
172 myconf="${myconf} --enable-dmeventd"
173 myconf="${myconf} --enable-cmdlib"
174 myconf="${myconf} --enable-applib"
175 myconf="${myconf} --enable-fsadm"
176 myconf="${myconf} --enable-lvmetad"
177
178 # Most of this package does weird stuff.
179 # The build options are tristate, and --without is NOT supported
180 # options: 'none', 'internal', 'shared'
181 if use static ; then
182 einfo "Building static LVM, for usage inside genkernel"
183 buildmode="internal"
184 # This only causes the .static versions to become available
185 # We explicitly provide the .static versions so that they can be included in
186 # initramfs environments.
187 myconf="${myconf} --enable-static_link"
188 else
189 ewarn "Building shared LVM, it will not work inside genkernel!"
190 buildmode="shared"
191 fi
192
193 # dmeventd requires mirrors to be internal, and snapshot available
194 # so we cannot disable them
195 myconf="${myconf} --with-mirrors=internal"
196 myconf="${myconf} --with-snapshots=internal"
197 use thin \
198 && myconf="${myconf} --with-thin=internal" \
199 || myconf="${myconf} --with-thin=none"
200
201 if use lvm1 ; then
202 myconf="${myconf} --with-lvm1=${buildmode}"
203 else
204 myconf="${myconf} --with-lvm1=none"
205 fi
206
207 # disable O_DIRECT support on hppa, breaks pv detection (#99532)
208 use hppa && myconf="${myconf} --disable-o_direct"
209
210 if use clvm; then
211 myconf="${myconf} --with-cluster=${buildmode}"
212 # 4-state! Make sure we get it right, per bug 210879
213 # Valid options are: none, cman, gulm, all
214 #
215 # 2009/02:
216 # gulm is removed now, now dual-state:
217 # cman, none
218 # all still exists, but is not needed
219 #
220 # 2009/07:
221 # TODO: add corosync and re-enable ALL
222 local clvmd=""
223 use cman && clvmd="cman"
224 #clvmd="${clvmd/cmangulm/all}"
225 [ -z "${clvmd}" ] && clvmd="none"
226 myconf="${myconf} --with-clvmd=${clvmd}"
227 myconf="${myconf} --with-pool=${buildmode}"
228 else
229 myconf="${myconf} --with-clvmd=none --with-cluster=none"
230 fi
231
232 local udevdir="${EPREFIX}/lib/udev/rules.d"
233 use udev && udevdir="${EPREFIX}$($(tc-getPKG_CONFIG) --variable=udevdir udev)/rules.d"
234
235 econf \
236 $(use_enable readline) \
237 $(use_enable selinux) \
238 --enable-pkgconfig \
239 --with-confdir="${EPREFIX}/etc" \
240 --sbindir="${EPREFIX}/sbin" \
241 --with-staticdir="${EPREFIX}/sbin" \
242 --libdir="${EPREFIX}/$(get_libdir)" \
243 --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
244 --with-default-run-dir=/run/lvm \
245 --with-default-locking-dir=/run/lock/lvm \
246 --with-dmeventd-path=/sbin/dmeventd \
247 $(use_enable udev udev_rules) \
248 $(use_enable udev udev_sync) \
249 $(use_with udev udevdir "${udevdir}") \
250 ${myconf} \
251 CLDFLAGS="${LDFLAGS}"
252 }
253
254 src_compile() {
255 einfo "Doing symlinks"
256 pushd include
257 emake || die "Failed to prepare symlinks"
258 popd
259
260 einfo "Starting main build"
261 emake AR="$(tc-getAR)" || die "compile fail"
262 }
263
264 src_install() {
265 emake DESTDIR="${D}" install
266
267 dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{conf,c,txt}
268 newinitd "${FILESDIR}"/lvm.rc-2.02.95-r2 lvm
269 newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring
270 newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
271 if use clvm; then
272 newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
273 newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
274 fi
275
276 # move shared libs to /lib(64)
277 if use static-libs; then
278 dolib.a libdm/ioctl/libdevmapper.a || die "dolib.a libdevmapper.a"
279 #gen_usr_ldscript libdevmapper.so
280 fi
281
282 dosbin "${S}"/scripts/lvm2create_initrd/lvm2create_initrd
283 doman "${S}"/scripts/lvm2create_initrd/lvm2create_initrd.8
284 newdoc "${S}"/scripts/lvm2create_initrd/README README.lvm2create_initrd
285
286 insinto /etc
287 doins "${FILESDIR}"/dmtab
288
289 # Device mapper stuff
290 newinitd "${FILESDIR}"/device-mapper.rc-2.02.95-r2 device-mapper
291 newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
292
293 newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
294 if use static-libs; then
295 dolib.a daemons/dmeventd/libdevmapper-event.a \
296 || die "dolib.a libdevmapper-event.a"
297 #gen_usr_ldscript libdevmapper-event.so
298 fi
299
300 use static-libs || \
301 rm -f "${D}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
302
303 #insinto /etc/udev/rules.d/
304 #newins "${FILESDIR}"/64-device-mapper.rules-2.02.56-r3 64-device-mapper.rules
305
306 # do not rely on /lib -> /libXX link
307 sed -i \
308 -e "s|/lib/rcscripts/|/$(get_libdir)/rcscripts/|" \
309 "${ED}"/etc/init.d/* || die
310
311 elog "USE flag nocman is deprecated and replaced"
312 elog "with the cman USE flag."
313 elog ""
314 elog "USE flags clvm and cman are masked"
315 elog "by default and need to be unmasked to be used"
316 elog ""
317 elog "If you are using genkernel and root-on-LVM, rebuild the initramfs."
318 }
319
320 pkg_postinst() {
321 elog "lvm volumes are no longer automatically created for"
322 elog "baselayout-2 users. If you are using baselayout-2, be sure to"
323 elog "run: # rc-update add lvm boot"
324 elog "Do NOT add it if you are still using baselayout-1."
325 }
326
327 src_test() {
328 einfo "Testcases disabled because of device-node mucking"
329 einfo "If you want them, compile the package and see ${S}/tests"
330 }