From: Tiziano Müller Date: Sat, 2 Dec 2006 11:55:45 +0000 (+0000) Subject: Revision bump to include new upstream patches. Included the glib-patch provided by... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1c2bb2d7bd6f6f1f3565e97737c944414a21b43f;p=gentoo.git Revision bump to include new upstream patches. Included the glib-patch provided by Jimmy Jazz (bug #152293) and the ocfs2-patch (bug #147276, thanks to Brad Plant). Solved bug #147281 and #154924. Dropped old version. Package-Manager: portage-2.1.2_rc2 --- diff --git a/sys-fs/evms/ChangeLog b/sys-fs/evms/ChangeLog index 48801fd2da84..bddea30c997f 100644 --- a/sys-fs/evms/ChangeLog +++ b/sys-fs/evms/ChangeLog @@ -1,6 +1,19 @@ # 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.54 2006/06/01 21:31:03 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/evms/ChangeLog,v 1.55 2006/12/02 11:55:45 dev-zero Exp $ + +*evms-2.5.5-r3 (02 Dec 2006) + + 02 Dec 2006; Tiziano Müller + +files/2.5.5/cli_query_segfault.patch, + +files/2.5.5/cli_reload_options.patch, +files/evms-2.5.5-glib_dep.patch, + +files/2.5.5/get_geometry.patch, +files/evms-2.5.5-ocfs2.patch, + +files/2.5.5/BaseName.patch, +files/2.5.5/ntfs_unmkfs.patch, + +files/2.5.5/raid5_algorithm.patch, metadata.xml, -evms-2.5.5.ebuild, + +evms-2.5.5-r3.ebuild: + Revision bump to include new upstream patches. Included the glib-patch + provided by Jimmy Jazz (bug #152293) and the ocfs2-patch (bug #147276, + thanks to Brad Plant). Solved bug #147281 and #154924. Dropped old version. *evms-2.5.5-r2 (01 Jun 2006) diff --git a/sys-fs/evms/evms-2.5.5-r3.ebuild b/sys-fs/evms/evms-2.5.5-r3.ebuild new file mode 100644 index 000000000000..87bad1132cad --- /dev/null +++ b/sys-fs/evms/evms-2.5.5-r3.ebuild @@ -0,0 +1,111 @@ +# 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-r3.ebuild,v 1.1 2006/12/02 11:55:45 dev-zero Exp $ + +WANT_AUTOMAKE="latest" +WANT_AUTOCONF="latest" + +inherit eutils flag-o-matic multilib toolchain-funcs autotools + +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="gtk ncurses 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-2* )" +DEPEND="${RDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${PV}/md_super_fix.patch" + epatch "${FILESDIR}/${PV}/ntfs_unmkfs.patch" + epatch "${FILESDIR}/${PV}/raid5_degrade_fix.patch" + epatch "${FILESDIR}/${PV}/raid5_remove_spare_fix.patch" + epatch "${FILESDIR}/${PV}/raid5_remove_spare_fix_2.patch" + epatch "${FILESDIR}/${PV}/raid5_algorithm.patch" + epatch "${FILESDIR}/${PV}/cli_reload_options.patch" + epatch "${FILESDIR}/${PV}/cli_query_segfault.patch" + epatch "${FILESDIR}/${PV}/get_geometry.patch" + epatch "${FILESDIR}/${PV}/BaseName.patch" + + epatch "${FILESDIR}/evms-2.5.5-as-needed.patch" + epatch "${FILESDIR}/evms-2.5.5-glib_dep.patch" + epatch "${FILESDIR}/evms-2.5.5-ocfs2.patch" + + eautoreconf +} + +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() { + emake 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/BaseName.patch b/sys-fs/evms/files/2.5.5/BaseName.patch new file mode 100644 index 000000000000..7a0ab0304312 --- /dev/null +++ b/sys-fs/evms/files/2.5.5/BaseName.patch @@ -0,0 +1,29 @@ +EVMS registers the base name for the top working object of a volume if the +object has its own device. However, EVMS engine fails to unregister such +names when discarding volumes. This prevents some operation on volumes. + +The problem magnifies in cluster environments because rediscovery of +CSM containers would fail to add volumes (discarded moments ago) back to +the object tree, and the volumes would get deleted when committing changes. + +Rediscovery can be triggered by an operation as simple as changing the +attributes of a CSM container. + +I added code to unregister the base name, and tested on my cluster. + +"Changju Gao" + +--- evms-2.5.5/engine/internalAPI.c 2005-10-10 09:44:41.000000000 -0500 ++++ evms-2.5.5-fix/engine/internalAPI.c 2006-11-01 17:11:42.113699000 -0600 +@@ -2722,6 +2722,11 @@ + if (rc == 0) { + engine_unregister_name(vol->name); + ++ if( vol->object->feature_header != NULL ) ++ { ++ engine_unregister_name(vol->name+EVMS_DEV_NODE_PATH_LEN); ++ } ++ + /* + * Clear out the volume pointer on this object and on all the child + * objects in the tree. diff --git a/sys-fs/evms/files/2.5.5/cli_query_segfault.patch b/sys-fs/evms/files/2.5.5/cli_query_segfault.patch new file mode 100644 index 000000000000..2df64bf3be0b --- /dev/null +++ b/sys-fs/evms/files/2.5.5/cli_query_segfault.patch @@ -0,0 +1,28 @@ +Fix for a segfault in the CLI when doing a query -- not enough memory declared +for a handle array. + +--- evms-2.5.5/ui/cli/interpreter.c 2005-06-01 10:20:32.000000000 -0500 ++++ evms-2.5.5-fix/ui/cli/interpreter.c 2006-09-14 09:47:16.480084103 -0500 +@@ -3326,7 +3326,8 @@ + dlist_t Return_Values; + object_handle_t Object_Handle; + handle_array_t * Object_List; +- handle_array_t Tmp_Array; ++ char Tmp_Buffer[sizeof(handle_array_t) + sizeof(object_handle_t)]; ++ handle_array_t * Tmp_Array = (handle_array_t *)Tmp_Buffer; + handle_object_info_t * Object_Info; + expand_handle_array_t * Expand_Points; + shrink_handle_array_t * Shrink_Points; +@@ -3477,9 +3478,9 @@ + case EVMS_OBJECT: + Object_List = Object_Info->info.object.parent_objects; + if (Object_List->count == 0 && Object_Info->info.object.volume != 0) { +- Tmp_Array.count = 1; +- Tmp_Array.handle[0] = Object_Info->info.object.volume; +- Object_List = &Tmp_Array; ++ Tmp_Array->count = 1; ++ Tmp_Array->handle[0] = Object_Info->info.object.volume; ++ Object_List = Tmp_Array; + } + break; + default: diff --git a/sys-fs/evms/files/2.5.5/cli_reload_options.patch b/sys-fs/evms/files/2.5.5/cli_reload_options.patch new file mode 100644 index 000000000000..425400514053 --- /dev/null +++ b/sys-fs/evms/files/2.5.5/cli_reload_options.patch @@ -0,0 +1,19 @@ +Check the returned effect after setting selected objects for a task and +reload the option descriptors if necessary. + +--- evms-2.5.5/ui/cli/interpreter.c 2005-06-01 10:20:32.000000000 -0500 ++++ evms-2.5.5-fix/ui/cli/interpreter.c 2006-09-01 11:54:50.903202365 -0500 +@@ -2400,6 +2400,13 @@ + Error = EINVAL; + + } ++ else ++ { ++ if (Task_Result & EVMS_Effect_Reload_Options) { ++ Clear_Option_Descriptors(); ++ Get_Option_Descriptors(); ++ } ++ } + + } + else diff --git a/sys-fs/evms/files/2.5.5/get_geometry.patch b/sys-fs/evms/files/2.5.5/get_geometry.patch new file mode 100644 index 000000000000..cc13b6451be7 --- /dev/null +++ b/sys-fs/evms/files/2.5.5/get_geometry.patch @@ -0,0 +1,37 @@ +This patch fixes a segmentation fault that can occur in the Local Disk Manager +when the queries for getting the geometry of the disk return a value of zero +for either the number of heads or the number of sectors per track. + +--- evms-2.5.5/plugins/disk/localdskmgr.c 2006-02-24 13:53:21.000000000 -0600 ++++ evms-2.5.5-fix/plugins/disk/localdskmgr.c 2006-09-01 11:41:56.681089000 -0500 +@@ -1552,16 +1552,25 @@ + + LOG_ENTRY(); + +- /* Set defaults */ +- disk->geometry.heads = 255; +- disk->geometry.sectors_per_track = 63; +- + rc = get_partition_table_geometry(disk); + + if (rc != 0) { +- get_kernel_geometry(disk); ++ rc = get_kernel_geometry(disk); ++ } ++ ++ /* Set defaults if no valid geometry was found. */ ++ if (disk->geometry.heads == 0) { ++ LOG_DEBUG("Disk %s: Heads is zero - setting to 255.\n", ++ disk->name); ++ disk->geometry.heads = 255; ++ } ++ if (disk->geometry.sectors_per_track == 0) { ++ LOG_DEBUG("Disk %s: Sectors-per-track is zero - " ++ "setting to 63.\n", disk->name); ++ disk->geometry.sectors_per_track = 63; + } + ++ /* Calculate number of cylinders based on other geometry fields. */ + disk->geometry.cylinders = disk->size / + (disk->geometry.heads * + disk->geometry.sectors_per_track * diff --git a/sys-fs/evms/files/2.5.5/ntfs_unmkfs.patch b/sys-fs/evms/files/2.5.5/ntfs_unmkfs.patch new file mode 100644 index 000000000000..6e62c28eb5d3 --- /dev/null +++ b/sys-fs/evms/files/2.5.5/ntfs_unmkfs.patch @@ -0,0 +1,33 @@ +This patch fixes a bug in the NTFS unmkfs. The offsets for the superblocks +were calculated incorrectly by using the filesystem size rather than using +the volume size. The result is that sometimes the superblocks didn't get +wiped out, leaving the NTFS file system still on the volume. + +--- evms-2.5.5/plugins/ntfs/utils.c 2006-02-24 10:36:54.000000000 -0600 ++++ evms-2.5.5-fix/plugins/ntfs/utils.c 2006-05-04 16:47:26.243120000 -0500 +@@ -313,7 +313,6 @@ + int clear_ntfs_boot_sectors(logical_volume_t * ev) + { + int rc = 0; +- private_data_t * pd = (private_data_t *) ev->private_data; + int fd; + void * block; + int32_t bytes_written; +@@ -346,7 +345,7 @@ + } + + /* Wipe out the NT4+ backup boot sector. */ +- bytes_written = EngFncs->write_volume(ev, fd, block, NTFS_BLOCK_SIZE, (pd->fs_size << EVMS_VSECTOR_SIZE_SHIFT) - NTFS_BLOCK_SIZE); ++ bytes_written = EngFncs->write_volume(ev, fd, block, NTFS_BLOCK_SIZE, (ev->vol_size << EVMS_VSECTOR_SIZE_SHIFT) - NTFS_BLOCK_SIZE); + if (bytes_written != NTFS_BLOCK_SIZE) { + LOG_WARNING("Failed to clear the primary boot sector on volume %s. " + "Only %d bytes were written.\n", +@@ -355,7 +354,7 @@ + } + + /* Wipe out the NT3.51- backup boot sector. */ +- bytes_written = EngFncs->write_volume(ev, fd, block, NTFS_BLOCK_SIZE, (pd->fs_size << (EVMS_VSECTOR_SIZE_SHIFT - 1))); ++ bytes_written = EngFncs->write_volume(ev, fd, block, NTFS_BLOCK_SIZE, (ev->vol_size << (EVMS_VSECTOR_SIZE_SHIFT - 1))); + if (bytes_written != NTFS_BLOCK_SIZE) { + LOG_WARNING("Failed to clear the primary boot sector on volume %s. " + "Only %d bytes were written.\n", diff --git a/sys-fs/evms/files/2.5.5/raid5_algorithm.patch b/sys-fs/evms/files/2.5.5/raid5_algorithm.patch new file mode 100644 index 000000000000..cae213b436f8 --- /dev/null +++ b/sys-fs/evms/files/2.5.5/raid5_algorithm.patch @@ -0,0 +1,15 @@ +This patch fixes the md plug-in so that it will set the desired parity algorithm +in the superblock for the RAID5 array. Previously it always set the algorithm +to 0, i.e., left asymmetric. + +--- evms-2.5.5/plugins/md/raid5_mgr.c 2006-02-22 10:05:17.000000000 -0600 ++++ evms-2.5.5-fix/plugins/md/raid5_mgr.c 2006-06-08 13:59:56.648351368 -0500 +@@ -1932,7 +1932,7 @@ + } + } + +- rc = md_init_sb(volume, &sb_ver, raid_level, 0, size, chunksize); ++ rc = md_init_sb(volume, &sb_ver, raid_level, parity_algorithm, size, chunksize); + if (rc) { + goto error_free; + } diff --git a/sys-fs/evms/files/digest-evms-2.5.5-r3 b/sys-fs/evms/files/digest-evms-2.5.5-r3 new file mode 100644 index 000000000000..33b12c6760ce --- /dev/null +++ b/sys-fs/evms/files/digest-evms-2.5.5-r3 @@ -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 diff --git a/sys-fs/evms/files/evms-2.5.5-glib_dep.patch b/sys-fs/evms/files/evms-2.5.5-glib_dep.patch new file mode 100644 index 000000000000..bbf492339934 --- /dev/null +++ b/sys-fs/evms/files/evms-2.5.5-glib_dep.patch @@ -0,0 +1,45 @@ +--- /root/aclocal.m4.old 2006-10-21 18:51:30.000000000 +0200 ++++ aclocal.m4 2006-10-21 20:48:07.000000000 +0200 +@@ -495,8 +495,8 @@ + AC_MSG_NOTICE([ not building text-mode ... requires ncurses library]) + elif test "$have_panel" = "no"; then + AC_MSG_NOTICE([ not building text-mode ... requires panel library]) +-elif test "$have_ha_glib" = "no"; then +- AC_MSG_NOTICE([ not building text-mode ... requires $ha_glib library]) ++#elif test "$have_ha_glib" = "no"; then ++# AC_MSG_NOTICE([ not building text-mode ... requires $ha_glib library]) + elif test "$have_math" = "no"; then + AC_MSG_NOTICE([ not building text-mode ... requires math library]) + else +@@ -920,7 +920,16 @@ + fi + fi + ++ha_glib=glib ++have_ha_glib=$have_glib ++HA_GLIB_CPPFLAGS=$GLIB_CPPFLAGS ++HA_GLIB_LIBS=$GLIB_LIBS ++ + if test "x$no_glib2" = x; then ++ ha_glib=glib2 ++ have_ha_glib=$have_glib2 ++ HA_GLIB_CPPFLAGS=$GLIB2_CPPFLAGS ++ HA_GLIB_LIBS=$GLIB2_LIBS + AC_MSG_RESULT([yes]) + ifelse([$2], , :, [$2]) + else +@@ -1286,10 +1295,10 @@ + [ifelse([$3], , :, [$3])]) + fi + +-ha_glib=glib +-have_ha_glib=$have_glib +-HA_GLIB_CPPFLAGS=$GLIB_CPPFLAGS +-HA_GLIB_LIBS=$GLIB_LIBS ++#ha_glib=glib ++#have_ha_glib=$have_glib ++#HA_GLIB_CPPFLAGS=$GLIB_CPPFLAGS ++#HA_GLIB_LIBS=$GLIB_LIBS + + if test "$have_ha_version" = "yes"; then + if test -d /usr/include/heartbeat -a \ diff --git a/sys-fs/evms/files/evms-2.5.5-ocfs2.patch b/sys-fs/evms/files/evms-2.5.5-ocfs2.patch new file mode 100644 index 000000000000..af8f0ee5dbe4 --- /dev/null +++ b/sys-fs/evms/files/evms-2.5.5-ocfs2.patch @@ -0,0 +1,22 @@ +--- plugins/ocfs2/ocfs2.c.orig 2006-09-12 18:45:36.000000000 +1000 ++++ plugins/ocfs2/ocfs2.c 2006-09-12 18:46:46.000000000 +1000 +@@ -636,6 +636,7 @@ static int fsim_test_version(void) + int status; + int bytes_read; + int rc; ++ float ver_num; + + LOG_ENTRY(); + +@@ -672,8 +673,9 @@ static int fsim_test_version(void) + LOG_DEBUG("Reading output from process %d on fd %d.\n", pidm, fds2[0]); + bytes_read = read(fds2[0], buffer, 1024); + if (bytes_read > 0) { +- ver = strstr(buffer, "1.1"); +- if (!ver) { ++ ver = strstr(buffer, "1."); ++ ver_num = atof(ver); ++ if(ver_num < 1.1) { + rc = EINVAL; + } else { + oc2_version = 2; diff --git a/sys-fs/evms/metadata.xml b/sys-fs/evms/metadata.xml index c2d772176970..c982d11b9bf7 100644 --- a/sys-fs/evms/metadata.xml +++ b/sys-fs/evms/metadata.xml @@ -4,8 +4,8 @@ base-system - eradicator@gentoo.org - Jeremy Huddleston + dev-zero@gentoo.org + Tiziano Müller evms is a volume management system written by IBM, it's open source