-
Notifications
You must be signed in to change notification settings - Fork 7
Commit 0cfb269
Initial support for hotfix integration as outlined in milestone 6. (#130)
Adds a new `/hotfixes` folder in containers and
`${PERSISTENT_ROOT}/hotfixes` with `scripts` and `patches` in it on the
host.
Adds a simple script to help apply hotfixes from a folder and installs
it in `/app/apply-hotfixes.sh` in all containers.
All containers bind-mount `${PERSISTENT_ROOT}/hotfixes` on `/hotfixes`
and `docker-entry.sh` is extended to first run `/app/apply-hotfixes.sh`
on the mounted `/hotfixes`. It traverses it and sequentially applies any
patches found in `/hotfix/patches/` and runs any scripts found in
`/hotfix/scripts/` before proceeding with the usual container execution
to effectively hot-fix everything inside the container before running.
It is tested to work in the development env with a couple of simple
`helloworld.sh` and `helloworld2.sh` scripts plus a minimal `motd.patch`
. For production use it is recommended to instead use a numbering prefix
for explicit ordering in order to assure patches and scripts are run in
the expected order. E.g. `00-initial-changes.patch` , ...,
`42-fix-something-else.patch` , ..., `99-final-wrap-up.patch` and
similar for the scripts.
Executed scripts and applied patches get registered in `/tmp` in order
to skip them and only run newly added ones if `apply-hotfixes.sh` is
re-run inside the containers.
NB: scripts need to be executable and patches need to be made with
absolute path so that `patch -d / -p 0 < PATCH` will apply them cleanly
without interaction.File tree
7 files changed
+154
-3
lines changed7 files changed
+154
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | + | ||
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
602 | - | ||
603 | + | ||
603 | 604 | | |
604 | - | ||
605 | + | ||
606 | + | ||
605 | 607 | | |
606 | 608 | | |
607 | 609 | | |
| |||
1635 | 1637 | | |
1636 | 1638 | | |
1637 | 1639 | | |
1640 | + | ||
1638 | 1641 | | |
1639 | 1642 | | |
1640 | 1643 | | |
| |||
1643 | 1646 | | |
1644 | 1647 | | |
1645 | 1648 | | |
1646 | - | ||
1649 | + | ||
1647 | 1650 | | |
1648 | 1651 | | |
1649 | 1652 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | + | ||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | ||
57 | + | ||
58 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | + | ||
55 | + | ||
56 | + | ||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
120 | + | ||
121 | + | ||
122 | + | ||
117 | 123 | | |
118 | 124 | | |
119 | 125 | | |
| |||
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
191 | + | ||
192 | + | ||
193 | + | ||
185 | 194 | | |
186 | 195 | | |
187 | 196 | | |
| |||
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
248 | + | ||
249 | + | ||
250 | + | ||
239 | 251 | | |
240 | 252 | | |
241 | 253 | | |
| |||
298 | 310 | | |
299 | 311 | | |
300 | 312 | | |
313 | + | ||
314 | + | ||
315 | + | ||
301 | 316 | | |
302 | 317 | | |
303 | 318 | | |
| |||
355 | 370 | | |
356 | 371 | | |
357 | 372 | | |
373 | + | ||
374 | + | ||
375 | + | ||
358 | 376 | | |
359 | 377 | | |
360 | 378 | | |
| |||
446 | 464 | | |
447 | 465 | | |
448 | 466 | | |
467 | + | ||
468 | + | ||
469 | + | ||
470 | + | ||
471 | + | ||
472 | + | ||
473 | + | ||
474 | + | ||
449 | 475 | | |
450 | 476 | | |
451 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | + | ||
55 | + | ||
56 | + | ||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
120 | + | ||
121 | + | ||
122 | + | ||
117 | 123 | | |
118 | 124 | | |
119 | 125 | | |
| |||
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
195 | + | ||
196 | + | ||
197 | + | ||
189 | 198 | | |
190 | 199 | | |
191 | 200 | | |
| |||
240 | 249 | | |
241 | 250 | | |
242 | 251 | | |
252 | + | ||
253 | + | ||
254 | + | ||
243 | 255 | | |
244 | 256 | | |
245 | 257 | | |
| |||
302 | 314 | | |
303 | 315 | | |
304 | 316 | | |
317 | + | ||
318 | + | ||
319 | + | ||
305 | 320 | | |
306 | 321 | | |
307 | 322 | | |
| |||
359 | 374 | | |
360 | 375 | | |
361 | 376 | | |
377 | + | ||
378 | + | ||
379 | + | ||
362 | 380 | | |
363 | 381 | | |
364 | 382 | | |
| |||
450 | 468 | | |
451 | 469 | | |
452 | 470 | | |
471 | + | ||
472 | + | ||
473 | + | ||
474 | + | ||
475 | + | ||
476 | + | ||
477 | + | ||
478 | + | ||
453 | 479 | | |
454 | 480 | | |
455 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | + | ||
45 | + | ||
46 | + | ||
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
101 | + | ||
102 | + | ||
103 | + | ||
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
252 | + | ||
253 | + | ||
254 | + | ||
246 | 255 | | |
247 | 256 | | |
248 | 257 | | |
| |||
386 | 395 | | |
387 | 396 | | |
388 | 397 | | |
398 | + | ||
399 | + | ||
400 | + | ||
389 | 401 | | |
390 | 402 | | |
391 | 403 | | |
| |||
528 | 540 | | |
529 | 541 | | |
530 | 542 | | |
543 | + | ||
544 | + | ||
545 | + | ||
531 | 546 | | |
532 | 547 | | |
533 | 548 | | |
| |||
670 | 685 | | |
671 | 686 | | |
672 | 687 | | |
688 | + | ||
689 | + | ||
690 | + | ||
673 | 691 | | |
674 | 692 | | |
675 | 693 | | |
| |||
812 | 830 | | |
813 | 831 | | |
814 | 832 | | |
833 | + | ||
834 | + | ||
835 | + | ||
815 | 836 | | |
816 | 837 | | |
817 | 838 | | |
| |||
891 | 912 | | |
892 | 913 | | |
893 | 914 | | |
915 | + | ||
916 | + | ||
917 | + | ||
918 | + | ||
919 | + | ||
920 | + | ||
921 | + | ||
922 | + | ||
894 | 923 | | |
895 | 924 | | |
896 | 925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | + | ||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | ||
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| |||
0 commit comments