summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2016-02-19 16:28:38 +0000
committerDimitri John Ledkov <xnox@ubuntu.com>2016-02-19 16:28:38 +0000
commit3daa86f837ad5bd61f2240a6a0303b19397e0e31 (patch)
tree91f2e62a4a852350347a07f35e1621eb529ca745
parent7e15cddececa359fa92a1a58e4a0c360e13058c1 (diff)
Drop use-tempnode-not-devnode.patch, not needed anymore.debian/3.4-1
* Drop use-tempnode-not-devnode.patch, not needed anymore. * Drop use-external-blkid.diff. (Closes: #793631)
-rw-r--r--Makefile6
-rw-r--r--ReadMe.c2
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/disable-incremental-assembly.patch12
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/use-external-blkid.diff16
-rw-r--r--debian/patches/use-tempnode-not-devnode.patch31
-rw-r--r--mdadm.8.in16
-rw-r--r--mdadm.conf.52
-rw-r--r--mdassemble.82
-rw-r--r--sha1.h8
-rw-r--r--systemd/mdmonitor.service5
-rw-r--r--udev-md-raid-arrays.rules2
-rw-r--r--udev-md-raid-assembly.rules3
14 files changed, 33 insertions, 77 deletions
diff --git a/Makefile b/Makefile
index fd79cfbc..664c79ff 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIB
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
@@ -62,8 +62,8 @@ CPPFLAGS += -DBINDIR=\"$(BINDIR)\"
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
diff --git a/ReadMe.c b/ReadMe.c
index d3fcb613..d40310a9 100644
--- a/ReadMe.c
+++ b/ReadMe.c
@@ -599,7 +599,7 @@ char Help_incr[] =
;
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"
diff --git a/debian/changelog b/debian/changelog
index 36762287..11f8b7f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
mdadm (3.4-1) unstable; urgency=medium
* New upstream release.
+ * Drop use-tempnode-not-devnode.patch, not needed anymore.
+ * Drop use-external-blkid.diff. (Closes: #793631)
+ * Refresh patches.
-- Dimitri John Ledkov <xnox@ubuntu.com> Fri, 19 Feb 2016 16:18:36 +0000
diff --git a/debian/patches/disable-incremental-assembly.patch b/debian/patches/disable-incremental-assembly.patch
index 693a65dc..d5886ab7 100644
--- a/debian/patches/disable-incremental-assembly.patch
+++ b/debian/patches/disable-incremental-assembly.patch
@@ -1,12 +1,14 @@
---- a/udev-md-raid-assembly.rules
-+++ b/udev-md-raid-assembly.rules
+Index: mdadm/udev-md-raid-assembly.rules
+===================================================================
+--- mdadm.orig/udev-md-raid-assembly.rules
++++ mdadm/udev-md-raid-assembly.rules
@@ -25,6 +25,9 @@ GOTO="md_inc_end"
-
+
LABEL="md_inc"
-
+
+# Disable incremental assembly to fix Debian bug #784070
+GOTO="md_inc_end"
+
# remember you can limit what gets auto/incrementally assembled by
# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
- ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $tempnode --offroot ${DEVLINKS}"
+ ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}"
diff --git a/debian/patches/series b/debian/patches/series
index 9aa3e3d7..fb725144 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,6 @@
debian-conffile-location.diff
debian-no-Werror.diff
sha1-includes.diff
-use-external-blkid.diff
-use-tempnode-not-devnode.patch
readlink-path.patch
mdmonitor-service-simplify.diff
disable-incremental-assembly.patch
diff --git a/debian/patches/use-external-blkid.diff b/debian/patches/use-external-blkid.diff
deleted file mode 100644
index 637f7c3a..00000000
--- a/debian/patches/use-external-blkid.diff
+++ /dev/null
@@ -1,16 +0,0 @@
-From: Michael Tokarev <mjt@tls.msk.ru>
-Subject: blkid is not udev builtin, use /sbin/blkid
-
---- a/udev-md-raid-arrays.rules
-+++ b/udev-md-raid-arrays.rules
-@@ -26,9 +26,7 @@ ENV{DEVTYPE}=="partition", ENV{MD_UUID}=
- 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"
-+IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
- 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}"
-
diff --git a/debian/patches/use-tempnode-not-devnode.patch b/debian/patches/use-tempnode-not-devnode.patch
deleted file mode 100644
index 38a55044..00000000
--- a/debian/patches/use-tempnode-not-devnode.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Michael Tokarev <mjt@tls.msk.ru>
-Subject: use tempnode not devnode in udev rules
-Bug-Debian: http://bugs.debian.org/770883
-Forwarded: no
-
-udev in wheezy does not understand $devnode construct
-in rules file, while upstream uses it in mdadm rules
-files. udev in jessie has $devnode and it also supports
-old $tempnode which is the way it worked in wheezy and
-before, even if $tempnode in jessie's udev is not documented.
-So on jessie, both $tempnode and $devnode works fine, while
-in wheezy, only $tempnode works.
-
-Use $tempnode instead of $devnode. Since mdadm is important
-enough for system functionality and easily can break system
-by making it unbootable, and this is the only incompatibility
-between wheezy's and jessie's udev wrt mdadm, it is better than
-having a versioned dependency on udev.
-
-This patch is debian-specific and should be dropped for jessie+1.
-
---- a/udev-md-raid-arrays.rules
-+++ b/udev-md-raid-arrays.rules
-@@ -20 +20 @@
--IMPORT{program}="BINDIR/mdadm --detail --export $devnode"
-+IMPORT{program}="BINDIR/mdadm --detail --export $tempnode"
---- a/udev-md-raid-assembly.rules
-+++ b/udev-md-raid-assembly.rules
-@@ -30 +30 @@
--ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}"
-+ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $tempnode --offroot ${DEVLINKS}"
diff --git a/mdadm.8.in b/mdadm.8.in
index 50be1aa8..7bae49d8 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -267,13 +267,13 @@ the exact meaning of this option in different contexts.
.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
@@ -1849,9 +1849,9 @@ The config file is only used if explicitly named with
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
@@ -3145,7 +3145,7 @@ uses this to find arrays when
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
@@ -3153,7 +3153,7 @@ they contain MD super block, and gives identifying information
.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.
diff --git a/mdadm.conf.5 b/mdadm.conf.5
index 18512cb0..542e2635 100644
--- 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
diff --git a/mdassemble.8 b/mdassemble.8
index d0c83c39..6cb005c5 100644
--- a/mdassemble.8
+++ b/mdassemble.8
@@ -40,7 +40,7 @@ There are no options to
.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/sha1.h b/sha1.h
index 999fc6a3..0f986585 100644
--- a/sha1.h
+++ b/sha1.h
@@ -22,7 +22,7 @@
#include <stdio.h>
-#if defined HAVE_LIMITS_H || _LIBC
+#if 1 /* defined HAVE_LIMITS_H || _LIBC */
# include <limits.h>
#endif
@@ -33,9 +33,9 @@
the resulting executable. Locally running cross-compiled executables
is usually not possible. */
-#ifdef _LIBC
-# include <sys/types.h>
-typedef u_int32_t sha1_uint32;
+#if 1 /* def _LIBC */
+# include <stdint.h>
+typedef uint32_t sha1_uint32;
typedef uintptr_t sha1_uintptr;
#else
# define INT_MAX_32_BITS 2147483647
diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service
index c7cff3e4..9aff2f56 100644
--- 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/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
index c95ec7b1..440febcb 100644
--- a/udev-md-raid-arrays.rules
+++ b/udev-md-raid-arrays.rules
@@ -35,7 +35,7 @@ ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk
ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service"
# Tell systemd to run mdmon for our container, if we need it.
-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"
ENV{MD_MON_THIS}=="?*", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@%c.service"
LABEL="md_end"
diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
index d0d440a6..8d206674 100644
--- a/udev-md-raid-assembly.rules
+++ b/udev-md-raid-assembly.rules
@@ -25,6 +25,9 @@ GOTO="md_inc_end"
LABEL="md_inc"
+# Disable incremental assembly to fix Debian bug #784070
+GOTO="md_inc_end"
+
# remember you can limit what gets auto/incrementally assembled by
# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}"