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