Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/lvm2: ChangeLog lvm2-2.02.95-r3.ebuild
Date: Thu, 05 Jul 2012 08:55:24
Message-Id: 20120705085513.EFC722004C@flycatcher.gentoo.org
1 ssuominen 12/07/05 08:55:13
2
3 Modified: ChangeLog
4 Added: lvm2-2.02.95-r3.ebuild
5 Log:
6 Fix compability with sys-fs/udev >= 185 wrt #424810 by Marien Zwart
7
8 (Portage version: 2.2.0_alpha116/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.274 sys-fs/lvm2/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.274&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?rev=1.274&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/ChangeLog?r1=1.273&r2=1.274
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v
20 retrieving revision 1.273
21 retrieving revision 1.274
22 diff -u -r1.273 -r1.274
23 --- ChangeLog 7 Jun 2012 03:30:37 -0000 1.273
24 +++ ChangeLog 5 Jul 2012 08:55:13 -0000 1.274
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-fs/lvm2
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.273 2012/06/07 03:30:37 robbat2 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.274 2012/07/05 08:55:13 ssuominen Exp $
30 +
31 +*lvm2-2.02.95-r3 (05 Jul 2012)
32 +
33 + 05 Jul 2012; Samuli Suominen <ssuominen@g.o> +lvm2-2.02.95-r3.ebuild,
34 + +files/lvm2-2.02.95-udev185.patch:
35 + Fix compability with sys-fs/udev >= 185 wrt #424810 by Marien Zwart
36
37 07 Jun 2012; Robin H. Johnson <robbat2@g.o> lvm2-2.02.95-r2.ebuild:
38 Bug #419871: Drop comments that say /usr is not used.
39
40
41
42 1.1 sys-fs/lvm2/lvm2-2.02.95-r3.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.95-r3.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/lvm2-2.02.95-r3.ebuild?rev=1.1&content-type=text/plain
46
47 Index: lvm2-2.02.95-r3.ebuild
48 ===================================================================
49 # Copyright 1999-2012 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.95-r3.ebuild,v 1.1 2012/07/05 08:55:13 ssuominen Exp $
52
53 EAPI=3
54 inherit eutils multilib toolchain-funcs autotools linux-info
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 ~amd64-linux ~x86-linux"
64
65 IUSE="readline static static-libs clvm cman +lvm1 selinux +udev +thin"
66
67 DEPEND_COMMON="!!sys-fs/device-mapper
68 readline? ( sys-libs/readline )
69 clvm? ( =sys-cluster/libdlm-3*
70 cman? ( =sys-cluster/cman-3* ) )
71 udev? ( >=sys-fs/udev-151-r4 )"
72
73 # /run is now required for locking during early boot. /var cannot be assumed to
74 # be available.
75 RDEPEND="${DEPEND_COMMON}
76 !<sys-apps/openrc-0.10.1
77 >=sys-apps/baselayout-2.1-r1
78 !!sys-fs/lvm-user
79 !!sys-fs/clvm
80 >=sys-apps/util-linux-2.16
81 thin? ( sys-block/thin-provisioning-tools )"
82
83 # Upgrading to this LVM will break older cryptsetup
84 RDEPEND="${RDEPEND}
85 !<sys-fs/cryptsetup-1.1.2"
86
87 DEPEND="${DEPEND_COMMON}
88 virtual/pkgconfig
89 >=sys-devel/binutils-2.20.1-r1
90 static? ( || ( >=sys-fs/udev-181[static-libs] <sys-fs/udev-181 ) )"
91
92 S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
93
94 pkg_setup() {
95 local CONFIG_CHECK="~SYSVIPC"
96 use udev && local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
97 check_extra_config
98 # 1. Genkernel no longer copies /sbin/lvm blindly.
99 if use static; then
100 elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
101 elog "their static versions. If you need the static binaries,"
102 elog "you must append .static to the filename!"
103 fi
104 }
105
106 src_unpack() {
107 unpack ${A}
108 }
109
110 src_prepare() {
111 epatch "${FILESDIR}"/lvm.conf-2.02.67.patch
112
113 # Should not be needed due to upstream re-arrangement of build
114 #epatch "${FILESDIR}"/${PN}-2.02.56-dmeventd.patch
115 # Should not be need with new upstream udev rules
116 #epatch "${FILESDIR}"/${PN}-2.02.56-device-mapper-export-format.patch
117
118 # Merged upstream:
119 #epatch "${FILESDIR}"/${PN}-2.02.51-as-needed.patch
120 # Merged upstream:
121 #epatch "${FILESDIR}"/${PN}-2.02.48-fix-pkgconfig.patch
122 # Merged upstream:
123 #epatch "${FILESDIR}"/${PN}-2.02.51-fix-pvcreate.patch
124 # Fixed differently upstream:
125 #epatch "${FILESDIR}"/${PN}-2.02.51-dmsetup-selinux-linking-fix-r3.patch
126
127 epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
128 epatch "${FILESDIR}"/lvm2-2.02.56-lvm2create_initrd.patch
129 # bug 318513 - merged upstream
130 #epatch "${FILESDIR}"/${PN}-2.02.64-dmeventd-libs.patch
131 # bug 301331
132 epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch
133 # bug 330373
134 epatch "${FILESDIR}"/${PN}-2.02.92-locale-muck.patch
135 # --as-needed
136 epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch
137 # bug 332905
138 epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch
139 # bug 361429 - merged upstream in .85
140 #epatch "${FILESDIR}"/${PN}-2.02.84-udev-pkgconfig.patch
141
142 # Merged upstream
143 #epatch "${FILESDIR}"/${PN}-2.02.73-asneeded.patch
144
145 epatch "${FILESDIR}"/${PN}-2.02.88-respect-cc.patch
146
147 # Upstream bug of LVM path
148 epatch "${FILESDIR}"/${PN}-2.02.95-lvmpath.patch
149
150 # Upstream patch for http://bugs.gentoo.org/424810
151 epatch "${FILESDIR}"/${PN}-2.02.95-udev185.patch
152
153 eautoreconf
154 }
155
156 src_configure() {
157 local myconf
158 local buildmode
159
160 myconf="${myconf} --enable-dmeventd"
161 myconf="${myconf} --enable-cmdlib"
162 myconf="${myconf} --enable-applib"
163 myconf="${myconf} --enable-fsadm"
164 myconf="${myconf} --enable-lvmetad"
165
166 # Most of this package does weird stuff.
167 # The build options are tristate, and --without is NOT supported
168 # options: 'none', 'internal', 'shared'
169 if use static ; then
170 einfo "Building static LVM, for usage inside genkernel"
171 buildmode="internal"
172 # This only causes the .static versions to become available
173 # We explicitly provide the .static versions so that they can be included in
174 # initramfs environments.
175 myconf="${myconf} --enable-static_link"
176 else
177 ewarn "Building shared LVM, it will not work inside genkernel!"
178 buildmode="shared"
179 fi
180
181 # dmeventd requires mirrors to be internal, and snapshot available
182 # so we cannot disable them
183 myconf="${myconf} --with-mirrors=internal"
184 myconf="${myconf} --with-snapshots=internal"
185 use thin \
186 && myconf="${myconf} --with-thin=internal" \
187 || myconf="${myconf} --with-thin=none"
188
189 if use lvm1 ; then
190 myconf="${myconf} --with-lvm1=${buildmode}"
191 else
192 myconf="${myconf} --with-lvm1=none"
193 fi
194
195 # disable O_DIRECT support on hppa, breaks pv detection (#99532)
196 use hppa && myconf="${myconf} --disable-o_direct"
197
198 if use clvm; then
199 myconf="${myconf} --with-cluster=${buildmode}"
200 # 4-state! Make sure we get it right, per bug 210879
201 # Valid options are: none, cman, gulm, all
202 #
203 # 2009/02:
204 # gulm is removed now, now dual-state:
205 # cman, none
206 # all still exists, but is not needed
207 #
208 # 2009/07:
209 # TODO: add corosync and re-enable ALL
210 local clvmd=""
211 use cman && clvmd="cman"
212 #clvmd="${clvmd/cmangulm/all}"
213 [ -z "${clvmd}" ] && clvmd="none"
214 myconf="${myconf} --with-clvmd=${clvmd}"
215 myconf="${myconf} --with-pool=${buildmode}"
216 else
217 myconf="${myconf} --with-clvmd=none --with-cluster=none"
218 fi
219
220 econf \
221 $(use_enable readline) \
222 $(use_enable selinux) \
223 --enable-pkgconfig \
224 --with-confdir="${EPREFIX}/etc" \
225 --sbindir="${EPREFIX}/sbin" \
226 --with-staticdir="${EPREFIX}/sbin" \
227 --libdir="${EPREFIX}/$(get_libdir)" \
228 --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
229 --with-default-run-dir=/run/lvm \
230 --with-default-locking-dir=/run/lock/lvm \
231 --with-dmeventd-path=/sbin/dmeventd \
232 $(use_enable udev udev_rules) \
233 $(use_enable udev udev_sync) \
234 $(use_with udev udevdir "${EPREFIX}/lib/udev/rules.d/") \
235 ${myconf} \
236 CLDFLAGS="${LDFLAGS}" || die
237 }
238
239 src_compile() {
240 einfo "Doing symlinks"
241 pushd include
242 emake || die "Failed to prepare symlinks"
243 popd
244
245 einfo "Starting main build"
246 emake || die "compile fail"
247 }
248
249 src_install() {
250 emake DESTDIR="${D}" install || die "Failed to emake install"
251
252 dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{conf,c,txt}
253 newinitd "${FILESDIR}"/lvm.rc-2.02.95-r2 lvm || die
254 newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring || die
255 newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm || die
256 if use clvm; then
257 newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd || die
258 newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd || die
259 fi
260
261 # move shared libs to /lib(64)
262 if use static-libs; then
263 dolib.a libdm/ioctl/libdevmapper.a || die "dolib.a libdevmapper.a"
264 #gen_usr_ldscript libdevmapper.so
265 fi
266
267 dosbin "${S}"/scripts/lvm2create_initrd/lvm2create_initrd
268 doman "${S}"/scripts/lvm2create_initrd/lvm2create_initrd.8
269 newdoc "${S}"/scripts/lvm2create_initrd/README README.lvm2create_initrd
270
271 insinto /etc
272 doins "${FILESDIR}"/dmtab
273
274 # Device mapper stuff
275 newinitd "${FILESDIR}"/device-mapper.rc-2.02.95-r2 device-mapper || die
276 newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper || die
277
278 newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd || die
279 if use static-libs; then
280 dolib.a daemons/dmeventd/libdevmapper-event.a \
281 || die "dolib.a libdevmapper-event.a"
282 #gen_usr_ldscript libdevmapper-event.so
283 fi
284
285 use static-libs || \
286 rm -f "${D}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
287
288 #insinto /etc/udev/rules.d/
289 #newins "${FILESDIR}"/64-device-mapper.rules-2.02.56-r3 64-device-mapper.rules || die
290
291 # do not rely on /lib -> /libXX link
292 sed -i \
293 -e "s|/lib/rcscripts/|/$(get_libdir)/rcscripts/|" \
294 "${ED}"/etc/init.d/* || die
295
296 elog "USE flag nocman is deprecated and replaced"
297 elog "with the cman USE flag."
298 elog ""
299 elog "USE flags clvm and cman are masked"
300 elog "by default and need to be unmasked to be used"
301 elog ""
302 elog "If you are using genkernel and root-on-LVM, rebuild the initramfs."
303 }
304
305 pkg_postinst() {
306 elog "lvm volumes are no longer automatically created for"
307 elog "baselayout-2 users. If you are using baselayout-2, be sure to"
308 elog "run: # rc-update add lvm boot"
309 elog "Do NOT add it if you are still using baselayout-1."
310 }
311
312 src_test() {
313 einfo "Testcases disabled because of device-node mucking"
314 einfo "If you want them, compile the package and see ${S}/tests"
315 }