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