diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2006-06-01 21:31:03 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2006-06-01 21:31:03 +0000 |
commit | d423a1ac87aae3a5070a84cf54f6e664d8db0a37 (patch) | |
tree | 546a88de049f18d64347659ee6372f040f6e4662 /sys-fs/evms | |
parent | Adjusting postinstall instructions wrt bug #135082 (diff) | |
download | gentoo-2-d423a1ac87aae3a5070a84cf54f6e664d8db0a37.tar.gz gentoo-2-d423a1ac87aae3a5070a84cf54f6e664d8db0a37.tar.bz2 gentoo-2-d423a1ac87aae3a5070a84cf54f6e664d8db0a37.zip |
Added patches from upstream to fix issues with allowing the user to remove a spare from a degraded raid5 array.
(Portage version: 2.1_rc3-r3)
Diffstat (limited to 'sys-fs/evms')
-rw-r--r-- | sys-fs/evms/ChangeLog | 10 | ||||
-rw-r--r-- | sys-fs/evms/evms-2.5.5-r2.ebuild | 95 | ||||
-rw-r--r-- | sys-fs/evms/files/2.5.5/raid5_remove_spare_fix.patch | 28 | ||||
-rw-r--r-- | sys-fs/evms/files/2.5.5/raid5_remove_spare_fix_2.patch | 34 | ||||
-rw-r--r-- | sys-fs/evms/files/digest-evms-2.5.5-r2 | 3 |
5 files changed, 169 insertions, 1 deletions
diff --git a/sys-fs/evms/ChangeLog b/sys-fs/evms/ChangeLog index 7a6d7b87fd7d..48801fd2da84 100644 --- a/sys-fs/evms/ChangeLog +++ b/sys-fs/evms/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-fs/evms # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/evms/ChangeLog,v 1.53 2006/06/01 21:24:17 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/evms/ChangeLog,v 1.54 2006/06/01 21:31:03 eradicator Exp $ + +*evms-2.5.5-r2 (01 Jun 2006) + + 01 Jun 2006; Jeremy Huddleston <eradicator@gentoo.org> + +files/2.5.5/raid5_remove_spare_fix.patch, + +files/2.5.5/raid5_remove_spare_fix_2.patch, +evms-2.5.5-r2.ebuild: + Added patches from upstream to fix issues with allowing the user to remove a + spare from a degraded raid5 array. 01 Jun 2006; Jeremy Huddleston <eradicator@gentoo.org> -files/2.5.3/md_expand.patch, +files/evms-2.5.5-as-needed.patch, diff --git a/sys-fs/evms/evms-2.5.5-r2.ebuild b/sys-fs/evms/evms-2.5.5-r2.ebuild new file mode 100644 index 000000000000..b1b3cdd381e7 --- /dev/null +++ b/sys-fs/evms/evms-2.5.5-r2.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/evms/evms-2.5.5-r2.ebuild,v 1.1 2006/06/01 21:31:03 eradicator Exp $ + +inherit eutils flag-o-matic multilib + +DESCRIPTION="Utilities for the IBM Enterprise Volume Management System" +HOMEPAGE="http://www.sourceforge.net/projects/evms" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="ncurses gtk nls" + +#EVMS uses libuuid from e2fsprogs +RDEPEND="virtual/libc + sys-fs/e2fsprogs + sys-fs/device-mapper + >=sys-apps/baselayout-1.9.4-r6 + gtk? ( =x11-libs/gtk+-1* ) + ncurses? ( sys-libs/ncurses + =dev-libs/glib-1* )" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PV}/raid5_degrade_fix.patch + epatch ${FILESDIR}/${PV}/md_super_fix.patch + epatch ${FILESDIR}/${PV}/raid5_remove_spare_fix.patch + epatch ${FILESDIR}/${PV}/raid5_remove_spare_fix_2.patch + epatch ${FILESDIR}/evms-2.5.5-as-needed.patch +} + +src_compile() { + # Bug #54856 + # filter-flags "-fstack-protector" + replace-flags -O3 -O2 + replace-flags -Os -O2 + + local excluded_interfaces="" + use ncurses || excluded_interfaces="--disable-text-mode" + use gtk || excluded_interfaces="${excluded_interfaces} --disable-gui" + + econf \ + --libdir=/$(get_libdir) \ + --sbindir=/sbin \ + --includedir=/usr/include \ + $(use_enable nls) \ + ${excluded_interfaces} || die "Failed configure" + emake || die "Failed emake" +} + +src_install() { + make DESTDIR="${D}" install || die "Make install died" + dodoc ChangeLog INSTALL* PLUGIN.IDS README TERMINOLOGY doc/linuxrc + + insinto /$(get_libdir)/rcscripts/addons + newins "${FILESDIR}"/evms2-start.sh evms-start.sh || die "rcscript addon failed" + + # install the sample configuration into the doc dir + dodoc ${D}/etc/evms.conf.sample + rm -f ${D}/etc/evms.conf.sample + + # the kernel patches may come handy for people compiling their own kernel + docinto kernel/2.4 + dodoc kernel/2.4/* + docinto kernel/2.6 + dodoc kernel/2.6/* + + # move static libraries to /usr/lib + dodir /usr/$(get_libdir) + mv -f ${D}/$(get_libdir)/*.a ${D}/usr/$(get_libdir) + + # Create linker scripts for dynamic libs in /lib, else gcc + # links to the static ones in /usr/lib first. Bug #4411. + for x in ${D}/usr/$(get_libdir)/*.a + do + if [ -f ${x} ] + then + local lib="${x##*/}" + gen_usr_ldscript ${lib/\.a/\.so} + fi + done + + # the gtk+ frontend should live in /usr/sbin + if use gtk + then + dodir /usr/sbin + mv -f ${D}/sbin/evmsgui ${D}/usr/sbin + fi + + # Needed for bug #51252 + dosym libevms-2.5.so.0.0 /$(get_libdir)/libevms-2.5.so.0 +} diff --git a/sys-fs/evms/files/2.5.5/raid5_remove_spare_fix.patch b/sys-fs/evms/files/2.5.5/raid5_remove_spare_fix.patch new file mode 100644 index 000000000000..8cd858618a55 --- /dev/null +++ b/sys-fs/evms/files/2.5.5/raid5_remove_spare_fix.patch @@ -0,0 +1,28 @@ +If a spare is added to fix a degraded raid5 array and the resync does not run, +the kernel probably still has it as a spare. The user should have the option to +remove this spare disk from the array. + +Note: This patch should be applied on top of raid5_degrade_fix.patch: +http://evms.sourceforge.net/patches/2.5.5/engine/raid5_degrade_fix.patch + +--- evms-2.5.5a/plugins/md/raid5_mgr.c 2006-05-10 11:33:10.173604904 -0500 ++++ evms-2.5.5b/plugins/md/raid5_mgr.c 2006-05-10 11:27:27.348722208 -0500 +@@ -3416,15 +3416,9 @@ + /* Clear out the spare_disks list. */ + EngFncs->delete_all_elements(spare_disks); + +- /* +- * If there is only one spare and the array is in degrade mode, then +- * the spare cannot be removed. +- */ +- if (vol->spare_disks <= 1) { +- if (vol->flags & MD_DEGRADED) { +- LOG_EXIT_INT(0); +- return 0; +- } ++ if ((vol->flags & MD_DEGRADED) && (vol->spare_disks > 0)) { ++ LOG_WARNING("%s is degraded, but there are %d spare disk(s).\n", ++ vol->name, vol->spare_disks); + } + + LIST_FOR_EACH(vol->members, iter, member) { diff --git a/sys-fs/evms/files/2.5.5/raid5_remove_spare_fix_2.patch b/sys-fs/evms/files/2.5.5/raid5_remove_spare_fix_2.patch new file mode 100644 index 000000000000..21670c44b5a3 --- /dev/null +++ b/sys-fs/evms/files/2.5.5/raid5_remove_spare_fix_2.patch @@ -0,0 +1,34 @@ +This is the second attempt to fix remove spare for active degraded raid5 array. + +This patch should be applied on top of raid5_remove_spare_fix.patch + +--- evms-2.5.5a/plugins/md/raid5_mgr.c 2006-05-10 15:16:31.199339328 -0500 ++++ evms-2.5.5b/plugins/md/raid5_mgr.c 2006-05-10 15:18:17.993104208 -0500 +@@ -4338,7 +4338,9 @@ + * least one spare is available. + */ + if (count && +- (conf->active_disks < conf->raid_disks)) { ++ (volume->flags & MD_DEGRADED) && ++ (volume->spare_disks == 1) && ++ (!(volume->region->flags & SOFLAG_ACTIVE)) ) { + + MESSAGE(_("At least one spare object must be left for recovering degraded array %s.\n"), + volume->region->name); +@@ -5684,10 +5686,13 @@ + LOG_EXIT_INT(rc); + return rc; + } +- if (vol->flags & MD_DEGRADED) { +- LOG_ERROR("Array %s is running in degrade mode. " +- "At least one spare must be left for the array to recover.\n", ++ if ((vol->flags & MD_DEGRADED) && ++ (!(vol->region->flags & SOFLAG_ACTIVE)) ) { ++ MESSAGE(_("Array %s is running in degrade mode. " ++ "At least one spare must be left for the array to recover.\n"), + vol->region->name); ++ LOG_EXIT_INT(EINVAL); ++ return EINVAL; + } + break; + diff --git a/sys-fs/evms/files/digest-evms-2.5.5-r2 b/sys-fs/evms/files/digest-evms-2.5.5-r2 new file mode 100644 index 000000000000..33b12c6760ce --- /dev/null +++ b/sys-fs/evms/files/digest-evms-2.5.5-r2 @@ -0,0 +1,3 @@ +MD5 45b463f0cbade194dc0a08be432b572e evms-2.5.5.tar.gz 2286321 +RMD160 716d6b34f48f6f7a3f5f4627bc4a2c34957607f7 evms-2.5.5.tar.gz 2286321 +SHA256 9dbfaac148d822068ba883f6533935e03ae5cfc9fdf8836dea6aee99c859307c evms-2.5.5.tar.gz 2286321 |