Drop use-tempnode-not-devnode.patch, not needed anymore.
* Drop use-tempnode-not-devnode.patch, not needed anymore.
* Drop use-external-blkid.diff. (Closes: #793631)
Dimitri John Ledkov
8 years ago
42 | 42 | |
43 | 43 | CC = $(CROSS_COMPILE)gcc |
44 | 44 | CXFLAGS ?= -ggdb |
45 | CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter | |
45 | CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter | |
46 | 46 | ifdef WARN_UNUSED |
47 | 47 | CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 |
48 | 48 | endif |
61 | 61 | PKG_CONFIG ?= pkg-config |
62 | 62 | |
63 | 63 | SYSCONFDIR = /etc |
64 | CONFFILE = $(SYSCONFDIR)/mdadm.conf | |
65 | CONFFILE2 = $(SYSCONFDIR)/mdadm/mdadm.conf | |
64 | CONFFILE = $(SYSCONFDIR)/mdadm/mdadm.conf | |
65 | CONFFILE2 = $(SYSCONFDIR)/mdadm.conf | |
66 | 66 | MAILCMD =/usr/sbin/sendmail -t |
67 | 67 | CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)\" -DCONFFILE2=\"$(CONFFILE2)\" |
68 | 68 | # Both MAP_DIR and MDMON_DIR should be somewhere that persists across the |
598 | 598 | ; |
599 | 599 | |
600 | 600 | char Help_config[] = |
601 | "The /etc/mdadm.conf config file:\n\n" | |
601 | "The /etc/mdadm/mdadm.conf config file:\n\n" | |
602 | 602 | " The config file contains, apart from blank lines and comment lines that\n" |
603 | 603 | " start with a hash(#), array lines, device lines, and various\n" |
604 | 604 | " configuration lines.\n" |
0 | 0 | mdadm (3.4-1) unstable; urgency=medium |
1 | 1 | |
2 | 2 | * New upstream release. |
3 | * Drop use-tempnode-not-devnode.patch, not needed anymore. | |
4 | * Drop use-external-blkid.diff. (Closes: #793631) | |
5 | * Refresh patches. | |
3 | 6 | |
4 | 7 | -- Dimitri John Ledkov <xnox@ubuntu.com> Fri, 19 Feb 2016 16:18:36 +0000 |
5 | 8 |
0 | --- a/udev-md-raid-assembly.rules | |
1 | +++ b/udev-md-raid-assembly.rules | |
0 | Index: mdadm/udev-md-raid-assembly.rules | |
1 | =================================================================== | |
2 | --- mdadm.orig/udev-md-raid-assembly.rules | |
3 | +++ mdadm/udev-md-raid-assembly.rules | |
2 | 4 | @@ -25,6 +25,9 @@ GOTO="md_inc_end" |
3 | ||
5 | ||
4 | 6 | LABEL="md_inc" |
5 | ||
7 | ||
6 | 8 | +# Disable incremental assembly to fix Debian bug #784070 |
7 | 9 | +GOTO="md_inc_end" |
8 | 10 | + |
9 | 11 | # remember you can limit what gets auto/incrementally assembled by |
10 | 12 | # mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY' |
11 | ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $tempnode --offroot ${DEVLINKS}" | |
13 | ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}" |
0 | 0 | debian-conffile-location.diff |
1 | 1 | debian-no-Werror.diff |
2 | 2 | sha1-includes.diff |
3 | use-external-blkid.diff | |
4 | use-tempnode-not-devnode.patch | |
5 | 3 | readlink-path.patch |
6 | 4 | mdmonitor-service-simplify.diff |
7 | 5 | disable-incremental-assembly.patch |
0 | From: Michael Tokarev <mjt@tls.msk.ru> | |
1 | Subject: blkid is not udev builtin, use /sbin/blkid | |
2 | ||
3 | --- a/udev-md-raid-arrays.rules | |
4 | +++ b/udev-md-raid-arrays.rules | |
5 | @@ -26,9 +26,7 @@ ENV{DEVTYPE}=="partition", ENV{MD_UUID}= | |
6 | ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n" | |
7 | ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n" | |
8 | ||
9 | -IMPORT{builtin}="blkid" | |
10 | -OPTIONS+="link_priority=100" | |
11 | -OPTIONS+="watch" | |
12 | +IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" | |
13 | ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" | |
14 | ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" | |
15 |
0 | From: Michael Tokarev <mjt@tls.msk.ru> | |
1 | Subject: use tempnode not devnode in udev rules | |
2 | Bug-Debian: http://bugs.debian.org/770883 | |
3 | Forwarded: no | |
4 | ||
5 | udev in wheezy does not understand $devnode construct | |
6 | in rules file, while upstream uses it in mdadm rules | |
7 | files. udev in jessie has $devnode and it also supports | |
8 | old $tempnode which is the way it worked in wheezy and | |
9 | before, even if $tempnode in jessie's udev is not documented. | |
10 | So on jessie, both $tempnode and $devnode works fine, while | |
11 | in wheezy, only $tempnode works. | |
12 | ||
13 | Use $tempnode instead of $devnode. Since mdadm is important | |
14 | enough for system functionality and easily can break system | |
15 | by making it unbootable, and this is the only incompatibility | |
16 | between wheezy's and jessie's udev wrt mdadm, it is better than | |
17 | having a versioned dependency on udev. | |
18 | ||
19 | This patch is debian-specific and should be dropped for jessie+1. | |
20 | ||
21 | --- a/udev-md-raid-arrays.rules | |
22 | +++ b/udev-md-raid-arrays.rules | |
23 | @@ -20 +20 @@ | |
24 | -IMPORT{program}="BINDIR/mdadm --detail --export $devnode" | |
25 | +IMPORT{program}="BINDIR/mdadm --detail --export $tempnode" | |
26 | --- a/udev-md-raid-assembly.rules | |
27 | +++ b/udev-md-raid-assembly.rules | |
28 | @@ -30 +30 @@ | |
29 | -ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}" | |
30 | +ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $tempnode --offroot ${DEVLINKS}" |
266 | 266 | .TP |
267 | 267 | .BR \-c ", " \-\-config= |
268 | 268 | Specify the config file or directory. Default is to use |
269 | .B /etc/mdadm/mdadm.conf | |
270 | and | |
271 | .BR /etc/mdadm/mdadm.conf.d , | |
272 | or if those are missing then | |
269 | 273 | .B /etc/mdadm.conf |
270 | 274 | and |
271 | .BR /etc/mdadm.conf.d , | |
272 | or if those are missing then | |
273 | .B /etc/mdadm/mdadm.conf | |
274 | and | |
275 | .BR /etc/mdadm/mdadm.conf.d . | |
275 | .BR /etc/mdadm.conf.d . | |
276 | 276 | If the config file given is |
277 | 277 | .B "partitions" |
278 | 278 | then nothing will be read, but |
1848 | 1848 | or requested with (a possibly implicit) |
1849 | 1849 | .BR \-\-scan . |
1850 | 1850 | In the later case, |
1851 | .B /etc/mdadm/mdadm.conf | |
1852 | or | |
1851 | 1853 | .B /etc/mdadm.conf |
1852 | or | |
1853 | .B /etc/mdadm/mdadm.conf | |
1854 | 1854 | is used. |
1855 | 1855 | |
1856 | 1856 | If |
3144 | 3144 | is given in Misc mode, and to monitor array reconstruction |
3145 | 3145 | on Monitor mode. |
3146 | 3146 | |
3147 | .SS /etc/mdadm.conf | |
3147 | .SS /etc/mdadm/mdadm.conf (or /etc/mdadm.conf) | |
3148 | 3148 | |
3149 | 3149 | The config file lists which devices may be scanned to see if |
3150 | 3150 | they contain MD super block, and gives identifying information |
3152 | 3152 | .BR mdadm.conf (5) |
3153 | 3153 | for more details. |
3154 | 3154 | |
3155 | .SS /etc/mdadm.conf.d | |
3155 | .SS /etc/mdadm/mdadm.conf.d (or /etc/mdadm.conf.d) | |
3156 | 3156 | |
3157 | 3157 | A directory containing configuration files which are read in lexical |
3158 | 3158 | order. |
7 | 7 | .SH NAME |
8 | 8 | mdadm.conf \- configuration for management of Software RAID with mdadm |
9 | 9 | .SH SYNOPSIS |
10 | /etc/mdadm.conf | |
10 | /etc/mdadm/mdadm.conf | |
11 | 11 | .SH DESCRIPTION |
12 | 12 | .PP |
13 | 13 | .I mdadm |
39 | 39 | |
40 | 40 | .SH FILES |
41 | 41 | |
42 | .SS /etc/mdadm.conf | |
42 | .SS /etc/mdadm/mdadm.conf | |
43 | 43 | |
44 | 44 | The config file lists which devices may be scanned to see if |
45 | 45 | they contain MD super block, and gives identifying information |
21 | 21 | |
22 | 22 | #include <stdio.h> |
23 | 23 | |
24 | #if defined HAVE_LIMITS_H || _LIBC | |
24 | #if 1 /* defined HAVE_LIMITS_H || _LIBC */ | |
25 | 25 | # include <limits.h> |
26 | 26 | #endif |
27 | 27 | |
32 | 32 | the resulting executable. Locally running cross-compiled executables |
33 | 33 | is usually not possible. */ |
34 | 34 | |
35 | #ifdef _LIBC | |
36 | # include <sys/types.h> | |
37 | typedef u_int32_t sha1_uint32; | |
35 | #if 1 /* def _LIBC */ | |
36 | # include <stdint.h> | |
37 | typedef uint32_t sha1_uint32; | |
38 | 38 | typedef uintptr_t sha1_uintptr; |
39 | 39 | #else |
40 | 40 | # define INT_MAX_32_BITS 2147483647 |
9 | 9 | DefaultDependencies=no |
10 | 10 | |
11 | 11 | [Service] |
12 | Environment= MDADM_MONITOR_ARGS=--scan | |
13 | EnvironmentFile=-/run/sysconfig/mdadm | |
14 | ExecStartPre=-/usr/lib/systemd/scripts/mdadm_env.sh | |
15 | ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS | |
12 | ExecStart=BINDIR/mdadm --monitor --scan |
34 | 34 | ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service" |
35 | 35 | |
36 | 36 | # Tell systemd to run mdmon for our container, if we need it. |
37 | ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/usr/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c" | |
37 | ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c" | |
38 | 38 | ENV{MD_MON_THIS}=="?*", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@%c.service" |
39 | 39 | |
40 | 40 | LABEL="md_end" |
24 | 24 | |
25 | 25 | LABEL="md_inc" |
26 | 26 | |
27 | # Disable incremental assembly to fix Debian bug #784070 | |
28 | GOTO="md_inc_end" | |
29 | ||
27 | 30 | # remember you can limit what gets auto/incrementally assembled by |
28 | 31 | # mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY' |
29 | 32 | ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}" |