[arch-commits] Commit in mdadm/trunk (6 files)
Tobias Powalowski
tpowa at archlinux.org
Mon Mar 18 16:12:01 UTC 2019
Date: Monday, March 18, 2019 @ 16:12:00
Author: tpowa
Revision: 348591
upgpkg: mdadm 4.1-1
bump to latest version
Modified:
mdadm/trunk/PKGBUILD
Deleted:
mdadm/trunk/disable-werror.patch
mdadm/trunk/linux-3.0.patch
mdadm/trunk/mdadm-fix-udev-rules.patch
mdadm/trunk/mdadm_hook
mdadm/trunk/mdadm_install
----------------------------+
PKGBUILD | 33 ++--------
disable-werror.patch | 11 ---
linux-3.0.patch | 45 --------------
mdadm-fix-udev-rules.patch | 137 -------------------------------------------
mdadm_hook | 49 ---------------
mdadm_install | 46 --------------
6 files changed, 8 insertions(+), 313 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-03-18 15:49:27 UTC (rev 348590)
+++ PKGBUILD 2019-03-18 16:12:00 UTC (rev 348591)
@@ -1,43 +1,28 @@
# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
# Contributor: Judd Vinet <jvinet at zeroflux.org>
pkgname=mdadm
-pkgver=4.0
-pkgrel=2
+pkgver=4.1
+pkgrel=1
pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
arch=(x86_64)
license=('GPL')
-url="http://neil.brown.name/blog/mdadm"
+url="http://git.kernel.org/cgit/utils/mdadm"
groups=('base')
conflicts=('mkinitcpio<0.7')
depends=('glibc')
backup=('etc/mdadm.conf')
-source=("https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-4.0.tar."{xz,sign}
+source=("https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-4.1.tar."{xz,sign}
mdadm.conf
- mdadm_install
- mdadm_hook
- mdadm_udev_install
- disable-werror.patch)
+ mdadm_udev_install)
replaces=('raidtools')
validpgpkeys=('6A86B80E1D22F21D0B26BA75397D82E0531A9C91') # Jes Sorensen
-md5sums=('2cb4feffea9167ba71b5f346a0c0a40d'
+md5sums=('51bf3651bd73a06c413a2f964f299598'
'SKIP'
'5a37c112aa07dccdde62f9fa5b888607'
- 'af2f73f0094ebee66f503ca4710c7142'
- 'fbfb7d07efcbaf5dc61af424c5f6e352'
- 'b6b0bfd6487c99264578630616dfe5eb'
- '599745ed2bec4489e83991cff89c46ee')
-
-prepare() {
- cd $srcdir/$pkgname-$pkgver
- patch -Np0 -i ../disable-werror.patch
-}
-
+ 'b6b0bfd6487c99264578630616dfe5eb')
build() {
cd $srcdir/$pkgname-$pkgver
make CXFLAGS="$CFLAGS" BINDIR=/usr/bin UDEVDIR=/usr/lib/udev
- # build static mdassemble for Arch's initramfs
- make MDASSEMBLE_AUTO=1 mdassemble
-
}
package() {
@@ -44,9 +29,7 @@
cd $srcdir/$pkgname-$pkgver
make INSTALL=/usr/bin/install BINDIR=/usr/bin DESTDIR=$pkgdir UDEVDIR=/usr/lib/udev install
make SYSTEMD_DIR=$pkgdir/usr/lib/systemd/system install-systemd
- install -D -m755 mdassemble $pkgdir/usr/bin/mdassemble
install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
- 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
+ ln -s /usr/lib/initcpio/install/mdadm_udev $pkgdir/usr/lib/initcpio/install/mdadm
}
Deleted: disable-werror.patch
===================================================================
--- disable-werror.patch 2019-03-18 15:49:27 UTC (rev 348590)
+++ disable-werror.patch 2019-03-18 16:12:00 UTC (rev 348591)
@@ -1,11 +0,0 @@
---- Makefile.old 2011-06-17 09:38:03.269238332 +0200
-+++ Makefile 2011-06-17 09:38:14.122398837 +0200
-@@ -42,7 +42,7 @@
-
- CC = $(CROSS_COMPILE)gcc
- 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 -O3
- endif
Deleted: linux-3.0.patch
===================================================================
--- linux-3.0.patch 2019-03-18 15:49:27 UTC (rev 348590)
+++ linux-3.0.patch 2019-03-18 16:12:00 UTC (rev 348591)
@@ -1,45 +0,0 @@
-From f161d047eed634b3380262767f955eb888502e88 Mon Sep 17 00:00:00 2001
-From: NeilBrown <neilb at suse.de>
-Date: Fri, 17 Jun 2011 22:49:24 +1000
-Subject: [PATCH 1/1] util: correctly parse shorter linux version numbers.
-
-The next version of Linux might be 3.0. If it is, get_linux_version
-will fail.
-So make it more robust.
-
-Reported-by: Namhyung Kim <namhyung at gmail.com>
-Reported-by: Milan Broz <mbroz at redhat.com>
-Signed-off-by: NeilBrown <neilb at suse.de>
----
- util.c | 10 +++++-----
- 1 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/util.c b/util.c
-index 10bbe56..55d171a 100644
---- a/util.c
-+++ b/util.c
-@@ -146,16 +146,16 @@ int get_linux_version()
- {
- struct utsname name;
- char *cp;
-- int a,b,c;
-+ int a = 0, b = 0,c = 0;
- if (uname(&name) <0)
- return -1;
-
- cp = name.release;
- a = strtoul(cp, &cp, 10);
-- if (*cp != '.') return -1;
-- b = strtoul(cp+1, &cp, 10);
-- if (*cp != '.') return -1;
-- c = strtoul(cp+1, NULL, 10);
-+ if (*cp == '.')
-+ b = strtoul(cp+1, &cp, 10);
-+ if (*cp == '.')
-+ c = strtoul(cp+1, &cp, 10);
-
- return (a*1000000)+(b*1000)+c;
- }
---
-1.7.2.3
-
Deleted: mdadm-fix-udev-rules.patch
===================================================================
--- mdadm-fix-udev-rules.patch 2019-03-18 15:49:27 UTC (rev 348590)
+++ mdadm-fix-udev-rules.patch 2019-03-18 16:12:00 UTC (rev 348591)
@@ -1,137 +0,0 @@
-diff --git a/Makefile b/Makefile
-index b6edb23..bedef96 100644
---- a/Makefile
-+++ b/Makefile
-@@ -253,8 +253,9 @@
- $(INSTALL) -D -m 644 md.4 $(DESTDIR)$(MAN4DIR)/md.4
- $(INSTALL) -D -m 644 mdadm.conf.5 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5
-
--install-udev: udev-md-raid.rules
-- $(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)/lib/udev/rules.d/64-md-raid.rules
-+install-udev: udev-md-raid-arrays.rules udev-md-raid-assembly.rules
-+ $(INSTALL) -D -m 644 udev-md-raid-arrays.rules $(DESTDIR)/usr/lib/udev/rules.d/63-md-raid-arrays.rules
-+ $(INSTALL) -D -m 644 udev-md-raid-assembly.rules $(DESTDIR)/usr/lib/udev/rules.d/64-md-raid-assembly.rules
-
- uninstall:
- rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm
-diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
-new file mode 100644
-index 0000000..883ee4d
---- /dev/null
-+++ b/udev-md-raid-arrays.rules
-@@ -0,0 +1,35 @@
-+# do not edit this file, it will be overwritten on update
-+
-+SUBSYSTEM!="block", GOTO="md_end"
-+
-+# handle md arrays
-+ACTION!="add|change", GOTO="md_end"
-+KERNEL!="md*", GOTO="md_end"
-+
-+# partitions have no md/{array_state,metadata_version}, but should not
-+# for that reason be ignored.
-+ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
-+
-+# container devices have a metadata version of e.g. 'external:ddf' and
-+# never leave state 'inactive'
-+ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
-+TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
-+ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
-+LABEL="md_ignore_state"
-+
-+IMPORT{program}="/usr/bin/mdadm --detail --export $devnode"
-+ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
-+ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
-+ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
-+ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
-+ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
-+ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
-+ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
-+
-+IMPORT{builtin}="blkid"
-+OPTIONS+="link_priority=100"
-+OPTIONS+="watch"
-+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
-+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
-+
-+LABEL="md_end"
-diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
-new file mode 100644
-index 0000000..b89775e
---- /dev/null
-+++ b/udev-md-raid-assembly.rules
-@@ -0,0 +1,19 @@
-+# do not edit this file, it will be overwritten on update
-+
-+# assemble md arrays
-+
-+SUBSYSTEM!="block", GOTO="md_inc_end"
-+
-+# handle potential components of arrays (the ones supported by md)
-+ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_inc"
-+GOTO="md_inc_end"
-+
-+LABEL="md_inc"
-+
-+# remember you can limit what gets auto/incrementally assembled by
-+# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
-+ACTION=="add", RUN+="/usr/bin/mdadm --incremental $devnode --offroot"
-+ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/usr/bin/mdadm -If $name --path $env{ID_PATH}"
-+ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/usr/bin/mdadm -If $name"
-+
-+LABEL="md_inc_end"
-diff --git a/udev-md-raid.rules b/udev-md-raid.rules
-deleted file mode 100644
-index cc7f5ef..0000000
---- a/udev-md-raid.rules
-+++ /dev/null
-@@ -1,49 +0,0 @@
--# do not edit this file, it will be overwritten on update
--
--SUBSYSTEM!="block", GOTO="md_end"
--
--# handle potential components of arrays (the ones supported by md)
--ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_inc"
--GOTO="md_inc_skip"
--
--LABEL="md_inc"
--
--# remember you can limit what gets auto/incrementally assembled by
--# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
--ACTION=="add", RUN+="/sbin/mdadm --incremental $tempnode --offroot"
--ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
--ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"
--
--LABEL="md_inc_skip"
--
--# handle md arrays
--ACTION!="add|change", GOTO="md_end"
--KERNEL!="md*", GOTO="md_end"
--
--# partitions have no md/{array_state,metadata_version}, but should not
--# for that reason be ignored.
--ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
--
--# container devices have a metadata version of e.g. 'external:ddf' and
--# never leave state 'inactive'
--ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
--TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
--ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
--LABEL="md_ignore_state"
--
--IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
--ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
--ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
--ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
--ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
--ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
--ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
--ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
--
--IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
--OPTIONS+="link_priority=100"
--OPTIONS+="watch"
--ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
--ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
--
--LABEL="md_end"
Deleted: mdadm_hook
===================================================================
--- mdadm_hook 2019-03-18 15:49:27 UTC (rev 348590)
+++ mdadm_hook 2019-03-18 16:12:00 UTC (rev 348591)
@@ -1,49 +0,0 @@
-#!/usr/bin/ash
-
-run_hook() {
- local i= mdconfig=/etc/mdadm.conf
-
- # for partitionable raid, we need to load md_mod first!
- modprobe md_mod 2>/dev/null
-
- if [ -n "$md" ]; then
- echo 'DEVICE partitions' >"$mdconfig"
- for i in $(cat /proc/cmdline); do
- case $i in
- # raid
- md=[0-9]*,/*)
- device=${i%%,*}
- device=${device/=/}
- array=${i#*,}
- echo "ARRAY /dev/$device devices=$array"
- ;;
- # partitionable raid
- md=d[0-9]*,/*)
- device=${i%%,*}
- device=${device/=/_}
- array=${i#*,}
- echo "ARRAY /dev/$device devices=$array"
- ;;
- # raid UUID
- md=[0-9]*,[0-9,a-fA-F]*)
- device=${i%%,*}
- device=${device/=/}
- array=${i#*,}
- echo "ARRAY /dev/$device UUID=$array"
- ;;
- # partitionable raid UUID
- md=d[0-9]*,[0-9,a-fA-F]*)
- device=${i%%,*}
- device=${device/=/_}
- array=${i#*,}
- echo "ARRAY /dev/$device UUID=$array"
- ;;
- esac
- done >>"$mdconfig"
- fi
-
- # assemble everything
- [ -s "$mdconfig" ] && /usr/bin/mdassemble
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
Deleted: mdadm_install
===================================================================
--- mdadm_install 2019-03-18 15:49:27 UTC (rev 348590)
+++ mdadm_install 2019-03-18 16:12:00 UTC (rev 348591)
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-build() {
- add_checked_modules -f 'dm-' 'drivers/md/*'
-
- # check if a custom mdadm.conf exists
- if grep -q ^ARRAY /etc/mdadm.conf; then
- echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
- add_file "/etc/mdadm.conf"
- fi
- add_binary "/usr/bin/mdassemble"
- add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook loads the necessary modules for any raid root device,
-and assembles the raid device when run.
-
-If arrays are defined in /etc/mdadm.conf, the file will be used instead
-of command line assembling.
-
-Command Line Setup:
-- for raid arrays with persistent superblocks:
- md=<md device no.>,dev0,dev1,...,devn
- md=<md device no.>,uuid
-- for partitionable raid arrays with persistent superblocks:
- md=d<md device no.>,dev0,dev1,...,devn
- md=d<md device no.>,uuid
-
-Parameters:
-- <md device no.> = the number of the md device:
- 0 means md0, 1 means md1, ...
-- <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
- or 0900878d:f95f6057:c39a36e9:55efa60a
-Examples:
-- md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1
- This will setup 2 md partitionable arrays.
-- md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
- This will setup 2 md arrays with persistent superblocks.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
More information about the arch-commits
mailing list