diff options
Diffstat (limited to 'sys-fs/raidtools')
-rw-r--r-- | sys-fs/raidtools/ChangeLog | 8 | ||||
-rw-r--r-- | sys-fs/raidtools/files/digest-raidtools-1.00.3-r4 | 1 | ||||
-rwxr-xr-x | sys-fs/raidtools/files/raid-start.sh | 40 | ||||
-rw-r--r-- | sys-fs/raidtools/raidtools-1.00.3-r4.ebuild | 62 |
4 files changed, 110 insertions, 1 deletions
diff --git a/sys-fs/raidtools/ChangeLog b/sys-fs/raidtools/ChangeLog index f5aab4e689e0..9c388647b288 100644 --- a/sys-fs/raidtools/ChangeLog +++ b/sys-fs/raidtools/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-fs/raidtools # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.17 2005/02/25 00:08:32 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.18 2005/03/02 04:29:58 vapier Exp $ + +*raidtools-1.00.3-r4 (01 Mar 2005) + + 01 Mar 2005; Mike Frysinger <vapier@gentoo.org> +files/raid-start.sh, + +raidtools-1.00.3-r4.ebuild: + Move raid stuff to raid packages. 25 Feb 2005; <plasmaroo@gentoo.org> files/raidtools-1.00.3-2.6.Headers.patch: diff --git a/sys-fs/raidtools/files/digest-raidtools-1.00.3-r4 b/sys-fs/raidtools/files/digest-raidtools-1.00.3-r4 new file mode 100644 index 000000000000..8b9f5451a2c5 --- /dev/null +++ b/sys-fs/raidtools/files/digest-raidtools-1.00.3-r4 @@ -0,0 +1 @@ +MD5 cb41f8093cd7381ee07adb2951cc53fa raidtools-1.00.3.tar.gz 167779 diff --git a/sys-fs/raidtools/files/raid-start.sh b/sys-fs/raidtools/files/raid-start.sh new file mode 100755 index 000000000000..c95708b387b2 --- /dev/null +++ b/sys-fs/raidtools/files/raid-start.sh @@ -0,0 +1,40 @@ +# /lib/rcscripts/addons/raid-start.sh: Setup raid volumes at boot +# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/files/raid-start.sh,v 1.1 2005/03/02 04:29:58 vapier Exp $ + +[[ -f /proc/mdstat ]] || exit 0 + +# We could make this dynamic, but eh +#[[ -z ${MAJOR} ]] && export MAJOR=$(awk '$2 == "md" { print $1 }' /proc/devices) +MAJOR=9 + +# Try to make sure the devices exist before we use them +create_devs() { + local d + for d in $@ ; do + d=${d/\/dev\/} + [[ -e /dev/${d} ]] && continue + mknod /dev/${d} b ${MAJOR} ${d##*md} >& /dev/null + done +} + +# Start software raid with raidtools (old school) +if [[ -x /sbin/raidstart && -f /etc/raidtab ]] ; then + create_devs $(awk '/^[[:space:]]*raiddev/ { print $2 }' /etc/raidtab) + ebegin "Starting up RAID devices (raidtools)" + output=$(raidstart -a 2>&1) + ret=$? + [[ ${ret} -ne 0 ]] && echo "${output}" + eend ${ret} +fi + +# Start software raid with mdadm (new school) +if [[ -x /sbin/mdadm && -f /etc/mdadm.conf ]] ; then + create_devs $(awk '/^[[:space:]]*ARRAY/ { print $2 }' /etc/mdadm.conf) + ebegin "Starting up RAID devices (mdadm)" + output=$(mdadm -As 2>&1) + ret=$? + [[ ${ret} -ne 0 ]] && echo "${output}" + eend ${ret} +fi + +# vim:ts=4 diff --git a/sys-fs/raidtools/raidtools-1.00.3-r4.ebuild b/sys-fs/raidtools/raidtools-1.00.3-r4.ebuild new file mode 100644 index 000000000000..101e1e0674aa --- /dev/null +++ b/sys-fs/raidtools/raidtools-1.00.3-r4.ebuild @@ -0,0 +1,62 @@ +# 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-r4.ebuild,v 1.1 2005/03/02 04:29:58 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 + exeinto /$(get_libdir)/rcscripts/addons + doexe "${FILESDIR}"/raid-start.sh || die "addon failed" + + if ! use build ; then + exeinto /etc/cron.daily + newexe "${FILESDIR}"/raidtools.cron raidtools + + 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 +} |