summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2007-01-23 20:37:06 +0000
committerTiziano Müller <dev-zero@gentoo.org>2007-01-23 20:37:06 +0000
commit3f7678c3870bbdfb6e82dd7d95417fb8d77e5b92 (patch)
tree08e74932ada2d58b73bf8d7073c13ceae90bb4ab /sys-fs
parentStable on ppc wrt bug 154198 (diff)
downloadhistorical-3f7678c3870bbdfb6e82dd7d95417fb8d77e5b92.tar.gz
historical-3f7678c3870bbdfb6e82dd7d95417fb8d77e5b92.tar.bz2
historical-3f7678c3870bbdfb6e82dd7d95417fb8d77e5b92.zip
Added src_test(). Added patch from Debian to set group for /dev/evms/* to disk, bug #159358
Package-Manager: portage-2.1.2-r1
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/evms/ChangeLog12
-rw-r--r--sys-fs/evms/Manifest27
-rw-r--r--sys-fs/evms/evms-2.5.5-r4.ebuild43
-rw-r--r--sys-fs/evms/evms-2.5.5-r5.ebuild152
-rw-r--r--sys-fs/evms/files/digest-evms-2.5.5-r53
-rw-r--r--sys-fs/evms/files/evms-2.5.5-use_disk_group.patch48
6 files changed, 273 insertions, 12 deletions
diff --git a/sys-fs/evms/ChangeLog b/sys-fs/evms/ChangeLog
index 61e269d41ec4..94883f7499eb 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.57 2006/12/09 09:09:17 dev-zero Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/evms/ChangeLog,v 1.58 2007/01/23 20:37:06 dev-zero Exp $
+
+*evms-2.5.5-r5 (23 Jan 2007)
+
+ 23 Jan 2007; Tiziano Müller <dev-zero@gentoo.org>
+ +files/evms-2.5.5-use_disk_group.patch, evms-2.5.5-r4.ebuild,
+ +evms-2.5.5-r5.ebuild:
+ Added src_test(). Added patch from Debian to set group for /dev/evms/* to
+ disk, bug #159358
09 Dec 2006; Tiziano Müller <dev-zero@gentoo.org> ChangeLog:
Corrected dependencies to fix #157497, thanks to Gour.
diff --git a/sys-fs/evms/Manifest b/sys-fs/evms/Manifest
index 572d6789242c..b4bd3b55dfd7 100644
--- a/sys-fs/evms/Manifest
+++ b/sys-fs/evms/Manifest
@@ -50,6 +50,10 @@ AUX evms-2.5.5-ocfs2.patch 634 RMD160 03cffc2ca996ac64b93b020fd49f3e18232b1091 S
MD5 0b916cf6f5faaf97ed9dc149f1294382 files/evms-2.5.5-ocfs2.patch 634
RMD160 03cffc2ca996ac64b93b020fd49f3e18232b1091 files/evms-2.5.5-ocfs2.patch 634
SHA256 e69be9be13725811d49a40cdee9c6eea7d60cea94e62129ba830e5d205b4ad53 files/evms-2.5.5-ocfs2.patch 634
+AUX evms-2.5.5-use_disk_group.patch 1225 RMD160 7c69acdb48758c465429c56e4954214bbb0fed4e SHA1 2c05af9ac5108dc3aefe58257d3f3101f3039d64 SHA256 6ebd11a08a018a364f1155e9e961e421ecf8c96643b0253106fffe9ebf677184
+MD5 baad56a65d2426219e2cfba9daf1dae7 files/evms-2.5.5-use_disk_group.patch 1225
+RMD160 7c69acdb48758c465429c56e4954214bbb0fed4e files/evms-2.5.5-use_disk_group.patch 1225
+SHA256 6ebd11a08a018a364f1155e9e961e421ecf8c96643b0253106fffe9ebf677184 files/evms-2.5.5-use_disk_group.patch 1225
AUX evms2-start.sh 382 RMD160 a9dbd94b537ddcc9b0798cb904769b075e7d529a SHA1 0d84590bd35b9ef91d74eb55456f0b8e56079ed1 SHA256 ea36fbde78590067029405ab18b09106b083913688ea4863c2e63eece8e74021
MD5 5eb632aa94b0537e1983f935e3706d74 files/evms2-start.sh 382
RMD160 a9dbd94b537ddcc9b0798cb904769b075e7d529a files/evms2-start.sh 382
@@ -59,14 +63,18 @@ EBUILD evms-2.5.5-r1.ebuild 2527 RMD160 e2dcac6d5c5876512720a5b3ccdfee4ad1612fe3
MD5 65b8e5021b94072f3fd8176d84ae6660 evms-2.5.5-r1.ebuild 2527
RMD160 e2dcac6d5c5876512720a5b3ccdfee4ad1612fe3 evms-2.5.5-r1.ebuild 2527
SHA256 1a2da02d4f60befa28048583576801919835ef6c3169f35e5631850b6f7edd72 evms-2.5.5-r1.ebuild 2527
-EBUILD evms-2.5.5-r4.ebuild 3290 RMD160 0af1268e2ae12aa09c1e46b4cf946d378ea25f14 SHA1 019588f199a3815f0907d8c715a35100d7e3a6cc SHA256 eece88a3ccc548e9bdb63d9e17b031f7d3924b6b0e4ed2a31b8059ab80521224
-MD5 bb8b52d9c62df14db5928b42c13daf64 evms-2.5.5-r4.ebuild 3290
-RMD160 0af1268e2ae12aa09c1e46b4cf946d378ea25f14 evms-2.5.5-r4.ebuild 3290
-SHA256 eece88a3ccc548e9bdb63d9e17b031f7d3924b6b0e4ed2a31b8059ab80521224 evms-2.5.5-r4.ebuild 3290
-MISC ChangeLog 12508 RMD160 002b4639ee63a9ddc59575c9802cc8fc0a98e83f SHA1 bc19fd47bf846a6b2ff732a516322c4add54e30d SHA256 58933f4bec736c839f5fff91fd4f3f12d52487e9855fba28a33c45512fd53c65
-MD5 083e2190b68f035ee7f22400c94e3956 ChangeLog 12508
-RMD160 002b4639ee63a9ddc59575c9802cc8fc0a98e83f ChangeLog 12508
-SHA256 58933f4bec736c839f5fff91fd4f3f12d52487e9855fba28a33c45512fd53c65 ChangeLog 12508
+EBUILD evms-2.5.5-r4.ebuild 4812 RMD160 648297803367168adbee80619fa959e01ef92104 SHA1 46fdfdc00746ef2015e596710676dcfd4232a99e SHA256 fb2b4f7663d2ac134ac64a5c62dc339087c51e09057be73d6b297902a18a55e8
+MD5 2fc776d38e93c311d1a39ff2199b4217 evms-2.5.5-r4.ebuild 4812
+RMD160 648297803367168adbee80619fa959e01ef92104 evms-2.5.5-r4.ebuild 4812
+SHA256 fb2b4f7663d2ac134ac64a5c62dc339087c51e09057be73d6b297902a18a55e8 evms-2.5.5-r4.ebuild 4812
+EBUILD evms-2.5.5-r5.ebuild 4842 RMD160 68db78e1aa19807da385b55c2becf8977c165aeb SHA1 9254aecfa537ce7020a37e95424469a919b9ed7e SHA256 fbef529541f5d435613c999890b79e3592cca4ba11a51b55fbbe332c5a2f1317
+MD5 657982b6b998336376055ff5cdf8a86b evms-2.5.5-r5.ebuild 4842
+RMD160 68db78e1aa19807da385b55c2becf8977c165aeb evms-2.5.5-r5.ebuild 4842
+SHA256 fbef529541f5d435613c999890b79e3592cca4ba11a51b55fbbe332c5a2f1317 evms-2.5.5-r5.ebuild 4842
+MISC ChangeLog 12777 RMD160 76f718c97dd95a621d9d0a24bd990350b87db4c2 SHA1 bec18bcef456db367745fad01a36bc94094c09e9 SHA256 704ec3bb9f521825bcb1b1464e75ddea1502b8a74a87d746588ddd20d3c29c74
+MD5 7711925ac60a56e98faaca451ffeb05c ChangeLog 12777
+RMD160 76f718c97dd95a621d9d0a24bd990350b87db4c2 ChangeLog 12777
+SHA256 704ec3bb9f521825bcb1b1464e75ddea1502b8a74a87d746588ddd20d3c29c74 ChangeLog 12777
MISC metadata.xml 383 RMD160 92e091c63bb348228df89a66aa6c3fe2b65f0768 SHA1 23d81d62b6e49d0867ad90698ea3ac087b2a9d95 SHA256 6ce67f896d7a3aa021bbfbf18cbd43e096de9f64e59e7159e6efb2689f651e7b
MD5 515e2b0ddb7f8c4e6fad2c72fda19768 metadata.xml 383
RMD160 92e091c63bb348228df89a66aa6c3fe2b65f0768 metadata.xml 383
@@ -77,3 +85,6 @@ SHA256 3c7b17329fb2f3fb7c0f65550c2d12c958b315af49b88160b7b43f6538b80c3d files/di
MD5 83e877452227406dad19b93325f98ca2 files/digest-evms-2.5.5-r4 235
RMD160 8b33887302192148a7f141f6c96deb68ebcf31ef files/digest-evms-2.5.5-r4 235
SHA256 3c7b17329fb2f3fb7c0f65550c2d12c958b315af49b88160b7b43f6538b80c3d files/digest-evms-2.5.5-r4 235
+MD5 83e877452227406dad19b93325f98ca2 files/digest-evms-2.5.5-r5 235
+RMD160 8b33887302192148a7f141f6c96deb68ebcf31ef files/digest-evms-2.5.5-r5 235
+SHA256 3c7b17329fb2f3fb7c0f65550c2d12c958b315af49b88160b7b43f6538b80c3d files/digest-evms-2.5.5-r5 235
diff --git a/sys-fs/evms/evms-2.5.5-r4.ebuild b/sys-fs/evms/evms-2.5.5-r4.ebuild
index fff4b0b4017f..8725ad6fc049 100644
--- a/sys-fs/evms/evms-2.5.5-r4.ebuild
+++ b/sys-fs/evms/evms-2.5.5-r4.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# 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.2 2006/12/09 09:09:17 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/evms/evms-2.5.5-r4.ebuild,v 1.3 2007/01/23 20:37:06 dev-zero Exp $
WANT_AUTOMAKE="latest"
WANT_AUTOCONF="latest"
@@ -110,3 +110,42 @@ src_install() {
# Needed for bug #51252
dosym libevms-2.5.so.0.0 /$(get_libdir)/libevms-2.5.so.0
}
+
+src_test() {
+ if [[ -z ${EVMS_TEST_VOLUME} ]] ; then
+ eerror "This is a volume manager and it therefore needs a volume"
+ eerror "for testing. You have to define EVMS_TEST_VOLUME as"
+ eerror "a volume evms can operate on."
+ eerror "Example: export EVMS_TEST_VOLUME=sda"
+ eerror "Note: The volume-name can not be a symlink."
+ eerror "WARNING: EVMS WILL DESTROY EVERYTHING ON IT."
+ einfo "If you don't have an empty disk, you can use the loopback-device:"
+ einfo "- Create a large file using dd (this creates a 4GB file):"
+ 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 "The disk has to be at least 4GB!"
+ einfo "To deactivate the loop-device afterwards:"
+ einfo "- losetup -d /dev/loop0"
+ hasq userpriv ${FEATURES} && ewarn "These tests have to run as root. Disable userpriv!"
+ die "need test-volume"
+ fi
+
+ if hasq userpriv ${FEATURES} ; then
+ eerror "These tests need root privileges. Disable userpriv!"
+ die "userpriv is not supported"
+ fi
+
+ volume=$(readlink "/dev/${EVMS_TEST_VOLUME}")
+ einfo "Disabling sandbox for:"
+ einfo " - /dev/${volume:-${EVMS_TEST_VOLUME}}"
+ addwrite /dev/${volume:-${EVMS_TEST_VOLUME}}
+ einfo " - /dev/evms"
+ addwrite /dev/evms
+ einfo " - /var/lock/evms-engine"
+ addwrite /var/lock/evms-engine
+
+ cd "${S}/tests/suite"
+ PATH="${PATH}:/sbin:/${S}/tests" ./run_tests ${EVMS_TEST_VOLUME} || die "tests failed"
+}
diff --git a/sys-fs/evms/evms-2.5.5-r5.ebuild b/sys-fs/evms/evms-2.5.5-r5.ebuild
new file mode 100644
index 000000000000..ef0290a83cb0
--- /dev/null
+++ b/sys-fs/evms/evms-2.5.5-r5.ebuild
@@ -0,0 +1,152 @@
+# 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-r5.ebuild,v 1.1 2007/01/23 20:37:06 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="debug 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*
+ =dev-libs/glib-1* )
+ ncurses? ( sys-libs/ncurses
+ >=dev-libs/glib-2.12.4-r1 )"
+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}/${P}-as-needed.patch"
+ epatch "${FILESDIR}/${P}-glib_dep.patch"
+ epatch "${FILESDIR}/${P}-ocfs2.patch"
+ epatch "${FILESDIR}/${P}-use_disk_group.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"
+
+ # We have to link statically against glib because evmsn resides in /sbin
+ econf \
+ --libdir=/$(get_libdir) \
+ --sbindir=/sbin \
+ --includedir=/usr/include \
+ --with-static-glib \
+ $(use_with debug) \
+ $(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
+}
+
+src_test() {
+ if [[ -z ${EVMS_TEST_VOLUME} ]] ; then
+ eerror "This is a volume manager and it therefore needs a volume"
+ eerror "for testing. You have to define EVMS_TEST_VOLUME as"
+ eerror "a volume evms can operate on."
+ eerror "Example: export EVMS_TEST_VOLUME=sda"
+ eerror "Note: The volume-name can not be a symlink."
+ eerror "WARNING: EVMS WILL DESTROY EVERYTHING ON IT."
+ einfo "If you don't have an empty disk, you can use the loopback-device:"
+ einfo "- Create a large file using dd (this creates a 4GB file):"
+ 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 "The disk has to be at least 4GB!"
+ einfo "To deactivate the loop-device afterwards:"
+ einfo "- losetup -d /dev/loop0"
+ hasq userpriv ${FEATURES} && ewarn "These tests have to run as root. Disable userpriv!"
+ die "need test-volume"
+ fi
+
+ if hasq userpriv ${FEATURES} ; then
+ eerror "These tests need root privileges. Disable userpriv!"
+ die "userpriv is not supported"
+ fi
+
+ volume=$(readlink "/dev/${EVMS_TEST_VOLUME}")
+ einfo "Disabling sandbox for:"
+ einfo " - /dev/${volume:-${EVMS_TEST_VOLUME}}"
+ addwrite /dev/${volume:-${EVMS_TEST_VOLUME}}
+ einfo " - /dev/evms"
+ addwrite /dev/evms
+ einfo " - /var/lock/evms-engine"
+ addwrite /var/lock/evms-engine
+
+ cd "${S}/tests/suite"
+ PATH="${PATH}:/sbin:/${S}/tests" ./run_tests ${EVMS_TEST_VOLUME} || die "tests failed"
+}
diff --git a/sys-fs/evms/files/digest-evms-2.5.5-r5 b/sys-fs/evms/files/digest-evms-2.5.5-r5
new file mode 100644
index 000000000000..33b12c6760ce
--- /dev/null
+++ b/sys-fs/evms/files/digest-evms-2.5.5-r5
@@ -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-use_disk_group.patch b/sys-fs/evms/files/evms-2.5.5-use_disk_group.patch
new file mode 100644
index 000000000000..5130816f24f3
--- /dev/null
+++ b/sys-fs/evms/files/evms-2.5.5-use_disk_group.patch
@@ -0,0 +1,48 @@
+--- evms-2.5.5.orig/engine/discover.c
++++ evms-2.5.5/engine/discover.c
+@@ -28,6 +28,8 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
++#include <sys/types.h>
++#include <grp.h>
+
+ #include "fullengine.h"
+ #include "discover.h"
+@@ -162,9 +164,23 @@
+ int rc = 0;
+ dev_t devt = makedev(major, minor);
+ char dir_name[EVMS_OBJECT_NODE_PATH_LEN + EVMS_NAME_SIZE + 1];
++ struct group *disk;
+
+ LOG_PROC_ENTRY();
+
++ /*
++ * Debian-specific: We want all devices to be owned by the
++ * group disk, not root.
++ */
++ disk = getgrnam("disk");
++ if (disk) {
++ if (setegid(disk->gr_gid) != 0) {
++ LOG_WARNING("could not setegid to group disk (%s), continuing as group root\n", strerror(errno));
++ }
++ } else {
++ LOG_WARNING("could not find group disk (%s), continuing as group root\n", strerror(errno));
++ }
++
+ /* Make sure major:minor is valid. */
+ if (major != 0) {
+ switch (hasa_dev_node(name, major, minor)) {
+@@ -227,6 +243,12 @@
+ LOG_DEBUG("Device node %s is for major %d, minor %d.\n", name, major, minor);
+ }
+
++ if (disk) {
++ if (setegid(getgid()) != 0) {
++ LOG_WARNING("could not setegid back to old group (%s)\n", strerror(errno));
++ }
++ }
++
+ LOG_PROC_EXIT_INT(rc);
+ return rc;
+ }