diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2009-12-26 01:57:42 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2009-12-26 01:57:42 +0000 |
commit | 55c752fc9e8b46ef3ae9c8ecfc2e697bd787ef6d (patch) | |
tree | 28d1f00b691d8b375fb0401354e53028cb472bb1 /sys-fs | |
parent | Use -j1 for build (bug #285783). Add die clause to install. (diff) | |
download | historical-55c752fc9e8b46ef3ae9c8ecfc2e697bd787ef6d.tar.gz historical-55c752fc9e8b46ef3ae9c8ecfc2e697bd787ef6d.tar.bz2 historical-55c752fc9e8b46ef3ae9c8ecfc2e697bd787ef6d.zip |
Bug #296198 redux: package in the contrib lvm2create_initrd script after patching it for users that have non-genkernel initrds.
Package-Manager: portage-2.2_rc58/cvs/Linux x86_64
RepoMan-Options: --force
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/lvm2/ChangeLog | 9 | ||||
-rw-r--r-- | sys-fs/lvm2/Manifest | 4 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch | 72 | ||||
-rw-r--r-- | sys-fs/lvm2/lvm2-2.02.56-r2.ebuild | 220 |
4 files changed, 303 insertions, 2 deletions
diff --git a/sys-fs/lvm2/ChangeLog b/sys-fs/lvm2/ChangeLog index 448329ea397b..9ce23d291ec1 100644 --- a/sys-fs/lvm2/ChangeLog +++ b/sys-fs/lvm2/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-fs/lvm2 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.192 2009/12/20 15:48:38 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.193 2009/12/26 01:57:42 robbat2 Exp $ + +*lvm2-2.02.56-r2 (26 Dec 2009) + + 26 Dec 2009; Robin H. Johnson <robbat2@gentoo.org> + +lvm2-2.02.56-r2.ebuild, +files/lvm2-2.02.56-lvm2create_initrd.patch: + Bug #296198 redux: package in the contrib lvm2create_initrd script after + patching it for users that have non-genkernel initrds. 20 Dec 2009; Raúl Porcel <armin76@gentoo.org> lvm2-2.02.56-r1.ebuild: alpha stable wrt #297439 diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest index 38d915a6571d..a36ea181c25f 100644 --- a/sys-fs/lvm2/Manifest +++ b/sys-fs/lvm2/Manifest @@ -31,6 +31,7 @@ AUX lvm2-2.02.51-fix-pvcreate.patch 3140 RMD160 c707cc280a893350a90c1258b0d73c15 AUX lvm2-2.02.56-always-make-static-libdm.patch 1418 RMD160 f5102745ad3ee4613a212933552d78798c636dcb SHA1 8679926abe2f8c9731d66d714e824a7c4f04fe67 SHA256 b0b77c9046f46e764c1354e850dd735015c9779bb7efdc3005fbae5ea5b6e550 AUX lvm2-2.02.56-device-mapper-export-format.patch 10774 RMD160 0e7c4d0b955e73663941f707315f18cfdccdb343 SHA1 e5247915cb3a6c49b3a5b04cb16e3c97531e51b2 SHA256 dd3cd1417bd8eef8da65d993c0178861265c14a166edde4f83c4ea18e7fa71c9 AUX lvm2-2.02.56-dmeventd.patch 539 RMD160 8fbdf28707ae18ac8e2f45aabfbf10b8b89aa76b SHA1 6e61c3aa6be93b9cc90504e70959d02d0a165fdd SHA256 c70b96d7c3d9fbd78d00c8711a4243d1a874745dcb175b63620015301ee99c10 +AUX lvm2-2.02.56-lvm2create_initrd.patch 2032 RMD160 5e9ff47cb85829c41d9876048ee4be4e26554973 SHA1 bd83079490b19efca6846435b92b891aa1ff764a SHA256 b892d0544e05350e78ea400c16e6fd3657671d9bdf50bfae70505fd79bdda081 AUX lvm2-start.sh 1025 RMD160 fa27385e4640d59c33f2ca42db9d38f80def3977 SHA1 83a86ff292192b3f62e4686b70bbbfcc39158b53 SHA256 8c7da13b6326a383888110b25f53a4902cbec7d0dace274b9c5f1d6b0a775039 AUX lvm2-start.sh-2.02.28-r2 1180 RMD160 3ec85899a19c56d4d49e4654e1b05f53bc7d9c93 SHA1 80fce53cc1925990fbb103e57314b3c1740de6ed SHA256 a891855ed04d4c59f17fc0b19dc61813a4ca3cc183166867606d92cb58498460 AUX lvm2-start.sh-2.02.49-r1 1200 RMD160 b88e37e7e228fecdedf359c1132723077a3d4c94 SHA1 85eb83a83c598b3ea405ec4c597a9c77364e7fb4 SHA256 94d15b5dbeabb275b4d91b284b3113cd812b7e7c90ec3018693803b3e91d9535 @@ -73,6 +74,7 @@ EBUILD lvm2-2.02.51-r2.ebuild 6747 RMD160 3d350d2a75ab7cf1696c2db56630b53a729145 EBUILD lvm2-2.02.51-r3.ebuild 6404 RMD160 21491ed18b10f62cc817638fad0d8b3949ba6cfc SHA1 78841b228530756ae7fdd582004e8b1966b328ca SHA256 124f093503be677ac176404374ab4799fb420ea2b67ebe090a681ce16982f300 EBUILD lvm2-2.02.51.ebuild 6397 RMD160 ca7101385b191a93e6c040f557b8a5366fe97408 SHA1 587651e610252a1741a0f936b350916e8d2ce36b SHA256 6cbe62189ff5996f5fe9ee3b48250eb976befb4318d71b5bb2384265dffcab42 EBUILD lvm2-2.02.56-r1.ebuild 6515 RMD160 465bc0946b640a75a91cf859a13ee191f55b1576 SHA1 d2093f6b9f5e5eaf2eebaf7a7300498545b22254 SHA256 297d1fc02f295464b41e9164cbab16cb42eb38e233e9a08c5e1a87bc1b170795 +EBUILD lvm2-2.02.56-r2.ebuild 6768 RMD160 53edd6cf839263d1f9f244dc4572ed1e9da17f07 SHA1 8908096c91833490c1cc886bb57a210e42d404b5 SHA256 d27e4282eb4d1a7fb44270ac7bf77999885f9ee28dce4ee3700c838e8369ca33 EBUILD lvm2-2.02.56.ebuild 6486 RMD160 3a14e38c19adf2f87e03cf092cb921817e43a029 SHA1 e25b584d20c400c2ad98e0547cdfe907f22ce5ba SHA256 78b5d0ef4ac096bda9926445980582e08ee9b48343720aa5671912c218234a20 -MISC ChangeLog 33709 RMD160 0e39f960d2145cd42d1377e047fb125b26ca14f4 SHA1 2e063592221830006eda34575587cdf9c151a756 SHA256 c440967ea32042ef9168da12f38fdf3144d657ae3a56a8ce29ffa645a1e1ac46 +MISC ChangeLog 33999 RMD160 249ed5c0b10e34e54eada7ef1231b8738099df7c SHA1 fb8743edb43c2ed219f88dae6cffe5d847664659 SHA256 1aef6a051110b8a41eacd788ca44e68116bc8e5ebca385a97693a702f7633c8e MISC metadata.xml 792 RMD160 f60db9169ee273ca2f97fa5e69d4e5329e988164 SHA1 42f85f30477c65a164a11e172db7e250f442dca5 SHA256 87ced5a3a6102985f7c2a619dd52f65e62ae916f8921c8e7115a25452cd44b7f diff --git a/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch b/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch new file mode 100644 index 000000000000..59aaa9b34a08 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch @@ -0,0 +1,72 @@ +--- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000 ++++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000 +@@ -54,7 +54,9 @@ + DEVRAM=/tmp/initrd.$$ + + # set defaults +-BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"} ++LVM=`which lvm.static` ++LVM=${LVM:-"`which lvm`"} ++BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"} + BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"} + BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"} + MAKEDEV=${MAKEDEV:-"debian"} +@@ -119,6 +121,10 @@ + echo "$PRE Mounting /proc" + mount -t proc none /proc + ++# We need /sys for lvm ++echo "$PRE Mounting /sys" ++mount -t sysfs sysfs /sys ++ + # plug in modules listed in /etc/modules + if [ -f /etc/modules ]; then + echo -n "$PRE plugging in kernel modules:" +@@ -179,26 +185,29 @@ + # run a shell if we're passed lvm2rescue on commandline + grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1 + if [ $? -eq 0 ]; then +- lvm vgchange --ignorelockingfailure -P -a y ++ $LVM vgchange --ignorelockingfailure -P -a y + do_shell + else +- lvm vgchange --ignorelockingfailure -a y ++ $LVM vgchange --ignorelockingfailure -a y + fi + + echo "$PRE Mounting root filesystem $rootvol ro" + mkdir /rootvol + if ! mount -t auto -o ro $rootvol /rootvol; then +- echo "\t*FAILED*"; ++ echo "\t*FAILED TRYING TO MOUNT ROOTVOL*"; + do_shell + fi + + echo "$PRE Umounting /proc" + umount /proc + ++echo "$PRE Umounting /sys" ++umount /sys ++ + echo "$PRE Changing roots" + cd /rootvol + if ! pivot_root . initrd ; then +- echo "\t*FAILED*" ++ echo "\t*FAILED PIVOT TO NEW ROOT*" + do_shell + fi + +@@ -356,7 +365,7 @@ + fi + + verbose "creating basic set of directories in $TMPMNT" +-(cd $TMPMNT; mkdir bin dev etc lib proc sbin var) ++(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var) + if [ $? -ne 0 ]; then + echo "$cmd -- ERROR creating directories in $TMPMNT" + cleanup 1 +@@ -499,4 +508,3 @@ + FINALTXT + + cleanup 0 +- diff --git a/sys-fs/lvm2/lvm2-2.02.56-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.56-r2.ebuild new file mode 100644 index 000000000000..5f95d5d166ea --- /dev/null +++ b/sys-fs/lvm2/lvm2-2.02.56-r2.ebuild @@ -0,0 +1,220 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $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 $ + +EAPI=2 +inherit eutils multilib toolchain-funcs autotools + +DESCRIPTION="User-land utilities for LVM2 (device-mapper) software." +HOMEPAGE="http://sources.redhat.com/lvm2/" +SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz + ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + +IUSE="readline +static clvm cman +lvm1 selinux" + +DEPEND="!!sys-fs/device-mapper + clvm? ( =sys-cluster/dlm-2* + cman? ( =sys-cluster/cman-2* ) )" + +RDEPEND="${DEPEND} + !<sys-apps/openrc-0.4 + !!sys-fs/lvm-user + !!sys-fs/clvm + >=sys-apps/util-linux-2.16" + +S="${WORKDIR}/${PN/lvm/LVM}.${PV}" + +pkg_setup() { + # 1. Genkernel no longer copies /sbin/lvm blindly. + # 2. There are no longer any linking deps in /usr. + if use static; then + elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with" + elog "their static versions. If you need the static binaries," + elog "you must append .static the filename!" + fi +} + +src_unpack() { + unpack ${A} +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.02.56-dmeventd.patch + epatch "${FILESDIR}"/lvm.conf-2.02.56.patch + epatch "${FILESDIR}"/${PN}-2.02.56-device-mapper-export-format.patch + + # Merged upstream: + #epatch "${FILESDIR}"/${PN}-2.02.51-as-needed.patch + # Merged upstream: + #epatch "${FILESDIR}"/${PN}-2.02.48-fix-pkgconfig.patch + # Merged upstream: + #epatch "${FILESDIR}"/${PN}-2.02.51-fix-pvcreate.patch + # Fixed differently upstream: + #epatch "${FILESDIR}"/${PN}-2.02.51-dmsetup-selinux-linking-fix-r3.patch + + epatch "${FILESDIR}"/${PN}-2.02.56-always-make-static-libdm.patch + epatch "${FILESDIR}"/lvm2-2.02.56-lvm2create_initrd.patch + + eautoreconf +} + +src_configure() { + local myconf + local buildmode + + myconf="${myconf} --enable-dmeventd" + myconf="${myconf} --enable-cmdlib" + myconf="${myconf} --enable-applib" + myconf="${myconf} --enable-fsadm" + + # Most of this package does weird stuff. + # The build options are tristate, and --without is NOT supported + # options: 'none', 'internal', 'shared' + if use static ; then + einfo "Building static LVM, for usage inside genkernel" + buildmode="internal" + # This only causes the .static versions to become available + # For recent systems, there are no linkages against anything in /usr anyway. + # We explicitly provide the .static versions so that they can be included in + # initramfs environments. + myconf="${myconf} --enable-static_link" + else + ewarn "Building shared LVM, it will not work inside genkernel!" + buildmode="shared" + fi + + # dmeventd requires mirrors to be internal, and snapshot available + # so we cannot disable them + myconf="${myconf} --with-mirrors=internal" + myconf="${myconf} --with-snapshots=internal" + + if use lvm1 ; then + myconf="${myconf} --with-lvm1=${buildmode}" + else + myconf="${myconf} --with-lvm1=none" + fi + + # disable O_DIRECT support on hppa, breaks pv detection (#99532) + use hppa && myconf="${myconf} --disable-o_direct" + + if use clvm; then + myconf="${myconf} --with-cluster=${buildmode}" + # 4-state! Make sure we get it right, per bug 210879 + # Valid options are: none, cman, gulm, all + # + # 2009/02: + # gulm is removed now, now dual-state: + # cman, none + # all still exists, but is not needed + # + # 2009/07: + # TODO: add corosync and re-enable ALL + local clvmd="" + use cman && clvmd="cman" + #clvmd="${clvmd/cmangulm/all}" + [ -z "${clvmd}" ] && clvmd="none" + myconf="${myconf} --with-clvmd=${clvmd}" + myconf="${myconf} --with-pool=${buildmode}" + else + myconf="${myconf} --with-clvmd=none --with-cluster=none" + fi + + myconf="${myconf} --sbindir=/sbin --with-staticdir=/sbin" + econf $(use_enable readline) \ + $(use_enable selinux) \ + --enable-pkgconfig \ + --libdir=/usr/$(get_libdir) \ + ${myconf} \ + CLDFLAGS="${LDFLAGS}" || die +} + +src_compile() { + einfo "Doing symlinks" + pushd include + emake || die "Failed to prepare symlinks" + popd + + einfo "Starting main build" + emake || die "compile fail" +} + +src_install() { + emake DESTDIR="${D}" install + + dodir /$(get_libdir) + # Put these in root so we can reach before /usr is up + for i in \ + libdevmapper-event{,-lvm2{mirror,snapshot}} \ + libdevmapper \ + liblvm2{format1,snapshot,cmd} \ + ; do + b="${D}"/usr/$(get_libdir)/${i} + if [ -f "${b}".so ]; then + mv -f "${b}".so* "${D}"/$(get_libdir) || die + gen_usr_ldscript ${i}.so || die + fi + done + + dodoc README VERSION WHATS_NEW doc/*.{conf,c,txt} + insinto /$(get_libdir)/rcscripts/addons + newins "${FILESDIR}"/lvm2-start.sh-2.02.49-r3 lvm-start.sh || die + newins "${FILESDIR}"/lvm2-stop.sh-2.02.49-r3 lvm-stop.sh || die + newinitd "${FILESDIR}"/lvm.rc-2.02.51-r2 lvm || die + newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm || die + if use clvm; then + newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd || die + newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd || die + fi + + # move shared libs to /lib(64) + dolib.a libdm/ioctl/libdevmapper.a || die "dolib.a libdevmapper.a" + #gen_usr_ldscript libdevmapper.so + + dosbin "${S}"/scripts/lvm2create_initrd/lvm2create_initrd + doman "${S}"/scripts/lvm2create_initrd/lvm2create_initrd.8 + newdoc "${S}"/scripts/lvm2create_initrd/README README.lvm2create_initrd + + insinto /etc + doins "${FILESDIR}"/dmtab + insinto /$(get_libdir)/rcscripts/addons + doins "${FILESDIR}"/dm-start.sh + + # Device mapper stuff + newinitd "${FILESDIR}"/device-mapper.rc-1.02.51-r2 device-mapper || die + newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper || die + + newinitd "${FILESDIR}"/1.02.22-dmeventd.initd dmeventd || die + dolib.a daemons/dmeventd/libdevmapper-event.a \ + || die "dolib.a libdevmapper-event.a" + #gen_usr_ldscript libdevmapper-event.so + + insinto /etc/udev/rules.d/ + newins "${FILESDIR}"/64-device-mapper.rules-1.02.49-r2 64-device-mapper.rules || die + + # do not rely on /lib -> /libXX link + sed -e "s-/lib/rcscripts/-/$(get_libdir)/rcscripts/-" -i "${D}"/etc/init.d/* + + elog "USE flag nocman is deprecated and replaced" + elog "with the cman USE flag." + elog "" + elog "USE flags clvm and cman are masked" + elog "by default and need to be unmasked to use them" + elog "" + elog "If you are using genkernel and root-on-LVM, rebuild the initramfs." +} + +pkg_postinst() { + elog "lvm volumes are no longer automatically created for" + elog "baselayout-2 users. If you are using baselayout-2, be sure to" + elog "run: # rc-update add lvm boot" + elog "Do NOT add it if you are using baselayout-1 still." +} + +src_test() { + einfo "Testcases disabled because of device-node mucking" + einfo "If you want them, compile the package and see ${S}/tests" +} |