Gentoo Archives: gentoo-commits

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