diff options
author | Tiziano Müller <dev-zero@gentoo.org> | 2007-07-15 20:23:44 +0000 |
---|---|---|
committer | Tiziano Müller <dev-zero@gentoo.org> | 2007-07-15 20:23:44 +0000 |
commit | ffc28d2bb993c79418dd5e57609e23feff7ccbf9 (patch) | |
tree | b2bd8e3afc8edd2952a6481fb7b127a565dc69cd /sys-fs/evms | |
parent | Fix building with asneeded for bug 184668. (diff) | |
download | gentoo-2-ffc28d2bb993c79418dd5e57609e23feff7ccbf9.tar.gz gentoo-2-ffc28d2bb993c79418dd5e57609e23feff7ccbf9.tar.bz2 gentoo-2-ffc28d2bb993c79418dd5e57609e23feff7ccbf9.zip |
Added disk_cache patch for bug #185369 (thanks to Attila Jecs)
Dropped old versions
(Portage version: 2.1.3_rc8)
Diffstat (limited to 'sys-fs/evms')
-rw-r--r-- | sys-fs/evms/ChangeLog | 10 | ||||
-rw-r--r-- | sys-fs/evms/evms-2.5.5-r1.ebuild | 93 | ||||
-rw-r--r-- | sys-fs/evms/evms-2.5.5-r6.ebuild (renamed from sys-fs/evms/evms-2.5.5-r4.ebuild) | 17 | ||||
-rw-r--r-- | sys-fs/evms/files/2.5.5/disk_cache.patch | 106 | ||||
-rw-r--r-- | sys-fs/evms/files/digest-evms-2.5.5-r4 | 3 | ||||
-rw-r--r-- | sys-fs/evms/files/digest-evms-2.5.5-r6 (renamed from sys-fs/evms/files/digest-evms-2.5.5-r1) | 0 |
6 files changed, 125 insertions, 104 deletions
diff --git a/sys-fs/evms/ChangeLog b/sys-fs/evms/ChangeLog index 40d2855ca079..a666a25fb80d 100644 --- a/sys-fs/evms/ChangeLog +++ b/sys-fs/evms/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-fs/evms # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/evms/ChangeLog,v 1.66 2007/04/06 20:32:39 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/evms/ChangeLog,v 1.67 2007/07/15 20:23:43 dev-zero Exp $ + +*evms-2.5.5-r6 (15 Jul 2007) + + 15 Jul 2007; Tiziano Müller <dev-zero@gentoo.org> + +files/2.5.5/disk_cache.patch, -evms-2.5.5-r1.ebuild, + -evms-2.5.5-r4.ebuild, +evms-2.5.5-r6.ebuild: + Added disk_cache patch for bug #185369 (thanks to Attila Jecs) + Dropped old versions 06 Apr 2007; Tobias Scherbaum <dertobi123@gentoo.org> evms-2.5.5-r5.ebuild: diff --git a/sys-fs/evms/evms-2.5.5-r1.ebuild b/sys-fs/evms/evms-2.5.5-r1.ebuild deleted file mode 100644 index 1d059ff67eee..000000000000 --- a/sys-fs/evms/evms-2.5.5-r1.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# 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-r1.ebuild,v 1.10 2006/08/20 21:23:00 vapier Exp $ - -inherit eutils flag-o-matic multilib toolchain-funcs - -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}/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/evms-2.5.5-r4.ebuild b/sys-fs/evms/evms-2.5.5-r6.ebuild index 2e7ca5b75d9d..efe5fa706bd6 100644 --- a/sys-fs/evms/evms-2.5.5-r4.ebuild +++ b/sys-fs/evms/evms-2.5.5-r6.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 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-r4.ebuild,v 1.4 2007/02/04 19:16:40 beandog Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/evms/evms-2.5.5-r6.ebuild,v 1.1 2007/07/15 20:23:43 dev-zero Exp $ WANT_AUTOMAKE="latest" WANT_AUTOCONF="latest" @@ -13,7 +13,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" IUSE="debug gtk ncurses nls" #EVMS uses libuuid from e2fsprogs @@ -41,10 +41,13 @@ src_unpack() { epatch "${FILESDIR}/${PV}/cli_query_segfault.patch" epatch "${FILESDIR}/${PV}/get_geometry.patch" epatch "${FILESDIR}/${PV}/BaseName.patch" + epatch "${FILESDIR}/${PV}/disk_cache.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" + epatch "${FILESDIR}/${P}-as-needed.patch" + epatch "${FILESDIR}/${P}-glib_dep.patch" + epatch "${FILESDIR}/${P}-ocfs2.patch" + epatch "${FILESDIR}/${P}-use_disk_group.patch" + epatch "${FILESDIR}/${P}-pagesize.patch" eautoreconf } @@ -124,7 +127,7 @@ src_test() { einfo " dd if=/dev/zero of=/tmp/evms_test_file bs=1M count=4096" einfo "- Activate a loop device on this file:" einfo " losetup /dev/loop0 /tmp/evms_test_file" - einfo "- export EVMS_TEST_VOLUME=loop0" + einfo "- export EVMS_TEST_VOLUME=loop/0" einfo "The disk has to be at least 4GB!" einfo "To deactivate the loop-device afterwards:" einfo "- losetup -d /dev/loop0" @@ -147,5 +150,5 @@ src_test() { addwrite /var/lock/evms-engine cd "${S}/tests/suite" - PATH="${PATH}:/sbin:/${S}/tests" ./run_tests ${EVMS_TEST_VOLUME} || die "tests failed" + PATH="${S}/ui/cli:${S}/tests:/sbin:${PATH}" ./run_tests ${EVMS_TEST_VOLUME} || die "tests failed" } diff --git a/sys-fs/evms/files/2.5.5/disk_cache.patch b/sys-fs/evms/files/2.5.5/disk_cache.patch new file mode 100644 index 000000000000..c6433c1b6bfc --- /dev/null +++ b/sys-fs/evms/files/2.5.5/disk_cache.patch @@ -0,0 +1,106 @@ +The local disk cache uses the address of an object as the identification for a +cached entry. However, the addresses are not unique (in some cases). In our +tests, the cache returned wrong data and caused serious problems. + +I changed the code to use the device major/minor number to identify cache +entries. + +"Changju Gao" <CGAO@novell.com> + +--- evms-2.5.5/plugins/disk/cache.c 2003-08-27 13:18:45.000000000 -0600 ++++ evms-2.5.5/plugins/disk/cache.c 2007-06-06 09:52:48.000000000 -0600 +@@ -49,7 +49,8 @@ + * Structure to hold information about a cache + ***/ + typedef struct cache_entry_s { +- storage_object_t * disk; ++ u_int32_t dev_major; ++ u_int32_t dev_minor; + lsn_t sector; + sector_count_t count; + void * buffer; +@@ -180,7 +181,8 @@ + + cache_entry = hash_entry->next; + while (cache_entry != hash_entry && +- (cache_entry->disk != disk || ++ (cache_entry->dev_major != disk->dev_major || ++ cache_entry->dev_minor != disk->dev_minor || + cache_entry->sector != sector || + cache_entry->count < count)) { + cache_entry = cache_entry->next; +@@ -191,8 +193,8 @@ + goto out; + } + +- LOG_DEBUG("Read from cache. disk %s, sector %"PRIu64", count %"PRIu64".\n", +- disk->name, sector, count); ++ LOG_DEBUG("Read from cache. disk %s (%d:%d), sector %"PRIu64", count %"PRIu64".\n", ++ disk->name, disk->dev_major, disk->dev_minor, sector, count); + memcpy(buffer, cache_entry->buffer, count << EVMS_VSECTOR_SIZE_SHIFT); + cache_hit_count++; + rc = 0; +@@ -228,7 +230,8 @@ + + cache_entry = hash_entry->next; + while (cache_entry != hash_entry && +- (cache_entry->disk != disk || ++ (cache_entry->dev_major != disk->dev_major || ++ cache_entry->dev_minor != disk->dev_minor || + cache_entry->sector != sector)) { + cache_entry = cache_entry->next; + } +@@ -236,14 +239,14 @@ + if (cache_entry != hash_entry) { + /* Found a cache entry. */ + if (cache_entry->count >= count) { +- LOG_DEBUG("Cache entry already exists for disk %s, sector %"PRIu64".\n", +- disk->name, sector); ++ LOG_DEBUG("Cache entry already exists for disk %s (%d:%d), sector %"PRIu64".\n", ++ disk->name, disk->dev_major, disk->dev_minor, sector); + rc = EEXIST; + goto out; + } + +- LOG_DEBUG("Cache entry for disk %s, sector %"PRIu64" is too small.\n", +- disk->name, sector); ++ LOG_DEBUG("Cache entry for disk %s (%d:%d) sector %"PRIu64" is too small.\n", ++ disk->name, disk->dev_major, disk->dev_minor, sector); + LOG_DEBUG(" Has %"PRIu64" sectors; need %"PRIu64" sectors.\n", + cache_entry->count, count); + free(cache_entry->buffer); +@@ -251,8 +254,8 @@ + cache_entry->count = 0; + } else { + /* Need a new cache entry. */ +- LOG_DEBUG("Create a new cache entry for disk %s, sector %"PRIu64", count %"PRIu64".\n", +- disk->name, sector, count); ++ LOG_DEBUG("Create a new cache entry for disk %s (%d:%d), sector %"PRIu64", count %"PRIu64".\n", ++ disk->name, disk->dev_major, disk->dev_minor, sector, count); + cache_entry = calloc(1, sizeof(cache_entry_t)); + if (!cache_entry) { + LOG_SERIOUS("Could not allocate memory for a new cache entry.\n"); +@@ -260,17 +263,18 @@ + goto out; + } + +- cache_entry->disk = disk; ++ cache_entry->dev_major = disk->dev_major; ++ cache_entry->dev_minor = disk->dev_minor; + cache_entry->sector = sector; + } + + if (cache_entry->buffer == NULL) { +- LOG_DEBUG("Allocate a new buffer for the cache entry for disk %s, sector %"PRIu64", count %"PRIu64".\n", +- disk->name, sector, count); ++ LOG_DEBUG("Allocate a new buffer for the cache entry for disk %s (%d:%d), sector %"PRIu64", count %"PRIu64".\n", ++ disk->name, disk->dev_major, disk->dev_minor, sector, count); + cache_entry->buffer = malloc(count << EVMS_VSECTOR_SIZE_SHIFT); + if (!cache_entry->buffer) { +- LOG_SERIOUS("Could not allocate memory for a buffer for a cache entry for disk %s, sector %"PRIu64", count %"PRIu64".\n", +- disk->name, sector, count); ++ LOG_SERIOUS("Could not allocate memory for a buffer for a cache entry for disk %s (%d:%d), sector %"PRIu64", count %"PRIu64".\n", ++ disk->name, disk->dev_major, disk->dev_minor, sector, count); + if (cache_entry->prev) { + list_delete(cache_entry); + } diff --git a/sys-fs/evms/files/digest-evms-2.5.5-r4 b/sys-fs/evms/files/digest-evms-2.5.5-r4 deleted file mode 100644 index 33b12c6760ce..000000000000 --- a/sys-fs/evms/files/digest-evms-2.5.5-r4 +++ /dev/null @@ -1,3 +0,0 @@ -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/digest-evms-2.5.5-r1 b/sys-fs/evms/files/digest-evms-2.5.5-r6 index 33b12c6760ce..33b12c6760ce 100644 --- a/sys-fs/evms/files/digest-evms-2.5.5-r1 +++ b/sys-fs/evms/files/digest-evms-2.5.5-r6 |