Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/lvm2: ChangeLog lvm2-2.02.63-r1.ebuild
Date: Tue, 20 Apr 2010 23:04:30
Message-Id: 20100420230425.D62442C04A@corvid.gentoo.org
1 robbat2 10/04/20 23:04:25
2
3 Modified: ChangeLog
4 Added: lvm2-2.02.63-r1.ebuild
5 Log:
6 Bug #316427: upstream changes to makefiles caused some libraries to not be present in / anymore, causing boot failure for users with a split /usr.
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.203 sys-fs/lvm2/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.203&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.203&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/lvm2/ChangeLog?r1=1.202&r2=1.203
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v
19 retrieving revision 1.202
20 retrieving revision 1.203
21 diff -p -w -b -B -u -u -r1.202 -r1.203
22 --- ChangeLog 20 Apr 2010 02:58:00 -0000 1.202
23 +++ ChangeLog 20 Apr 2010 23:04:25 -0000 1.203
24 @@ -1,6 +1,13 @@
25 # ChangeLog for sys-fs/lvm2
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.202 2010/04/20 02:58:00 robbat2 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.203 2010/04/20 23:04:25 robbat2 Exp $
29 +
30 +*lvm2-2.02.63-r1 (20 Apr 2010)
31 +
32 + 20 Apr 2010; Robin H. Johnson <robbat2@g.o>
33 + +lvm2-2.02.63-r1.ebuild:
34 + Bug #316427: upstream changes to makefiles caused some libraries to not be
35 + present in / anymore, causing boot failure for users with a split /usr.
36
37 *lvm2-2.02.63 (19 Apr 2010)
38
39
40
41
42 1.1 sys-fs/lvm2/lvm2-2.02.63-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/lvm2/lvm2-2.02.63-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/lvm2/lvm2-2.02.63-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: lvm2-2.02.63-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.63-r1.ebuild,v 1.1 2010/04/20 23:04:25 robbat2 Exp $
52
53 EAPI=2
54 inherit eutils multilib toolchain-funcs autotools
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-146-r3 >=sys-fs/udev-151-r2 )"
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 DEPEND="${DEPEND_COMMON}
79 dev-util/pkgconfig"
80
81 S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
82
83 pkg_setup() {
84 # 1. Genkernel no longer copies /sbin/lvm blindly.
85 # 2. There are no longer any linking deps in /usr.
86 if use static; then
87 elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
88 elog "their static versions. If you need the static binaries,"
89 elog "you must append .static the filename!"
90 fi
91 }
92
93 src_unpack() {
94 unpack ${A}
95 }
96
97 src_prepare() {
98 epatch "${FILESDIR}"/lvm.conf-2.02.56.patch
99
100 # Should not be needed due to upstream re-arrangement of build
101 #epatch "${FILESDIR}"/${PN}-2.02.56-dmeventd.patch
102 # Should not be need with new upstream udev rules
103 #epatch "${FILESDIR}"/${PN}-2.02.56-device-mapper-export-format.patch
104
105 # Merged upstream:
106 #epatch "${FILESDIR}"/${PN}-2.02.51-as-needed.patch
107 # Merged upstream:
108 #epatch "${FILESDIR}"/${PN}-2.02.48-fix-pkgconfig.patch
109 # Merged upstream:
110 #epatch "${FILESDIR}"/${PN}-2.02.51-fix-pvcreate.patch
111 # Fixed differently upstream:
112 #epatch "${FILESDIR}"/${PN}-2.02.51-dmsetup-selinux-linking-fix-r3.patch
113
114 epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
115 epatch "${FILESDIR}"/lvm2-2.02.56-lvm2create_initrd.patch
116
117 eautoreconf
118 }
119
120 src_configure() {
121 local myconf
122 local buildmode
123
124 myconf="${myconf} --enable-dmeventd"
125 myconf="${myconf} --enable-cmdlib"
126 myconf="${myconf} --enable-applib"
127 myconf="${myconf} --enable-fsadm"
128
129 # Most of this package does weird stuff.
130 # The build options are tristate, and --without is NOT supported
131 # options: 'none', 'internal', 'shared'
132 if use static ; then
133 einfo "Building static LVM, for usage inside genkernel"
134 buildmode="internal"
135 # This only causes the .static versions to become available
136 # For recent systems, there are no linkages against anything in /usr anyway.
137 # We explicitly provide the .static versions so that they can be included in
138 # initramfs environments.
139 myconf="${myconf} --enable-static_link"
140 else
141 ewarn "Building shared LVM, it will not work inside genkernel!"
142 buildmode="shared"
143 fi
144
145 # dmeventd requires mirrors to be internal, and snapshot available
146 # so we cannot disable them
147 myconf="${myconf} --with-mirrors=internal"
148 myconf="${myconf} --with-snapshots=internal"
149
150 if use lvm1 ; then
151 myconf="${myconf} --with-lvm1=${buildmode}"
152 else
153 myconf="${myconf} --with-lvm1=none"
154 fi
155
156 # disable O_DIRECT support on hppa, breaks pv detection (#99532)
157 use hppa && myconf="${myconf} --disable-o_direct"
158
159 if use clvm; then
160 myconf="${myconf} --with-cluster=${buildmode}"
161 # 4-state! Make sure we get it right, per bug 210879
162 # Valid options are: none, cman, gulm, all
163 #
164 # 2009/02:
165 # gulm is removed now, now dual-state:
166 # cman, none
167 # all still exists, but is not needed
168 #
169 # 2009/07:
170 # TODO: add corosync and re-enable ALL
171 local clvmd=""
172 use cman && clvmd="cman"
173 #clvmd="${clvmd/cmangulm/all}"
174 [ -z "${clvmd}" ] && clvmd="none"
175 myconf="${myconf} --with-clvmd=${clvmd}"
176 myconf="${myconf} --with-pool=${buildmode}"
177 else
178 myconf="${myconf} --with-clvmd=none --with-cluster=none"
179 fi
180
181 myconf="${myconf} --sbindir=/sbin --with-staticdir=/sbin"
182 econf $(use_enable readline) \
183 $(use_enable selinux) \
184 --enable-pkgconfig \
185 --libdir=/$(get_libdir) \
186 --enable-udev_rules \
187 --enable-udev_sync \
188 --with-udevdir=/$(get_libdir)/udev/rules.d/ \
189 ${myconf} \
190 CLDFLAGS="${LDFLAGS}" || die
191 }
192
193 src_compile() {
194 einfo "Doing symlinks"
195 pushd include
196 emake || die "Failed to prepare symlinks"
197 popd
198
199 einfo "Starting main build"
200 emake || die "compile fail"
201 }
202
203 src_install() {
204 emake DESTDIR="${D}" install
205
206 # Upstream build script puts a lot of this stuff into /usr/lib regardless of
207 # libdir variable
208 dodir /$(get_libdir)
209 # Put these in root so we can reach before /usr is up
210 for i in \
211 libdevmapper-event{,-lvm2{,mirror,snapshot}} \
212 libdevmapper-event \
213 libdevmapper \
214 liblvm2{format1,snapshot,cmd,app} \
215 ; do
216 for d in $(get_libdir) lib ; do
217 b="${D}"/usr/${d}/${i}
218 #einfo "$i in $d : $b"
219 if [ -n "$(ls "${b}".so* 2>/dev/null)" ]; then
220 [ -s "$b.so" ] && rm -f $b
221 mv -f "${b}".so* "${D}"/$(get_libdir) || die
222 gen_usr_ldscript ${i}.so || die
223 fi
224 if [ "$d" != "$(get_libdir)" -a -f "${b}.a" ]; then
225 mv -f "${b}.a" "${D}"/usr/$(get_libdir) || die
226 fi
227 done
228 for d in $(get_libdir) lib ; do
229 b="${D}"/${d}/${i}
230 [ -s "$b.so" ] && rm -f $b
231 done
232 done
233
234 dodoc README VERSION WHATS_NEW doc/*.{conf,c,txt}
235 insinto /$(get_libdir)/rcscripts/addons
236 newins "${FILESDIR}"/lvm2-start.sh-2.02.49-r3 lvm-start.sh || die
237 newins "${FILESDIR}"/lvm2-stop.sh-2.02.49-r3 lvm-stop.sh || die
238 newinitd "${FILESDIR}"/lvm.rc-2.02.51-r2 lvm || die
239 newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm || die
240 if use clvm; then
241 newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd || die
242 newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd || die
243 fi
244
245 # move shared libs to /lib(64)
246 dolib.a libdm/ioctl/libdevmapper.a || die "dolib.a libdevmapper.a"
247 #gen_usr_ldscript libdevmapper.so
248
249 dosbin "${S}"/scripts/lvm2create_initrd/lvm2create_initrd
250 doman "${S}"/scripts/lvm2create_initrd/lvm2create_initrd.8
251 newdoc "${S}"/scripts/lvm2create_initrd/README README.lvm2create_initrd
252
253 insinto /etc
254 doins "${FILESDIR}"/dmtab
255 insinto /$(get_libdir)/rcscripts/addons
256 doins "${FILESDIR}"/dm-start.sh
257
258 # Device mapper stuff
259 newinitd "${FILESDIR}"/device-mapper.rc-1.02.51-r2 device-mapper || die
260 newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper || die
261
262 newinitd "${FILESDIR}"/1.02.22-dmeventd.initd dmeventd || die
263 dolib.a daemons/dmeventd/libdevmapper-event.a \
264 || die "dolib.a libdevmapper-event.a"
265 #gen_usr_ldscript libdevmapper-event.so
266
267 #insinto /etc/udev/rules.d/
268 #newins "${FILESDIR}"/64-device-mapper.rules-2.02.56-r3 64-device-mapper.rules || die
269
270 # do not rely on /lib -> /libXX link
271 sed -e "s-/lib/rcscripts/-/$(get_libdir)/rcscripts/-" -i "${D}"/etc/init.d/*
272
273 elog "USE flag nocman is deprecated and replaced"
274 elog "with the cman USE flag."
275 elog ""
276 elog "USE flags clvm and cman are masked"
277 elog "by default and need to be unmasked to use them"
278 elog ""
279 elog "If you are using genkernel and root-on-LVM, rebuild the initramfs."
280 }
281
282 pkg_postinst() {
283 elog "lvm volumes are no longer automatically created for"
284 elog "baselayout-2 users. If you are using baselayout-2, be sure to"
285 elog "run: # rc-update add lvm boot"
286 elog "Do NOT add it if you are using baselayout-1 still."
287 }
288
289 src_test() {
290 einfo "Testcases disabled because of device-node mucking"
291 einfo "If you want them, compile the package and see ${S}/tests"
292 }