mdadm 3.3.1

This commit is contained in:
AlmAck 2014-08-19 23:07:15 +02:00
parent 31cd6be47c
commit 59f03ab1a2
5 changed files with 24 additions and 69 deletions

View File

@ -1,21 +1,18 @@
#
# Core Packages for Chakra, part of chakra-project.org
# Core Packages for Chakra, part of chakrao.org
#
# maintainer abveritas@chakra-project.org
pkgname=mdadm
pkgver=3.2.5
pkgrel=2
pkgver=3.3.1
pkgrel=1
pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
arch=(i686 x86_64)
arch=(x86_64)
license=('GPL')
url="http://www.cse.unsw.edu.au/~neilb/source/mdadm/"
groups=('base')
conflicts=('mkinitcpio<0.7')
depends=('glibc')
backup=('etc/mdadm.conf')
source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2
mdadm
source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.xz
mdadm.conf
mdadm_install
mdadm_hook
@ -23,19 +20,22 @@ source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2
mdadm.service
disable-werror.patch)
replaces=('raidtools')
md5sums=('83ba4a6249ae24677e915e44c9cfcc58'
'8333d405f550317c2bacd5510bf1cb60'
'00cbed931db4f15b6ce49e3e7d433966'
md5sums=('4227d48de62dfb217c92fa0c54171bbe'
'5a37c112aa07dccdde62f9fa5b888607'
'6e1a3377e2ac33e9fb222ab38050c654'
'8e02ee595dfa4e5178ed8886e822cf3a'
'8450ebbae214e6def01e14b6727d8935'
'21086c200486a5d9f51a6b59fb1444d9'
'aafb5f9ac8437a284cbf948b9b13b179'
'4ad87b74a4bc9a34621280abe0e0c3e4')
'599745ed2bec4489e83991cff89c46ee')
prepare() {
cd $srcdir/$pkgname-$pkgver
patch -Np0 -i ../disable-werror.patch
}
build() {
cd $srcdir/$pkgname-$pkgver
patch -p0 -i ../disable-werror.patch
make CXFLAGS="$CFLAGS"
make CXFLAGS="$CFLAGS" UDEVDIR=/usr/lib/udev #BINDIR=/usr/bin
# build static mdassemble for initramfs
make MDASSEMBLE_AUTO=1 mdassemble
@ -43,18 +43,15 @@ build() {
package() {
cd $srcdir/$pkgname-$pkgver
make INSTALL=/usr/bin/install DESTDIR=$pkgdir install
make INSTALL=/usr/bin/install DESTDIR=$pkgdir UDEVDIR=/usr/lib/udev install
make SYSTEMD_DIR=$pkgdir/usr/lib/systemd/system install-systemd
install -D -m755 mdassemble $pkgdir/sbin/mdassemble
install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
install -D -m755 ../mdadm $pkgdir/etc/rc.d/mdadm
install -D -m644 ../mdadm_install $pkgdir/usr/lib/initcpio/install/mdadm
install -D -m644 ../mdadm_hook $pkgdir/usr/lib/initcpio/hooks/mdadm
install -D -m644 ../mdadm_udev_install $pkgdir/usr/lib/initcpio/install/mdadm_udev
# symlink for backward compatibility
ln -sf /usr/lib/initcpio/hooks/mdadm $pkgdir/usr/lib/initcpio/hooks/raid
# move /lib/* to /usr/lib/
mv $pkgdir/lib/udev $pkgdir/usr/lib/
rm -rf $pkgdir/lib
# systemd service file
install -D -m644 $srcdir/mdadm.service $pkgdir/usr/lib/systemd/system/mdadm.service
}

View File

@ -3,9 +3,9 @@
@@ -42,7 +42,7 @@
CC = $(CROSS_COMPILE)gcc
CXFLAGS = -ggdb
CXFLAGS ?= -ggdb
-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
+CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter
ifdef WARN_UNUSED
CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O
CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
endif

View File

@ -1,42 +0,0 @@
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
pidfile=/run/mdadm.pid
if [[ -r $pidfile ]]; then
read -r PID <"$pidfile"
if [[ $PID && ! -d /proc/$PID ]]; then
# stale pidfile
unset PID
rm -f "$pidfile"
fi
fi
case $1 in
start)
stat_busy "Starting mdadm RAID Monitor"
if [[ -z $PID ]] && mdadm --monitor --scan -i "$pidfile" -f; then
add_daemon mdadm
stat_done
else
stat_fail
fi
;;
stop)
stat_busy "Stopping mdadm RAID Monitor"
if [[ $PID ]] && kill "$PID" &>/dev/null; then
rm_daemon mdadm
stat_done
else
stat_fail
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac

View File

@ -59,8 +59,8 @@ DEVICE partitions
# When used in --follow (aka --monitor) mode, mdadm needs a
# mail address and/or a program. To start mdadm's monitor mode, add
# "mdadm" to your DAEMONS array in /etc/rc.conf
# mail address and/or a program. To start mdadm's monitor mode, enable
# mdadm.service in systemd.
#
# If the lines are not found, mdadm will exit quietly
#MAILADDR root@mydomain.tld

View File

@ -16,7 +16,7 @@ build() {
help() {
cat <<HELPEOF
This hook loads the necessary modules for a RAID array and uses incremental
assembly via udev at runtime to create the devices. This hook with NOT work
assembly via udev at runtime to create the devices. This hook will NOT work
without the udev hook included on the image.
HELPEOF
}