summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-02-12 02:08:22 +0000
committerMike Frysinger <vapier@gentoo.org>2005-02-12 02:08:22 +0000
commitf42966d011d57ffa1a39c271bf849c5983e4c604 (patch)
tree042a332e76c94f5c16084ad404762bfe7869f336 /sys-fs/raidtools
parentold (diff)
downloadhistorical-f42966d011d57ffa1a39c271bf849c5983e4c604.tar.gz
historical-f42966d011d57ffa1a39c271bf849c5983e4c604.tar.bz2
historical-f42966d011d57ffa1a39c271bf849c5983e4c604.zip
Add misc patches from Fedora, including one to fix #46847 by Vlastimil Holer. Do not generate device nodes since there is no point and it makes selinux angry #73928 by Bryan Stine. Clean up the ebuild in general and change the -fPIC filter to a proper PIC patch.
Package-Manager: portage-2.0.51-r15
Diffstat (limited to 'sys-fs/raidtools')
-rw-r--r--sys-fs/raidtools/ChangeLog16
-rw-r--r--sys-fs/raidtools/Manifest14
-rw-r--r--sys-fs/raidtools/files/digest-raidtools-1.00.3-r31
-rw-r--r--sys-fs/raidtools/files/raidtools-1.00.3-PIC.patch23
-rw-r--r--sys-fs/raidtools/files/raidtools-1.00.3-gcc33.patch59
-rw-r--r--sys-fs/raidtools/files/raidtools-1.00.3-mkraid.patch15
-rw-r--r--sys-fs/raidtools/files/raidtools-1.00.3-raidstop.patch114
-rw-r--r--sys-fs/raidtools/files/raidtools-1.00.3-s390x.patch41
-rw-r--r--sys-fs/raidtools/raidtools-1.00.3-r3.ebuild57
9 files changed, 332 insertions, 8 deletions
diff --git a/sys-fs/raidtools/ChangeLog b/sys-fs/raidtools/ChangeLog
index e69615e56a84..0819eed1c5b8 100644
--- a/sys-fs/raidtools/ChangeLog
+++ b/sys-fs/raidtools/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sys-fs/raidtools
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.14 2004/09/06 15:56:39 dsd Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.15 2005/02/12 02:08:22 vapier Exp $
+
+*raidtools-1.00.3-r3 (11 Feb 2005)
+
+ 11 Feb 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/raidtools-1.00.3-PIC.patch, +files/raidtools-1.00.3-gcc33.patch,
+ +files/raidtools-1.00.3-mkraid.patch,
+ +files/raidtools-1.00.3-raidstop.patch,
+ +files/raidtools-1.00.3-s390x.patch, +raidtools-1.00.3-r3.ebuild:
+ Add misc patches from Fedora, including one to fix #46847 by Vlastimil
+ Holer. Do not generate device nodes since there is no point and it makes
+ selinux angry #73928 by Bryan Stine. Clean up the ebuild in general and
+ change the -fPIC filter to a proper PIC patch.
06 Sep 2004; Daniel Drake <dsd@gentoo.org> raidtools-1.00.3-r1.ebuild,
raidtools-1.00.3-r2.ebuild:
diff --git a/sys-fs/raidtools/Manifest b/sys-fs/raidtools/Manifest
index b2d19581e467..cfce37870eb2 100644
--- a/sys-fs/raidtools/Manifest
+++ b/sys-fs/raidtools/Manifest
@@ -1,8 +1,10 @@
-MD5 85785dca913882fb12a68bb05191e3ca raidtools-0.90-r2.ebuild 1207
-MD5 2f6b8df3bf0f01fa51a9381a1998b6bd raidtools-1.00.3-r2.ebuild 1320
-MD5 f57da54b51961dfb6b3c18733497615a ChangeLog 3910
+MD5 767ad0f69ea7a28cef34f244b80db28a ChangeLog 4495
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
-MD5 54b6277ec8d8f24e23ece051ea2e8680 files/digest-raidtools-1.00.3-r2 68
-MD5 b71f5a7d7befa267454ef03173daedfe files/digest-raidtools-0.90-r2 85
-MD5 9193117eae2cca6725886db3d163e227 files/mkraid.c-gcc33.patch 3042
+MD5 45940ef3e4a7797709763c379482a320 raidtools-1.00.3-r3.ebuild 1587
+MD5 0fa91a341c38be56295db45f2a73aade files/raidtools-1.00.3-gcc33.patch 3044
+MD5 effa29906fa5b9b7755ac3f16442c07f files/raidtools-1.00.3-raidstop.patch 2921
MD5 05f0f7c14b2e15209d13826cfd9bbcd6 files/raidtools-1.00.3-2.6.Headers.patch 939
+MD5 1ed9388ea5a0f44ceea181fc7ffa2552 files/raidtools-1.00.3-s390x.patch 1515
+MD5 54b6277ec8d8f24e23ece051ea2e8680 files/digest-raidtools-1.00.3-r3 68
+MD5 402cd2a18b3b385d4af9458ba862607b files/raidtools-1.00.3-mkraid.patch 578
+MD5 ff1baef0dbbc5cd525aa9c13014242ea files/raidtools-1.00.3-PIC.patch 726
diff --git a/sys-fs/raidtools/files/digest-raidtools-1.00.3-r3 b/sys-fs/raidtools/files/digest-raidtools-1.00.3-r3
new file mode 100644
index 000000000000..8b9f5451a2c5
--- /dev/null
+++ b/sys-fs/raidtools/files/digest-raidtools-1.00.3-r3
@@ -0,0 +1 @@
+MD5 cb41f8093cd7381ee07adb2951cc53fa raidtools-1.00.3.tar.gz 167779
diff --git a/sys-fs/raidtools/files/raidtools-1.00.3-PIC.patch b/sys-fs/raidtools/files/raidtools-1.00.3-PIC.patch
new file mode 100644
index 000000000000..756ff21a4049
--- /dev/null
+++ b/sys-fs/raidtools/files/raidtools-1.00.3-PIC.patch
@@ -0,0 +1,23 @@
+Fix building with -fPIC
+http://bugs.gentoo.org/show_bug.cgi?id=34712
+
+--- raidtools-1.00.3/raid_io.c
++++ raidtools-1.00.3/raid_io.c
+@@ -81,7 +81,7 @@
+ }
+ #undef F
+
+-#if !(defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__))
++#if !(defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__PIC__))
+ # ifndef __NR__llseek
+ # ifdef __sparc__
+ # define __NR__llseek 236
+@@ -105,7 +105,7 @@
+ long long result;
+ int retval;
+
+-#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__)
++#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__PIC__)
+ return lseek(fd, offset, SEEK_SET);
+ #else
+ retval = _llseek (fd, ((unsigned long long) offset) >> 32,
diff --git a/sys-fs/raidtools/files/raidtools-1.00.3-gcc33.patch b/sys-fs/raidtools/files/raidtools-1.00.3-gcc33.patch
new file mode 100644
index 000000000000..d8a78901dfda
--- /dev/null
+++ b/sys-fs/raidtools/files/raidtools-1.00.3-gcc33.patch
@@ -0,0 +1,59 @@
+--- raidtools-1.00.3/mkraid.c.gcc33 2003-05-22 15:59:57.000000000 -0400
++++ raidtools-1.00.3/mkraid.c 2003-05-22 16:00:38.000000000 -0400
+@@ -171,31 +171,31 @@
+ if (old_force_flag && (func == mkraid)) {
+ fprintf(stderr,
+
+-"
+- WARNING!
+-
+- NOTE: if you are recovering a double-disk error or some other failure mode
+- that made your array unrunnable but data is still intact then it's strongly
+- recommended to use the lsraid utility and to read the lsraid HOWTO.
+-
+- If your RAID array holds useful and not yet backed up data then --force
+- and the hot-add/hot-remove functionality should be used with extreme care!
+- If your /etc/raidtab file is not in sync with the real array configuration,
+- then --force might DESTROY ALL YOUR DATA. It's especially dangerous to use
+- -f if the array is in degraded mode.
+-
+- If your /etc/raidtab file matches the real layout of on-disk data then
+- recreating the array will not hurt your data, but be aware of the risks
+- of doing this anyway: freshly created RAID1 and RAID5 arrays do a full
+- resync of their mirror/parity blocks, which, if the raidtab is incorrect,
+- the resync will wipe out data irrecoverably. Also, if your array is in
+- degraded mode then the raidtab must match the degraded config exactly,
+- otherwise you'll get the same kind of data destruction during resync.
+- (see the failed-disk raidtab option.) You have been warned!
+-
+- [ If your array holds no data, or you have it all backed up, or if you
+- know precisely what you are doing and you still want to proceed then use
+- the --really-force (or -R) flag. ]
++"\n\
++ WARNING!\n\
++\n\
++ NOTE: if you are recovering a double-disk error or some other failure mode\n\
++ that made your array unrunnable but data is still intact then it's strongly\n\
++ recommended to use the lsraid utility and to read the lsraid HOWTO.\n\
++\n\
++ If your RAID array holds useful and not yet backed up data then --force\n\
++ and the hot-add/hot-remove functionality should be used with extreme care!\n\
++ If your /etc/raidtab file is not in sync with the real array configuration,\n\
++ then --force might DESTROY ALL YOUR DATA. It's especially dangerous to use\n\
++ -f if the array is in degraded mode.\n\
++\n\
++ If your /etc/raidtab file matches the real layout of on-disk data then\n\
++ recreating the array will not hurt your data, but be aware of the risks\n\
++ of doing this anyway: freshly created RAID1 and RAID5 arrays do a full\n\
++ resync of their mirror/parity blocks, which, if the raidtab is incorrect,\n\
++ the resync will wipe out data irrecoverably. Also, if your array is in\n\
++ degraded mode then the raidtab must match the degraded config exactly,\n\
++ otherwise you'll get the same kind of data destruction during resync.\n\
++ (see the failed-disk raidtab option.) You have been warned!\n\
++\n\
++ [ If your array holds no data, or you have it all backed up, or if you\n\
++ know precisely what you are doing and you still want to proceed then use\n\
++ the --really-force (or -R) flag. ]\n\
+ ");
+ return EXIT_FAILURE;
+ }
diff --git a/sys-fs/raidtools/files/raidtools-1.00.3-mkraid.patch b/sys-fs/raidtools/files/raidtools-1.00.3-mkraid.patch
new file mode 100644
index 000000000000..f3391b936a69
--- /dev/null
+++ b/sys-fs/raidtools/files/raidtools-1.00.3-mkraid.patch
@@ -0,0 +1,15 @@
+ripped from Fedora
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=73365
+http://bugs.gentoo.org/show_bug.cgi?id=46847
+
+--- raidtools-1.00.3/mkraid.c.cfg 2003-08-22 18:47:10.000000000 -0400
++++ raidtools-1.00.3/mkraid.c 2003-08-22 18:47:31.000000000 -0400
+@@ -244,7 +244,7 @@
+ while (*args) {
+ for (p = cfg_head; p; p = p->next) {
+ if (strcmp(p->md_name, *args)) continue;
+- if (check_active(cfg))
++ if (check_active(p))
+ goto abort;
+ if (force_flag) {
+ fprintf(stderr, "DESTROYING the contents of %s in 5 seconds, Ctrl-C if unsure!\n", *args);
diff --git a/sys-fs/raidtools/files/raidtools-1.00.3-raidstop.patch b/sys-fs/raidtools/files/raidtools-1.00.3-raidstop.patch
new file mode 100644
index 000000000000..423e261c5e86
--- /dev/null
+++ b/sys-fs/raidtools/files/raidtools-1.00.3-raidstop.patch
@@ -0,0 +1,114 @@
+Index: raidstart.c
+===================================================================
+RCS file: /cvs/devel/raidtools/raidstart.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- raidtools-1.00.3/raidstart.c 23 Mar 2002 16:27:05 -0000 1.2
++++ raidtools-1.00.3/raidstart.c 23 May 2003 00:38:27 -0000 1.3
+@@ -96,34 +96,9 @@
+ return (EXIT_VERSION);
+ }
+
+- fp = fopen(configFile, "r");
+- if (fp == NULL) {
+- fprintf(stderr, "Couldn't open %s -- %s\n", configFile, strerror(errno));
+- exit(EXIT_FAILURE);
+- }
+-
+ if (prepare_raidlib())
+ return EXIT_FAILURE;
+
+- if (readwrite) {
+- int fd;
+- if (func != raidstart) {
+- fprintf(stderr, "Can do --readwrite only with raidstart!\n");
+- return EXIT_FAILURE;
+- }
+- args = (char **)poptGetArgs(optCon);
+- if (!args) {
+- usage(namestart);
+- exit(EXIT_FAILURE);
+- }
+-
+- fd = open_or_die(*args);
+-
+- if (do_raidstart_rw (fd, *args))
+- exit(EXIT_FAILURE);
+- exit(0);
+- }
+-
+ if (readonly) {
+ if (func != raidstop) {
+ fprintf(stderr, "Can do --readonly only with raidstop!\n");
+@@ -137,8 +112,60 @@
+ * without parsing the config
+ */
+ if ((func == raidstop) || (func == raidstop_ro)) {
+- int fd;
++ if (!all) {
++ int fd;
++
++ args = (char **)poptGetArgs(optCon);
++ if (!args) {
++ usage(namestart);
++ exit(EXIT_FAILURE);
++ }
++
++ fd = open_or_die(*args);
++
++ if (do_raidstop (fd, *args, func == raidstop ? 0:1))
++ exit(EXIT_FAILURE);
++ exit(0);
++ } else {
++ char buf[16], *md_dev;
++ int md_num, fd;
++
++ md_dev = &buf[0];
++ /* scan all possible md devs we have on our one major */
++ for(md_num = 0; md_num < 256; md_num++) {
++ sprintf(md_dev, "/dev/md%d", md_num);
++ fd = open(md_dev, O_RDWR);
++ if (fd != -1) {
++ struct stat s;
++ mdu_array_info_t info;
++
++ fstat (fd, &s);
++ if (major (s.st_rdev) != MD_MAJOR ||
++ ioctl(fd, GET_ARRAY_INFO, &info) != 0) {
++ close (fd);
++ continue;
++ }
++
++ if (do_raidstop (fd, md_dev, func == raidstop ? 0:1) == 0)
++ fprintf (stderr, "%s: successfully stopped.\n", md_dev);
++ close (fd);
++ }
++ }
++ }
++ }
++
++ fp = fopen(configFile, "r");
++ if (fp == NULL) {
++ fprintf(stderr, "Couldn't open %s -- %s\n", configFile, strerror(errno));
++ exit(EXIT_FAILURE);
++ }
+
++ if (readwrite) {
++ int fd;
++ if (func != raidstart) {
++ fprintf(stderr, "Can do --readwrite only with raidstart!\n");
++ return EXIT_FAILURE;
++ }
+ args = (char **)poptGetArgs(optCon);
+ if (!args) {
+ usage(namestart);
+@@ -147,7 +174,7 @@
+
+ fd = open_or_die(*args);
+
+- if (do_raidstop (fd, *args, func == raidstop ? 0:1))
++ if (do_raidstart_rw (fd, *args))
+ exit(EXIT_FAILURE);
+ exit(0);
+ }
diff --git a/sys-fs/raidtools/files/raidtools-1.00.3-s390x.patch b/sys-fs/raidtools/files/raidtools-1.00.3-s390x.patch
new file mode 100644
index 000000000000..b3a17c93e9ce
--- /dev/null
+++ b/sys-fs/raidtools/files/raidtools-1.00.3-s390x.patch
@@ -0,0 +1,41 @@
+ripped from Fedora.
+
+cvs log: Fixed s390x BLKGETSIZE problem.
+
+--- raidtools-1.00.3/raid_io.c.s390x 2002-12-11 18:35:14.000000000 +0100
++++ raidtools-1.00.3/raid_io.c 2003-03-25 15:18:50.000000000 +0100
+@@ -363,7 +363,7 @@
+ md_raid_info_t *array;
+ mdu_disk_info_t *disk;
+ struct stat stat_buf;
+- __u32 nr_blocks;
++ unsigned long nr_blocks;
+
+ if (!cfg)
+ return 1;
+@@ -454,14 +454,14 @@
+ }
+ nr_blocks >>= 1;
+ if (nr_blocks < MD_RESERVED_BLOCKS * 2) {
+- fprintf(stderr, "%s: device too small (%dkB)\n", cfg->device_name[i], nr_blocks);
++ fprintf(stderr, "%s: device too small (%ldkB)\n", cfg->device_name[i], nr_blocks);
+ close(fd);
+ return 1;
+ }
+
+ cfg->sb_block_offset[i] = MD_NEW_SIZE_BLOCKS(nr_blocks);
+ if (!cfg->array.param.not_persistent) {
+- printf("disk %d: %s, %ukB, raid superblock at %dkB\n", i, cfg->device_name[i], nr_blocks, cfg->sb_block_offset[i]);
++ printf("disk %d: %s, %lukB, raid superblock at %dkB\n", i, cfg->device_name[i], nr_blocks, cfg->sb_block_offset[i]);
+ if (sanity_checks(cfg->device_name[i], fd,
+ cfg->sb_block_offset[i], forceSanity,
+ upgradeArray, cfg, 0)) {
+@@ -495,7 +495,7 @@
+ }
+ nr_blocks >>= 1;
+ if (nr_blocks < MD_RESERVED_BLOCKS * 2) {
+- fprintf(stderr, "%s: device too small (%dkB)\n", cfg->device_name[i], nr_blocks);
++ fprintf(stderr, "%s: device too small (%ldkB)\n", cfg->device_name[i], nr_blocks);
+ close(fd);
+ return 1;
+ }
diff --git a/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild b/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild
new file mode 100644
index 000000000000..3ca17edfbd07
--- /dev/null
+++ b/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/raidtools-1.00.3-r3.ebuild,v 1.1 2005/02/12 02:08:22 vapier Exp $
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Linux RAID 0/1/4/5 utilities"
+HOMEPAGE="http://people.redhat.com/mingo/raidtools/"
+SRC_URI="http://people.redhat.com/mingo/raidtools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
+IUSE="build"
+
+RDEPEND="virtual/libc
+ dev-libs/popt"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-gcc33.patch
+ epatch "${FILESDIR}"/${P}-2.6.Headers.patch
+ epatch "${FILESDIR}"/${P}-mkraid.patch
+ epatch "${FILESDIR}"/${P}-s390x.patch
+ epatch "${FILESDIR}"/${P}-raidstop.patch
+ epatch "${FILESDIR}"/${P}-PIC.patch
+
+ # Buffer overflow fix
+ sed -i -e "/define MAX_LINE_LENGTH/s:100:1000:" common.h
+ # Don't create device nodes (pisses off selinux) #73928
+ sed -i \
+ -e '/^CFLAGS/s:-O2:@CFLAGS@:' \
+ -e "s:mknod:echo mknod means MonKey NOD:" \
+ Makefile.in || die "sed Makefile.in failed"
+}
+
+src_compile() {
+ econf || die "configure failed"
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ make install ROOTDIR="${D}" || die
+
+ if ! use build ; then
+ doman *.8 *.5
+ dodoc README *raidtab raidreconf-HOWTO reconf.notes retry summary
+ dodoc Software-RAID.HOWTO/Software-RAID.HOWTO.txt
+ dohtml Software-RAID.HOWTO/Software-RAID.HOWTO.html
+ dohtml Software-RAID.HOWTO/Software-RAID.HOWTO.sgml
+ docinto config
+ dodoc *.sample
+ fi
+}