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