Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/lvm2: ChangeLog lvm2-2.02.73-r1.ebuild
Date: Wed, 01 Sep 2010 15:32:59
Message-Id: 20100901153250.53C8C20054@flycatcher.gentoo.org
1 flameeyes 10/09/01 15:32:50
2
3 Modified: ChangeLog
4 Added: lvm2-2.02.73-r1.ebuild
5 Log:
6 Add patch to fix linking when using --as-needed, to fix bug #335205.
7
8 (Portage version: 2.2_rc72/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.232 sys-fs/lvm2/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.232&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.232&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?r1=1.231&r2=1.232
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v
20 retrieving revision 1.231
21 retrieving revision 1.232
22 diff -u -r1.231 -r1.232
23 --- ChangeLog 28 Aug 2010 22:38:29 -0000 1.231
24 +++ ChangeLog 1 Sep 2010 15:32:50 -0000 1.232
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-fs/lvm2
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.231 2010/08/28 22:38:29 hwoarang Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.232 2010/09/01 15:32:50 flameeyes Exp $
30 +
31 +*lvm2-2.02.73-r1 (01 Sep 2010)
32 +
33 + 01 Sep 2010; Diego E. Pettenò <flameeyes@g.o>
34 + +lvm2-2.02.73-r1.ebuild, +files/lvm2-2.02.73-asneeded.patch:
35 + Add patch to fix linking when using --as-needed, to fix bug #335205.
36
37 28 Aug 2010; Markos Chandras <hwoarang@g.o> lvm2-2.02.73.ebuild:
38 Stable on amd64 wrt bug #334087
39
40
41
42 1.1 sys-fs/lvm2/lvm2-2.02.73-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.73-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.73-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: lvm2-2.02.73-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2010 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.73-r1.ebuild,v 1.1 2010/09/01 15:32:50 flameeyes Exp $
52
53 EAPI=2
54 inherit eutils multilib toolchain-funcs autotools linux-info
55
56 DESCRIPTION="User-land utilities for LVM2 (device-mapper) software."
57 HOMEPAGE="http://sources.redhat.com/lvm2/"
58 SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
59 ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
64
65 IUSE="readline +static clvm cman +lvm1 selinux"
66
67 DEPEND_COMMON="!!sys-fs/device-mapper
68 clvm? ( =sys-cluster/dlm-2*
69 cman? ( =sys-cluster/cman-2* ) )
70 >=sys-fs/udev-151-r4"
71
72 RDEPEND="${DEPEND_COMMON}
73 !<sys-apps/openrc-0.4
74 !!sys-fs/lvm-user
75 !!sys-fs/clvm
76 >=sys-apps/util-linux-2.16"
77
78 # Upgrading to this LVM will break older cryptsetup
79 RDEPEND="${RDEPEND}
80 !<sys-fs/cryptsetup-1.1.2"
81
82 DEPEND="${DEPEND_COMMON}
83 dev-util/pkgconfig"
84
85 S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
86
87 pkg_setup() {
88 local CONFIG_CHECK="~SYSVIPC"
89 local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
90 check_extra_config
91 # 1. Genkernel no longer copies /sbin/lvm blindly.
92 # 2. There are no longer any linking deps in /usr.
93 if use static; then
94 elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
95 elog "their static versions. If you need the static binaries,"
96 elog "you must append .static the filename!"
97 fi
98 }
99
100 src_unpack() {
101 unpack ${A}
102 }
103
104 src_prepare() {
105 epatch "${FILESDIR}"/lvm.conf-2.02.67.patch
106
107 # Should not be needed due to upstream re-arrangement of build
108 #epatch "${FILESDIR}"/${PN}-2.02.56-dmeventd.patch
109 # Should not be need with new upstream udev rules
110 #epatch "${FILESDIR}"/${PN}-2.02.56-device-mapper-export-format.patch
111
112 # Merged upstream:
113 #epatch "${FILESDIR}"/${PN}-2.02.51-as-needed.patch
114 # Merged upstream:
115 #epatch "${FILESDIR}"/${PN}-2.02.48-fix-pkgconfig.patch
116 # Merged upstream:
117 #epatch "${FILESDIR}"/${PN}-2.02.51-fix-pvcreate.patch
118 # Fixed differently upstream:
119 #epatch "${FILESDIR}"/${PN}-2.02.51-dmsetup-selinux-linking-fix-r3.patch
120
121 epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
122 epatch "${FILESDIR}"/lvm2-2.02.56-lvm2create_initrd.patch
123 # bug 318513
124 epatch "${FILESDIR}"/${PN}-2.02.64-dmeventd-libs.patch
125 # bug 301331
126 epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch
127 # bug 330373
128 epatch "${FILESDIR}"/${PN}-2.02.73-locale-muck.patch
129 # --as-needed
130 epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch
131 # bug 332905
132 epatch "${FILESDIR}"/${PN}-2.02.72-dynamic-static-ldflags.patch
133
134 epatch "${FILESDIR}"/${PN}-2.02.73-asneeded.patch
135
136 eautoreconf
137 }
138
139 src_configure() {
140 local myconf
141 local buildmode
142
143 myconf="${myconf} --enable-dmeventd"
144 myconf="${myconf} --enable-cmdlib"
145 myconf="${myconf} --enable-applib"
146 myconf="${myconf} --enable-fsadm"
147
148 # Most of this package does weird stuff.
149 # The build options are tristate, and --without is NOT supported
150 # options: 'none', 'internal', 'shared'
151 if use static ; then
152 einfo "Building static LVM, for usage inside genkernel"
153 buildmode="internal"
154 # This only causes the .static versions to become available
155 # For recent systems, there are no linkages against anything in /usr anyway.
156 # We explicitly provide the .static versions so that they can be included in
157 # initramfs environments.
158 myconf="${myconf} --enable-static_link"
159 else
160 ewarn "Building shared LVM, it will not work inside genkernel!"
161 buildmode="shared"
162 fi
163
164 # dmeventd requires mirrors to be internal, and snapshot available
165 # so we cannot disable them
166 myconf="${myconf} --with-mirrors=internal"
167 myconf="${myconf} --with-snapshots=internal"
168
169 if use lvm1 ; then
170 myconf="${myconf} --with-lvm1=${buildmode}"
171 else
172 myconf="${myconf} --with-lvm1=none"
173 fi
174
175 # disable O_DIRECT support on hppa, breaks pv detection (#99532)
176 use hppa && myconf="${myconf} --disable-o_direct"
177
178 if use clvm; then
179 myconf="${myconf} --with-cluster=${buildmode}"
180 # 4-state! Make sure we get it right, per bug 210879
181 # Valid options are: none, cman, gulm, all
182 #
183 # 2009/02:
184 # gulm is removed now, now dual-state:
185 # cman, none
186 # all still exists, but is not needed
187 #
188 # 2009/07:
189 # TODO: add corosync and re-enable ALL
190 local clvmd=""
191 use cman && clvmd="cman"
192 #clvmd="${clvmd/cmangulm/all}"
193 [ -z "${clvmd}" ] && clvmd="none"
194 myconf="${myconf} --with-clvmd=${clvmd}"
195 myconf="${myconf} --with-pool=${buildmode}"
196 else
197 myconf="${myconf} --with-clvmd=none --with-cluster=none"
198 fi
199
200 myconf="${myconf}
201 --sbindir=/sbin
202 --with-staticdir=/sbin
203 --with-dmeventd-path=/sbin/dmeventd"
204 econf $(use_enable readline) \
205 $(use_enable selinux) \
206 --enable-pkgconfig \
207 --libdir=/$(get_libdir) \
208 --with-usrlibdir=/usr/$(get_libdir) \
209 --enable-udev_rules \
210 --enable-udev_sync \
211 --with-udevdir=/$(get_libdir)/udev/rules.d/ \
212 ${myconf} \
213 CLDFLAGS="${LDFLAGS}" || die
214 }
215
216 src_compile() {
217 einfo "Doing symlinks"
218 pushd include
219 emake || die "Failed to prepare symlinks"
220 popd
221
222 einfo "Starting main build"
223 emake || die "compile fail"
224 }
225
226 src_install() {
227 emake DESTDIR="${D}" install || die "Failed to emake install"
228
229 # All of this was change by upstream, and if we don't get any problems, we
230 # can probably drop it in .65
231 #X## Revamp all of our library handling for bug #316571
232 #X## Upstream build script puts a lot of this stuff into /usr/lib regardless of
233 #X## libdir variable.
234 #X#dodir /$(get_libdir)
235 #X## .so -> /$(get_libdir)
236 #X#mv -f "${D}"/usr/lib/lib*.so* "${D}"/$(get_libdir)
237 #X#[[ "$(get_libdir)" != "lib" ]] && \
238 #X# mv "${D}"/usr/$(get_libdir)/lib*.so* "${D}"/$(get_libdir)
239 #X## .a -> /usr/$(get_libdir)
240 #X#[[ "$(get_libdir)" != "lib" ]] && \
241 #X# mv -f "${D}"/usr/lib/lib*.a "${D}"/usr/$(get_libdir)
242 #X## The upstream symlinks are borked. lets rebuild them instead.
243 #X#find "${D}"/{usr,}/{lib,$(get_libdir)} -type l \
244 #X# | xargs rm -f 2>/dev/null
245 #X#for i in "${D}"/$(get_libdir)/*.so.* ; do
246 #X# b="${i//*\/}" o="${b/.so.*/.so}"
247 #X# ln -s "${b}" "${D}/$(get_libdir)/${o}"
248 #X#done
249 #X## Now enable building properly
250 #X#for i in \
251 #X# libdevmapper-event{,-lvm2{,mirror,snapshot}} \
252 #X# libdevmapper \
253 #X# liblvm2{format1,snapshot,cmd,app} \
254 #X# ; do
255 #X# gen_usr_ldscript ${i}.so || die
256 #X#done
257
258 dodoc README VERSION WHATS_NEW doc/*.{conf,c,txt}
259 insinto /$(get_libdir)/rcscripts/addons
260 newins "${FILESDIR}"/lvm2-start.sh-2.02.67-r1 lvm-start.sh || die
261 newins "${FILESDIR}"/lvm2-stop.sh-2.02.67-r1 lvm-stop.sh || die
262 newinitd "${FILESDIR}"/lvm.rc-2.02.67-r1 lvm || die
263 newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring || die
264 newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm || die
265 if use clvm; then
266 newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd || die
267 newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd || die
268 fi
269
270 # move shared libs to /lib(64)
271 dolib.a libdm/ioctl/libdevmapper.a || die "dolib.a libdevmapper.a"
272 #gen_usr_ldscript libdevmapper.so
273
274 dosbin "${S}"/scripts/lvm2create_initrd/lvm2create_initrd
275 doman "${S}"/scripts/lvm2create_initrd/lvm2create_initrd.8
276 newdoc "${S}"/scripts/lvm2create_initrd/README README.lvm2create_initrd
277
278 insinto /etc
279 doins "${FILESDIR}"/dmtab
280 insinto /$(get_libdir)/rcscripts/addons
281 doins "${FILESDIR}"/dm-start.sh
282
283 # Device mapper stuff
284 newinitd "${FILESDIR}"/device-mapper.rc-2.02.67-r1 device-mapper || die
285 newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper || die
286
287 newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd || die
288 dolib.a daemons/dmeventd/libdevmapper-event.a \
289 || die "dolib.a libdevmapper-event.a"
290 #gen_usr_ldscript libdevmapper-event.so
291
292 #insinto /etc/udev/rules.d/
293 #newins "${FILESDIR}"/64-device-mapper.rules-2.02.56-r3 64-device-mapper.rules || die
294
295 # do not rely on /lib -> /libXX link
296 sed -e "s-/lib/rcscripts/-/$(get_libdir)/rcscripts/-" -i "${D}"/etc/init.d/*
297
298 elog "USE flag nocman is deprecated and replaced"
299 elog "with the cman USE flag."
300 elog ""
301 elog "USE flags clvm and cman are masked"
302 elog "by default and need to be unmasked to use them"
303 elog ""
304 elog "If you are using genkernel and root-on-LVM, rebuild the initramfs."
305 }
306
307 pkg_postinst() {
308 elog "lvm volumes are no longer automatically created for"
309 elog "baselayout-2 users. If you are using baselayout-2, be sure to"
310 elog "run: # rc-update add lvm boot"
311 elog "Do NOT add it if you are using baselayout-1 still."
312 }
313
314 src_test() {
315 einfo "Testcases disabled because of device-node mucking"
316 einfo "If you want them, compile the package and see ${S}/tests"
317 }