From b83f8fcaffa542498c5698a3a161b9967ac1d3d6 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Sat, 2 Jul 2016 19:16:01 +0100 Subject: mdadm (3.4-2) unstable; urgency=low * Reneable incremental assembly * Rely on udev to assemble incremental arrays * In environments with systemd rely on mdadm-last-resort@.timer|.service units to activate degrated raids * In environments initramfs-tools initrd (no systemd) add local-block script to do the same after 2/3rds of root delay iteration * Drop local-top initramfs script * Drop dependency on initscripts package * Drop INITRDSTART support * Drop mdadm-raid init script * Drop ancient preinst * In mdadm.init remove dependency on mdadm-raid * In mdadm.init check, and bail out running in a container * In mdadm.config drop mdadm/autostart logic * Drop CREATE stanzas from mkconf and don't include them in the initramfs. The generated defaults, are the compiled-in defaults. And the current one generates warnings when running mdadm in the initramfs, as there is no passwd|group files to resolve root/disk uid/gid. Closes: 717609 * Adapt changes and formatting of initramfs hook from Ubuntu * Bump standards version to 3.9.7, no changes required * Fix copyright-refers-to-symlink-license * Closes: #781172, #796624, #769201, #813335, #632401, #804973, #714155, #770002, #737132, #675452, #726390, #813637, #814036. # imported from the archive --- debian/patches/debian-conffile-location.diff | 115 +++++++++++++++++++++++++ debian/patches/debian-no-Werror.diff | 24 ++++++ debian/patches/mdmonitor-service-simplify.diff | 20 +++++ debian/patches/readlink-path.patch | 15 ++++ debian/patches/series | 5 ++ debian/patches/sha1-includes.diff | 40 +++++++++ 6 files changed, 219 insertions(+) create mode 100644 debian/patches/debian-conffile-location.diff create mode 100644 debian/patches/debian-no-Werror.diff create mode 100644 debian/patches/mdmonitor-service-simplify.diff create mode 100644 debian/patches/readlink-path.patch create mode 100644 debian/patches/series create mode 100644 debian/patches/sha1-includes.diff (limited to 'debian/patches') diff --git a/debian/patches/debian-conffile-location.diff b/debian/patches/debian-conffile-location.diff new file mode 100644 index 00000000..8acc6077 --- /dev/null +++ b/debian/patches/debian-conffile-location.diff @@ -0,0 +1,115 @@ +From: martin f. krafft +Subject: Set /etc/mdadm/mdadm.conf as primary config file location + +On Debian, the configuration file resides primarily in /etc/mdadm/mdadm.conf, +/etc/mdadm.conf is only used as a backup. + +This is a Debian-specific patch. + +Forwarded: not-needed +Reviewed-by: martin f. krafft + +--- + Makefile | 4 ++-- + ReadMe.c | 2 +- + mdadm.8.in | 14 ++++++-------- + mdadm.conf.5 | 2 +- + mdassemble.8 | 2 +- + 5 files changed, 11 insertions(+), 13 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -61,8 +61,8 @@ + PKG_CONFIG ?= pkg-config + + SYSCONFDIR = /etc +-CONFFILE = $(SYSCONFDIR)/mdadm.conf +-CONFFILE2 = $(SYSCONFDIR)/mdadm/mdadm.conf ++CONFFILE = $(SYSCONFDIR)/mdadm/mdadm.conf ++CONFFILE2 = $(SYSCONFDIR)/mdadm.conf + MAILCMD =/usr/sbin/sendmail -t + CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)\" -DCONFFILE2=\"$(CONFFILE2)\" + # Both MAP_DIR and MDMON_DIR should be somewhere that persists across the +--- a/ReadMe.c ++++ b/ReadMe.c +@@ -590,7 +590,7 @@ + ; + + char Help_config[] = +-"The /etc/mdadm.conf config file:\n\n" ++"The /etc/mdadm/mdadm.conf config file:\n\n" + " The config file contains, apart from blank lines and comment lines that\n" + " start with a hash(#), array lines, device lines, and various\n" + " configuration lines.\n" +--- a/mdadm.8.in ++++ b/mdadm.8.in +@@ -264,13 +264,13 @@ + .TP + .BR \-c ", " \-\-config= + Specify the config file or directory. Default is to use +-.B /etc/mdadm.conf ++.B /etc/mdadm/mdadm.conf + and +-.BR /etc/mdadm.conf.d , ++.BR /etc/mdadm/mdadm.conf.d , + or if those are missing then +-.B /etc/mdadm/mdadm.conf ++.B /etc/mdadm.conf + and +-.BR /etc/mdadm/mdadm.conf.d . ++.BR /etc/mdadm.conf.d . + If the config file given is + .B "partitions" + then nothing will be read, but +@@ -1742,9 +1742,9 @@ + or requested with (a possibly implicit) + .BR \-\-scan . + In the later case, +-.B /etc/mdadm.conf +-or + .B /etc/mdadm/mdadm.conf ++or ++.B /etc/mdadm.conf + is used. + + If +@@ -3003,7 +3003,7 @@ + is given in Misc mode, and to monitor array reconstruction + on Monitor mode. + +-.SS /etc/mdadm.conf ++.SS /etc/mdadm/mdadm.conf (or /etc/mdadm.conf) + + The config file lists which devices may be scanned to see if + they contain MD super block, and gives identifying information +@@ -3011,7 +3011,7 @@ + .BR mdadm.conf (5) + for more details. + +-.SS /etc/mdadm.conf.d ++.SS /etc/mdadm/mdadm.conf.d (or /etc/mdadm.conf.d) + + A directory containing configuration files which are read in lexical + order. +--- a/mdadm.conf.5 ++++ b/mdadm.conf.5 +@@ -8,7 +8,7 @@ + .SH NAME + mdadm.conf \- configuration for management of Software RAID with mdadm + .SH SYNOPSIS +-/etc/mdadm.conf ++/etc/mdadm/mdadm.conf + .SH DESCRIPTION + .PP + .I mdadm +--- a/mdassemble.8 ++++ b/mdassemble.8 +@@ -40,7 +40,7 @@ + + .SH FILES + +-.SS /etc/mdadm.conf ++.SS /etc/mdadm/mdadm.conf + + The config file lists which devices may be scanned to see if + they contain MD super block, and gives identifying information diff --git a/debian/patches/debian-no-Werror.diff b/debian/patches/debian-no-Werror.diff new file mode 100644 index 00000000..0a427f16 --- /dev/null +++ b/debian/patches/debian-no-Werror.diff @@ -0,0 +1,24 @@ +From: martin f. krafft +Subject: Remove -Werror from compiler flags + +-Werror seems like a bad idea on released/packaged code because a toolchain +update (introducing new warnings) could break the build. We'll let upstream +use it to beautify the code, but remove it for out builds. + +Signed-off-by: martin f. krafft + +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -43,7 +43,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 diff --git a/debian/patches/mdmonitor-service-simplify.diff b/debian/patches/mdmonitor-service-simplify.diff new file mode 100644 index 00000000..ea706a68 --- /dev/null +++ b/debian/patches/mdmonitor-service-simplify.diff @@ -0,0 +1,20 @@ +Subject: simplify mdmonitor.service +From: Michael Tokarev +Date: Fri, 14 Nov 2014 19:18:05 +0300 +Bug-Debian: http://bugs.debian.org/764647 +Forwarded: no + +There isn't much for customization for mdadm --monitor. +it'll just do what it's supposed to do, so just run it. + +--- a/systemd/mdmonitor.service ++++ b/systemd/mdmonitor.service +@@ -10,7 +10,4 @@ Description=MD array monitor + DefaultDependencies=no + + [Service] +-Environment= MDADM_MONITOR_ARGS=--scan +-EnvironmentFile=-/run/sysconfig/mdadm +-ExecStartPre=-/usr/lib/systemd/scripts/mdadm_env.sh +-ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS ++ExecStart=BINDIR/mdadm --monitor --scan diff --git a/debian/patches/readlink-path.patch b/debian/patches/readlink-path.patch new file mode 100644 index 00000000..86544592 --- /dev/null +++ b/debian/patches/readlink-path.patch @@ -0,0 +1,15 @@ +From: Michael Tokarev +Subject: readlink is in /bin not /usr/bin on debian +Date: Fri, 14 Nov 2014 19:11:51 +0300 +Bug-Debian: http://bugs.debian.org/766416 +Forwarded: no + +This is a debian-specific change, upstream ships +the rule to use /usr/bin/readlink while on debian +it is /bin/readlink + +--- a/udev-md-raid-arrays.rules ++++ b/udev-md-raid-arrays.rules +@@ -38 +38 @@ ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service" +-ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/usr/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c" ++ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c" diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..728fabf4 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,5 @@ +debian-conffile-location.diff +debian-no-Werror.diff +sha1-includes.diff +readlink-path.patch +mdmonitor-service-simplify.diff diff --git a/debian/patches/sha1-includes.diff b/debian/patches/sha1-includes.diff new file mode 100644 index 00000000..0dfd7daf --- /dev/null +++ b/debian/patches/sha1-includes.diff @@ -0,0 +1,40 @@ +From: Michael Tokarev +Subject: do not #include ansidecl.h from sha1.h, use system headers + +In 3.2.5 version of mdadm, new sha1 implementation has been included +which tries to include ansidecl.h header which is internal to some +other project. But this #include isn't really necessary, since this +implementation does not actually use any defines from ansidecl.h. So +just remove the #include, instead of adding a new external dependency. + +References: http://www.spinics.net/lists/raid/msg38859.html + +While at it, unconditionally include system headers like limits.h and +stdint.h, since on a Linux system these headers are available, and +these contains definitive information about real system types than +any guesses. + +--- a/sha1.h ++++ b/sha1.h +@@ -22,7 +22,7 @@ + + #include + +-#if defined HAVE_LIMITS_H || _LIBC ++#if 1 /* defined HAVE_LIMITS_H || _LIBC */ + # include + #endif + +@@ -33,9 +33,9 @@ + the resulting executable. Locally running cross-compiled executables + is usually not possible. */ + +-#ifdef _LIBC +-# include +-typedef u_int32_t sha1_uint32; ++#if 1 /* def _LIBC */ ++# include ++typedef uint32_t sha1_uint32; + typedef uintptr_t sha1_uintptr; + #else + # define INT_MAX_32_BITS 2147483647 -- cgit v1.2.3