1 |
commit: 597d7c451eec97fc4b4a00fed47dbd3cd2979ff3 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 27 09:12:46 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 27 09:13:19 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=597d7c45 |
7 |
|
8 |
sys-fs/mdadm: Removed old. |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
sys-fs/mdadm/Manifest | 2 - |
13 |
...date-metadata_update-size-before-using-it.patch | 44 ------- |
14 |
...-not-try-to-restart-if-reshape-is-running.patch | 45 -------- |
15 |
....1-Grow-fix-removal-of-line-in-wrong-case.patch | 39 ------- |
16 |
...-use-strcpy-rather-than-pointless-strncpy.patch | 32 ------ |
17 |
...date-metadata_update-size-before-using-it.patch | 128 --------------------- |
18 |
...file-install-mdadm-grow-continue-.service.patch | 28 ----- |
19 |
...on-allow-prepare_update-to-report-failure.patch | 119 ------------------- |
20 |
...e-Unix-domain-socket-is-created-with-safe.patch | 34 ------ |
21 |
sys-fs/mdadm/mdadm-3.3.1-r2.ebuild | 95 --------------- |
22 |
10 files changed, 566 deletions(-) |
23 |
|
24 |
diff --git a/sys-fs/mdadm/Manifest b/sys-fs/mdadm/Manifest |
25 |
index 1f58dd0f95a..c40d02b9473 100644 |
26 |
--- a/sys-fs/mdadm/Manifest |
27 |
+++ b/sys-fs/mdadm/Manifest |
28 |
@@ -1,8 +1,6 @@ |
29 |
-DIST mdadm-3.3.1.tar.xz 407964 BLAKE2B 7494f6431729c3278412080aa3db7676a02d963148e5be7522f3de3e73acb1af9bf9e0be0042e13ee0c7524155e772a252a924eb4965c430d6918dc37aede246 SHA512 46fc1889e97d2d14b72ac26ee07eb4301467dc4a0e838ba89920253484fcd443749f3afccb3d792f7e468b20021d50dbc29dda7033d9b5a8fbaee664200f1981 |
30 |
DIST mdadm-3.4.tar.xz 422704 BLAKE2B 0e8251fefb2db853a921215a07f1f7e70dfcd6650c20493cb487d4ce32cb609fe8191297046161e62f802c75150e6628b52192bb466d72c4cabfb1bcfae09839 SHA512 5de06f3a2b83333e5346a1e858b15e76f75a13a1d5c5f2032fecc6eb167454b282e12ee111ac2abec778e058ec9554708ac317a476778328546603618e6f70f7 |
31 |
DIST mdadm-4.0.tar.xz 430780 BLAKE2B f08a67452398c864d73c78e2a7258d89c5c81b83dd136d4cd7e31e46b22d75ff67ecf553dc22f55dca418409daded51a399728dfdbd36039e828cad3233774e6 SHA512 12fb26e6b9c1912698defa406e5e47a7ca8d68d4a9aa7acdc9b463ee2d4a37fc6ecef6beb5395ff619018c3f6bdb6d8c573060d027707540f645ad2265170e8b |
32 |
DIST mdadm-4.1-rc1.tar.xz 440336 BLAKE2B af2e4b9e9fd7f75e92d30a29b0a240e4b078e34f3906a583cf10cda1c89717a27d0044d1ba72e9d41b96becda370a423f880c09cd5f2d783715bf2519e401b3c SHA512 07d75ba511a252de95356bc63e480b3c196ad0715d719f75599d1fa2995d649ea86a63f74aee7558316d728ebaae2c87d86806089cba735532e1c39641baf727 |
33 |
-DIST mdadm_3.3-2.debian.tar.gz 127889 BLAKE2B f7cfe5e59e16bf71561f672e3c7f7a480658919665490a0b6c32b47979050880b51e481c4f0869efdeb791c8bd34d3db5d4034b40bbf9b55f5b8bbdf73040618 SHA512 92e4c403542caba4b9afb870ba803e6bc7ade143b27efdc27e03b3407f322722a635457cce9e8c195a3ecd7cbce66fdebdd6046fc4f36836e56e27d5d838c037 |
34 |
DIST mdadm_3.3.4-1.1.debian.tar.xz 86312 BLAKE2B 367a9ed4b16b73a63b613e8029934ee8fbb056e33ca621e92964408ac9a3b3d107af03b657dbfe572f63150e5438879f6dd29a7e7cca1599b213ba135249e78d SHA512 ea9b34a9952e1ff836cb931c7eef0ae0c44e3f4d46162c7a7eca24936d6f7168e99d67749b3100bc68ebadc8f256e4833d42da48c531cf71e6e8f3100911828f |
35 |
DIST mdadm_3.4-4.debian.tar.xz 81200 BLAKE2B 393bac2310139788935ced77b736d60d11f58e86349990034367af5460483e97239eef5a6622405b68a7aa6f65059bc5692518172e422c3596ab879527619952 SHA512 86a9edb8f29931fdfa40037d535ca80f0bf59539fe1ef16f2639e666a5ac1bd90ec617ec1635080ae62a02f7986a6e10c97dce5389555ab7d417885f216c0f93 |
36 |
DIST mdadm_4.0-2.debian.tar.xz 81844 BLAKE2B f8b33e27dacfa83292cc0632dd2d9a83b9d5a69e5360cdfb7494b489400504f20c7ab213ec455dfefc68d5a7f8a48fb2085710fe420b9791df9f8ebbe05d1a10 SHA512 a118df3edbe492e28dda054672a0adfe2c1ce276655f70509c2f24082aecd5193ade84ca3f0ee93280f646ee6a1636d703607046b7e27388086627bed911037a |
37 |
|
38 |
diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-DDF-validate-metadata_update-size-before-using-it.patch b/sys-fs/mdadm/files/mdadm-3.3.1-DDF-validate-metadata_update-size-before-using-it.patch |
39 |
deleted file mode 100644 |
40 |
index befb7da9173..00000000000 |
41 |
--- a/sys-fs/mdadm/files/mdadm-3.3.1-DDF-validate-metadata_update-size-before-using-it.patch |
42 |
+++ /dev/null |
43 |
@@ -1,44 +0,0 @@ |
44 |
-From 1f17f96b538793a0e665e471f602c6fa490ec167 Mon Sep 17 00:00:00 2001 |
45 |
-From: NeilBrown <neilb@××××.de> |
46 |
-Date: Thu, 10 Jul 2014 15:59:06 +1000 |
47 |
-Subject: [PATCH 12/14] DDF: validate metadata_update size before using it. |
48 |
- |
49 |
-process_update already checks update->len, for all but |
50 |
-the 'magic', prepare_update doesn't at all. |
51 |
- |
52 |
-So add tests to prepare_update that we don't exceed the buffer. |
53 |
-This will consequently protect process_update from looking |
54 |
-for a 'magic' which isn't there. |
55 |
- |
56 |
-Reported-by: Vincent Berg <vberg@××××××××.com> |
57 |
-Signed-off-by: NeilBrown <neilb@××××.de> |
58 |
---- |
59 |
- super-ddf.c | 10 ++++++++-- |
60 |
- 1 file changed, 8 insertions(+), 2 deletions(-) |
61 |
- |
62 |
-diff --git a/super-ddf.c b/super-ddf.c |
63 |
-index 1e43ca2..8957c2e 100644 |
64 |
---- a/super-ddf.c |
65 |
-+++ b/super-ddf.c |
66 |
-@@ -4914,10 +4914,16 @@ static int ddf_prepare_update(struct supertype *st, |
67 |
- * If a malloc is needed, do it here. |
68 |
- */ |
69 |
- struct ddf_super *ddf = st->sb; |
70 |
-- be32 *magic = (be32 *)update->buf; |
71 |
-+ be32 *magic; |
72 |
-+ if (update->len < 4) |
73 |
-+ return 0; |
74 |
-+ magic = (be32 *)update->buf; |
75 |
- if (be32_eq(*magic, DDF_VD_CONF_MAGIC)) { |
76 |
- struct vcl *vcl; |
77 |
-- struct vd_config *conf = (struct vd_config *) update->buf; |
78 |
-+ struct vd_config *conf; |
79 |
-+ if (update->len < (int)sizeof(*conf)) |
80 |
-+ return 0; |
81 |
-+ conf = (struct vd_config *) update->buf; |
82 |
- if (posix_memalign(&update->space, 512, |
83 |
- offsetof(struct vcl, conf) |
84 |
- + ddf->conf_rec_len * 512) != 0) { |
85 |
--- |
86 |
-2.0.0 |
87 |
- |
88 |
|
89 |
diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-Grow-Do-not-try-to-restart-if-reshape-is-running.patch b/sys-fs/mdadm/files/mdadm-3.3.1-Grow-Do-not-try-to-restart-if-reshape-is-running.patch |
90 |
deleted file mode 100644 |
91 |
index 717317b8a2d..00000000000 |
92 |
--- a/sys-fs/mdadm/files/mdadm-3.3.1-Grow-Do-not-try-to-restart-if-reshape-is-running.patch |
93 |
+++ /dev/null |
94 |
@@ -1,45 +0,0 @@ |
95 |
-From 13ffbe89b6103c146c08eb1c9a70833306c8322b Mon Sep 17 00:00:00 2001 |
96 |
-From: Pawel Baldysiak <pawel.baldysiak@×××××.com> |
97 |
-Date: Wed, 16 Jul 2014 12:20:34 +0200 |
98 |
-Subject: [PATCH 14/14] Grow: Do not try to restart if reshape is running |
99 |
- |
100 |
-Grow process did not check if reshape is already started |
101 |
-when deciding about restarting. |
102 |
-Sync_action should be checked in this case, and if |
103 |
-reshape is running - restart flag should not be set. |
104 |
-Otherwise, Grow process will fail to write data to |
105 |
-sysfs, and reshape will not be continued. |
106 |
- |
107 |
-Signed-off-by: Pawel Baldysiak <pawel.baldysiak@×××××.com> |
108 |
-Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@×××××.com> |
109 |
-Signed-off-by: NeilBrown <neilb@××××.de> |
110 |
---- |
111 |
- Grow.c | 5 ++++- |
112 |
- 1 file changed, 4 insertions(+), 1 deletion(-) |
113 |
- |
114 |
-diff --git a/Grow.c b/Grow.c |
115 |
-index a2f4f14..ea9cc60 100644 |
116 |
---- a/Grow.c |
117 |
-+++ b/Grow.c |
118 |
-@@ -2822,6 +2822,7 @@ static int reshape_array(char *container, int fd, char *devname, |
119 |
- unsigned long long array_size; |
120 |
- int done; |
121 |
- struct mdinfo *sra = NULL; |
122 |
-+ char buf[20]; |
123 |
- |
124 |
- /* when reshaping a RAID0, the component_size might be zero. |
125 |
- * So try to fix that up. |
126 |
-@@ -2869,7 +2870,9 @@ static int reshape_array(char *container, int fd, char *devname, |
127 |
- goto release; |
128 |
- } |
129 |
- |
130 |
-- if (st->ss->external && restart && (info->reshape_progress == 0)) { |
131 |
-+ if (st->ss->external && restart && (info->reshape_progress == 0) && |
132 |
-+ !((sysfs_get_str(info, NULL, "sync_action", buf, sizeof(buf)) > 0) && |
133 |
-+ (strncmp(buf, "reshape", 7) == 0))) { |
134 |
- /* When reshape is restarted from '0', very begin of array |
135 |
- * it is possible that for external metadata reshape and array |
136 |
- * configuration doesn't happen. |
137 |
--- |
138 |
-2.0.0 |
139 |
- |
140 |
|
141 |
diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-Grow-fix-removal-of-line-in-wrong-case.patch b/sys-fs/mdadm/files/mdadm-3.3.1-Grow-fix-removal-of-line-in-wrong-case.patch |
142 |
deleted file mode 100644 |
143 |
index acc38267d16..00000000000 |
144 |
--- a/sys-fs/mdadm/files/mdadm-3.3.1-Grow-fix-removal-of-line-in-wrong-case.patch |
145 |
+++ /dev/null |
146 |
@@ -1,39 +0,0 @@ |
147 |
-From e339dba2a1744dc6860a58e286ded39fc993c2db Mon Sep 17 00:00:00 2001 |
148 |
-From: Pawel Baldysiak <pawel.baldysiak@×××××.com> |
149 |
-Date: Wed, 11 Jun 2014 15:18:44 +0000 |
150 |
-Subject: [PATCH 02/14] Grow: fix removal of line in wrong case |
151 |
- |
152 |
-Commit 18d9bcfa33939cee345d4d7735bc6081bcc409c8 |
153 |
-removed wrong line (in case RAID0->RAID4). |
154 |
-This patch corrects this mistake |
155 |
-(line should be removed in case RAID4->RAID4). |
156 |
- |
157 |
-Signed-off-by: Pawel Baldysiak <pawel.baldysiak@×××××.com> |
158 |
-Signed-off-by: NeilBrown <neilb@××××.de> |
159 |
---- |
160 |
- Grow.c | 2 +- |
161 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
162 |
- |
163 |
-diff --git a/Grow.c b/Grow.c |
164 |
-index 12730e2..a2f4f14 100644 |
165 |
---- a/Grow.c |
166 |
-+++ b/Grow.c |
167 |
-@@ -1324,6 +1324,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) |
168 |
- |
169 |
- switch (re->level) { |
170 |
- case 4: |
171 |
-+ re->before.layout = 0; |
172 |
- re->after.layout = 0; |
173 |
- break; |
174 |
- case 5: |
175 |
-@@ -1339,7 +1340,6 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) |
176 |
- |
177 |
- switch (re->level) { |
178 |
- case 4: |
179 |
-- re->before.layout = 0; |
180 |
- re->after.layout = 0; |
181 |
- break; |
182 |
- case 5: |
183 |
--- |
184 |
-2.0.0 |
185 |
- |
186 |
|
187 |
diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-use-strcpy-rather-than-pointless-strncpy.patch b/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-use-strcpy-rather-than-pointless-strncpy.patch |
188 |
deleted file mode 100644 |
189 |
index b63b1e732d3..00000000000 |
190 |
--- a/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-use-strcpy-rather-than-pointless-strncpy.patch |
191 |
+++ /dev/null |
192 |
@@ -1,32 +0,0 @@ |
193 |
-From 6d8d290a2f09a3bfd9e44f382ae5daea128772f7 Mon Sep 17 00:00:00 2001 |
194 |
-From: NeilBrown <neilb@××××.de> |
195 |
-Date: Thu, 3 Jul 2014 15:04:01 +1000 |
196 |
-Subject: [PATCH 03/14] IMSM: use strcpy rather than pointless strncpy. |
197 |
- |
198 |
-As strncpy doesn't guarantee to nul-terminate, some static |
199 |
-analysers get upset that it is followed by a 'strncat'. |
200 |
-So just use a 'strcpy' - strlen(disk_by_path) is constant |
201 |
-and definitely less than PATH_MAX. |
202 |
- |
203 |
-Link: https://github.com/neilbrown/mdadm/issues/4 |
204 |
-Signed-off-by: NeilBrown <neilb@××××.de> |
205 |
---- |
206 |
- super-intel.c | 2 +- |
207 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
208 |
- |
209 |
-diff --git a/super-intel.c b/super-intel.c |
210 |
-index 9dd807a..0106b4f 100644 |
211 |
---- a/super-intel.c |
212 |
-+++ b/super-intel.c |
213 |
-@@ -9357,7 +9357,7 @@ static const char *imsm_get_disk_controller_domain(const char *path) |
214 |
- char *drv=NULL; |
215 |
- struct stat st; |
216 |
- |
217 |
-- strncpy(disk_path, disk_by_path, PATH_MAX - 1); |
218 |
-+ strcpy(disk_path, disk_by_path); |
219 |
- strncat(disk_path, path, PATH_MAX - strlen(disk_path) - 1); |
220 |
- if (stat(disk_path, &st) == 0) { |
221 |
- struct sys_dev* hba; |
222 |
--- |
223 |
-2.0.0 |
224 |
- |
225 |
|
226 |
diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-validate-metadata_update-size-before-using-it.patch b/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-validate-metadata_update-size-before-using-it.patch |
227 |
deleted file mode 100644 |
228 |
index b1610835753..00000000000 |
229 |
--- a/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-validate-metadata_update-size-before-using-it.patch |
230 |
+++ /dev/null |
231 |
@@ -1,128 +0,0 @@ |
232 |
-From 095b8088fa99ad1195d1aba03af2aa561b4a6379 Mon Sep 17 00:00:00 2001 |
233 |
-From: NeilBrown <neilb@××××.de> |
234 |
-Date: Thu, 10 Jul 2014 16:09:28 +1000 |
235 |
-Subject: [PATCH 13/14] IMSM: validate metadata_update size before using it. |
236 |
- |
237 |
-Every case in prepare_update check that the size message |
238 |
-size is sufficient, so process_update doesn't need to check anything. |
239 |
- |
240 |
-Reported-by: Vincent Berg <vberg@××××××××.com> |
241 |
-Signed-off-by: NeilBrown <neilb@××××.de> |
242 |
---- |
243 |
- super-intel.c | 44 +++++++++++++++++++++++++++++++++++++++++--- |
244 |
- 1 file changed, 41 insertions(+), 3 deletions(-) |
245 |
- |
246 |
-diff --git a/super-intel.c b/super-intel.c |
247 |
-index 2547b4a..b4efa72 100644 |
248 |
---- a/super-intel.c |
249 |
-+++ b/super-intel.c |
250 |
-@@ -8587,7 +8587,7 @@ static void imsm_process_update(struct supertype *st, |
251 |
- } |
252 |
- case update_add_remove_disk: { |
253 |
- /* we may be able to repair some arrays if disks are |
254 |
-- * being added, check teh status of add_remove_disk |
255 |
-+ * being added, check the status of add_remove_disk |
256 |
- * if discs has been added. |
257 |
- */ |
258 |
- if (add_remove_disk_update(super)) { |
259 |
-@@ -8617,19 +8617,28 @@ static int imsm_prepare_update(struct supertype *st, |
260 |
- * integrated by the monitor thread without worrying about live pointers |
261 |
- * in the manager thread. |
262 |
- */ |
263 |
-- enum imsm_update_type type = *(enum imsm_update_type *) update->buf; |
264 |
-+ enum imsm_update_type type; |
265 |
- struct intel_super *super = st->sb; |
266 |
- struct imsm_super *mpb = super->anchor; |
267 |
- size_t buf_len; |
268 |
- size_t len = 0; |
269 |
- |
270 |
-+ if (update->len < (int)sizeof(type)) |
271 |
-+ return 0; |
272 |
-+ |
273 |
-+ type = *(enum imsm_update_type *) update->buf; |
274 |
-+ |
275 |
- switch (type) { |
276 |
- case update_general_migration_checkpoint: |
277 |
-+ if (update->len < (int)sizeof(struct imsm_update_general_migration_checkpoint)) |
278 |
-+ return 0; |
279 |
- dprintf("imsm: prepare_update() " |
280 |
- "for update_general_migration_checkpoint called\n"); |
281 |
- break; |
282 |
- case update_takeover: { |
283 |
- struct imsm_update_takeover *u = (void *)update->buf; |
284 |
-+ if (update->len < (int)sizeof(*u)) |
285 |
-+ return 0; |
286 |
- if (u->direction == R0_TO_R10) { |
287 |
- void **tail = (void **)&update->space_list; |
288 |
- struct imsm_dev *dev = get_imsm_dev(super, u->subarray); |
289 |
-@@ -8670,6 +8679,9 @@ static int imsm_prepare_update(struct supertype *st, |
290 |
- struct intel_dev *dl; |
291 |
- void **space_tail = (void**)&update->space_list; |
292 |
- |
293 |
-+ if (update->len < (int)sizeof(*u)) |
294 |
-+ return 0; |
295 |
-+ |
296 |
- dprintf("imsm: imsm_prepare_update() for update_reshape\n"); |
297 |
- |
298 |
- for (dl = super->devlist; dl; dl = dl->next) { |
299 |
-@@ -8702,6 +8714,9 @@ static int imsm_prepare_update(struct supertype *st, |
300 |
- void *s; |
301 |
- int current_level = -1; |
302 |
- |
303 |
-+ if (update->len < (int)sizeof(*u)) |
304 |
-+ return 0; |
305 |
-+ |
306 |
- dprintf("imsm: imsm_prepare_update() for update_reshape\n"); |
307 |
- |
308 |
- /* add space for bigger array in update |
309 |
-@@ -8769,6 +8784,13 @@ static int imsm_prepare_update(struct supertype *st, |
310 |
- break; |
311 |
- } |
312 |
- case update_size_change: { |
313 |
-+ if (update->len < (int)sizeof(struct imsm_update_size_change)) |
314 |
-+ return 0; |
315 |
-+ break; |
316 |
-+ } |
317 |
-+ case update_activate_spare: { |
318 |
-+ if (update->len < (int)sizeof(struct imsm_update_activate_spare)) |
319 |
-+ return 0; |
320 |
- break; |
321 |
- } |
322 |
- case update_create_array: { |
323 |
-@@ -8781,6 +8803,9 @@ static int imsm_prepare_update(struct supertype *st, |
324 |
- int i; |
325 |
- int activate = 0; |
326 |
- |
327 |
-+ if (update->len < (int)sizeof(*u)) |
328 |
-+ return 0; |
329 |
-+ |
330 |
- inf = get_disk_info(u); |
331 |
- len = sizeof_imsm_dev(dev, 1); |
332 |
- /* allocate a new super->devlist entry */ |
333 |
-@@ -8802,9 +8827,22 @@ static int imsm_prepare_update(struct supertype *st, |
334 |
- } |
335 |
- len += activate * sizeof(struct imsm_disk); |
336 |
- break; |
337 |
-- default: |
338 |
-+ } |
339 |
-+ case update_kill_array: { |
340 |
-+ if (update->len < (int)sizeof(struct imsm_update_kill_array)) |
341 |
-+ return 0; |
342 |
- break; |
343 |
- } |
344 |
-+ case update_rename_array: { |
345 |
-+ if (update->len < (int)sizeof(struct imsm_update_rename_array)) |
346 |
-+ return 0; |
347 |
-+ break; |
348 |
-+ } |
349 |
-+ case update_add_remove_disk: |
350 |
-+ /* no update->len needed */ |
351 |
-+ break; |
352 |
-+ default: |
353 |
-+ return 0; |
354 |
- } |
355 |
- |
356 |
- /* check if we need a larger metadata buffer */ |
357 |
--- |
358 |
-2.0.0 |
359 |
- |
360 |
|
361 |
diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-Makefile-install-mdadm-grow-continue-.service.patch b/sys-fs/mdadm/files/mdadm-3.3.1-Makefile-install-mdadm-grow-continue-.service.patch |
362 |
deleted file mode 100644 |
363 |
index 431bfd1abe3..00000000000 |
364 |
--- a/sys-fs/mdadm/files/mdadm-3.3.1-Makefile-install-mdadm-grow-continue-.service.patch |
365 |
+++ /dev/null |
366 |
@@ -1,28 +0,0 @@ |
367 |
-From 616f197f9d6d044afb9e27ddc9cd087d21d610f0 Mon Sep 17 00:00:00 2001 |
368 |
-From: NeilBrown <neilb@××××.de> |
369 |
-Date: Tue, 10 Jun 2014 20:34:40 +1000 |
370 |
-Subject: [PATCH 01/14] Makefile: install mdadm-grow-continue@.service |
371 |
- |
372 |
-Forgot to add this to install-systemd target |
373 |
- |
374 |
-Signed-off-by: NeilBrown <neilb@××××.de> |
375 |
---- |
376 |
- Makefile | 2 +- |
377 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
378 |
- |
379 |
-diff --git a/Makefile b/Makefile |
380 |
-index c7e7a42..1a4a5dc 100644 |
381 |
---- a/Makefile |
382 |
-+++ b/Makefile |
383 |
-@@ -290,7 +290,7 @@ install-udev: udev-md-raid-arrays.rules udev-md-raid-assembly.rules |
384 |
- |
385 |
- install-systemd: systemd/mdmon@.service |
386 |
- @for file in mdmon@.service mdmonitor.service mdadm-last-resort@.timer \ |
387 |
-- mdadm-last-resort@.service ; \ |
388 |
-+ mdadm-last-resort@.service mdadm-grow-continue@.service; \ |
389 |
- do sed -e 's,BINDIR,$(BINDIR),g' systemd/$$file > .install.tmp && \ |
390 |
- echo $(INSTALL) -D -m 644 systemd/$$file $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \ |
391 |
- $(INSTALL) -D -m 644 .install.tmp $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \ |
392 |
--- |
393 |
-2.0.0 |
394 |
- |
395 |
|
396 |
diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-allow-prepare_update-to-report-failure.patch b/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-allow-prepare_update-to-report-failure.patch |
397 |
deleted file mode 100644 |
398 |
index 772248b19c3..00000000000 |
399 |
--- a/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-allow-prepare_update-to-report-failure.patch |
400 |
+++ /dev/null |
401 |
@@ -1,119 +0,0 @@ |
402 |
-From 5fe6f031d9a21a935f0ef1b1fbdb314b53f2199f Mon Sep 17 00:00:00 2001 |
403 |
-From: NeilBrown <neilb@××××.de> |
404 |
-Date: Thu, 10 Jul 2014 15:54:02 +1000 |
405 |
-Subject: [PATCH 11/14] mdmon: allow prepare_update to report failure. |
406 |
- |
407 |
-If 'prepare_update' fails for some reason there is little |
408 |
-point continuing on to 'process_update'. |
409 |
-For now only malloc failures are caught, but other failures |
410 |
-will be considered in future. |
411 |
- |
412 |
-Signed-off-by: NeilBrown <neilb@××××.de> |
413 |
---- |
414 |
- managemon.c | 3 ++- |
415 |
- mdadm.h | 5 ++++- |
416 |
- super-ddf.c | 8 +++++--- |
417 |
- super-intel.c | 9 +++++---- |
418 |
- 4 files changed, 16 insertions(+), 9 deletions(-) |
419 |
- |
420 |
-diff --git a/managemon.c b/managemon.c |
421 |
-index 5f7e2ce..1c9eccc 100644 |
422 |
---- a/managemon.c |
423 |
-+++ b/managemon.c |
424 |
-@@ -819,7 +819,8 @@ static void handle_message(struct supertype *container, struct metadata_update * |
425 |
- mu->space_list = NULL; |
426 |
- mu->next = NULL; |
427 |
- if (container->ss->prepare_update) |
428 |
-- container->ss->prepare_update(container, mu); |
429 |
-+ if (!container->ss->prepare_update(container, mu)) |
430 |
-+ free_updates(&mu); |
431 |
- queue_metadata_update(mu); |
432 |
- } |
433 |
- } |
434 |
-diff --git a/mdadm.h b/mdadm.h |
435 |
-index 914d67c..02a9288 100644 |
436 |
---- a/mdadm.h |
437 |
-+++ b/mdadm.h |
438 |
-@@ -929,7 +929,10 @@ extern struct superswitch { |
439 |
- void (*sync_metadata)(struct supertype *st); |
440 |
- void (*process_update)(struct supertype *st, |
441 |
- struct metadata_update *update); |
442 |
-- void (*prepare_update)(struct supertype *st, |
443 |
-+ /* Prepare updates allocates extra memory that might be |
444 |
-+ * needed. If the update cannot be understood, return 0. |
445 |
-+ */ |
446 |
-+ int (*prepare_update)(struct supertype *st, |
447 |
- struct metadata_update *update); |
448 |
- |
449 |
- /* activate_spare will check if the array is degraded and, if it |
450 |
-diff --git a/super-ddf.c b/super-ddf.c |
451 |
-index ab9fc46..1e43ca2 100644 |
452 |
---- a/super-ddf.c |
453 |
-+++ b/super-ddf.c |
454 |
-@@ -4906,8 +4906,8 @@ static void ddf_process_update(struct supertype *st, |
455 |
- /* case DDF_SPARE_ASSIGN_MAGIC */ |
456 |
- } |
457 |
- |
458 |
--static void ddf_prepare_update(struct supertype *st, |
459 |
-- struct metadata_update *update) |
460 |
-+static int ddf_prepare_update(struct supertype *st, |
461 |
-+ struct metadata_update *update) |
462 |
- { |
463 |
- /* This update arrived at managemon. |
464 |
- * We are about to pass it to monitor. |
465 |
-@@ -4922,15 +4922,17 @@ static void ddf_prepare_update(struct supertype *st, |
466 |
- offsetof(struct vcl, conf) |
467 |
- + ddf->conf_rec_len * 512) != 0) { |
468 |
- update->space = NULL; |
469 |
-- return; |
470 |
-+ return 0; |
471 |
- } |
472 |
- vcl = update->space; |
473 |
- vcl->conf.sec_elmnt_count = conf->sec_elmnt_count; |
474 |
- if (alloc_other_bvds(ddf, vcl) != 0) { |
475 |
- free(update->space); |
476 |
- update->space = NULL; |
477 |
-+ return 0; |
478 |
- } |
479 |
- } |
480 |
-+ return 1; |
481 |
- } |
482 |
- |
483 |
- /* |
484 |
-diff --git a/super-intel.c b/super-intel.c |
485 |
-index 7734bde..2547b4a 100644 |
486 |
---- a/super-intel.c |
487 |
-+++ b/super-intel.c |
488 |
-@@ -8607,8 +8607,8 @@ static void imsm_process_update(struct supertype *st, |
489 |
- |
490 |
- static struct mdinfo *get_spares_for_grow(struct supertype *st); |
491 |
- |
492 |
--static void imsm_prepare_update(struct supertype *st, |
493 |
-- struct metadata_update *update) |
494 |
-+static int imsm_prepare_update(struct supertype *st, |
495 |
-+ struct metadata_update *update) |
496 |
- { |
497 |
- /** |
498 |
- * Allocate space to hold new disk entries, raid-device entries or a new |
499 |
-@@ -8828,6 +8828,7 @@ static void imsm_prepare_update(struct supertype *st, |
500 |
- else |
501 |
- super->next_buf = NULL; |
502 |
- } |
503 |
-+ return 1; |
504 |
- } |
505 |
- |
506 |
- /* must be called while manager is quiesced */ |
507 |
-@@ -9716,8 +9717,8 @@ static void imsm_update_metadata_locally(struct supertype *st, |
508 |
- mu.space = NULL; |
509 |
- mu.space_list = NULL; |
510 |
- mu.next = NULL; |
511 |
-- imsm_prepare_update(st, &mu); |
512 |
-- imsm_process_update(st, &mu); |
513 |
-+ if (imsm_prepare_update(st, &mu)) |
514 |
-+ imsm_process_update(st, &mu); |
515 |
- |
516 |
- while (mu.space_list) { |
517 |
- void **space = mu.space_list; |
518 |
--- |
519 |
-2.0.0 |
520 |
- |
521 |
|
522 |
diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-ensure-Unix-domain-socket-is-created-with-safe.patch b/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-ensure-Unix-domain-socket-is-created-with-safe.patch |
523 |
deleted file mode 100644 |
524 |
index 9780196e28c..00000000000 |
525 |
--- a/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-ensure-Unix-domain-socket-is-created-with-safe.patch |
526 |
+++ /dev/null |
527 |
@@ -1,34 +0,0 @@ |
528 |
-From 120ec6f7b96455e42bdfa9131c0c9026c57eaf19 Mon Sep 17 00:00:00 2001 |
529 |
-From: NeilBrown <neilb@××××.de> |
530 |
-Date: Thu, 3 Jul 2014 17:06:45 +1000 |
531 |
-Subject: [PATCH 09/14] mdmon: ensure Unix domain socket is created with safe |
532 |
- permissions. |
533 |
- |
534 |
-In the unlikely case that mdmon is started with an overly |
535 |
-permissive umask, we don't want to risk giving away world acccess. |
536 |
- |
537 |
-All other "mkdir" and "O_CREAT" calls in mdmon and mdadm set |
538 |
-a suitably restrictive permission mask. 'bind' don't take an |
539 |
-explicit mask so it needs an implicit one. |
540 |
- |
541 |
-Reported-by: Vincent Berg <vberg@××××××××.com> |
542 |
-Signed-off-by: NeilBrown <neilb@××××.de> |
543 |
---- |
544 |
- mdmon.c | 1 + |
545 |
- 1 file changed, 1 insertion(+) |
546 |
- |
547 |
-diff --git a/mdmon.c b/mdmon.c |
548 |
-index b84d4d9..21221cd 100644 |
549 |
---- a/mdmon.c |
550 |
-+++ b/mdmon.c |
551 |
-@@ -232,6 +232,7 @@ static int make_control_sock(char *devname) |
552 |
- |
553 |
- addr.sun_family = PF_LOCAL; |
554 |
- strcpy(addr.sun_path, path); |
555 |
-+ umask(077); /* ensure no world write access */ |
556 |
- if (bind(sfd, &addr, sizeof(addr)) < 0) { |
557 |
- close(sfd); |
558 |
- return -1; |
559 |
--- |
560 |
-2.0.0 |
561 |
- |
562 |
|
563 |
diff --git a/sys-fs/mdadm/mdadm-3.3.1-r2.ebuild b/sys-fs/mdadm/mdadm-3.3.1-r2.ebuild |
564 |
deleted file mode 100644 |
565 |
index c667861c611..00000000000 |
566 |
--- a/sys-fs/mdadm/mdadm-3.3.1-r2.ebuild |
567 |
+++ /dev/null |
568 |
@@ -1,95 +0,0 @@ |
569 |
-# Copyright 1999-2015 Gentoo Foundation |
570 |
-# Distributed under the terms of the GNU General Public License v2 |
571 |
- |
572 |
-EAPI=4 |
573 |
-inherit eutils flag-o-matic multilib systemd toolchain-funcs udev |
574 |
- |
575 |
-DESCRIPTION="Tool for running RAID systems - replacement for the raidtools" |
576 |
-HOMEPAGE="http://neil.brown.name/blog/mdadm" |
577 |
-DEB_PR=2 |
578 |
-SRC_URI="mirror://kernel/linux/utils/raid/mdadm/${P}.tar.xz |
579 |
- mirror://debian/pool/main/m/mdadm/${PN}_3.3-${DEB_PR}.debian.tar.gz" |
580 |
- |
581 |
-LICENSE="GPL-2" |
582 |
-SLOT="0" |
583 |
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86" |
584 |
-IUSE="static" |
585 |
- |
586 |
-DEPEND="virtual/pkgconfig |
587 |
- app-arch/xz-utils" |
588 |
-RDEPEND=">=sys-apps/util-linux-2.16" |
589 |
- |
590 |
-# The tests edit values in /proc and run tests on software raid devices. |
591 |
-# Thus, they shouldn't be run on systems with active software RAID devices. |
592 |
-RESTRICT="test" |
593 |
- |
594 |
-mdadm_emake() { |
595 |
- emake \ |
596 |
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
597 |
- CC="$(tc-getCC)" \ |
598 |
- CWFLAGS="-Wall" \ |
599 |
- CXFLAGS="${CFLAGS}" \ |
600 |
- UDEVDIR="$(get_udevdir)" \ |
601 |
- SYSTEMD_DIR="$(systemd_get_unitdir)" \ |
602 |
- "$@" |
603 |
-} |
604 |
- |
605 |
-src_prepare() { |
606 |
- # These are important bugfixes from upstream git after 3.3.1 release, |
607 |
- # and before and including 17 Jul 2014: |
608 |
- epatch \ |
609 |
- "${FILESDIR}"/${P}-Makefile-install-mdadm-grow-continue-.service.patch \ |
610 |
- "${FILESDIR}"/${P}-Grow-fix-removal-of-line-in-wrong-case.patch \ |
611 |
- "${FILESDIR}"/${P}-IMSM-use-strcpy-rather-than-pointless-strncpy.patch \ |
612 |
- "${FILESDIR}"/${P}-mdmon-ensure-Unix-domain-socket-is-created-with-safe.patch \ |
613 |
- "${FILESDIR}"/${P}-mdmon-allow-prepare_update-to-report-failure.patch \ |
614 |
- "${FILESDIR}"/${P}-DDF-validate-metadata_update-size-before-using-it.patch \ |
615 |
- "${FILESDIR}"/${P}-IMSM-validate-metadata_update-size-before-using-it.patch \ |
616 |
- "${FILESDIR}"/${P}-Grow-Do-not-try-to-restart-if-reshape-is-running.patch |
617 |
-} |
618 |
- |
619 |
-src_compile() { |
620 |
- use static && append-ldflags -static |
621 |
- mdadm_emake all mdassemble |
622 |
-} |
623 |
- |
624 |
-src_test() { |
625 |
- mdadm_emake test |
626 |
- |
627 |
- sh ./test || die |
628 |
-} |
629 |
- |
630 |
-src_install() { |
631 |
- # Use split lines because of bug #517218 |
632 |
- mdadm_emake DESTDIR="${D}" install |
633 |
- mdadm_emake DESTDIR="${D}" install-systemd |
634 |
- into / |
635 |
- dosbin mdassemble |
636 |
- dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV} |
637 |
- |
638 |
- insinto /etc |
639 |
- newins mdadm.conf-example mdadm.conf |
640 |
- newinitd "${FILESDIR}"/mdadm.rc mdadm |
641 |
- newconfd "${FILESDIR}"/mdadm.confd mdadm |
642 |
- newinitd "${FILESDIR}"/mdraid.rc mdraid |
643 |
- newconfd "${FILESDIR}"/mdraid.confd mdraid |
644 |
- |
645 |
- # From the Debian patchset |
646 |
- into /usr |
647 |
- dodoc "${WORKDIR}"/debian/README.checkarray |
648 |
- dosbin "${WORKDIR}"/debian/checkarray |
649 |
- |
650 |
- insinto /etc/cron.weekly |
651 |
- newins "${FILESDIR}"/mdadm.weekly mdadm |
652 |
-} |
653 |
- |
654 |
-pkg_postinst() { |
655 |
- if ! systemd_is_booted; then |
656 |
- if [[ -z ${REPLACING_VERSIONS} ]] ; then |
657 |
- # Only inform people the first time they install. |
658 |
- elog "If you're not relying on kernel auto-detect of your RAID" |
659 |
- elog "devices, you need to add 'mdraid' to your 'boot' runlevel:" |
660 |
- elog " rc-update add mdraid boot" |
661 |
- fi |
662 |
- fi |
663 |
-} |