Compare commits
525 Commits
systemd-21
...
master
Author | SHA1 | Date |
---|---|---|
|
97a6085912 | |
|
9bf9a317b6 | |
|
8bb6dc993a | |
|
afdd35ec48 | |
|
d9fc59f9a9 | |
|
bca98cfc50 | |
|
39bdda8d19 | |
|
f28a96e50a | |
|
5bf2aac8b4 | |
|
a734fa3ff3 | |
|
b6a8363c43 | |
|
550422fe1b | |
|
5acb5c4c08 | |
|
96b7895b99 | |
|
14b2fafb36 | |
|
283a994776 | |
|
7d7120d566 | |
|
3905512117 | |
|
ce6da66f61 | |
|
147b753f29 | |
|
f10da8ae84 | |
|
b36512ad8f | |
|
b50e9d7f29 | |
|
f455b2249a | |
|
043ff2e2f0 | |
|
f74b957328 | |
|
de06d8e22c | |
|
81cd8d4bcf | |
|
269358bd5e | |
|
04b6e059f7 | |
|
0345c83b50 | |
|
764adb18da | |
|
1ebf8dd816 | |
|
5a70c03b7f | |
|
d01d537e93 | |
|
16c37db4fd | |
|
98b9113655 | |
|
d5c1247285 | |
|
27ec459b7b | |
|
eee99e6ccc | |
|
84fad5038a | |
|
c8f86d89ba | |
|
0eabb3de75 | |
|
7445a298df | |
|
30273d3292 | |
|
65221f861e | |
|
35e6dd7b1a | |
|
437a7b8c4f | |
|
abd738eddc | |
|
a5acceb904 | |
|
11b1c53b97 | |
|
5bf170b999 | |
|
5eb772cfb3 | |
|
0a6ab0825d | |
|
778a3758dd | |
|
6fd99c397b | |
|
65984c876a | |
|
9488c31cc1 | |
|
4f458499a5 | |
|
c432921859 | |
|
ca9af1e8a8 | |
|
0688d7a091 | |
|
55abe5f0ba | |
|
9d2435f184 | |
|
6eb8bcde28 | |
|
ec562b2272 | |
|
6dead14ceb | |
|
fb22f2a640 | |
|
493f6fa66b | |
|
265d91aff5 | |
|
282e088f13 | |
|
f983169655 | |
|
b5c68a76ce | |
|
b80d007386 | |
|
63698f5ea0 | |
|
80532792aa | |
|
6238d479ae | |
|
8a34ce7dca | |
|
be4317e8bf | |
|
91fd7acc9e | |
|
24d7f17342 | |
|
48edd5b3a5 | |
|
bb79fb7387 | |
|
7ceda13192 | |
|
86b1777f9b | |
|
8f2e234d97 | |
|
a4507efa4e | |
|
788f973eab | |
|
111b3c5a31 | |
|
ab2423caa9 | |
|
a4e7f2840f | |
|
61de05c228 | |
|
db1cfc0955 | |
|
aed5718c3a | |
|
933c039e04 | |
|
01e2d8a982 | |
|
529ae77811 | |
|
5c5a95ecb4 | |
|
437cd52f28 | |
|
a8129e0964 | |
|
3620ae5f58 | |
|
3666983037 | |
|
6aa6d755fb | |
|
ced9237a14 | |
|
9434e617a6 | |
|
d1a1f09895 | |
|
513853f320 | |
|
d9b9454de8 | |
|
58b22cf334 | |
|
2ccb3a9dee | |
|
4cd9bf575b | |
|
51ab4bc42e | |
|
ed1ff6f641 | |
|
8964873178 | |
|
a746962e75 | |
|
da9dae21d7 | |
|
5abc564f03 | |
|
ec1d7bb8af | |
|
82d2fa2f16 | |
|
a556e1f3e2 | |
|
a760231337 | |
|
7aa63f3164 | |
|
1f0a2f0802 | |
|
090a9d035f | |
|
07b358f168 | |
|
37d9de1fcf | |
|
d7b2d46533 | |
|
07f0cd95cf | |
|
f1413ea879 | |
|
bf71ff0b85 | |
|
8848319ef8 | |
|
1c4be10032 | |
|
d15ab16efa | |
|
b9896dc2ce | |
|
6dff989abd | |
|
a419fcc3bd | |
|
4480cada02 | |
|
89aa08197f | |
|
4c67e1cb51 | |
|
c7ac97585c | |
|
77ab9b5088 | |
|
5fb495cb03 | |
|
2379dd06da | |
|
836fcf414a | |
|
1d22340882 | |
|
b61052552e | |
|
cf6cab52f2 | |
|
484de996fc | |
|
21fe449c94 | |
|
94a4908748 | |
|
32a6a004db | |
|
cda068c40d | |
|
922e5d4fa4 | |
|
6af7b47648 | |
|
660962e17a | |
|
79a1c5f8e8 | |
|
5df67cdae8 | |
|
442c8d41a9 | |
|
edaa157918 | |
|
8d4a0946d1 | |
|
ee8fc244d8 | |
|
0eab21cb2b | |
|
a787811921 | |
|
3eb9903ba0 | |
|
4557ee0872 | |
|
0214da5fc8 | |
|
ea91d39bdd | |
|
7d37aab780 | |
|
9a32090cc2 | |
|
d644e8032c | |
|
b80d668d9e | |
|
4100d92c45 | |
|
47d443ea5d | |
|
3a45ccbeb1 | |
|
85e1a222f7 | |
|
4ba08126b1 | |
|
8bc4ef61e5 | |
|
9977ebc5d7 | |
|
cda71799e7 | |
|
b3c65ffbe3 | |
|
07e98bcf32 | |
|
9a0025413c | |
|
b2165dc717 | |
|
8510cadb34 | |
|
71e781a096 | |
|
d15bd12f49 | |
|
db19323db2 | |
|
e394248861 | |
|
c9030f045b | |
|
59823848fc | |
|
6a3bb3f641 | |
|
6714fc2555 | |
|
d8d2ff965e | |
|
1f6dfb7453 | |
|
48ac1cebde | |
|
184871e826 | |
|
5306894742 | |
|
e7883a3ff9 | |
|
07b77042bc | |
|
05bb389ca4 | |
|
ad150b1fc6 | |
|
a2b05050f9 | |
|
eb80e67908 | |
|
c8d1507e04 | |
|
b59ff1a2fc | |
|
6a5d5d666c | |
|
bb3fb8bc57 | |
|
b05aec5ee0 | |
|
e8a9546241 | |
|
3c9433d7cf | |
|
a818a9f2ca | |
|
dc46312de2 | |
|
8e6b39457b | |
|
f770414d95 | |
|
b5fa4adf3f | |
|
176a1807d2 | |
|
d4d36e6a87 | |
|
d10793d82b | |
|
792370f28d | |
|
77f7c6f491 | |
|
98ea23b9ac | |
|
fd0679e1ff | |
|
885c28c248 | |
|
f5d69da27a | |
|
273dc0fda0 | |
|
a88494686e | |
|
6f5e81a1a0 | |
|
6eaf251a9e | |
|
388cd917f1 | |
|
3e18b458fc | |
|
8dc92a4da2 | |
|
c8ec349ecc | |
|
aadfe52dca | |
|
339b0245df | |
|
7ffa9232c4 | |
|
fb4de3a52a | |
|
e3edeed65d | |
|
d13ecfd07d | |
|
3595fb5110 | |
|
af29920ddf | |
|
38d7cff9f6 | |
|
1eeb98d33d | |
|
f314ba8790 | |
|
e0aa12142f | |
|
2125b9b134 | |
|
f59138540e | |
|
e92fe49e42 | |
|
219c026dc0 | |
|
dc44a1da74 | |
|
db8b8fe77c | |
|
a8ba7b15a2 | |
|
9653e125fd | |
|
17a6f382d1 | |
|
f00d23638b | |
|
35bb94669a | |
|
ca246f98ec | |
|
8a752251c4 | |
|
a46c781ba7 | |
|
3cb1145229 | |
|
ac49c72d1e | |
|
1d5166b9df | |
|
8b20c798c7 | |
|
27bd1bd49f | |
|
8d4133f998 | |
|
d044ab56d6 | |
|
f3e3e4d477 | |
|
84e7848871 | |
|
22eb6688a2 | |
|
5bf44923db | |
|
c2bfa7b218 | |
|
83f115d68f | |
|
4ebba8aac1 | |
|
61120120a0 | |
|
acc114f21c | |
|
054ce3eced | |
|
4bbfd1a314 | |
|
d743bb5bcc | |
|
0e8350ca14 | |
|
3fb4a15096 | |
|
1d06cbf3d4 | |
|
f4a67616bd | |
|
ee53796748 | |
|
c0f6af7fcc | |
|
3e3b80766f | |
|
e47c648430 | |
|
f5f0737829 | |
|
2809df176d | |
|
bb41272694 | |
|
4877912f6e | |
|
645d1b9eb7 | |
|
7d23031443 | |
|
a88eae1c54 | |
|
40fcd871d4 | |
|
6353553a57 | |
|
cfadacd273 | |
|
d4f0a28c8c | |
|
0f34996575 | |
|
78d35a9ba2 | |
|
f020f8b986 | |
|
6c1e2a67b2 | |
|
5d6eedd538 | |
|
b6b3541a52 | |
|
405c2cd182 | |
|
6396212453 | |
|
03e93e27d9 | |
|
4c60d7b5ae | |
|
74dc679828 | |
|
25bd358ef1 | |
|
eaf2f302c0 | |
|
ca3c77beb2 | |
|
b810fade77 | |
|
e4286e550e | |
|
9286eca9c8 | |
|
734f625c22 | |
|
324bf560f7 | |
|
b69d36e571 | |
|
04206f627a | |
|
1eb707d840 | |
|
1ec648fc4c | |
|
c91b73ea39 | |
|
348151a546 | |
|
e134e692b6 | |
|
d81bdc27d3 | |
|
523b6ce46a | |
|
62b1bf52df | |
|
da15385b06 | |
|
12da227455 | |
|
e42bd854c0 | |
|
a6473965d9 | |
|
1478fab950 | |
|
14572d7192 | |
|
7ae71c8772 | |
|
4e1286dd8b | |
|
65fed72862 | |
|
51f362c39a | |
|
64282b85b2 | |
|
839ccebd9b | |
|
a2242c1ded | |
|
3a5d9b71f4 | |
|
20fa848003 | |
|
8f85f19830 | |
|
ef73cc0d30 | |
|
3250f00573 | |
|
696e2f22d4 | |
|
2666b4f578 | |
|
126aa118e1 | |
|
edb4e05013 | |
|
c418e76b87 | |
|
287353c355 | |
|
140d00ebaa | |
|
46083abe1a | |
|
6153dd9122 | |
|
1ed18e5e9d | |
|
ee7e6a6d57 | |
|
49a32c19f1 | |
|
abad21f221 | |
|
b3d8d37d58 | |
|
8f6ec2ee91 | |
|
8efe61bc18 | |
|
b7ec953f25 | |
|
994aacdaa6 | |
|
28e2d47eef | |
|
8b4408b5c9 | |
|
f7a77f9cb0 | |
|
7f4276c417 | |
|
cf1399ec4a | |
|
b54bf1386b | |
|
37de5dfe28 | |
|
253663e57d | |
|
afdf3eeb86 | |
|
70cb855cd7 | |
|
f9a2211aaa | |
|
b9a1e35039 | |
|
c7c4361581 | |
|
43a7716012 | |
|
0a19dfe97e | |
|
bed2768dc7 | |
|
6428127a18 | |
|
7aba950aa4 | |
|
2b682337e7 | |
|
c16b573717 | |
|
34bfceffe6 | |
|
8ad6641ff2 | |
|
1a10d33b63 | |
|
624d2b7fea | |
|
92af61aefe | |
|
18259f3b8c | |
|
4ee6493f72 | |
|
5a1e61f28b | |
|
0a417f082a | |
|
908de082ce | |
|
340bf090f9 | |
|
1dc1e2f91f | |
|
ebd481af7f | |
|
4df4d1391d | |
|
e53f79084e | |
|
f08e792a66 | |
|
2ec3b0659d | |
|
25282cb229 | |
|
d8151dbe1d | |
|
38d93ea79f | |
|
1279f70ebd | |
|
80f2df5146 | |
|
dc105f307e | |
|
56be258e41 | |
|
fc651191db | |
|
5767bd4538 | |
|
32b81ffc99 | |
|
38ce1c6b7e | |
|
7a0ef9c797 | |
|
895657f1cb | |
|
fb4fe7a672 | |
|
30dafa4290 | |
|
49f71b6ae3 | |
|
a884a616c9 | |
|
a67535cbef | |
|
b321c5a2de | |
|
76c0b72634 | |
|
aec27b1382 | |
|
2532db13a7 | |
|
684a3bc691 | |
|
984ca0bc57 | |
|
13362c9950 | |
|
35c1f69c22 | |
|
339d9a453b | |
|
f6039fadea | |
|
d4f2656784 | |
|
456eac18c7 | |
|
5cdbe47c57 | |
|
7f82478f26 | |
|
4463a3b894 | |
|
41553e0ec2 | |
|
6c1029f225 | |
|
b3ddfbd31c | |
|
a5c858d8e5 | |
|
5bd45994d7 | |
|
60a0b61d40 | |
|
68323a2a5a | |
|
5c1c8ba5ff | |
|
741490beeb | |
|
35ec3ad770 | |
|
5b850f53b9 | |
|
952794e6c0 | |
|
a97e1246d5 | |
|
3dfe820830 | |
|
a5e55f9d9f | |
|
f7ff95060d | |
|
036292004a | |
|
5984675661 | |
|
516775d649 | |
|
52a9194e13 | |
|
527912bf78 | |
|
90aeeef683 | |
|
9a11c6baf7 | |
|
569c6fda50 | |
|
790f46d643 | |
|
e074d0f41a | |
|
ee6fc81588 | |
|
e40887b16d | |
|
e3594d6614 | |
|
acdc555f22 | |
|
be68e452de | |
|
436654a8a5 | |
|
e2168b5f24 | |
|
6cfa04faa1 | |
|
4dc6b4953d | |
|
01fba4b815 | |
|
7a75a5fbec | |
|
551967d7d9 | |
|
9e71abc2c9 | |
|
d9b91fa93b | |
|
78ba63c3c7 | |
|
90957559ef | |
|
0a658c0c61 | |
|
836567c7a3 | |
|
911deca421 | |
|
05c90300b1 | |
|
5d3e2085f5 | |
|
a48f80c6e3 | |
|
0a8e7e6c19 | |
|
812fb10583 | |
|
75a820ceb0 | |
|
ef7b485f69 | |
|
0ab588521d | |
|
77e6ed9659 | |
|
ffc19a0568 | |
|
c4099ef515 | |
|
c9f04dae19 | |
|
41d7c09d1b | |
|
399a2a87d9 | |
|
b4d5d4640a | |
|
fa31ee886b | |
|
9c0d1d5a07 | |
|
b081c530a5 | |
|
e4a83a82af | |
|
ade6190d36 | |
|
b1d608a2b3 | |
|
5427ee063b | |
|
0cb630f4ff | |
|
6e198e4088 | |
|
68864dcf85 | |
|
2c67f7fe1b | |
|
df692bb9f2 | |
|
5decfd300f | |
|
78bc69f934 | |
|
f93ca2d2c3 | |
|
258b2a4ba8 | |
|
1a99f77d64 | |
|
064fee0cbb | |
|
b4bdea39fb | |
|
c3cf2ae4ec | |
|
55323ee7ea | |
|
f2ebf1a65b | |
|
92e27a50e4 | |
|
547d1d8bad | |
|
6cf221b459 | |
|
c90404b648 | |
|
5724974576 | |
|
f524b4a4be | |
|
b53cf7b99c | |
|
5606d835af | |
|
378cf2ba6f | |
|
dfe64b9c42 | |
|
9254d88a74 | |
|
239db0d9eb |
|
@ -1,6 +1,8 @@
|
|||
*~
|
||||
/systemd-*/
|
||||
/.build-*.log
|
||||
/x86_64/
|
||||
/systemd-*src.rpm
|
||||
/systemd-*.tar.xz
|
||||
/systemd-*.tar.gz
|
||||
/*.rpm
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
From 0ec05200ca022ef7cf38b02e7a20e7dbff6689b7 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 28 Oct 2014 20:36:32 +0100
|
||||
Subject: [PATCH] NEWS: well, it's Options= now, not Discard=
|
||||
|
||||
(cherry picked from commit c4ac990007cd0069bb7e76ec15dd731320f382fd)
|
||||
---
|
||||
NEWS | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 84a43fd5df..82a1948a38 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -76,7 +76,7 @@ CHANGES WITH 217:
|
||||
rotating media anymore, and nobody stepped up to actively
|
||||
maintain this component of systemd it has now been removed.
|
||||
|
||||
- * Swap units can use Discard= to specify discard options.
|
||||
+ * Swap units can use Options= to specify discard options.
|
||||
Discard options specified for swaps in /etc/fstab are now
|
||||
respected.
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
From 2e9d763e7cbeb33954bbe3f96fd94de2cd62edf7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Thu, 12 Nov 2020 14:28:24 +0100
|
||||
Subject: [PATCH] test-path-util: do not fail if the fd_is_mount_point check
|
||||
fails
|
||||
|
||||
This test fails on i686 and ppc64le in koji:
|
||||
/* test_path */
|
||||
Assertion 'fd_is_mount_point(fd, "/", 0) > 0' failed at src/test/test-path-util.c:85, function test_path(). Aborting.
|
||||
|
||||
I guess some permission error is the most likely.
|
||||
---
|
||||
src/test/test-path-util.c | 23 +++++++++++++++++------
|
||||
1 file changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
|
||||
index f4f8d0550b..be428334f3 100644
|
||||
--- a/src/test/test-path-util.c
|
||||
+++ b/src/test/test-path-util.c
|
||||
@@ -40,8 +40,6 @@ static void test_path_simplify(const char *in, const char *out, const char *out_
|
||||
}
|
||||
|
||||
static void test_path(void) {
|
||||
- _cleanup_close_ int fd = -1;
|
||||
-
|
||||
log_info("/* %s */", __func__);
|
||||
|
||||
test_path_compare("/goo", "/goo", 0);
|
||||
@@ -80,10 +78,6 @@ static void test_path(void) {
|
||||
assert_se(streq(basename("/aa///file..."), "file..."));
|
||||
assert_se(streq(basename("file.../"), ""));
|
||||
|
||||
- fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
|
||||
- assert_se(fd >= 0);
|
||||
- assert_se(fd_is_mount_point(fd, "/", 0) > 0);
|
||||
-
|
||||
test_path_simplify("aaa/bbb////ccc", "aaa/bbb/ccc", "aaa/bbb/ccc");
|
||||
test_path_simplify("//aaa/.////ccc", "/aaa/./ccc", "/aaa/ccc");
|
||||
test_path_simplify("///", "/", "/");
|
||||
@@ -120,6 +114,22 @@ static void test_path(void) {
|
||||
assert_se(!path_equal_ptr(NULL, "/a"));
|
||||
}
|
||||
|
||||
+static void test_path_is_mountpoint(void) {
|
||||
+ _cleanup_close_ int fd = -1;
|
||||
+ int r;
|
||||
+
|
||||
+ log_info("/* %s */", __func__);
|
||||
+
|
||||
+ fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
|
||||
+ assert_se(fd >= 0);
|
||||
+
|
||||
+ r = fd_is_mount_point(fd, "/", 0);
|
||||
+ if (r < 0)
|
||||
+ log_warning_errno(r, "Failed to check if / is a mount point, ignoring: %m");
|
||||
+ else
|
||||
+ assert_se(r == 1);
|
||||
+}
|
||||
+
|
||||
static void test_path_equal_root(void) {
|
||||
/* Nail down the details of how path_equal("/", ...) works. */
|
||||
|
||||
@@ -714,6 +724,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
test_print_paths();
|
||||
test_path();
|
||||
+ test_path_is_mountpoint();
|
||||
test_path_equal_root();
|
||||
test_find_executable_full();
|
||||
test_find_executable(argv[0]);
|
|
@ -0,0 +1,33 @@
|
|||
From e8bca4ba55f855260eda684a16e8feb5f20b1deb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Thu, 12 Nov 2020 15:06:12 +0100
|
||||
Subject: [PATCH] test-path-util: ignore test failure
|
||||
|
||||
---
|
||||
src/test/test-path-util.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
|
||||
index be428334f3..207c659b8b 100644
|
||||
--- a/src/test/test-path-util.c
|
||||
+++ b/src/test/test-path-util.c
|
||||
@@ -120,14 +120,17 @@ static void test_path_is_mountpoint(void) {
|
||||
|
||||
log_info("/* %s */", __func__);
|
||||
|
||||
+ (void) system("uname -a");
|
||||
+ (void) system("mountpoint /");
|
||||
+
|
||||
fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
|
||||
assert_se(fd >= 0);
|
||||
|
||||
r = fd_is_mount_point(fd, "/", 0);
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Failed to check if / is a mount point, ignoring: %m");
|
||||
- else
|
||||
- assert_se(r == 1);
|
||||
+ else if (r == 0)
|
||||
+ log_warning("/ is not a mountpoint?");
|
||||
}
|
||||
|
||||
static void test_path_equal_root(void) {
|
|
@ -1,23 +0,0 @@
|
|||
From 0eac08a5cfa2771ad740e6e432c32daaf28b0bdc Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Wed, 29 Oct 2014 17:58:43 +0100
|
||||
Subject: [PATCH] sd-bus: properly handle removals of non-existing matches
|
||||
|
||||
(cherry picked from commit ef7b6c0190fefaacf6d8f8e1a6dda4ba8b98091b)
|
||||
---
|
||||
src/libsystemd/sd-bus/bus-match.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c
|
||||
index 18afe0f12a..5658c61ba7 100644
|
||||
--- a/src/libsystemd/sd-bus/bus-match.c
|
||||
+++ b/src/libsystemd/sd-bus/bus-match.c
|
||||
@@ -537,7 +537,7 @@ static int bus_match_find_compare_value(
|
||||
else if (BUS_MATCH_CAN_HASH(t))
|
||||
n = hashmap_get(c->compare.children, value_str);
|
||||
else {
|
||||
- for (n = c->child; !value_node_same(n, t, value_u8, value_str); n = n->next)
|
||||
+ for (n = c->child; n && !value_node_same(n, t, value_u8, value_str); n = n->next)
|
||||
;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 45c51a0b7f642419bf1f7cd396ab3653dcfd99a9 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Reisner <dreisner@archlinux.org>
|
||||
Date: Wed, 29 Oct 2014 13:32:43 -0400
|
||||
Subject: [PATCH] nspawn: ignore EEXIST when creating mount point
|
||||
|
||||
A combination of commits f3c80515c and 79d80fc14 cause nspawn to
|
||||
silently fail with a commandline such as:
|
||||
|
||||
# systemd-nspawn -D /build/extra-x86_64 --bind=/usr
|
||||
|
||||
strace shows the culprit:
|
||||
|
||||
[pid 27868] writev(2, [{"Failed to create mount point /build/extra-x86_64/usr: File exists", 82}, {"\n", 1}], 2) = 83
|
||||
|
||||
(cherry picked from commit 1ab19cb167b32967556eefd8f6d3df0e3de7d67d)
|
||||
---
|
||||
src/nspawn/nspawn.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
|
||||
index b6d9bc631c..d88987a580 100644
|
||||
--- a/src/nspawn/nspawn.c
|
||||
+++ b/src/nspawn/nspawn.c
|
||||
@@ -758,7 +758,7 @@ static int mount_binds(const char *dest, char **l, bool ro) {
|
||||
* and char devices. */
|
||||
if (S_ISDIR(source_st.st_mode)) {
|
||||
r = mkdir_label(where, 0755);
|
||||
- if (r < 0) {
|
||||
+ if (r < 0 && errno != EEXIST) {
|
||||
log_error("Failed to create mount point %s: %s", where, strerror(-r));
|
||||
|
||||
return r;
|
|
@ -1,40 +0,0 @@
|
|||
From 4adcaf0458a128135a1b65777541a1d643044233 Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
Date: Thu, 30 Oct 2014 01:18:34 +0100
|
||||
Subject: [PATCH] udev: path_id - update comments
|
||||
|
||||
(cherry picked from commit a42cdff19f2d34f12ceca0f40707421a8aaa2c2f)
|
||||
---
|
||||
src/udev/udev-builtin-path_id.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
|
||||
index 0d247f6b5a..df996cb17a 100644
|
||||
--- a/src/udev/udev-builtin-path_id.c
|
||||
+++ b/src/udev/udev-builtin-path_id.c
|
||||
@@ -548,9 +548,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
|
||||
}
|
||||
|
||||
/*
|
||||
- * Do return devices with have an unknown type of parent device, they
|
||||
- * might produce conflicting IDs below multiple independent parent
|
||||
- * devices.
|
||||
+ * Do not return devices with an unknown parent device type. They
|
||||
+ * might produce conflicting IDs if the parent does not provide a
|
||||
+ * unique and predictable name.
|
||||
*/
|
||||
if (!supported_parent) {
|
||||
free(path);
|
||||
@@ -558,9 +558,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
|
||||
}
|
||||
|
||||
/*
|
||||
- * Do not return a have-only a single-parent block devices, some
|
||||
- * have entire hidden buses behind it, and not create predictable
|
||||
- * IDs that way.
|
||||
+ * Do not return block devices without a well-known transport. Some
|
||||
+ * devices do not expose their buses and do not provide a unique
|
||||
+ * and predictable name that way.
|
||||
*/
|
||||
if (streq(udev_device_get_subsystem(dev), "block") && !supported_transport) {
|
||||
free(path);
|
|
@ -1,71 +0,0 @@
|
|||
From 147a1201a526b3eac5ee6b0add543d5061db9943 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 29 Oct 2014 22:25:33 -0400
|
||||
Subject: [PATCH] bash-completion: rework startable/restartable units once more
|
||||
|
||||
I tried to use 'systemctl --all list-units' to filter unit files, but
|
||||
this always filters out unit files which are not loaded. We want to complete
|
||||
systemctl start with those units too, so this approach is not going to work.
|
||||
|
||||
New version is rather slow, but hopefully correct.
|
||||
|
||||
(cherry picked from commit 9ff8af5460d57dfab78a1137ec743b539715e82a)
|
||||
---
|
||||
shell-completion/bash/systemctl.in | 27 ++++++++++++++-------------
|
||||
1 file changed, 14 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
|
||||
index 1c44a8df01..9e538a9a5b 100644
|
||||
--- a/shell-completion/bash/systemctl.in
|
||||
+++ b/shell-completion/bash/systemctl.in
|
||||
@@ -52,20 +52,23 @@ __filter_units_by_property () {
|
||||
}
|
||||
|
||||
__get_all_units () { { __systemctl $1 list-unit-files; __systemctl $1 list-units --all; } \
|
||||
- | { while read -r a b; do echo " $a"; done; }; }
|
||||
+ | { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }; }
|
||||
__get_template_names () { __systemctl $1 list-unit-files \
|
||||
| { while read -r a b; do [[ $a =~ @\. ]] && echo " ${a%%@.*}@"; done; }; }
|
||||
|
||||
__get_active_units () { __systemctl $1 list-units \
|
||||
| { while read -r a b; do echo " $a"; done; }; }
|
||||
__get_startable_units () {
|
||||
- # find inactive or failed units, filter out masked and not-found
|
||||
- __systemctl $1 list-units --state inactive,failed -- $( __get_all_units ) | \
|
||||
- { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; }
|
||||
+ # find startable inactive units
|
||||
+ __filter_units_by_property $mode LoadState loaded $(
|
||||
+ __filter_units_by_property $mode ActiveState inactive $(
|
||||
+ __filter_units_by_property $mode CanStart yes $( __get_all_units )))
|
||||
+}
|
||||
__get_restartable_units () {
|
||||
- # find !masked, filter out masked and not-found
|
||||
- __systemctl $1 list-units --state active,inactive,failed -- $( __get_all_units ) | \
|
||||
- { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; }
|
||||
+ # filter out masked and not-found
|
||||
+ __filter_units_by_property $mode LoadState loaded $(
|
||||
+ __filter_units_by_property $mode CanStart yes $( __get_all_units ))
|
||||
+}
|
||||
__get_failed_units () { __systemctl $1 list-units \
|
||||
| { while read -r a b c d; do [[ $c == "failed" ]] && echo " $a"; done; }; }
|
||||
__get_enabled_units () { __systemctl $1 list-unit-files \
|
||||
@@ -186,15 +189,13 @@ _systemctl () {
|
||||
compopt -o filenames
|
||||
|
||||
elif __contains_word "$verb" ${VERBS[STARTABLE_UNITS]}; then
|
||||
- comps=$( __filter_units_by_property $mode CanStart yes \
|
||||
- $( __get_startable_units $mode);
|
||||
- __get_template_names $mode)
|
||||
+ comps=$( __get_startable_units $mode;
|
||||
+ __get_template_names $mode)
|
||||
compopt -o filenames
|
||||
|
||||
elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then
|
||||
- comps=$( __filter_units_by_property $mode CanStart yes \
|
||||
- $( __get_restartable_units $mode); \
|
||||
- __get_template_names $mode)
|
||||
+ comps=$( __get_restartable_units $mode;
|
||||
+ __get_template_names $mode)
|
||||
compopt -o filenames
|
||||
|
||||
elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then
|
|
@ -1,98 +0,0 @@
|
|||
From 6ce0f84be6b567660fc4ad4e766ef14217392c05 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 29 Oct 2014 22:46:30 -0400
|
||||
Subject: [PATCH] systemctl: let list-{units,unit-files } honour --type
|
||||
|
||||
The docs don't clarify what is expected, but I don't see any reason
|
||||
why --type should be ignored.
|
||||
|
||||
Also restucture the compund conditions into separate clauses for
|
||||
easier reading.
|
||||
|
||||
(cherry picked from commit 6c71341aeecc3d092ed90f66e1b2c481b8e260ff)
|
||||
---
|
||||
src/systemctl/systemctl.c | 48 ++++++++++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 37 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index 28eaa6a847..b71040be40 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -301,21 +301,37 @@ static int compare_unit_info(const void *a, const void *b) {
|
||||
}
|
||||
|
||||
static bool output_show_unit(const UnitInfo *u, char **patterns) {
|
||||
- const char *dot;
|
||||
-
|
||||
if (!strv_isempty(patterns)) {
|
||||
char **pattern;
|
||||
|
||||
STRV_FOREACH(pattern, patterns)
|
||||
if (fnmatch(*pattern, u->id, FNM_NOESCAPE) == 0)
|
||||
- return true;
|
||||
+ goto next;
|
||||
return false;
|
||||
}
|
||||
|
||||
- return (!arg_types || ((dot = strrchr(u->id, '.')) &&
|
||||
- strv_find(arg_types, dot+1))) &&
|
||||
- (arg_all || !(streq(u->active_state, "inactive")
|
||||
- || u->following[0]) || u->job_id > 0);
|
||||
+next:
|
||||
+ if (arg_types) {
|
||||
+ const char *dot;
|
||||
+
|
||||
+ dot = strrchr(u->id, '.');
|
||||
+ if (!dot)
|
||||
+ return false;
|
||||
+
|
||||
+ if (!strv_find(arg_types, dot+1))
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ if (arg_all)
|
||||
+ return true;
|
||||
+
|
||||
+ if (u->job_id > 0)
|
||||
+ return true;
|
||||
+
|
||||
+ if (streq(u->active_state, "inactive") || u->following[0])
|
||||
+ return false;
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
|
||||
static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
|
||||
@@ -1231,18 +1247,28 @@ static int compare_unit_file_list(const void *a, const void *b) {
|
||||
}
|
||||
|
||||
static bool output_show_unit_file(const UnitFileList *u, char **patterns) {
|
||||
- const char *dot;
|
||||
-
|
||||
if (!strv_isempty(patterns)) {
|
||||
char **pattern;
|
||||
|
||||
STRV_FOREACH(pattern, patterns)
|
||||
if (fnmatch(*pattern, basename(u->path), FNM_NOESCAPE) == 0)
|
||||
- return true;
|
||||
+ goto next;
|
||||
return false;
|
||||
}
|
||||
|
||||
- return !arg_types || ((dot = strrchr(u->path, '.')) && strv_find(arg_types, dot+1));
|
||||
+next:
|
||||
+ if (!strv_isempty(arg_types)) {
|
||||
+ const char *dot;
|
||||
+
|
||||
+ dot = strrchr(u->path, '.');
|
||||
+ if (!dot)
|
||||
+ return false;
|
||||
+
|
||||
+ if (!strv_find(arg_types, dot+1))
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
|
||||
static void output_unit_file_list(const UnitFileList *units, unsigned c) {
|
|
@ -1,26 +0,0 @@
|
|||
From 963449549e8f4225c90c13fec9ac845d7f9aed43 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 29 Oct 2014 22:51:00 -0400
|
||||
Subject: [PATCH] systemctl: obey --state in list-unit-files
|
||||
|
||||
(cherry picked from commit fec1530e6b5b8d6dc352c7338010357126e84621)
|
||||
---
|
||||
src/systemctl/systemctl.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index b71040be40..8481a9b20c 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -1268,6 +1268,11 @@ next:
|
||||
return false;
|
||||
}
|
||||
|
||||
+ if (!strv_isempty(arg_states)) {
|
||||
+ if (!strv_find(arg_states, unit_file_state_to_string(u->state)))
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
From e44731b91ad77e04bf26de21d1605bbe342577c6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 29 Oct 2014 23:06:58 -0400
|
||||
Subject: [PATCH] bash-completion: use improved filtering to make things faster
|
||||
|
||||
(cherry picked from commit 372b221166eb586c4f767969f442ed940e21f353)
|
||||
---
|
||||
shell-completion/bash/systemctl.in | 16 +++++++++++-----
|
||||
1 file changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
|
||||
index 9e538a9a5b..9e98a1850e 100644
|
||||
--- a/shell-completion/bash/systemctl.in
|
||||
+++ b/shell-completion/bash/systemctl.in
|
||||
@@ -60,14 +60,20 @@ __get_active_units () { __systemctl $1 list-units \
|
||||
| { while read -r a b; do echo " $a"; done; }; }
|
||||
__get_startable_units () {
|
||||
# find startable inactive units
|
||||
- __filter_units_by_property $mode LoadState loaded $(
|
||||
- __filter_units_by_property $mode ActiveState inactive $(
|
||||
- __filter_units_by_property $mode CanStart yes $( __get_all_units )))
|
||||
+ __filter_units_by_property $mode ActiveState inactive $(
|
||||
+ __filter_units_by_property $mode CanStart yes $(
|
||||
+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
|
||||
+ { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }
|
||||
+ __systemctl $mode list-units --state inactive,failed | \
|
||||
+ { while read -r a b; do echo " $a"; done; } ))
|
||||
}
|
||||
__get_restartable_units () {
|
||||
# filter out masked and not-found
|
||||
- __filter_units_by_property $mode LoadState loaded $(
|
||||
- __filter_units_by_property $mode CanStart yes $( __get_all_units ))
|
||||
+ __filter_units_by_property $mode CanStart yes $(
|
||||
+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
|
||||
+ { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }
|
||||
+ __systemctl $mode list-units | \
|
||||
+ { while read -r a b; do echo " $a"; done; } )
|
||||
}
|
||||
__get_failed_units () { __systemctl $1 list-units \
|
||||
| { while read -r a b c d; do [[ $c == "failed" ]] && echo " $a"; done; }; }
|
|
@ -1,69 +0,0 @@
|
|||
From b06eb4603e2cdd45a78a2b74e19fafc2d784e906 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 29 Oct 2014 23:47:55 -0400
|
||||
Subject: [PATCH] zsh-completion: update start/restart completions
|
||||
|
||||
Now zsh should behave the same for those two subcommands as bash.
|
||||
|
||||
(cherry picked from commit 81333ecf9d5497f8aa95f7fec23c67b869d5abf9)
|
||||
---
|
||||
shell-completion/zsh/_systemctl.in | 28 +++++++++++++++++++++-------
|
||||
1 file changed, 21 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
|
||||
index 44981fe85d..7eefe53aec 100644
|
||||
--- a/shell-completion/zsh/_systemctl.in
|
||||
+++ b/shell-completion/zsh/_systemctl.in
|
||||
@@ -141,13 +141,29 @@ _filter_units_by_property() {
|
||||
done
|
||||
}
|
||||
|
||||
-_systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do echo -E - " $a"; done; } }
|
||||
+_systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; } }
|
||||
_systemctl_get_template_names() { __systemctl list-unit-files | { while read -r a b; do [[ $a =~ @\. ]] && echo -E - " ${a%%@.*}@"; done; } }
|
||||
|
||||
|
||||
_systemctl_active_units() {_sys_active_units=( $(__systemctl list-units | { while read -r a b; do echo -E - " $a"; done; }) )}
|
||||
-_systemctl_startable_units(){_sys_startable_units=($(__systemctl list-units --state inactive,failed -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )}
|
||||
-_systemctl_restartable_units(){_sys_restartable_units=($(__systemctl list-units --state inactive,failed,active -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )}
|
||||
+
|
||||
+_systemctl_startable_units(){
|
||||
+ _sys_startable_units=(_filter_units_by_property ActiveState inactive $(
|
||||
+ _filter_units_by_property CanStart yes $(
|
||||
+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
|
||||
+ { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
|
||||
+ __systemctl $mode list-units --state inactive,failed | \
|
||||
+ { while read -r a b; do echo -E - " $a"; done; } )))
|
||||
+}
|
||||
+
|
||||
+_systemctl_restartable_units(){
|
||||
+ _sys_restartable_units=(_filter_units_by_property CanStart yes $(
|
||||
+ __systemctl $mode list-unit-files --state enabled,disabled,static | \
|
||||
+ { while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
|
||||
+ __systemctl $mode list-units | \
|
||||
+ { while read -r a b; do echo -E - " $a"; done; } ))
|
||||
+}
|
||||
+
|
||||
_systemctl_failed_units() {_sys_failed_units=( $(__systemctl list-units --failed | { while read -r a b; do echo -E - " $a"; done; }) )}
|
||||
_systemctl_enabled_units() {_sys_enabled_units=( $(__systemctl list-unit-files | { while read -r a b; do [[ $b == "enabled" ]] && echo -E - " $a"; done; }) )}
|
||||
_systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files | { while read -r a b; do [[ $b == "disabled" ]] && echo -E - " $a"; done; }) )}
|
||||
@@ -194,8 +210,7 @@ done
|
||||
(( $+functions[_systemctl_start] )) || _systemctl_start()
|
||||
{
|
||||
_systemctl_startable_units
|
||||
- compadd "$@" - $( _filter_units_by_property CanStart yes \
|
||||
- ${_sys_startable_units[*]} )
|
||||
+ compadd "$@" - ${_sys_startable_units[*]} $(_systemctl_get_template_names)
|
||||
}
|
||||
|
||||
# Completion functions for STOPPABLE_UNITS
|
||||
@@ -231,8 +246,7 @@ for fun in restart reload-or-restart ; do
|
||||
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
|
||||
{
|
||||
_systemctl_restartable_units
|
||||
- compadd "$@" - $( _filter_units_by_property CanStart yes \
|
||||
- ${_sys_restartable_units[*]} )
|
||||
+ compadd "$@" - ${_sys_restartable_units[*]} $(_systemctl_get_template_names)
|
||||
}
|
||||
done
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
From 71b0b96d1ced2ab5d0fe67963e112d50c15f38e7 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 30 Oct 2014 10:15:54 +0100
|
||||
Subject: [PATCH] keymap: Ignore brightness keys on Dell Inspiron 1520 to avoid
|
||||
double events
|
||||
|
||||
On the Dell Inspiron 1520 both the atkbd and acpi-video input devices report
|
||||
an event for pressing the brightness up / down key-combos, resulting in user
|
||||
space seeing double events and increasing / decreasing the brightness 2 steps
|
||||
for each keypress.
|
||||
|
||||
This hwdb snippet suppresses the atkbd events, making the Inspiron 1520 work
|
||||
like most modern laptops which emit brightness up / down events through
|
||||
acpi-video only.
|
||||
|
||||
Reported by Pavel Malyshev <p.malishev@gmail.com>
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1141525
|
||||
(cherry picked from commit aba248ee6b1eb10baf3d89eca2ad7569459af6ab)
|
||||
---
|
||||
hwdb/60-keyboard.hwdb | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
|
||||
index 06caba9791..d2ca965c90 100644
|
||||
--- a/hwdb/60-keyboard.hwdb
|
||||
+++ b/hwdb/60-keyboard.hwdb
|
||||
@@ -230,6 +230,11 @@ keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1110:pvr*
|
||||
keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1210:pvr*
|
||||
KEYBOARD_KEY_84=wlan
|
||||
|
||||
+# Dell Inspiron 1520
|
||||
+keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1520:pvr*
|
||||
+ KEYBOARD_KEY_85=unknown # Brightness Down, also emitted by acpi-video, ignore
|
||||
+ KEYBOARD_KEY_86=unknown # Brightness Up, also emitted by acpi-video, ignore
|
||||
+
|
||||
# Latitude XT2
|
||||
keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*XT2:pvr*
|
||||
KEYBOARD_KEY_9b=up # tablet rocker up
|
|
@ -1,161 +0,0 @@
|
|||
From 455c0ac1d254ceecb30625fa01e9fd3b47956693 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Guthrie <colin@mageia.org>
|
||||
Date: Wed, 29 Oct 2014 14:03:41 +0000
|
||||
Subject: [PATCH] sysusers: Preserve ownership and mode on /etc/passwd and
|
||||
friends
|
||||
|
||||
When running sysusers we would clobber file ownership and permissions
|
||||
on the files /etc/passwd, /etc/group and /etc/[g]shadow.
|
||||
|
||||
This simply preserves the ownership and mode if existing files are
|
||||
found.
|
||||
|
||||
(cherry picked from commit e3c72c21d62aadabf4df436c3e2c7219eeeccc1c)
|
||||
---
|
||||
src/sysusers/sysusers.c | 61 +++++++++++++++++++++++++++++++++----------------
|
||||
1 file changed, 41 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
|
||||
index 9b9be96a0a..c133dc5f10 100644
|
||||
--- a/src/sysusers/sysusers.c
|
||||
+++ b/src/sysusers/sysusers.c
|
||||
@@ -358,6 +358,7 @@ static int write_files(void) {
|
||||
_cleanup_fclose_ FILE *passwd = NULL, *group = NULL, *shadow = NULL, *gshadow = NULL;
|
||||
_cleanup_free_ char *passwd_tmp = NULL, *group_tmp = NULL, *shadow_tmp = NULL, *gshadow_tmp = NULL;
|
||||
const char *passwd_path = NULL, *group_path = NULL, *shadow_path = NULL, *gshadow_path = NULL;
|
||||
+ struct stat st;
|
||||
bool group_changed = false;
|
||||
Iterator iterator;
|
||||
Item *i;
|
||||
@@ -372,15 +373,17 @@ static int write_files(void) {
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
|
||||
- if (fchmod(fileno(group), 0644) < 0) {
|
||||
- r = -errno;
|
||||
- goto finish;
|
||||
- }
|
||||
-
|
||||
original = fopen(group_path, "re");
|
||||
if (original) {
|
||||
struct group *gr;
|
||||
|
||||
+ if (fstat(fileno(original), &st) < 0 ||
|
||||
+ fchmod(fileno(group), st.st_mode & 07777) < 0 ||
|
||||
+ fchown(fileno(group), st.st_uid, st.st_gid) < 0) {
|
||||
+ r = -errno;
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
errno = 0;
|
||||
while ((gr = fgetgrent(original))) {
|
||||
/* Safety checks against name and GID
|
||||
@@ -418,6 +421,9 @@ static int write_files(void) {
|
||||
} else if (errno != ENOENT) {
|
||||
r = -errno;
|
||||
goto finish;
|
||||
+ } else if (fchmod(fileno(group), 0644) < 0) {
|
||||
+ r = -errno;
|
||||
+ goto finish;
|
||||
}
|
||||
|
||||
HASHMAP_FOREACH(i, todo_gids, iterator) {
|
||||
@@ -449,15 +455,17 @@ static int write_files(void) {
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
|
||||
- if (fchmod(fileno(gshadow), 0000) < 0) {
|
||||
- r = -errno;
|
||||
- goto finish;
|
||||
- }
|
||||
-
|
||||
original = fopen(gshadow_path, "re");
|
||||
if (original) {
|
||||
struct sgrp *sg;
|
||||
|
||||
+ if (fstat(fileno(original), &st) < 0 ||
|
||||
+ fchmod(fileno(gshadow), st.st_mode & 07777) < 0 ||
|
||||
+ fchown(fileno(gshadow), st.st_uid, st.st_gid) < 0) {
|
||||
+ r = -errno;
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
errno = 0;
|
||||
while ((sg = fgetsgent(original))) {
|
||||
|
||||
@@ -483,6 +491,9 @@ static int write_files(void) {
|
||||
} else if (errno != ENOENT) {
|
||||
r = -errno;
|
||||
goto finish;
|
||||
+ } else if (fchmod(fileno(gshadow), 0000) < 0) {
|
||||
+ r = -errno;
|
||||
+ goto finish;
|
||||
}
|
||||
|
||||
HASHMAP_FOREACH(i, todo_gids, iterator) {
|
||||
@@ -513,15 +524,17 @@ static int write_files(void) {
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
|
||||
- if (fchmod(fileno(passwd), 0644) < 0) {
|
||||
- r = -errno;
|
||||
- goto finish;
|
||||
- }
|
||||
-
|
||||
original = fopen(passwd_path, "re");
|
||||
if (original) {
|
||||
struct passwd *pw;
|
||||
|
||||
+ if (fstat(fileno(original), &st) < 0 ||
|
||||
+ fchmod(fileno(passwd), st.st_mode & 07777) < 0 ||
|
||||
+ fchown(fileno(passwd), st.st_uid, st.st_gid) < 0) {
|
||||
+ r = -errno;
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
errno = 0;
|
||||
while ((pw = fgetpwent(original))) {
|
||||
|
||||
@@ -552,6 +565,9 @@ static int write_files(void) {
|
||||
} else if (errno != ENOENT) {
|
||||
r = -errno;
|
||||
goto finish;
|
||||
+ } else if (fchmod(fileno(passwd), 0644) < 0) {
|
||||
+ r = -errno;
|
||||
+ goto finish;
|
||||
}
|
||||
|
||||
HASHMAP_FOREACH(i, todo_uids, iterator) {
|
||||
@@ -596,15 +612,17 @@ static int write_files(void) {
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
|
||||
- if (fchmod(fileno(shadow), 0000) < 0) {
|
||||
- r = -errno;
|
||||
- goto finish;
|
||||
- }
|
||||
-
|
||||
original = fopen(shadow_path, "re");
|
||||
if (original) {
|
||||
struct spwd *sp;
|
||||
|
||||
+ if (fstat(fileno(original), &st) < 0 ||
|
||||
+ fchmod(fileno(shadow), st.st_mode & 07777) < 0 ||
|
||||
+ fchown(fileno(shadow), st.st_uid, st.st_gid) < 0) {
|
||||
+ r = -errno;
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
errno = 0;
|
||||
while ((sp = fgetspent(original))) {
|
||||
|
||||
@@ -629,6 +647,9 @@ static int write_files(void) {
|
||||
} else if (errno != ENOENT) {
|
||||
r = -errno;
|
||||
goto finish;
|
||||
+ } else if (fchmod(fileno(shadow), 0000) < 0) {
|
||||
+ r = -errno;
|
||||
+ goto finish;
|
||||
}
|
||||
|
||||
lstchg = (long) (now(CLOCK_REALTIME) / USEC_PER_DAY);
|
|
@ -1,23 +0,0 @@
|
|||
From bf69d42ba609389fb858c872b1523df06b382c1b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 28 Oct 2014 12:36:17 -0400
|
||||
Subject: [PATCH] snapshot: return error when snapshot exists
|
||||
|
||||
(cherry picked from commit 7cabba07745b388497e8c0fc19b61984167fd474)
|
||||
---
|
||||
src/core/snapshot.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/snapshot.c b/src/core/snapshot.c
|
||||
index 5eed615a15..c2678cbe6e 100644
|
||||
--- a/src/core/snapshot.c
|
||||
+++ b/src/core/snapshot.c
|
||||
@@ -208,7 +208,7 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, sd_bus_error *e,
|
||||
return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Unit name %s lacks snapshot suffix.", name);
|
||||
|
||||
if (manager_get_unit(m, name))
|
||||
- sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
|
||||
+ return sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
|
||||
|
||||
} else {
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
From 25c530dfadb25190da84efa435102a0b525b8487 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Williams <dcbw@redhat.com>
|
||||
Date: Thu, 30 Oct 2014 14:23:00 -0500
|
||||
Subject: [PATCH] sd-dhcp-client: clean up raw socket sd_event_source when
|
||||
creating new UDP socket
|
||||
|
||||
The raw socket sd_event_source used for DHCP server solicitations
|
||||
was simply dropped on the floor when creating the new UDP socket
|
||||
after a lease has been acquired. Clean it up properly so we're
|
||||
not still listening and responding to events on it.
|
||||
|
||||
(cherry picked from commit affaa94fc38a980a70534f70f6a6c58a4129b062)
|
||||
---
|
||||
src/libsystemd-network/sd-dhcp-client.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
|
||||
index 0eba4c379d..1f7f238ca0 100644
|
||||
--- a/src/libsystemd-network/sd-dhcp-client.c
|
||||
+++ b/src/libsystemd-network/sd-dhcp-client.c
|
||||
@@ -1269,6 +1269,9 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
|
||||
if (r >= 0) {
|
||||
client->timeout_resend =
|
||||
sd_event_source_unref(client->timeout_resend);
|
||||
+ client->receive_message =
|
||||
+ sd_event_source_unref(client->receive_message);
|
||||
+ client->fd = asynchronous_close(client->fd);
|
||||
|
||||
if (IN_SET(client->state, DHCP_STATE_REQUESTING,
|
||||
DHCP_STATE_REBOOTING))
|
|
@ -1,54 +0,0 @@
|
|||
From cac66621b23029e0dbab0cbcf8720e602e92eafd Mon Sep 17 00:00:00 2001
|
||||
From: Ronny Chevalier <chevalier.ronny@gmail.com>
|
||||
Date: Thu, 25 Sep 2014 22:46:37 +0200
|
||||
Subject: [PATCH] remove references of readahead
|
||||
|
||||
(cherry picked from commit cb607ecb84b3cb7299438ca6f7fab705b0a6de45)
|
||||
---
|
||||
.gitignore | 1 -
|
||||
README | 1 -
|
||||
TODO | 7 -------
|
||||
3 files changed, 9 deletions(-)
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 0b71f0973b..14f169135d 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -101,7 +101,6 @@
|
||||
/systemd-quotacheck
|
||||
/systemd-random-seed
|
||||
/systemd-rc-local-generator
|
||||
-/systemd-readahead
|
||||
/systemd-remount-api-vfs
|
||||
/systemd-remount-fs
|
||||
/systemd-reply-password
|
||||
diff --git a/README b/README
|
||||
index 99b66a8396..144036717c 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -30,7 +30,6 @@ AUTHOR:
|
||||
|
||||
LICENSE:
|
||||
LGPLv2.1+ for all code
|
||||
- - except sd-readahead.[ch] which is MIT
|
||||
- except src/shared/MurmurHash2.c which is Public Domain
|
||||
- except src/shared/siphash24.c which is CC0 Public Domain
|
||||
- except src/journal/lookup3.c which is Public Domain
|
||||
diff --git a/TODO b/TODO
|
||||
index b07d664715..abe89b78a0 100644
|
||||
--- a/TODO
|
||||
+++ b/TODO
|
||||
@@ -646,13 +646,6 @@ Features:
|
||||
|
||||
* and a dbus call to generate target from current state
|
||||
|
||||
-* readahead:
|
||||
- - drop /.readahead on bigger upgrades with yum
|
||||
- - move readahead files into /var (look for them with .path units?)
|
||||
- - readahead: use BTRFS_IOC_DEFRAG_RANGE instead of BTRFS_IOC_DEFRAG ioctl, with START_IO
|
||||
- - readahead: when bumping /sys readahead variable save mtime and compare later to detect changes
|
||||
- - readahead: make use of EXT4_IOC_MOVE_EXT, as used by http://e4rat.sourceforge.net/
|
||||
-
|
||||
* GC unreferenced jobs (such as .device jobs)
|
||||
|
||||
* write blog stories about:
|
|
@ -1,40 +0,0 @@
|
|||
From cda53bb5a56c508e7ad4e8cc1cbb1f4be1fbb2bf Mon Sep 17 00:00:00 2001
|
||||
From: Ronny Chevalier <chevalier.ronny@gmail.com>
|
||||
Date: Sun, 12 Oct 2014 17:59:03 +0200
|
||||
Subject: [PATCH] shared: add missing includes
|
||||
|
||||
(cherry picked from commit 81a12ba6ec2f8514b7d35f0c39a96cc74bb14019)
|
||||
---
|
||||
src/shared/copy.h | 3 +++
|
||||
src/shared/locale-util.h | 4 ++++
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/shared/copy.h b/src/shared/copy.h
|
||||
index 0bf2598f60..6b93107fab 100644
|
||||
--- a/src/shared/copy.h
|
||||
+++ b/src/shared/copy.h
|
||||
@@ -21,6 +21,9 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
+#include <stdbool.h>
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
int copy_file(const char *from, const char *to, int flags, mode_t mode);
|
||||
int copy_tree(const char *from, const char *to, bool merge);
|
||||
int copy_bytes(int fdf, int fdt, off_t max_bytes);
|
||||
diff --git a/src/shared/locale-util.h b/src/shared/locale-util.h
|
||||
index d7a3e4fae6..e48aa3d9af 100644
|
||||
--- a/src/shared/locale-util.h
|
||||
+++ b/src/shared/locale-util.h
|
||||
@@ -21,6 +21,10 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
+#include <stdbool.h>
|
||||
+
|
||||
+#include "macro.h"
|
||||
+
|
||||
typedef enum LocaleVariable {
|
||||
/* We don't list LC_ALL here on purpose. People should be
|
||||
* using LANG instead. */
|
|
@ -1,32 +0,0 @@
|
|||
From 0e0f3ce5c1c3d4d112e2a4534fc895aca463e460 Mon Sep 17 00:00:00 2001
|
||||
From: Ronny Chevalier <chevalier.ronny@gmail.com>
|
||||
Date: Thu, 16 Oct 2014 23:22:06 +0200
|
||||
Subject: [PATCH] shared: fix typo
|
||||
|
||||
(cherry picked from commit d3774a1b15ea86f6156269e7ed813830f0c4abb8)
|
||||
---
|
||||
src/shared/capability.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/shared/capability.c b/src/shared/capability.c
|
||||
index d2b901337f..0226542c6c 100644
|
||||
--- a/src/shared/capability.c
|
||||
+++ b/src/shared/capability.c
|
||||
@@ -228,7 +228,7 @@ int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilities) {
|
||||
* which we want to avoid. */
|
||||
|
||||
if (setresgid(gid, gid, gid) < 0) {
|
||||
- log_error("Failed change group ID: %m");
|
||||
+ log_error("Failed to change group ID: %m");
|
||||
return -errno;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilities) {
|
||||
|
||||
r = setresuid(uid, uid, uid);
|
||||
if (r < 0) {
|
||||
- log_error("Failed change user ID: %m");
|
||||
+ log_error("Failed to change user ID: %m");
|
||||
return -errno;
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
From 471a21a8647c54a0a9c7334a7dde4e6dd1712248 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Reisner <dreisner@archlinux.org>
|
||||
Date: Thu, 30 Oct 2014 20:12:05 -0400
|
||||
Subject: [PATCH] shared/install: avoid prematurely rejecting "missing" units
|
||||
|
||||
f7101b7368df copied some logic to prevent enabling masked units, but
|
||||
also added a check which causes attempts to enable templated units to
|
||||
fail. Since we know the logic beyond this check will properly handle
|
||||
units which truly do not exist, we can rely on the unit file state
|
||||
comparison to suffice for expressing the intent of f7101b7368df.
|
||||
|
||||
ref: https://bugs.archlinux.org/task/42616
|
||||
(cherry picked from commit 0ffce503cd6e5a5ff5ba5cd1cc23684cfb8bb9e3)
|
||||
---
|
||||
src/shared/install.c | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/shared/install.c b/src/shared/install.c
|
||||
index 035b44cc52..cab93e8dc6 100644
|
||||
--- a/src/shared/install.c
|
||||
+++ b/src/shared/install.c
|
||||
@@ -1620,12 +1620,10 @@ int unit_file_enable(
|
||||
STRV_FOREACH(i, files) {
|
||||
UnitFileState state;
|
||||
|
||||
+ /* We only want to know if this unit is masked, so we ignore
|
||||
+ * errors from unit_file_get_state, deferring other checks.
|
||||
+ * This allows templated units to be enabled on the fly. */
|
||||
state = unit_file_get_state(scope, root_dir, *i);
|
||||
- if (state < 0) {
|
||||
- log_error("Failed to get unit file state for %s: %s", *i, strerror(-state));
|
||||
- return state;
|
||||
- }
|
||||
-
|
||||
if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) {
|
||||
log_error("Failed to enable unit: Unit %s is masked", *i);
|
||||
return -ENOTSUP;
|
|
@ -1,75 +0,0 @@
|
|||
From 9706b7533be86dad6303cf91a886a8491d2995f7 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 30 Oct 2014 20:53:23 +0100
|
||||
Subject: [PATCH] nspawn: don't make up -1 as error code
|
||||
|
||||
(cherry picked from commit fddbb89c46ea5d39e52e361b390ea34a06cbb67c)
|
||||
---
|
||||
src/nspawn/nspawn.c | 27 +++++++++++----------------
|
||||
1 file changed, 11 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
|
||||
index d88987a580..7e96efd425 100644
|
||||
--- a/src/nspawn/nspawn.c
|
||||
+++ b/src/nspawn/nspawn.c
|
||||
@@ -2931,33 +2931,30 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) {
|
||||
}
|
||||
|
||||
switch (status.si_code) {
|
||||
+
|
||||
case CLD_EXITED:
|
||||
r = status.si_status;
|
||||
if (r == 0) {
|
||||
if (!arg_quiet)
|
||||
- log_debug("Container %s exited successfully.",
|
||||
- arg_machine);
|
||||
+ log_debug("Container %s exited successfully.", arg_machine);
|
||||
|
||||
*container = CONTAINER_TERMINATED;
|
||||
- } else {
|
||||
- log_error("Container %s failed with error code %i.",
|
||||
- arg_machine, status.si_status);
|
||||
- }
|
||||
+ } else
|
||||
+ log_error("Container %s failed with error code %i.", arg_machine, status.si_status);
|
||||
+
|
||||
break;
|
||||
|
||||
case CLD_KILLED:
|
||||
if (status.si_status == SIGINT) {
|
||||
if (!arg_quiet)
|
||||
- log_info("Container %s has been shut down.",
|
||||
- arg_machine);
|
||||
+ log_info("Container %s has been shut down.", arg_machine);
|
||||
|
||||
*container = CONTAINER_TERMINATED;
|
||||
r = 0;
|
||||
break;
|
||||
} else if (status.si_status == SIGHUP) {
|
||||
if (!arg_quiet)
|
||||
- log_info("Container %s is being rebooted.",
|
||||
- arg_machine);
|
||||
+ log_info("Container %s is being rebooted.", arg_machine);
|
||||
|
||||
*container = CONTAINER_REBOOTED;
|
||||
r = 0;
|
||||
@@ -2966,15 +2963,13 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) {
|
||||
/* CLD_KILLED fallthrough */
|
||||
|
||||
case CLD_DUMPED:
|
||||
- log_error("Container %s terminated by signal %s.",
|
||||
- arg_machine, signal_to_string(status.si_status));
|
||||
- r = -1;
|
||||
+ log_error("Container %s terminated by signal %s.", arg_machine, signal_to_string(status.si_status));
|
||||
+ r = -EIO;
|
||||
break;
|
||||
|
||||
default:
|
||||
- log_error("Container %s failed due to unknown reason.",
|
||||
- arg_machine);
|
||||
- r = -1;
|
||||
+ log_error("Container %s failed due to unknown reason.", arg_machine);
|
||||
+ r = -EIO;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
From cae7f26accc90031b04c6cedae10b54a6c854c87 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 31 Oct 2014 16:22:36 +0100
|
||||
Subject: [PATCH] units: don't order journal flushing afte remote-fs.target
|
||||
|
||||
Instead, only depend on the actual file systems we need.
|
||||
|
||||
This should solve dep loops on setups where remote-fs.target is moved
|
||||
into late boot.
|
||||
|
||||
(cherry picked from commit 919699ec301ea507edce4a619141ed22e789ac0d)
|
||||
---
|
||||
src/nspawn/nspawn.c | 38 ++++++++++++++--------------------
|
||||
units/systemd-journal-flush.service.in | 3 ++-
|
||||
2 files changed, 18 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
|
||||
index 7e96efd425..f332ade03e 100644
|
||||
--- a/src/nspawn/nspawn.c
|
||||
+++ b/src/nspawn/nspawn.c
|
||||
@@ -2911,8 +2911,8 @@ static int change_uid_gid(char **_home) {
|
||||
* container argument.
|
||||
* > 0 : The program executed in the container terminated with an
|
||||
* error. The exit code of the program executed in the
|
||||
- * container is returned. No change is made to the container
|
||||
- * argument.
|
||||
+ * container is returned. The container argument has been set
|
||||
+ * to CONTAINER_TERMINATED.
|
||||
* 0 : The container is being rebooted, has been shut down or exited
|
||||
* successfully. The container argument has been set to either
|
||||
* CONTAINER_TERMINATED or CONTAINER_REBOOTED.
|
||||
@@ -2921,8 +2921,8 @@ static int change_uid_gid(char **_home) {
|
||||
* error is indicated by a non-zero value.
|
||||
*/
|
||||
static int wait_for_container(pid_t pid, ContainerStatus *container) {
|
||||
- int r;
|
||||
siginfo_t status;
|
||||
+ int r;
|
||||
|
||||
r = wait_for_terminate(pid, &status);
|
||||
if (r < 0) {
|
||||
@@ -2933,44 +2933,38 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) {
|
||||
switch (status.si_code) {
|
||||
|
||||
case CLD_EXITED:
|
||||
- r = status.si_status;
|
||||
- if (r == 0) {
|
||||
- if (!arg_quiet)
|
||||
- log_debug("Container %s exited successfully.", arg_machine);
|
||||
+ if (status.si_status == 0) {
|
||||
+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s exited successfully.", arg_machine);
|
||||
|
||||
- *container = CONTAINER_TERMINATED;
|
||||
} else
|
||||
- log_error("Container %s failed with error code %i.", arg_machine, status.si_status);
|
||||
+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s failed with error code %i.", arg_machine, status.si_status);
|
||||
|
||||
- break;
|
||||
+ *container = CONTAINER_TERMINATED;
|
||||
+ return status.si_status;
|
||||
|
||||
case CLD_KILLED:
|
||||
if (status.si_status == SIGINT) {
|
||||
- if (!arg_quiet)
|
||||
- log_info("Container %s has been shut down.", arg_machine);
|
||||
|
||||
+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s has been shut down.", arg_machine);
|
||||
*container = CONTAINER_TERMINATED;
|
||||
- r = 0;
|
||||
- break;
|
||||
+ return 0;
|
||||
+
|
||||
} else if (status.si_status == SIGHUP) {
|
||||
- if (!arg_quiet)
|
||||
- log_info("Container %s is being rebooted.", arg_machine);
|
||||
|
||||
+ log_full(arg_quiet ? LOG_DEBUG : LOG_INFO, "Container %s is being rebooted.", arg_machine);
|
||||
*container = CONTAINER_REBOOTED;
|
||||
- r = 0;
|
||||
- break;
|
||||
+ return 0;
|
||||
}
|
||||
+
|
||||
/* CLD_KILLED fallthrough */
|
||||
|
||||
case CLD_DUMPED:
|
||||
log_error("Container %s terminated by signal %s.", arg_machine, signal_to_string(status.si_status));
|
||||
- r = -EIO;
|
||||
- break;
|
||||
+ return -EIO;
|
||||
|
||||
default:
|
||||
log_error("Container %s failed due to unknown reason.", arg_machine);
|
||||
- r = -EIO;
|
||||
- break;
|
||||
+ return -EIO;
|
||||
}
|
||||
|
||||
return r;
|
||||
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
|
||||
index 699670bb4e..2612220e2e 100644
|
||||
--- a/units/systemd-journal-flush.service.in
|
||||
+++ b/units/systemd-journal-flush.service.in
|
||||
@@ -10,8 +10,9 @@ Description=Trigger Flushing of Journal to Persistent Storage
|
||||
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
|
||||
DefaultDependencies=no
|
||||
Requires=systemd-journald.service
|
||||
-After=systemd-journald.service local-fs.target remote-fs.target
|
||||
+After=systemd-journald.service
|
||||
Before=systemd-user-sessions.service systemd-tmpfiles-setup.service
|
||||
+RequiresMountsFor=/var/log/journal
|
||||
|
||||
[Service]
|
||||
ExecStart=@rootbindir@/journalctl --flush
|
|
@ -1,75 +0,0 @@
|
|||
From bc1912751bdb942cb36ccbadc823c0ba1377ec46 Mon Sep 17 00:00:00 2001
|
||||
From: Marcel Holtmann <marcel@holtmann.org>
|
||||
Date: Fri, 31 Oct 2014 20:37:59 +0100
|
||||
Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
|
||||
|
||||
(cherry picked from commit 5d20fde4a5c4dff4d7c737b545fbd13582d544c1)
|
||||
---
|
||||
hwdb/20-bluetooth-vendor-product.hwdb | 57 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 57 insertions(+)
|
||||
|
||||
diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
|
||||
index ee2efdff2e..58ca87d69d 100644
|
||||
--- a/hwdb/20-bluetooth-vendor-product.hwdb
|
||||
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
|
||||
@@ -1166,3 +1166,60 @@ bluetooth:v0181*
|
||||
|
||||
bluetooth:v0182*
|
||||
ID_VENDOR_FROM_DATABASE=HOP Ubiquitous
|
||||
+
|
||||
+bluetooth:v0183*
|
||||
+ ID_VENDOR_FROM_DATABASE=To Be Assigned
|
||||
+
|
||||
+bluetooth:v0184*
|
||||
+ ID_VENDOR_FROM_DATABASE=Nectar
|
||||
+
|
||||
+bluetooth:v0185*
|
||||
+ ID_VENDOR_FROM_DATABASE=bel'apps LLC
|
||||
+
|
||||
+bluetooth:v0186*
|
||||
+ ID_VENDOR_FROM_DATABASE=CORE Lighting Ltd
|
||||
+
|
||||
+bluetooth:v0187*
|
||||
+ ID_VENDOR_FROM_DATABASE=Seraphim Sense Ltd
|
||||
+
|
||||
+bluetooth:v0188*
|
||||
+ ID_VENDOR_FROM_DATABASE=Unico RBC
|
||||
+
|
||||
+bluetooth:v0189*
|
||||
+ ID_VENDOR_FROM_DATABASE=Physical Enterprises Inc.
|
||||
+
|
||||
+bluetooth:v018A*
|
||||
+ ID_VENDOR_FROM_DATABASE=Able Trend Technology Limited
|
||||
+
|
||||
+bluetooth:v018B*
|
||||
+ ID_VENDOR_FROM_DATABASE=Konica Minolta, Inc.
|
||||
+
|
||||
+bluetooth:v018C*
|
||||
+ ID_VENDOR_FROM_DATABASE=Wilo SE
|
||||
+
|
||||
+bluetooth:v018D*
|
||||
+ ID_VENDOR_FROM_DATABASE=Extron Design Services
|
||||
+
|
||||
+bluetooth:v018E*
|
||||
+ ID_VENDOR_FROM_DATABASE=Fitbit, Inc.
|
||||
+
|
||||
+bluetooth:v018F*
|
||||
+ ID_VENDOR_FROM_DATABASE=Fireflies Systems
|
||||
+
|
||||
+bluetooth:v0190*
|
||||
+ ID_VENDOR_FROM_DATABASE=Intelletto Technologies Inc.
|
||||
+
|
||||
+bluetooth:v0191*
|
||||
+ ID_VENDOR_FROM_DATABASE=FDK CORPORATION
|
||||
+
|
||||
+bluetooth:v0192*
|
||||
+ ID_VENDOR_FROM_DATABASE=Cloudleaf, Inc
|
||||
+
|
||||
+bluetooth:v0193*
|
||||
+ ID_VENDOR_FROM_DATABASE=Maveric Automation LLC
|
||||
+
|
||||
+bluetooth:v0194*
|
||||
+ ID_VENDOR_FROM_DATABASE=Acoustic Stream Corporation
|
||||
+
|
||||
+bluetooth:v0195*
|
||||
+ ID_VENDOR_FROM_DATABASE=Zuli
|
|
@ -1,60 +0,0 @@
|
|||
From 84ba1738e89859f02e6d333337afb3b80cb44cdb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sat, 1 Nov 2014 11:32:44 -0400
|
||||
Subject: [PATCH] libudev: modernization
|
||||
|
||||
This brings udev logging style a bit closer to normal systemd convention.
|
||||
|
||||
(cherry picked from commit fe756ed9ec2c0fa33c30b1d9a33d745dc1593aed)
|
||||
---
|
||||
src/libudev/libudev.c | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c
|
||||
index e2ab960d55..7803863b2e 100644
|
||||
--- a/src/libudev/libudev.c
|
||||
+++ b/src/libudev/libudev.c
|
||||
@@ -119,7 +119,7 @@ _public_ struct udev *udev_new(void)
|
||||
{
|
||||
struct udev *udev;
|
||||
const char *env;
|
||||
- FILE *f;
|
||||
+ _cleanup_free_ FILE *f = NULL;
|
||||
|
||||
udev = new0(struct udev, 1);
|
||||
if (udev == NULL)
|
||||
@@ -132,7 +132,7 @@ _public_ struct udev *udev_new(void)
|
||||
f = fopen("/etc/udev/udev.conf", "re");
|
||||
if (f != NULL) {
|
||||
char line[UTIL_LINE_SIZE];
|
||||
- int line_nr = 0;
|
||||
+ unsigned line_nr = 0;
|
||||
|
||||
while (fgets(line, sizeof(line), f)) {
|
||||
size_t len;
|
||||
@@ -153,7 +153,7 @@ _public_ struct udev *udev_new(void)
|
||||
/* split key/value */
|
||||
val = strchr(key, '=');
|
||||
if (val == NULL) {
|
||||
- udev_err(udev, "missing <key>=<value> in /etc/udev/udev.conf[%i]; skip line\n", line_nr);
|
||||
+ udev_err(udev, "/etc/udev/udev.conf:%u: missing assignment, skipping line.\n", line_nr);
|
||||
continue;
|
||||
}
|
||||
val[0] = '\0';
|
||||
@@ -185,7 +185,7 @@ _public_ struct udev *udev_new(void)
|
||||
/* unquote */
|
||||
if (val[0] == '"' || val[0] == '\'') {
|
||||
if (val[len-1] != val[0]) {
|
||||
- udev_err(udev, "inconsistent quoting in /etc/udev/udev.conf[%i]; skip line\n", line_nr);
|
||||
+ udev_err(udev, "/etc/udev/udev.conf:%u: inconsistent quoting, skipping line.\n", line_nr);
|
||||
continue;
|
||||
}
|
||||
val[len-1] = '\0';
|
||||
@@ -197,7 +197,6 @@ _public_ struct udev *udev_new(void)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
- fclose(f);
|
||||
}
|
||||
|
||||
/* environment overrides config */
|
|
@ -1,72 +0,0 @@
|
|||
From bedfb81393f6718d07dc7857bd94ddf0c9e17d67 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sat, 1 Nov 2014 12:06:41 -0400
|
||||
Subject: [PATCH] libudev: do not accept invalid log levels
|
||||
|
||||
Invalid log levels lead to a assert failure later on.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=85657
|
||||
(cherry picked from commit ee7122c0ec6aa11f02e9e8d94254b353f12d2c14)
|
||||
---
|
||||
src/libudev/libudev-util.c | 10 +++++++---
|
||||
src/libudev/libudev.c | 19 ++++++++++++++++---
|
||||
2 files changed, 23 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c
|
||||
index f3fdf3b5aa..0bc10f3470 100644
|
||||
--- a/src/libudev/libudev-util.c
|
||||
+++ b/src/libudev/libudev-util.c
|
||||
@@ -159,9 +159,13 @@ int util_log_priority(const char *priority)
|
||||
char *endptr;
|
||||
int prio;
|
||||
|
||||
- prio = strtol(priority, &endptr, 10);
|
||||
- if (endptr[0] == '\0' || isspace(endptr[0]))
|
||||
- return prio;
|
||||
+ prio = strtoul(priority, &endptr, 10);
|
||||
+ if (endptr[0] == '\0' || isspace(endptr[0])) {
|
||||
+ if (prio >= 0 && prio <= 7)
|
||||
+ return prio;
|
||||
+ else
|
||||
+ return -ERANGE;
|
||||
+ }
|
||||
|
||||
return log_level_from_string(priority);
|
||||
}
|
||||
diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c
|
||||
index 7803863b2e..8464427651 100644
|
||||
--- a/src/libudev/libudev.c
|
||||
+++ b/src/libudev/libudev.c
|
||||
@@ -193,7 +193,13 @@ _public_ struct udev *udev_new(void)
|
||||
}
|
||||
|
||||
if (streq(key, "udev_log")) {
|
||||
- udev_set_log_priority(udev, util_log_priority(val));
|
||||
+ int prio;
|
||||
+
|
||||
+ prio = util_log_priority(val);
|
||||
+ if (prio < 0)
|
||||
+ udev_err(udev, "/etc/udev/udev.conf:%u: invalid logging level '%s', ignoring.\n", line_nr, val);
|
||||
+ else
|
||||
+ udev_set_log_priority(udev, prio);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -201,8 +207,15 @@ _public_ struct udev *udev_new(void)
|
||||
|
||||
/* environment overrides config */
|
||||
env = secure_getenv("UDEV_LOG");
|
||||
- if (env != NULL)
|
||||
- udev_set_log_priority(udev, util_log_priority(env));
|
||||
+ if (env != NULL) {
|
||||
+ int prio;
|
||||
+
|
||||
+ prio = util_log_priority(env);
|
||||
+ if (prio < 0)
|
||||
+ udev_err(udev, "$UDEV_LOG specifies invalid logging level '%s', ignoring.\n", env);
|
||||
+ else
|
||||
+ udev_set_log_priority(udev, prio);
|
||||
+ }
|
||||
|
||||
return udev;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
From c2c2394e0c29458ce9ed3c990c8978fafdc1a97b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sat, 1 Nov 2014 14:36:29 -0400
|
||||
Subject: [PATCH] man: describe all log levels in udevadm(8)
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=85657
|
||||
(cherry picked from commit e03234a16047dc635d13f7118fc9fcf243744b51)
|
||||
---
|
||||
man/udevadm.xml | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/man/udevadm.xml b/man/udevadm.xml
|
||||
index b85d9a9249..fd17f40be3 100644
|
||||
--- a/man/udevadm.xml
|
||||
+++ b/man/udevadm.xml
|
||||
@@ -368,9 +368,14 @@
|
||||
<term><option>-l</option></term>
|
||||
<term><option>--log-priority=<replaceable>value</replaceable></option></term>
|
||||
<listitem>
|
||||
- <para>Set the internal log level of systemd-udevd. Valid values are the numerical
|
||||
- syslog priorities or their textual representations: <option>err</option>,
|
||||
- <option>info</option> and <option>debug</option>.</para>
|
||||
+ <para>Set the internal log level of
|
||||
+ <filename>systemd-udevd</filename>. Valid values are the
|
||||
+ numerical syslog priorities or their textual
|
||||
+ representations: <option>emerg</option>,
|
||||
+ <option>alert</option>, <option>crit</option>,
|
||||
+ <option>err</option>, <option>warning</option>,
|
||||
+ <option>notice</option>, <option>info</option>, and
|
||||
+ <option>debug</option>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
|
@ -1,50 +0,0 @@
|
|||
From 87c237865b445906e3df7873b0fcd0a9f8483f13 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Williams <dcbw@redhat.com>
|
||||
Date: Fri, 31 Oct 2014 12:20:21 -0500
|
||||
Subject: [PATCH] sd-dhcp6-client: fix off-by-two error in DUID length
|
||||
|
||||
The duid data passed by the caller does not include the DUID type,
|
||||
but sd_dhcp6_client_set_duid() was treating it like it did.
|
||||
|
||||
(cherry picked from commit 393b6f28ecec537f05567c4ec8af8c499d0ea226)
|
||||
---
|
||||
src/libsystemd-network/sd-dhcp6-client.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
|
||||
index fa4f9b5dc2..dbec1a2a8b 100644
|
||||
--- a/src/libsystemd-network/sd-dhcp6-client.c
|
||||
+++ b/src/libsystemd-network/sd-dhcp6-client.c
|
||||
@@ -200,19 +200,19 @@ int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *du
|
||||
|
||||
switch (type) {
|
||||
case DHCP6_DUID_LLT:
|
||||
- if (duid_len <= sizeof(client->duid.llt))
|
||||
+ if (duid_len <= sizeof(client->duid.llt) - 2)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case DHCP6_DUID_EN:
|
||||
- if (duid_len != sizeof(client->duid.en))
|
||||
+ if (duid_len != sizeof(client->duid.en) - 2)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case DHCP6_DUID_LL:
|
||||
- if (duid_len <= sizeof(client->duid.ll))
|
||||
+ if (duid_len <= sizeof(client->duid.ll) - 2)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case DHCP6_DUID_UUID:
|
||||
- if (duid_len != sizeof(client->duid.uuid))
|
||||
+ if (duid_len != sizeof(client->duid.uuid) - 2)
|
||||
return -EINVAL;
|
||||
break;
|
||||
default:
|
||||
@@ -222,7 +222,7 @@ int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *du
|
||||
|
||||
client->duid.raw.type = htobe16(type);
|
||||
memcpy(&client->duid.raw.data, duid, duid_len);
|
||||
- client->duid_len = duid_len;
|
||||
+ client->duid_len = duid_len + 2; /* +2 for sizeof(type) */
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
From 7400d7681c4cb18c2d7f993165f60558e509275a Mon Sep 17 00:00:00 2001
|
||||
From: Jan Synacek <jsynacek@redhat.com>
|
||||
Date: Fri, 31 Oct 2014 10:16:45 +0100
|
||||
Subject: [PATCH] core: improve error message when machine id is missing
|
||||
|
||||
(cherry picked from commit 86fb9ca7ae49790880d4b3ce523988b01b13d9ae)
|
||||
---
|
||||
src/core/machine-id-setup.c | 17 ++++++++++++-----
|
||||
1 file changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
|
||||
index efb074fcbd..ce6d8e02d0 100644
|
||||
--- a/src/core/machine-id-setup.c
|
||||
+++ b/src/core/machine-id-setup.c
|
||||
@@ -162,7 +162,7 @@ static int generate(char id[34], const char *root) {
|
||||
int machine_id_setup(const char *root) {
|
||||
const char *etc_machine_id, *run_machine_id;
|
||||
_cleanup_close_ int fd = -1;
|
||||
- bool writable = false;
|
||||
+ bool writable = true;
|
||||
struct stat st;
|
||||
char id[34]; /* 32 + \n + \0 */
|
||||
int r;
|
||||
@@ -186,12 +186,19 @@ int machine_id_setup(const char *root) {
|
||||
|
||||
mkdir_parents(etc_machine_id, 0755);
|
||||
fd = open(etc_machine_id, O_RDWR|O_CREAT|O_CLOEXEC|O_NOCTTY, 0444);
|
||||
- if (fd >= 0)
|
||||
- writable = true;
|
||||
- else {
|
||||
+ if (fd < 0) {
|
||||
+ int old_errno = errno;
|
||||
+
|
||||
fd = open(etc_machine_id, O_RDONLY|O_CLOEXEC|O_NOCTTY);
|
||||
if (fd < 0) {
|
||||
- log_error("Cannot open %s: %m", etc_machine_id);
|
||||
+ if (old_errno == EROFS && errno == ENOENT)
|
||||
+ log_error("System cannot boot: Missing /etc/machine-id and /etc is mounted read-only.\n"
|
||||
+ "Booting up is supported only when:\n"
|
||||
+ "1) /etc/machine-id exists and is populated.\n"
|
||||
+ "2) /etc/machine-id exists and is empty.\n"
|
||||
+ "3) /etc/machine-id is missing and /etc is writable.\n");
|
||||
+ else
|
||||
+ log_error("Cannot open %s: %m", etc_machine_id);
|
||||
return -errno;
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
From 0ad235ddb0640251e6be5a7250ee2b9236571521 Mon Sep 17 00:00:00 2001
|
||||
From: Umut Tezduyar Lindskog <umut.tezduyar@axis.com>
|
||||
Date: Wed, 29 Oct 2014 11:20:02 +0100
|
||||
Subject: [PATCH] man: explain journalctl --flush correctly
|
||||
|
||||
(cherry picked from commit 2a97b03b3b087e724867e7501ae0c1535ee35031)
|
||||
---
|
||||
NEWS | 4 ++++
|
||||
man/journalctl.xml | 4 ++--
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 82a1948a38..d8770a0fcf 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -7,6 +7,10 @@ CHANGES WITH 217:
|
||||
show log timestamps in the UTC timezone. journalctl now also
|
||||
accepts -n/--lines=all to disable line capping in a pager.
|
||||
|
||||
+ * journalctl gained a new switch, --flush, that flushes
|
||||
+ logs from /run/log/journal to /var/log/journal if
|
||||
+ persistent storage is enabled.
|
||||
+
|
||||
* Services can notify the manager before they start a reload
|
||||
(by sending RELOADING=1) or shutdown (by sending
|
||||
STOPPING=1). This allows the manager to track and show the
|
||||
diff --git a/man/journalctl.xml b/man/journalctl.xml
|
||||
index db2a1e142b..0ed3ca3bc8 100644
|
||||
--- a/man/journalctl.xml
|
||||
+++ b/man/journalctl.xml
|
||||
@@ -883,9 +883,9 @@
|
||||
|
||||
<listitem><para>Asks the Journal
|
||||
daemon to flush any log data stored in
|
||||
- <filename>/run/systemd/log</filename>
|
||||
+ <filename>/run/log/journal</filename>
|
||||
into
|
||||
- <filename>/var/systemd/log</filename>,
|
||||
+ <filename>/var/log/journal</filename>,
|
||||
if persistent storage is enabled. This
|
||||
call does not return until the
|
||||
operation is
|
|
@ -1,45 +0,0 @@
|
|||
From 48a8d6bbdb6132ee4086e380437fac74457738d7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sat, 1 Nov 2014 13:52:14 -0400
|
||||
Subject: [PATCH] systemd-journal-flush.service: remove "trigger" from
|
||||
description
|
||||
|
||||
This service is now synchronous, so "trigger" is misleading.
|
||||
|
||||
(cherry picked from commit a65b82457735df2ef58736a55846f400124a8dc0)
|
||||
---
|
||||
NEWS | 7 ++++---
|
||||
units/systemd-journal-flush.service.in | 2 +-
|
||||
2 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index d8770a0fcf..0ed03daa21 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -7,9 +7,10 @@ CHANGES WITH 217:
|
||||
show log timestamps in the UTC timezone. journalctl now also
|
||||
accepts -n/--lines=all to disable line capping in a pager.
|
||||
|
||||
- * journalctl gained a new switch, --flush, that flushes
|
||||
- logs from /run/log/journal to /var/log/journal if
|
||||
- persistent storage is enabled.
|
||||
+ * journalctl gained a new switch, --flush, that synchronously
|
||||
+ flushes logs from /run/log/journal to /var/log/journal if
|
||||
+ persistent storage is enabled. systemd-journal-flush.service
|
||||
+ now waits until the operation is complete.
|
||||
|
||||
* Services can notify the manager before they start a reload
|
||||
(by sending RELOADING=1) or shutdown (by sending
|
||||
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
|
||||
index 2612220e2e..fa290897d6 100644
|
||||
--- a/units/systemd-journal-flush.service.in
|
||||
+++ b/units/systemd-journal-flush.service.in
|
||||
@@ -6,7 +6,7 @@
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
-Description=Trigger Flushing of Journal to Persistent Storage
|
||||
+Description=Flush Journal to Persistent Storage
|
||||
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
|
||||
DefaultDependencies=no
|
||||
Requires=systemd-journald.service
|
|
@ -1,38 +0,0 @@
|
|||
From c21b1d4f483825ccfae22f5ea384bb14eb86be49 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chapman <mike@very.puzzling.org>
|
||||
Date: Wed, 29 Oct 2014 11:54:07 +1100
|
||||
Subject: [PATCH] kernel-install/90-loaderentry.install: fix cmdline parsing
|
||||
|
||||
A recent commit (2f3a215) changed the parsing of /proc/cmdline to use a
|
||||
shell array. Unfortunately, this introduced a bug: "read -ar line"
|
||||
populates the shell variable $r, not $line. This breaks installation of
|
||||
new loader entries:
|
||||
|
||||
# kernel-install add 3.17.1-304.fc21.x86_64 \
|
||||
/boot/vmlinuz-3.17.1-304.fc21.x86_64
|
||||
Could not determine the kernel command line parameters.
|
||||
Please specify the kernel command line in /etc/kernel/cmdline!
|
||||
|
||||
This commit alters the read command to correctly populate the $line
|
||||
array instead.
|
||||
|
||||
(cherry picked from commit c008f6ee8df9aa36782378d1a3767543b3635a54)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1158035
|
||||
---
|
||||
src/kernel-install/90-loaderentry.install | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
|
||||
index 6f032b5a4b..d433e00a5c 100644
|
||||
--- a/src/kernel-install/90-loaderentry.install
|
||||
+++ b/src/kernel-install/90-loaderentry.install
|
||||
@@ -47,7 +47,7 @@ if [[ -f /etc/kernel/cmdline ]]; then
|
||||
fi
|
||||
|
||||
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
||||
- read -ar line < /proc/cmdline
|
||||
+ read -a line -r < /proc/cmdline
|
||||
for i in "${line[@]}"; do
|
||||
[[ "${i#initrd=*}" != "$i" ]] && continue
|
||||
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
|
|
@ -1,27 +0,0 @@
|
|||
From 98ec0eb525d2091a88f5226ec96c23a7407d276e Mon Sep 17 00:00:00 2001
|
||||
From: Joe Lawrence <joe.lawrence@stratus.com>
|
||||
Date: Sat, 1 Nov 2014 12:18:08 -0400
|
||||
Subject: [PATCH] scsi_id: fix usage spelling
|
||||
|
||||
s/threat/treat/g
|
||||
|
||||
(cherry picked from commit 85f13fce322e6303e7e4e55cb43104f81827f36b)
|
||||
---
|
||||
src/udev/scsi_id/scsi_id.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
|
||||
index 4d9378a5c0..48c6cf7dba 100644
|
||||
--- a/src/udev/scsi_id/scsi_id.c
|
||||
+++ b/src/udev/scsi_id/scsi_id.c
|
||||
@@ -317,8 +317,8 @@ static void help(void) {
|
||||
" -f,--config= location of config file\n"
|
||||
" -p,--page=0x80|0x83|pre-spc3-83 SCSI page (0x80, 0x83, pre-spc3-83)\n"
|
||||
" -s,--sg-version=3|4 use SGv3 or SGv4\n"
|
||||
- " -b,--blacklisted threat device as blacklisted\n"
|
||||
- " -g,--whitelisted threat device as whitelisted\n"
|
||||
+ " -b,--blacklisted treat device as blacklisted\n"
|
||||
+ " -g,--whitelisted treat device as whitelisted\n"
|
||||
" -u,--replace-whitespace replace all whitespace by underscores\n"
|
||||
" -v,--verbose verbose logging\n"
|
||||
" --version print version\n"
|
|
@ -1,28 +0,0 @@
|
|||
From 7410911917e8b2ffef4ee0c9644632c382bd1aef Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Sat, 1 Nov 2014 15:49:53 -0400
|
||||
Subject: [PATCH] libudev: Use correct free function
|
||||
|
||||
FILE * wants cleanup_fclose().
|
||||
|
||||
Spotted by udev hwdb segfaulting in gnome-continuous' buildroot
|
||||
construction.
|
||||
|
||||
(cherry picked from commit ea55caa60c6860e33fa4f1a216c003ff666e9c68)
|
||||
---
|
||||
src/libudev/libudev.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c
|
||||
index 8464427651..05f3b479fa 100644
|
||||
--- a/src/libudev/libudev.c
|
||||
+++ b/src/libudev/libudev.c
|
||||
@@ -119,7 +119,7 @@ _public_ struct udev *udev_new(void)
|
||||
{
|
||||
struct udev *udev;
|
||||
const char *env;
|
||||
- _cleanup_free_ FILE *f = NULL;
|
||||
+ _cleanup_fclose_ FILE *f = NULL;
|
||||
|
||||
udev = new0(struct udev, 1);
|
||||
if (udev == NULL)
|
|
@ -1,40 +0,0 @@
|
|||
From bf50845d2c7ebba254ae91b280086701503cf7b9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 2 Nov 2014 12:10:42 -0500
|
||||
Subject: [PATCH] Raise level of 'Found dependency...' lines
|
||||
|
||||
This way they always show up together with 'Found ordering cycle...'.
|
||||
Ordering cycles are a serious error and a major pain to debug. If
|
||||
quiet is enabled, only the first and the last line of output are
|
||||
shown:
|
||||
|
||||
systemd[1]: Found ordering cycle on basic.target/start
|
||||
systemd[1]: Breaking ordering cycle by deleting job timers.target/start
|
||||
systemd[1]: Job timers.target/start deleted to break ordering cycle starting with basic.target/start
|
||||
|
||||
which isn't particularly enlightening. So just show the whole message
|
||||
at the same level.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1158206
|
||||
(cherry picked from commit 14fe721b5f6d8457cc8737fa75f2ed79e7fa534b)
|
||||
---
|
||||
src/core/transaction.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/core/transaction.c b/src/core/transaction.c
|
||||
index dbb4133fe3..91f5ee18df 100644
|
||||
--- a/src/core/transaction.c
|
||||
+++ b/src/core/transaction.c
|
||||
@@ -377,9 +377,9 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
|
||||
for (k = from; k; k = ((k->generation == generation && k->marker != k) ? k->marker : NULL)) {
|
||||
|
||||
/* logging for j not k here here to provide consistent narrative */
|
||||
- log_info_unit(j->unit->id,
|
||||
- "Found dependency on %s/%s",
|
||||
- k->unit->id, job_type_to_string(k->type));
|
||||
+ log_warning_unit(j->unit->id,
|
||||
+ "Found dependency on %s/%s",
|
||||
+ k->unit->id, job_type_to_string(k->type));
|
||||
|
||||
if (!delete && hashmap_get(tr->jobs, k->unit) &&
|
||||
!unit_matters_to_anchor(k->unit, k)) {
|
|
@ -1,124 +0,0 @@
|
|||
From 1034fff7872e864bc6a7e091724b85a44f34474f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 2 Nov 2014 12:19:38 -0500
|
||||
Subject: [PATCH] manager: do not print timing when running in test mode
|
||||
|
||||
(cherry picked from commit 56dacdbc1ca95cef8bf8c97c0d7af761a71eaab3)
|
||||
---
|
||||
src/core/manager.c | 84 ++++++++++++++++++++++++++++++------------------------
|
||||
1 file changed, 46 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/src/core/manager.c b/src/core/manager.c
|
||||
index d427d88d4e..ff29ae1d9d 100644
|
||||
--- a/src/core/manager.c
|
||||
+++ b/src/core/manager.c
|
||||
@@ -2584,45 +2584,13 @@ bool manager_unit_inactive_or_pending(Manager *m, const char *name) {
|
||||
return unit_inactive_or_pending(u);
|
||||
}
|
||||
|
||||
-void manager_check_finished(Manager *m) {
|
||||
+static void manager_notify_finished(Manager *m) {
|
||||
char userspace[FORMAT_TIMESPAN_MAX], initrd[FORMAT_TIMESPAN_MAX], kernel[FORMAT_TIMESPAN_MAX], sum[FORMAT_TIMESPAN_MAX];
|
||||
usec_t firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec;
|
||||
- Unit *u = NULL;
|
||||
- Iterator i;
|
||||
|
||||
- assert(m);
|
||||
-
|
||||
- if (m->n_running_jobs == 0)
|
||||
- m->jobs_in_progress_event_source = sd_event_source_unref(m->jobs_in_progress_event_source);
|
||||
-
|
||||
- if (hashmap_size(m->jobs) > 0) {
|
||||
-
|
||||
- if (m->jobs_in_progress_event_source)
|
||||
- sd_event_source_set_time(m->jobs_in_progress_event_source, now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC);
|
||||
-
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- manager_flip_auto_status(m, false);
|
||||
-
|
||||
- /* Notify Type=idle units that we are done now */
|
||||
- m->idle_pipe_event_source = sd_event_source_unref(m->idle_pipe_event_source);
|
||||
- manager_close_idle_pipe(m);
|
||||
-
|
||||
- /* Turn off confirm spawn now */
|
||||
- m->confirm_spawn = false;
|
||||
-
|
||||
- /* No need to update ask password status when we're going non-interactive */
|
||||
- manager_close_ask_password(m);
|
||||
-
|
||||
- /* This is no longer the first boot */
|
||||
- manager_set_first_boot(m, false);
|
||||
-
|
||||
- if (dual_timestamp_is_set(&m->finish_timestamp))
|
||||
+ if (m->test_run)
|
||||
return;
|
||||
|
||||
- dual_timestamp_get(&m->finish_timestamp);
|
||||
-
|
||||
if (m->running_as == SYSTEMD_SYSTEM && detect_container(NULL) <= 0) {
|
||||
|
||||
/* Note that m->kernel_usec.monotonic is always at 0,
|
||||
@@ -2677,10 +2645,6 @@ void manager_check_finished(Manager *m) {
|
||||
NULL);
|
||||
}
|
||||
|
||||
- SET_FOREACH(u, m->startup_units, i)
|
||||
- if (u->cgroup_path)
|
||||
- cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
|
||||
-
|
||||
bus_manager_send_finished(m, firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec);
|
||||
|
||||
sd_notifyf(false,
|
||||
@@ -2689,6 +2653,50 @@ void manager_check_finished(Manager *m) {
|
||||
format_timespan(sum, sizeof(sum), total_usec, USEC_PER_MSEC));
|
||||
}
|
||||
|
||||
+void manager_check_finished(Manager *m) {
|
||||
+ Unit *u = NULL;
|
||||
+ Iterator i;
|
||||
+
|
||||
+ assert(m);
|
||||
+
|
||||
+ if (m->n_running_jobs == 0)
|
||||
+ m->jobs_in_progress_event_source = sd_event_source_unref(m->jobs_in_progress_event_source);
|
||||
+
|
||||
+ if (hashmap_size(m->jobs) > 0) {
|
||||
+
|
||||
+ if (m->jobs_in_progress_event_source)
|
||||
+ sd_event_source_set_time(m->jobs_in_progress_event_source, now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC);
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ manager_flip_auto_status(m, false);
|
||||
+
|
||||
+ /* Notify Type=idle units that we are done now */
|
||||
+ m->idle_pipe_event_source = sd_event_source_unref(m->idle_pipe_event_source);
|
||||
+ manager_close_idle_pipe(m);
|
||||
+
|
||||
+ /* Turn off confirm spawn now */
|
||||
+ m->confirm_spawn = false;
|
||||
+
|
||||
+ /* No need to update ask password status when we're going non-interactive */
|
||||
+ manager_close_ask_password(m);
|
||||
+
|
||||
+ /* This is no longer the first boot */
|
||||
+ manager_set_first_boot(m, false);
|
||||
+
|
||||
+ if (dual_timestamp_is_set(&m->finish_timestamp))
|
||||
+ return;
|
||||
+
|
||||
+ dual_timestamp_get(&m->finish_timestamp);
|
||||
+
|
||||
+ manager_notify_finished(m);
|
||||
+
|
||||
+ SET_FOREACH(u, m->startup_units, i)
|
||||
+ if (u->cgroup_path)
|
||||
+ cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
|
||||
+}
|
||||
+
|
||||
static int create_generator_dir(Manager *m, char **generator, const char *name) {
|
||||
char *p;
|
||||
int r;
|
|
@ -1,58 +0,0 @@
|
|||
From 0b0aec3a3418f2562805416f1f8ced5cd245c894 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 2 Nov 2014 11:39:17 -0500
|
||||
Subject: [PATCH] unit: do not order timers.target before basic.target
|
||||
|
||||
Since commit 19f8d037833f2 'timer: order OnCalendar units after
|
||||
timer-sync.target if DefaultDependencies=no' timers might get a
|
||||
dependency on time-sync.target, which does not really belong in early
|
||||
boot. If ntp is enabled, time-sync.target might be delayed until a
|
||||
network connection is established.
|
||||
|
||||
It turns out that majority of timer units found in the wild do not
|
||||
need to be started in early boot. Out of the timer units available in
|
||||
Fedora 21, only systemd-readahead-done.timer and mdadm-last-resort@.timer
|
||||
should be started early, but they both have DefaultDependencies=no,
|
||||
so are not part of timers.target anyway. All the rest look like they
|
||||
will be fine with being started a bit later (and the majority even
|
||||
much later, since they run daily or weekly).
|
||||
|
||||
Let timers.target be pulled in by basic.target, but without the
|
||||
temporal dependency. This means timer units are started on a "best
|
||||
effort" schedule.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1158206
|
||||
(cherry picked from commit 3b0217036040a6013faeab4eb9da7469e3bbcfb3)
|
||||
---
|
||||
units/basic.target | 5 ++++-
|
||||
units/timers.target | 3 +++
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/units/basic.target b/units/basic.target
|
||||
index 228f62c4b1..eee3e6b774 100644
|
||||
--- a/units/basic.target
|
||||
+++ b/units/basic.target
|
||||
@@ -8,8 +8,11 @@
|
||||
[Unit]
|
||||
Description=Basic System
|
||||
Documentation=man:systemd.special(7)
|
||||
+
|
||||
Requires=sysinit.target
|
||||
+After=sysinit.target
|
||||
Wants=sockets.target timers.target paths.target slices.target
|
||||
-After=sysinit.target sockets.target timers.target paths.target slices.target
|
||||
+After=sockets.target paths.target slices.target
|
||||
+
|
||||
JobTimeoutSec=15min
|
||||
JobTimeoutAction=poweroff-force
|
||||
diff --git a/units/timers.target b/units/timers.target
|
||||
index 07fda3d9d0..251fa68065 100644
|
||||
--- a/units/timers.target
|
||||
+++ b/units/timers.target
|
||||
@@ -8,3 +8,6 @@
|
||||
[Unit]
|
||||
Description=Timers
|
||||
Documentation=man:systemd.special(7)
|
||||
+
|
||||
+DefaultDependencies=no
|
||||
+Conflicts=shutdown.target
|
|
@ -1,28 +0,0 @@
|
|||
From ce5c8ab64093246bd0cdd2037789e947d80551ca Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 2 Nov 2014 21:45:42 -0500
|
||||
Subject: [PATCH] units: order sd-journal-flush after sd-remount-fs
|
||||
|
||||
Otherwise we could attempt to flush the journal while /var/log/ was
|
||||
still ro, and silently skip journal flushing.
|
||||
|
||||
The way that errors in flushing are handled should still be changed to
|
||||
be more transparent and robust.
|
||||
|
||||
(cherry picked from commit 1f1926aa5e836caa3bd6df43704aecd606135103)
|
||||
---
|
||||
units/systemd-journal-flush.service.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
|
||||
index fa290897d6..98c91b4bc5 100644
|
||||
--- a/units/systemd-journal-flush.service.in
|
||||
+++ b/units/systemd-journal-flush.service.in
|
||||
@@ -11,6 +11,7 @@ Documentation=man:systemd-journald.service(8) man:journald.conf(5)
|
||||
DefaultDependencies=no
|
||||
Requires=systemd-journald.service
|
||||
After=systemd-journald.service
|
||||
+After=systemd-remount-fs.service
|
||||
Before=systemd-user-sessions.service systemd-tmpfiles-setup.service
|
||||
RequiresMountsFor=/var/log/journal
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
From be463cec86a08f14b565f5c7324fc5b8696a0161 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
Date: Mon, 3 Nov 2014 15:58:30 +0100
|
||||
Subject: [PATCH] man: sd_event_add_post - fix typo
|
||||
|
||||
(cherry picked from commit f49481d0ca170ea567b46fde6c1c089b1dbb49cb)
|
||||
---
|
||||
man/sd_event_add_defer.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/sd_event_add_defer.xml b/man/sd_event_add_defer.xml
|
||||
index 442600a93e..dcc76cd48f 100644
|
||||
--- a/man/sd_event_add_defer.xml
|
||||
+++ b/man/sd_event_add_defer.xml
|
||||
@@ -104,7 +104,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
default, the handler will be called once
|
||||
(<constant>SD_EVENT_ONESHOT</constant>).</para>
|
||||
|
||||
- <para><function>sd_event_add_defer()</function> adds a new event
|
||||
+ <para><function>sd_event_add_post()</function> adds a new event
|
||||
source that will "fire" if any event handlers are invoked whenever
|
||||
the event loop is run. By default, the source is enabled
|
||||
permanently (<constant>SD_EVENT_ON</constant>).</para>
|
|
@ -1,22 +0,0 @@
|
|||
From db1bd7139d53e7417ce1ed992c08ba52b83dfb0a Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 3 Nov 2014 21:11:16 +0100
|
||||
Subject: [PATCH] journald: fix minor memory leak
|
||||
|
||||
(cherry picked from commit 99d0966e75a984bed4f117c888ecc93e16e7b7b6)
|
||||
---
|
||||
src/journal/journald-server.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
||||
index 12735c4b81..08b143b630 100644
|
||||
--- a/src/journal/journald-server.c
|
||||
+++ b/src/journal/journald-server.c
|
||||
@@ -1655,6 +1655,7 @@ void server_done(Server *s) {
|
||||
free(s->buffer);
|
||||
free(s->tty_path);
|
||||
free(s->cgroup_root);
|
||||
+ free(s->hostname_field);
|
||||
|
||||
if (s->mmap)
|
||||
mmap_cache_unref(s->mmap);
|
|
@ -1,27 +0,0 @@
|
|||
From a2e4c94df3d38cd2af73546ffd2623d9d1b20baa Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 3 Nov 2014 23:10:34 +0100
|
||||
Subject: [PATCH] journald: fix memory leak on error path
|
||||
|
||||
(cherry picked from commit 26d8ff04914a5208d029e899682cd314b7714bf0)
|
||||
---
|
||||
src/journal/journal-vacuum.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
|
||||
index 7699482a77..226af82da7 100644
|
||||
--- a/src/journal/journal-vacuum.c
|
||||
+++ b/src/journal/journal-vacuum.c
|
||||
@@ -275,7 +275,11 @@ int journal_directory_vacuum(
|
||||
|
||||
patch_realtime(directory, p, &st, &realtime);
|
||||
|
||||
- GREEDY_REALLOC(list, n_allocated, n_list + 1);
|
||||
+ if (!GREEDY_REALLOC(list, n_allocated, n_list + 1)) {
|
||||
+ free(p);
|
||||
+ r = -ENOMEM;
|
||||
+ goto finish;
|
||||
+ }
|
||||
|
||||
list[n_list].filename = p;
|
||||
list[n_list].usage = 512UL * (uint64_t) st.st_blocks;
|
|
@ -1,26 +0,0 @@
|
|||
From f4dab44d63124d6753a9c168442f70ab6a745e2c Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 4 Nov 2014 00:28:33 +0100
|
||||
Subject: [PATCH] journal: when dumping log data with missing COMM fields, show
|
||||
"unknown" instead
|
||||
|
||||
A small readability improvement...
|
||||
|
||||
(cherry picked from commit 1248e84008028ae54326c565fcc65dcbce3556ad)
|
||||
---
|
||||
src/shared/logs-show.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
|
||||
index 04e1165191..e33824be4a 100644
|
||||
--- a/src/shared/logs-show.c
|
||||
+++ b/src/shared/logs-show.c
|
||||
@@ -365,7 +365,7 @@ static int output_short(
|
||||
fprintf(f, " %.*s", (int) comm_len, comm);
|
||||
n += comm_len + 1;
|
||||
} else
|
||||
- fputc(' ', f);
|
||||
+ fputs(" unknown", f);
|
||||
|
||||
if (pid && shall_print(pid, pid_len, flags)) {
|
||||
fprintf(f, "[%.*s]", (int) pid_len, pid);
|
|
@ -1,31 +0,0 @@
|
|||
From 34f01b8f564d8b0b15bfaa50f4c89ac8cebcf291 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Synacek <jsynacek@redhat.com>
|
||||
Date: Mon, 3 Nov 2014 14:01:04 +0100
|
||||
Subject: [PATCH] localectl: fix localectl set-x11-keymap syntax description
|
||||
|
||||
This complements the fix in:
|
||||
|
||||
commit cd4c6fb12598435fe24431f1dd616f9582f0e3bd
|
||||
Author: Jan Synacek <jsynacek@redhat.com>
|
||||
Date: Mon Oct 20 12:43:39 2014 +0200
|
||||
|
||||
man: fix localectl set-x11-keymap syntax description
|
||||
|
||||
(cherry picked from commit 31cf921abbeafc9dae2d5c777f3e2285e6f4c19d)
|
||||
---
|
||||
src/locale/localectl.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/locale/localectl.c b/src/locale/localectl.c
|
||||
index 3690f9fc89..d4a2d29aea 100644
|
||||
--- a/src/locale/localectl.c
|
||||
+++ b/src/locale/localectl.c
|
||||
@@ -505,7 +505,7 @@ static void help(void) {
|
||||
" list-locales Show known locales\n"
|
||||
" set-keymap MAP [MAP] Set virtual console keyboard mapping\n"
|
||||
" list-keymaps Show known virtual console keyboard mappings\n"
|
||||
- " set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]\n"
|
||||
+ " set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]\n"
|
||||
" Set X11 keyboard mapping\n"
|
||||
" list-x11-keymap-models Show known X11 keyboard mapping models\n"
|
||||
" list-x11-keymap-layouts Show known X11 keyboard mapping layouts\n"
|
|
@ -1,25 +0,0 @@
|
|||
From 328d74f857bcba139289654a88e66693cc24013f Mon Sep 17 00:00:00 2001
|
||||
From: Jan Synacek <jsynacek@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 13:38:59 +0100
|
||||
Subject: [PATCH] man/tmpfiles.d: fix typo
|
||||
|
||||
(cherry picked from commit ff8d1aba5378949c352147cf348aaeafd7221716)
|
||||
---
|
||||
man/tmpfiles.d.xml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
|
||||
index f2360ba9a4..1b14d69a91 100644
|
||||
--- a/man/tmpfiles.d.xml
|
||||
+++ b/man/tmpfiles.d.xml
|
||||
@@ -108,8 +108,8 @@
|
||||
filename in lexicographic order, regardless of which
|
||||
of the directories they reside in. If multiple files
|
||||
specify the same path, the entry in the file with the
|
||||
- lexicographically earliest name will be applied, all
|
||||
- all other conflicting entries will be logged as
|
||||
+ lexicographically earliest name will be applied.
|
||||
+ All other conflicting entries will be logged as
|
||||
errors. When two lines are prefix and suffix of each
|
||||
other, then the prefix is always processed first, the
|
||||
suffix later. Otherwise, the files/directories are
|
|
@ -1,33 +0,0 @@
|
|||
From 5793666dcea38a768af843c6dcd60029a8c43026 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 20:28:08 +0100
|
||||
Subject: [PATCH] units: make systemd-journald.service Type=notify
|
||||
|
||||
It already calls sd_notify(), so it looks like an oversight.
|
||||
|
||||
Without it, its ordering to systemd-journal-flush.service is
|
||||
non-deterministic and the SIGUSR1 from flushing may kill journald before
|
||||
it has its signal handlers set up.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=85871
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1159641
|
||||
(cherry picked from commit a87a38c20196a4aeb56b6ba71d688eefd0b21c30)
|
||||
|
||||
Conflicts:
|
||||
units/systemd-journald.service.in
|
||||
---
|
||||
units/systemd-journald.service.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
|
||||
index 4de38fad59..441d5b1f96 100644
|
||||
--- a/units/systemd-journald.service.in
|
||||
+++ b/units/systemd-journald.service.in
|
||||
@@ -14,6 +14,7 @@ After=systemd-journald.socket systemd-journald-dev-log.socket syslog.socket
|
||||
Before=sysinit.target
|
||||
|
||||
[Service]
|
||||
+Type=notify
|
||||
Sockets=systemd-journald.socket systemd-journald-dev-log.socket
|
||||
ExecStart=@rootlibexecdir@/systemd-journald
|
||||
Restart=always
|
|
@ -1,22 +0,0 @@
|
|||
From 28ad915f797e29462533011ec886640db58884c8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
|
||||
Date: Tue, 4 Nov 2014 20:48:08 -0300
|
||||
Subject: [PATCH] buildsys: test-util needs -lm for fabs()
|
||||
|
||||
(cherry picked from commit 01acf6c3b7390e8c47b7a5cd7cae4bcbd2846634)
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index c80d25df29..a94578a9a7 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -1527,6 +1527,7 @@ test_util_SOURCES = \
|
||||
src/test/test-util.c
|
||||
|
||||
test_util_LDADD = \
|
||||
+ -lm \
|
||||
libsystemd-core.la
|
||||
|
||||
test_uid_range_SOURCES = \
|
|
@ -1,26 +0,0 @@
|
|||
From 86e00bfef3a221d032d2dfdf4592cea152548b16 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 23:45:15 +0000
|
||||
Subject: [PATCH] udev: Fix parsing of udev.event-timeout kernel parameter.
|
||||
|
||||
(cherry picked from commit f671774f52838d35d78e62ddcb781b5b65b3373f)
|
||||
---
|
||||
src/udev/udevd.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
|
||||
index 2e6c71352f..193702cd28 100644
|
||||
--- a/src/udev/udevd.c
|
||||
+++ b/src/udev/udevd.c
|
||||
@@ -994,9 +994,9 @@ static void kernel_cmdline_options(struct udev *udev) {
|
||||
if (r < 0)
|
||||
log_warning("Invalid udev.exec-delay ignored: %s", opt + 16);
|
||||
} else if (startswith(opt, "udev.event-timeout=")) {
|
||||
- r = safe_atou64(opt + 16, &arg_event_timeout_usec);
|
||||
+ r = safe_atou64(opt + 19, &arg_event_timeout_usec);
|
||||
if (r < 0) {
|
||||
- log_warning("Invalid udev.event-timeout ignored: %s", opt + 16);
|
||||
+ log_warning("Invalid udev.event-timeout ignored: %s", opt + 19);
|
||||
break;
|
||||
}
|
||||
arg_event_timeout_usec *= USEC_PER_SEC;
|
|
@ -1,62 +0,0 @@
|
|||
From d135b3c6e1bcded6080f83d787254eb0ece25027 Mon Sep 17 00:00:00 2001
|
||||
From: David Herrmann <dh.herrmann@gmail.com>
|
||||
Date: Wed, 5 Nov 2014 12:56:49 +0100
|
||||
Subject: [PATCH] udev: avoid magic constants in kernel-cmdline parsers
|
||||
|
||||
Lets recognize the fact that startswith() returns a pointer to the tail on
|
||||
success. Use it instead of hard-coding string-lengths as magic constants.
|
||||
|
||||
(cherry picked from commit cfe2061add5479710f6597899d632e64c54e62ef)
|
||||
---
|
||||
src/udev/udevd.c | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
|
||||
index 193702cd28..65d086e9ee 100644
|
||||
--- a/src/udev/udevd.c
|
||||
+++ b/src/udev/udevd.c
|
||||
@@ -967,7 +967,7 @@ static void kernel_cmdline_options(struct udev *udev) {
|
||||
return;
|
||||
|
||||
FOREACH_WORD_QUOTED(word, l, line, state) {
|
||||
- char *s, *opt;
|
||||
+ char *s, *opt, *value;
|
||||
|
||||
s = strndup(word, l);
|
||||
if (!s)
|
||||
@@ -979,24 +979,24 @@ static void kernel_cmdline_options(struct udev *udev) {
|
||||
else
|
||||
opt = s;
|
||||
|
||||
- if (startswith(opt, "udev.log-priority=")) {
|
||||
+ if ((value = startswith(opt, "udev.log-priority="))) {
|
||||
int prio;
|
||||
|
||||
- prio = util_log_priority(opt + 18);
|
||||
+ prio = util_log_priority(value);
|
||||
log_set_max_level(prio);
|
||||
udev_set_log_priority(udev, prio);
|
||||
- } else if (startswith(opt, "udev.children-max=")) {
|
||||
- r = safe_atoi(opt + 18, &arg_children_max);
|
||||
+ } else if ((value = startswith(opt, "udev.children-max="))) {
|
||||
+ r = safe_atoi(value, &arg_children_max);
|
||||
if (r < 0)
|
||||
- log_warning("Invalid udev.children-max ignored: %s", opt + 18);
|
||||
- } else if (startswith(opt, "udev.exec-delay=")) {
|
||||
- r = safe_atoi(opt + 16, &arg_exec_delay);
|
||||
+ log_warning("Invalid udev.children-max ignored: %s", value);
|
||||
+ } else if ((value = startswith(opt, "udev.exec-delay="))) {
|
||||
+ r = safe_atoi(value, &arg_exec_delay);
|
||||
if (r < 0)
|
||||
- log_warning("Invalid udev.exec-delay ignored: %s", opt + 16);
|
||||
- } else if (startswith(opt, "udev.event-timeout=")) {
|
||||
- r = safe_atou64(opt + 19, &arg_event_timeout_usec);
|
||||
+ log_warning("Invalid udev.exec-delay ignored: %s", value);
|
||||
+ } else if ((value = startswith(opt, "udev.event-timeout="))) {
|
||||
+ r = safe_atou64(value, &arg_event_timeout_usec);
|
||||
if (r < 0) {
|
||||
- log_warning("Invalid udev.event-timeout ignored: %s", opt + 19);
|
||||
+ log_warning("Invalid udev.event-timeout ignored: %s", value);
|
||||
break;
|
||||
}
|
||||
arg_event_timeout_usec *= USEC_PER_SEC;
|
|
@ -1,48 +0,0 @@
|
|||
From de1a1440dd81857ae679672ae1d757bfbdd2e112 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Guthrie <colin@mageia.org>
|
||||
Date: Sun, 2 Nov 2014 13:33:16 +0000
|
||||
Subject: [PATCH] manager: Ensure user's systemd runtime directory exists.
|
||||
|
||||
This mirrors code in dbus.c when creating the private socket and
|
||||
avoids error messages like:
|
||||
|
||||
systemd[1353]: bind(/run/user/603/systemd/notify) failed: No such file or directory
|
||||
systemd[1353]: Failed to fully start up daemon: No such file or directory
|
||||
|
||||
(cherry picked from commit 0c3f25e0c1f028d4da9cc5253abf0322230e6835)
|
||||
---
|
||||
src/core/manager.c | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/core/manager.c b/src/core/manager.c
|
||||
index ff29ae1d9d..47e23ba80e 100644
|
||||
--- a/src/core/manager.c
|
||||
+++ b/src/core/manager.c
|
||||
@@ -662,9 +662,11 @@ static int manager_setup_notify(Manager *m) {
|
||||
return -errno;
|
||||
}
|
||||
|
||||
- if (m->running_as == SYSTEMD_SYSTEM)
|
||||
+ if (m->running_as == SYSTEMD_SYSTEM) {
|
||||
m->notify_socket = strdup("/run/systemd/notify");
|
||||
- else {
|
||||
+ if (!m->notify_socket)
|
||||
+ return log_oom();
|
||||
+ } else {
|
||||
const char *e;
|
||||
|
||||
e = getenv("XDG_RUNTIME_DIR");
|
||||
@@ -674,9 +676,11 @@ static int manager_setup_notify(Manager *m) {
|
||||
}
|
||||
|
||||
m->notify_socket = strappend(e, "/systemd/notify");
|
||||
+ if (!m->notify_socket)
|
||||
+ return log_oom();
|
||||
+
|
||||
+ mkdir_parents_label(m->notify_socket, 0755);
|
||||
}
|
||||
- if (!m->notify_socket)
|
||||
- return log_oom();
|
||||
|
||||
strncpy(sa.un.sun_path, m->notify_socket, sizeof(sa.un.sun_path)-1);
|
||||
r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path));
|
|
@ -1,62 +0,0 @@
|
|||
From af49e1e5c7ff8e30035c1880ee42225f2d15bfd9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 5 Nov 2014 09:16:58 -0500
|
||||
Subject: [PATCH] units: disable job timeouts
|
||||
|
||||
For boot, we might kill fsck in the middle, with likely catastrophic
|
||||
consequences.
|
||||
|
||||
On shutdown there might be other jobs, like downloading of updates for
|
||||
installation, and other custom jobs. It seems better to schedule an
|
||||
individual timeout on each one separately, when it is known what
|
||||
timeout is useful.
|
||||
|
||||
Disable the timeouts for now, until we have a clearer picture of how
|
||||
we can deal with long-running jobs.
|
||||
|
||||
(cherry picked from commit 038193efa6c00e852110f17383ef2786136f4f81)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1152220
|
||||
---
|
||||
units/basic.target | 3 ---
|
||||
units/poweroff.target | 2 --
|
||||
units/reboot.target | 2 --
|
||||
3 files changed, 7 deletions(-)
|
||||
|
||||
diff --git a/units/basic.target b/units/basic.target
|
||||
index eee3e6b774..abb63ec560 100644
|
||||
--- a/units/basic.target
|
||||
+++ b/units/basic.target
|
||||
@@ -13,6 +13,3 @@ Requires=sysinit.target
|
||||
After=sysinit.target
|
||||
Wants=sockets.target timers.target paths.target slices.target
|
||||
After=sockets.target paths.target slices.target
|
||||
-
|
||||
-JobTimeoutSec=15min
|
||||
-JobTimeoutAction=poweroff-force
|
||||
diff --git a/units/poweroff.target b/units/poweroff.target
|
||||
index dd92d816ca..71871033a5 100644
|
||||
--- a/units/poweroff.target
|
||||
+++ b/units/poweroff.target
|
||||
@@ -12,8 +12,6 @@ DefaultDependencies=no
|
||||
Requires=systemd-poweroff.service
|
||||
After=systemd-poweroff.service
|
||||
AllowIsolate=yes
|
||||
-JobTimeoutSec=30min
|
||||
-JobTimeoutAction=poweroff-force
|
||||
|
||||
[Install]
|
||||
Alias=ctrl-alt-del.target
|
||||
diff --git a/units/reboot.target b/units/reboot.target
|
||||
index 668b98d9e4..dec8f56796 100644
|
||||
--- a/units/reboot.target
|
||||
+++ b/units/reboot.target
|
||||
@@ -12,8 +12,6 @@ DefaultDependencies=no
|
||||
Requires=systemd-reboot.service
|
||||
After=systemd-reboot.service
|
||||
AllowIsolate=yes
|
||||
-JobTimeoutSec=30min
|
||||
-JobTimeoutAction=reboot-force
|
||||
|
||||
[Install]
|
||||
Alias=ctrl-alt-del.target
|
|
@ -1,59 +0,0 @@
|
|||
From 4d4eff2436b63f19811fa39ef26fa1e2ca31a54a Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 5 Nov 2014 08:30:52 -0500
|
||||
Subject: [PATCH] login: rerun vconsole-setup when switching from vgacon to
|
||||
fbcon
|
||||
|
||||
The initialization performed by systemd-vconsole-setup is reset
|
||||
when changing console drivers (say from vgacon to fbcon), so we
|
||||
need to run it in that case.
|
||||
|
||||
See
|
||||
http://lists.freedesktop.org/archives/systemd-devel/2014-October/023919.html
|
||||
http://lists.freedesktop.org/archives/systemd-devel/2014-October/024423.html
|
||||
http://lists.freedesktop.org/archives/systemd-devel/2014-November/024881.html
|
||||
|
||||
This commit adds a udev rule to make systemd-vconsole-setup get run when
|
||||
the fbcon device becomes available.
|
||||
|
||||
(david: moved into new file 90-vconsole.rules instead of 71-seats.rules;
|
||||
build-failures are on me, not on Ray)
|
||||
|
||||
(cherry picked from commit f6ba8671d83f9fce9a00045d8fa399a1c07ba7fc)
|
||||
---
|
||||
Makefile.am | 3 +++
|
||||
src/vconsole/90-vconsole.rules | 11 +++++++++++
|
||||
2 files changed, 14 insertions(+)
|
||||
create mode 100644 src/vconsole/90-vconsole.rules
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index a94578a9a7..22fd306c81 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -4403,6 +4403,9 @@ rootlibexec_PROGRAMS += \
|
||||
nodist_systemunit_DATA += \
|
||||
units/systemd-vconsole-setup.service
|
||||
|
||||
+dist_udevrules_DATA += \
|
||||
+ src/vconsole/90-vconsole.rules
|
||||
+
|
||||
SYSINIT_TARGET_WANTS += \
|
||||
systemd-vconsole-setup.service
|
||||
endif
|
||||
diff --git a/src/vconsole/90-vconsole.rules b/src/vconsole/90-vconsole.rules
|
||||
new file mode 100644
|
||||
index 0000000000..bf6a9efaa5
|
||||
--- /dev/null
|
||||
+++ b/src/vconsole/90-vconsole.rules
|
||||
@@ -0,0 +1,11 @@
|
||||
+# This file is part of systemd.
|
||||
+#
|
||||
+# systemd is free software; you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU Lesser General Public License as published by
|
||||
+# the Free Software Foundation; either version 2.1 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+# Kernel resets vconsole state when changing console drivers so run
|
||||
+# systemd-vconsole-setup when fbcon loads
|
||||
+
|
||||
+ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fbcon", RUN+="/usr/lib/systemd/systemd-vconsole-setup"
|
|
@ -1,72 +0,0 @@
|
|||
From 2203c07490c8b64286cf2d04dbb110f4173912a1 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 6 Nov 2014 14:37:12 +0100
|
||||
Subject: [PATCH] hostnamed: introduce new "embedded" chassis type
|
||||
|
||||
We really don't want to get lost in adding fridge, car, plane, drone, or
|
||||
whatever else, hence add a generic term "embedded" cover all the cases
|
||||
where the computer is just part of something bigger, and not at the
|
||||
focus of things.
|
||||
|
||||
(cherry picked from commit 25fa306ed58b0b7fe30ca9be37c66a7b3b2de70e)
|
||||
---
|
||||
man/hostnamectl.xml | 3 ++-
|
||||
shell-completion/bash/hostnamectl | 2 +-
|
||||
shell-completion/zsh/_hostnamectl | 2 +-
|
||||
src/hostname/hostnamed.c | 3 ++-
|
||||
4 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
|
||||
index 128d92f576..ffae5e6b06 100644
|
||||
--- a/man/hostnamectl.xml
|
||||
+++ b/man/hostnamectl.xml
|
||||
@@ -217,7 +217,8 @@
|
||||
<literal>server</literal>,
|
||||
<literal>tablet</literal>,
|
||||
<literal>handset</literal>,
|
||||
- <literal>watch</literal>, as well as
|
||||
+ <literal>watch</literal>,
|
||||
+ <literal>embedded</literal> as well as
|
||||
the special chassis types
|
||||
<literal>vm</literal> and
|
||||
<literal>container</literal> for
|
||||
diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl
|
||||
index a5e34600c8..7a0850dbe4 100644
|
||||
--- a/shell-completion/bash/hostnamectl
|
||||
+++ b/shell-completion/bash/hostnamectl
|
||||
@@ -52,7 +52,7 @@ _hostnamectl() {
|
||||
if [[ -z $verb ]]; then
|
||||
comps=${VERBS[*]}
|
||||
elif __contains_word "$verb" ${VERBS[CHASSIS]}; then
|
||||
- comps='desktop laptop server tablet handset watch vm container'
|
||||
+ comps='desktop laptop server tablet handset watch embedded vm container'
|
||||
elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then
|
||||
comps=''
|
||||
fi
|
||||
diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl
|
||||
index e02f6de30e..a7217a1999 100644
|
||||
--- a/shell-completion/zsh/_hostnamectl
|
||||
+++ b/shell-completion/zsh/_hostnamectl
|
||||
@@ -18,7 +18,7 @@ _hostnamectl_set-icon-name() {
|
||||
|
||||
_hostnamectl_set-chassis() {
|
||||
if (( CURRENT <= 3 )); then
|
||||
- _chassis=( desktop laptop server tablet handset watch vm container )
|
||||
+ _chassis=( desktop laptop server tablet handset watch embedded vm container )
|
||||
_describe chassis _chassis
|
||||
else
|
||||
_message "no more options"
|
||||
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
|
||||
index a449610bb8..0123922c4a 100644
|
||||
--- a/src/hostname/hostnamed.c
|
||||
+++ b/src/hostname/hostnamed.c
|
||||
@@ -138,7 +138,8 @@ static bool valid_chassis(const char *chassis) {
|
||||
"server\0"
|
||||
"tablet\0"
|
||||
"handset\0"
|
||||
- "watch\0",
|
||||
+ "watch\0"
|
||||
+ "embedded\0",
|
||||
chassis);
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From fe357da5e638f97081099a28b477d59cc6991189 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 6 Nov 2014 15:20:29 +0100
|
||||
Subject: [PATCH] systemctl: when invokes as "reboot -f", sync()
|
||||
|
||||
We do this in the clean shutdown path in shutdown.c, hence we should do
|
||||
is for "reboot -f", too.
|
||||
|
||||
(cherry picked from commit 4a3ad39957399c4a30fc472a804e72907ecaa4f9)
|
||||
---
|
||||
src/systemctl/systemctl.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index 8481a9b20c..207a5e78dc 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -6948,8 +6948,13 @@ done:
|
||||
|
||||
static int halt_now(enum action a) {
|
||||
|
||||
-/* Make sure C-A-D is handled by the kernel from this
|
||||
- * point on... */
|
||||
+ /* The kernel will automaticall flush ATA disks and suchlike
|
||||
+ * on reboot(), but the file systems need to be synce'd
|
||||
+ * explicitly in advance. */
|
||||
+ sync();
|
||||
+
|
||||
+ /* Make sure C-A-D is handled by the kernel from this point
|
||||
+ * on... */
|
||||
reboot(RB_ENABLE_CAD);
|
||||
|
||||
switch (a) {
|
|
@ -1,41 +0,0 @@
|
|||
From 70a3ef63810ef3c7970871c1b1e1e060110ecfa6 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 3 Sep 2014 13:31:25 +0200
|
||||
Subject: [PATCH] switch_root: do not fail, if base_filesystem_create() failed
|
||||
|
||||
Not all switch roots are like base_filesystem_create() wants them
|
||||
to look like. They might even boot, if they are RO and don't have the FS
|
||||
layout. Just ignore the error and switch_root nevertheless.
|
||||
|
||||
base_filesystem_create() should have logged, what went wrong.
|
||||
|
||||
(cherry picked from commit 6d0f91bf551464c57bc12f99deccd515fb3f628d)
|
||||
---
|
||||
src/shared/switch-root.c | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c
|
||||
index bac0e5c349..1a558b897b 100644
|
||||
--- a/src/shared/switch-root.c
|
||||
+++ b/src/shared/switch-root.c
|
||||
@@ -47,7 +47,6 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot,
|
||||
struct stat new_root_stat;
|
||||
bool old_root_remove;
|
||||
const char *i, *temporary_old_root;
|
||||
- int r;
|
||||
|
||||
if (path_equal(new_root, "/"))
|
||||
return 0;
|
||||
@@ -103,11 +102,7 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot,
|
||||
}
|
||||
}
|
||||
|
||||
- r = base_filesystem_create(new_root);
|
||||
- if (r < 0) {
|
||||
- log_error("Failed to create the base filesystem: %s", strerror(-r));
|
||||
- return r;
|
||||
- }
|
||||
+ (void) base_filesystem_create(new_root);
|
||||
|
||||
if (chdir(new_root) < 0) {
|
||||
log_error("Failed to change directory to %s: %m", new_root);
|
|
@ -1,42 +0,0 @@
|
|||
From f37f36832bafdb4c8566298c554e335f55d23152 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Thu, 6 Nov 2014 16:48:11 +0100
|
||||
Subject: [PATCH] shared: create files even if the SELinux policy has no
|
||||
context for them
|
||||
|
||||
The SELinux policy defines no context for some files. E.g.:
|
||||
$ matchpathcon /run/lock/subsys /dev/mqueue
|
||||
/run/lock/subsys <<none>>
|
||||
/dev/mqueue <<none>>
|
||||
|
||||
We still need to be able to create them.
|
||||
In this case selabel_lookup_raw() returns ENOENT. We should then skip
|
||||
setfscreatecon(), but still return success.
|
||||
It was broken since c34255bdb2 ("label: unify code to make directories,
|
||||
symlinks").
|
||||
|
||||
(cherry picked from commit 2d58aa4692e9fc47911bff5d064ba3e328c35369)
|
||||
---
|
||||
src/shared/selinux-util.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c
|
||||
index 1eddd17d27..6bd3bf1c80 100644
|
||||
--- a/src/shared/selinux-util.c
|
||||
+++ b/src/shared/selinux-util.c
|
||||
@@ -332,9 +332,13 @@ int mac_selinux_create_file_prepare(const char *path, mode_t mode) {
|
||||
r = selabel_lookup_raw(label_hnd, &filecon, newpath, mode);
|
||||
}
|
||||
|
||||
- if (r < 0 && errno != ENOENT)
|
||||
+ /* No context specified by the policy? Proceed without setting it. */
|
||||
+ if (r < 0 && errno == ENOENT)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (r < 0)
|
||||
r = -errno;
|
||||
- else if (r == 0) {
|
||||
+ else {
|
||||
r = setfscreatecon(filecon);
|
||||
if (r < 0) {
|
||||
log_enforcing("Failed to set SELinux security context %s for %s: %m", filecon, path);
|
|
@ -1,27 +0,0 @@
|
|||
From 8051be0e4a82590a76e2d76662a57ca624ddc89c Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 6 Nov 2014 20:00:01 +0100
|
||||
Subject: [PATCH] switch-root: explain why we don't care about
|
||||
base_filesystem_create() failing
|
||||
|
||||
(cherry picked from commit 64e18fd626838c3500e28b4dbf86ed62206fff47)
|
||||
---
|
||||
src/shared/switch-root.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c
|
||||
index 1a558b897b..3adb8463c5 100644
|
||||
--- a/src/shared/switch-root.c
|
||||
+++ b/src/shared/switch-root.c
|
||||
@@ -102,6 +102,11 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot,
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Do not fail, if base_filesystem_create() fails. Not all
|
||||
+ * switch roots are like base_filesystem_create() wants them
|
||||
+ * to look like. They might even boot, if they are RO and
|
||||
+ * don't have the FS layout. Just ignore the error and
|
||||
+ * switch_root() nevertheless. */
|
||||
(void) base_filesystem_create(new_root);
|
||||
|
||||
if (chdir(new_root) < 0) {
|
|
@ -1,67 +0,0 @@
|
|||
From e47a9f972749544d28cffede77de13e9d8af4d2b Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Thu, 6 Nov 2014 22:24:13 +0100
|
||||
Subject: [PATCH] shutdown: fix arguments to /run/initramfs/shutdown
|
||||
|
||||
Our initrd interface specifies that the verb is in argv[1].
|
||||
This is where systemd passes it to systemd-shutdown, but getopt
|
||||
permutes argv[]. This confuses dracut's shutdown script:
|
||||
Shutdown called with argument '--log-level'. Rebooting!
|
||||
|
||||
getopt can be convinced to not permute argv[] by having '-' as the first
|
||||
character of optstring. Let's use it. This requires changing the way
|
||||
non-option arguments (in our case, the verb) are processed.
|
||||
|
||||
This fixes a bug where the system would reboot instead of powering off.
|
||||
|
||||
(cherry picked from commit 4b5d8d0f22ae61ceb45a25391354ba53b43ee992)
|
||||
---
|
||||
src/core/shutdown.c | 17 +++++++++++------
|
||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
|
||||
index 20cf526ba2..03cfddc543 100644
|
||||
--- a/src/core/shutdown.c
|
||||
+++ b/src/core/shutdown.c
|
||||
@@ -75,7 +75,9 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
assert(argc >= 1);
|
||||
assert(argv);
|
||||
|
||||
- while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0)
|
||||
+ /* "-" prevents getopt from permuting argv[] and moving the verb away
|
||||
+ * from argv[1]. Our interface to initrd promises it'll be there. */
|
||||
+ while ((c = getopt_long(argc, argv, "-", options, NULL)) >= 0)
|
||||
switch (c) {
|
||||
|
||||
case ARG_LOG_LEVEL:
|
||||
@@ -113,6 +115,13 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
|
||||
break;
|
||||
|
||||
+ case '\001':
|
||||
+ if (!arg_verb)
|
||||
+ arg_verb = optarg;
|
||||
+ else
|
||||
+ log_error("Excess arguments, ignoring");
|
||||
+ break;
|
||||
+
|
||||
case '?':
|
||||
return -EINVAL;
|
||||
|
||||
@@ -120,15 +129,11 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
assert_not_reached("Unhandled option code.");
|
||||
}
|
||||
|
||||
- if (optind >= argc) {
|
||||
+ if (!arg_verb) {
|
||||
log_error("Verb argument missing.");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- arg_verb = argv[optind];
|
||||
-
|
||||
- if (optind + 1 < argc)
|
||||
- log_error("Excess arguments, ignoring");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From bfb4c47dddd3c7aeaa07eb733bb50b62eff2e082 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chapman <mike@very.puzzling.org>
|
||||
Date: Thu, 6 Nov 2014 19:47:02 +1100
|
||||
Subject: [PATCH] timer: reenable TIMER_ACTIVE timers when restarted
|
||||
|
||||
A timer configured with OnActiveSec will start its associated unit again
|
||||
if the timer is stopped, then started. However, if the timer unit is
|
||||
restarted -- with "systemctl restart", say -- this does not occur.
|
||||
|
||||
This commit ensures that TIMER_ACTIVE timers are re-enabled whenever the
|
||||
timer is started, even if that's within a restart job.
|
||||
|
||||
(cherry picked from commit 779042e772d2459f7649b34a164902dc456f1bab)
|
||||
---
|
||||
src/core/timer.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/core/timer.c b/src/core/timer.c
|
||||
index a3713e2140..5c4e9f995a 100644
|
||||
--- a/src/core/timer.c
|
||||
+++ b/src/core/timer.c
|
||||
@@ -521,6 +521,7 @@ fail:
|
||||
|
||||
static int timer_start(Unit *u) {
|
||||
Timer *t = TIMER(u);
|
||||
+ TimerValue *v;
|
||||
|
||||
assert(t);
|
||||
assert(t->state == TIMER_DEAD || t->state == TIMER_FAILED);
|
||||
@@ -530,6 +531,11 @@ static int timer_start(Unit *u) {
|
||||
|
||||
t->last_trigger = DUAL_TIMESTAMP_NULL;
|
||||
|
||||
+ /* Reenable all timers that depend on unit activation time */
|
||||
+ LIST_FOREACH(value, v, t->values)
|
||||
+ if (v->base == TIMER_ACTIVE)
|
||||
+ v->disabled = false;
|
||||
+
|
||||
if (t->stamp_path) {
|
||||
struct stat st;
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ ! -x /sbin/new-kernel-pkg ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
COMMAND="$1"
|
||||
KERNEL_VERSION="$2"
|
||||
BOOT_DIR_ABS="$3"
|
||||
KERNEL_IMAGE="$4"
|
||||
|
||||
KERNEL_DIR="${KERNEL_IMAGE%/*}"
|
||||
[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
|
||||
case "$COMMAND" in
|
||||
add)
|
||||
if [[ "${KERNEL_DIR}" != "/boot" ]]; then
|
||||
for i in \
|
||||
"$KERNEL_IMAGE" \
|
||||
"$KERNEL_DIR"/System.map \
|
||||
"$KERNEL_DIR"/config \
|
||||
"$KERNEL_DIR"/zImage.stub \
|
||||
"$KERNEL_DIR"/dtb \
|
||||
; do
|
||||
[[ -e "$i" ]] || continue
|
||||
cp -aT "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
|
||||
command -v restorecon &>/dev/null && \
|
||||
restorecon -R "/boot/${i##*/}-${KERNEL_VERSION}"
|
||||
done
|
||||
# hmac is .vmlinuz-<version>.hmac so needs a special treatment
|
||||
i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac"
|
||||
if [[ -e "$i" ]]; then
|
||||
cp -a "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
|
||||
command -v restorecon &>/dev/null && \
|
||||
restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
|
||||
fi
|
||||
fi
|
||||
/sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $?
|
||||
/sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $?
|
||||
/sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $?
|
||||
;;
|
||||
remove)
|
||||
/sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $?
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# skip other installation plugins, if we can't find a boot loader spec conforming setup
|
||||
if ! [[ -d /boot/loader/entries || -L /boot/loader/entries ]]; then
|
||||
exit 77
|
||||
fi
|
|
@ -0,0 +1,42 @@
|
|||
# The ptrace system call is used for interprocess services,
|
||||
# communication and introspection (like synchronisation, signaling,
|
||||
# debugging, tracing and profiling) of processes.
|
||||
#
|
||||
# Usage of ptrace is restricted by normal user permissions. Normal
|
||||
# unprivileged processes cannot use ptrace on processes that they
|
||||
# cannot send signals to or processes that are running set-uid or
|
||||
# set-gid. Nevertheless, processes running under the same uid will
|
||||
# usually be able to ptrace one another.
|
||||
#
|
||||
# Fedora enables the Yama security mechanism which restricts ptrace
|
||||
# even further. Sysctl setting kernel.yama.ptrace_scope can have one
|
||||
# of the following values:
|
||||
#
|
||||
# 0 - Normal ptrace security permissions.
|
||||
# 1 - Restricted ptrace. Only child processes plus normal permissions.
|
||||
# 2 - Admin-only attach. Only executables with CAP_SYS_PTRACE.
|
||||
# 3 - No attach. No process may call ptrace at all. Irrevocable.
|
||||
#
|
||||
# For more information see Documentation/security/Yama.txt in the
|
||||
# kernel sources.
|
||||
#
|
||||
# The default is 1., which allows tracing of child processes, but
|
||||
# forbids tracing of arbitrary processes. This allows programs like
|
||||
# gdb or strace to work when the most common way of having the
|
||||
# debugger start the debuggee is used:
|
||||
# gdb /path/to/program ...
|
||||
# Attaching to already running programs is NOT allowed:
|
||||
# gdb -p ...
|
||||
# This default setting is suitable for the common case, because it
|
||||
# reduces the risk that one hacked process can be used to attack other
|
||||
# processes. (For example, a hacked firefox process in a user session
|
||||
# will not be able to ptrace the keyring process and extract passwords
|
||||
# stored only in memory.)
|
||||
#
|
||||
# Developers and administrators might want to disable those protections
|
||||
# to be able to attach debuggers to existing processes. Use
|
||||
# sysctl kernel.yama.ptrace_scope=0
|
||||
# for change the setting temporarily, or copy this file to
|
||||
# /etc/sysctl.d/20-yama-ptrace.conf to set it for future boots.
|
||||
|
||||
kernel.yama.ptrace_scope = 0
|
|
@ -1,11 +0,0 @@
|
|||
# We enable all display managers by default. Since only one can
|
||||
# actually be enabled at the same time the one which is installed
|
||||
# first wins
|
||||
|
||||
enable gdm.service
|
||||
enable lightdm.service
|
||||
enable slim.service
|
||||
enable lxdm.service
|
||||
enable sddm.service
|
||||
enable kdm.service
|
||||
enable xdm.service
|
|
@ -1,120 +0,0 @@
|
|||
# Also see:
|
||||
# https://fedoraproject.org/wiki/Starting_services_by_default
|
||||
|
||||
# On Fedora we deviate from some upstream defaults
|
||||
disable systemd-timesyncd.service
|
||||
disable systemd-networkd.service
|
||||
disable systemd-resolved.service
|
||||
|
||||
# System stuff
|
||||
enable sshd.service
|
||||
enable atd.*
|
||||
enable crond.*
|
||||
enable chronyd.service
|
||||
enable rpcbind.*
|
||||
enable NetworkManager.service
|
||||
enable NetworkManager-dispatcher.service
|
||||
enable ModemManager.service
|
||||
enable auditd.service
|
||||
enable restorecond.service
|
||||
enable bluetooth.*
|
||||
enable avahi-daemon.*
|
||||
enable cups.*
|
||||
|
||||
# The various syslog implementations
|
||||
enable rsyslog.*
|
||||
enable syslog-ng.*
|
||||
enable sysklogd.*
|
||||
|
||||
# Network facing
|
||||
enable firewalld.service
|
||||
enable libvirtd.service
|
||||
enable xinetd.service
|
||||
enable ladvd.service
|
||||
|
||||
# Storage
|
||||
enable multipathd.service
|
||||
enable libstoragemgmt.service
|
||||
enable lvm2-monitor.*
|
||||
enable lvm2-lvmetad.*
|
||||
enable dm-event.*
|
||||
enable dmraid-activation.service
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=855372
|
||||
enable mdmonitor.service
|
||||
enable mdmonitor-takeover.service
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=876237
|
||||
enable spice-vdagentd.service
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=885406
|
||||
enable qemu-guest-agent.service
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=928726
|
||||
enable dnf-makecache.timer
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=929403
|
||||
enable initial-setup-graphical.service
|
||||
enable initial-setup-text.service
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=957135
|
||||
enable vmtoolsd.service
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=976315
|
||||
enable dkms.service
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=961878
|
||||
enable ipmi.service
|
||||
enable ipmievd.service
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1039351
|
||||
enable x509watch.timer
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1060754
|
||||
enable dnssec-triggerd.service
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1095353
|
||||
enable uuidd.socket
|
||||
|
||||
# Hardware
|
||||
enable gpm.*
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1066421
|
||||
enable gpsd.socket
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1141607
|
||||
enable x2gocleansessions.service
|
||||
|
||||
enable irqbalance.service
|
||||
enable lm_sensors.service
|
||||
enable mcelog.*
|
||||
enable acpid.*
|
||||
enable smartd.service
|
||||
enable pcscd.socket
|
||||
enable rngd.service
|
||||
|
||||
# Other stuff
|
||||
enable abrtd.service
|
||||
enable abrt-ccpp.service
|
||||
enable abrt-oops.service
|
||||
enable abrt-xorg.service
|
||||
enable abrt-vmcore.service
|
||||
enable lttng-sessiond.service
|
||||
enable ksm.service
|
||||
enable ksmtuned.service
|
||||
enable rootfs-resize.service
|
||||
enable sysstat.service
|
||||
enable sysstat-collect.timer
|
||||
enable sysstat-summary.timer
|
||||
enable uuidd.service
|
||||
enable xendomains.service
|
||||
enable xenstored.service
|
||||
enable xenconsoled.service
|
||||
|
||||
# Desktop stuff
|
||||
enable accounts-daemon.service
|
||||
enable rtkit-daemon.service
|
||||
enable upower.service
|
||||
enable udisks2.service
|
||||
enable polkit.service
|
||||
enable packagekit-offline-update.service
|
|
@ -1 +0,0 @@
|
|||
disable *
|
|
@ -0,0 +1,129 @@
|
|||
From f58b96d3e8d1cb0dd3666bc74fa673918b586612 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 14 Sep 2020 17:58:03 +0200
|
||||
Subject: [PATCH] test-mountpointutil-util: do not assert in test_mnt_id()
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1803070
|
||||
|
||||
I *think* this a kernel bug: the mnt_id as listed in /proc/self/mountinfo is different
|
||||
than the one we get from /proc/self/fdinfo/. This only matters when both statx and
|
||||
name_to_handle_at are unavailable and we hit the fallback path that goes through fdinfo:
|
||||
|
||||
(gdb) !uname -r
|
||||
5.6.19-200.fc31.ppc64le
|
||||
|
||||
(gdb) !cat /proc/self/mountinfo
|
||||
697 664 253:0 /var/lib/mock/fedora-31-ppc64le/root / rw,relatime shared:298 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
|
||||
698 697 253:0 /var/cache/mock/fedora-31-ppc64le/yum_cache /var/cache/yum rw,relatime shared:299 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
|
||||
699 697 253:0 /var/cache/mock/fedora-31-ppc64le/dnf_cache /var/cache/dnf rw,relatime shared:300 master:1 - xfs /dev/mapper/fedora_rh--power--vm14-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota
|
||||
700 697 0:32 /mock-selinux-plugin.7me9bfpi /proc/filesystems rw,nosuid,nodev shared:301 master:18 - tmpfs tmpfs rw,seclabel <==========================================================
|
||||
701 697 0:41 / /sys ro,nosuid,nodev,noexec,relatime shared:302 - sysfs sysfs ro,seclabel
|
||||
702 701 0:21 / /sys/fs/selinux ro,nosuid,nodev,noexec,relatime shared:306 master:8 - selinuxfs selinuxfs rw
|
||||
703 697 0:42 / /dev rw,nosuid shared:303 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
704 703 0:43 / /dev/shm rw,nosuid,nodev shared:304 - tmpfs tmpfs rw,seclabel
|
||||
705 703 0:45 / /dev/pts rw,nosuid,noexec,relatime shared:307 - devpts devpts rw,seclabel,gid=5,mode=620,ptmxmode=666
|
||||
706 703 0:6 /btrfs-control /dev/btrfs-control rw,nosuid shared:308 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
707 703 0:6 /loop-control /dev/loop-control rw,nosuid shared:309 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
708 703 0:6 /loop0 /dev/loop0 rw,nosuid shared:310 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
709 703 0:6 /loop1 /dev/loop1 rw,nosuid shared:311 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
710 703 0:6 /loop10 /dev/loop10 rw,nosuid shared:312 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
711 703 0:6 /loop11 /dev/loop11 rw,nosuid shared:313 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
712 703 0:6 /loop2 /dev/loop2 rw,nosuid shared:314 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
713 703 0:6 /loop3 /dev/loop3 rw,nosuid shared:315 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
714 703 0:6 /loop4 /dev/loop4 rw,nosuid shared:316 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
715 703 0:6 /loop5 /dev/loop5 rw,nosuid shared:317 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
716 703 0:6 /loop6 /dev/loop6 rw,nosuid shared:318 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
717 703 0:6 /loop7 /dev/loop7 rw,nosuid shared:319 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
718 703 0:6 /loop8 /dev/loop8 rw,nosuid shared:320 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
719 703 0:6 /loop9 /dev/loop9 rw,nosuid shared:321 master:9 - devtmpfs devtmpfs rw,seclabel,size=4107840k,nr_inodes=64185,mode=755
|
||||
720 697 0:44 / /run rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
721 720 0:25 /systemd/nspawn/propagate/9cc8a155d0244558b273f773d2b92142 /run/systemd/nspawn/incoming ro master:12 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
722 697 0:32 /mock-resolv.dvml91hp /etc/resolv.conf rw,nosuid,nodev shared:322 master:18 - tmpfs tmpfs rw,seclabel
|
||||
725 697 0:47 / /proc rw,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
603 725 0:47 /sys /proc/sys ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
604 725 0:44 /systemd/inaccessible/reg /proc/kallsyms ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
605 725 0:44 /systemd/inaccessible/reg /proc/kcore ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
606 725 0:44 /systemd/inaccessible/reg /proc/keys ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
607 725 0:44 /systemd/inaccessible/reg /proc/sysrq-trigger ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
608 725 0:44 /systemd/inaccessible/reg /proc/timer_list ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
609 725 0:47 /bus /proc/bus ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
610 725 0:47 /fs /proc/fs ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
611 725 0:47 /irq /proc/irq ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
612 725 0:47 /scsi /proc/scsi ro,nosuid,nodev,noexec,relatime shared:323 - proc proc rw
|
||||
613 703 0:46 / /dev/mqueue rw,nosuid,nodev,noexec,relatime shared:324 - mqueue mqueue rw,seclabel
|
||||
614 701 0:26 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:325 - cgroup2 cgroup rw,seclabel,nsdelegate
|
||||
615 603 0:44 /.#proc-sys-kernel-random-boot-id4fbdce67af46d1c2//deleted /proc/sys/kernel/random/boot_id ro,nosuid,nodev,noexec shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
616 725 0:44 /.#proc-sys-kernel-random-boot-id4fbdce67af46d1c2//deleted /proc/sys/kernel/random/boot_id rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
617 725 0:44 /.#proc-kmsg5b7a8bcfe6717139//deleted /proc/kmsg rw,nosuid,nodev shared:305 - tmpfs tmpfs rw,seclabel,mode=755
|
||||
|
||||
The test process does
|
||||
name_to_handle_at("/proc/filesystems") which returns -EOPNOTSUPP, and then
|
||||
openat(AT_FDCWD, "/proc/filesystems") which returns 4, and then
|
||||
read(open("/proc/self/fdinfo/4", ...)) which gives
|
||||
"pos:\t0\nflags:\t012100000\nmnt_id:\t725\n"
|
||||
|
||||
and the "725" is clearly inconsistent with "700" in /proc/self/mountinfo.
|
||||
|
||||
We could either drop the fallback path (and fail name_to_handle_at() is not
|
||||
avaliable) or ignore the error in the test. Not sure what is better. I think
|
||||
this issue only occurs sometimes and with older kernels, so probably continuing
|
||||
with the current flaky implementation is better than ripping out the fallback.
|
||||
|
||||
Another strace:
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/sys is 603", iov_len=27}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/sys is 603
|
||||
) = 28
|
||||
name_to_handle_at(AT_FDCWD, "/", {handle_bytes=128 => 12, handle_type=129, f_handle=0x52748401000000008b93e20d}, [697], 0) = 0
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of / is 697", iov_len=19}, {iov_base="\n", iov_len=1}], 2mnt ids of / is 697
|
||||
) = 20
|
||||
name_to_handle_at(AT_FDCWD, "/proc/kcore", {handle_bytes=128 => 12, handle_type=1, f_handle=0x92ddcfcd2e802d0100000000}, [605], 0) = 0
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/kcore is 605", iov_len=29}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/kcore is 605
|
||||
) = 30
|
||||
name_to_handle_at(AT_FDCWD, "/dev", {handle_bytes=128 => 12, handle_type=1, f_handle=0x8ae269160c802d0100000000}, [703], 0) = 0
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of /dev is 703", iov_len=22}, {iov_base="\n", iov_len=1}], 2mnt ids of /dev is 703
|
||||
) = 23
|
||||
name_to_handle_at(AT_FDCWD, "/proc/filesystems", {handle_bytes=128}, 0x7fffe36ddb84, 0) = -1 EOPNOTSUPP (Operation not supported)
|
||||
openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 4</proc/filesystems>
|
||||
openat(AT_FDCWD, "/proc/self/fdinfo/4", O_RDONLY|O_CLOEXEC) = 5</proc/20/fdinfo/4>
|
||||
fstat(5</proc/20/fdinfo/4>, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0
|
||||
fstat(5</proc/20/fdinfo/4>, {st_mode=S_IFREG|0400, st_size=0, ...}) = 0
|
||||
read(5</proc/20/fdinfo/4>, "pos:\t0\nflags:\t012100000\nmnt_id:\t725\n", 2048) = 36
|
||||
read(5</proc/20/fdinfo/4>, "", 1024) = 0
|
||||
close(5</proc/20/fdinfo/4>) = 0
|
||||
close(4</proc/filesystems>) = 0
|
||||
writev(2</dev/pts/0>, [{iov_base="mnt ids of /proc/filesystems are 700, 725", iov_len=41}, {iov_base="\n", iov_len=1}], 2mnt ids of /proc/filesystems are 700, 725
|
||||
) = 42
|
||||
writev(2</dev/pts/0>, [{iov_base="the other path for mnt id 725 is /proc", iov_len=38}, {iov_base="\n", iov_len=1}], 2the other path for mnt id 725 is /proc
|
||||
) = 39
|
||||
writev(2</dev/pts/0>, [{iov_base="Assertion 'path_equal(p, t)' failed at src/test/test-mountpoint-util.c:94, function test_mnt_id(). Aborting.", iov_len=108}, {iov_base="\n", iov_len=1}], 2Assertion 'path_equal(p, t)' failed at src/test/test-mountpoint-util.c:94, function test_mnt_id(). Aborting.
|
||||
) = 109
|
||||
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
|
||||
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
|
||||
getpid() = 20
|
||||
gettid() = 20
|
||||
tgkill(20, 20, SIGABRT) = 0
|
||||
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
|
||||
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=20, si_uid=0} ---
|
||||
+++ killed by SIGABRT (core dumped) +++
|
||||
---
|
||||
src/test/test-mountpoint-util.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/test/test-mountpoint-util.c b/src/test/test-mountpoint-util.c
|
||||
index 30b00ae4d8b..ffe5144b04a 100644
|
||||
--- a/src/test/test-mountpoint-util.c
|
||||
+++ b/src/test/test-mountpoint-util.c
|
||||
@@ -89,8 +89,12 @@ static void test_mnt_id(void) {
|
||||
/* The ids don't match? If so, then there are two mounts on the same path, let's check if
|
||||
* that's really the case */
|
||||
char *t = hashmap_get(h, INT_TO_PTR(mnt_id2));
|
||||
- log_debug("the other path for mnt id %i is %s\n", mnt_id2, t);
|
||||
- assert_se(path_equal(p, t));
|
||||
+ log_debug("Path for mnt id %i from /proc/self/mountinfo is %s\n", mnt_id2, t);
|
||||
+
|
||||
+ if (!path_equal(p, t))
|
||||
+ /* Apparent kernel bug in /proc/self/fdinfo */
|
||||
+ log_warning("Bad mount id given for %s: %d, should be %d",
|
||||
+ p, mnt_id2, mnt_id);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
From 30353eb466fe1ef768dc7bc1ccc1239b97dab70c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 7 Oct 2014 01:49:10 -0400
|
||||
Subject: [PATCH] fedora: add bridge sysctl configuration
|
||||
|
||||
Udev rule is added to load those settings when the bridge
|
||||
module is loaded.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=634736
|
||||
---
|
||||
Makefile.am | 8 ++++++--
|
||||
rules/.gitignore | 1 +
|
||||
rules/99-bridge.rules.in | 9 +++++++++
|
||||
sysctl.d/50-bridge.conf | 4 ++++
|
||||
4 files changed, 20 insertions(+), 2 deletions(-)
|
||||
create mode 100644 rules/99-bridge.rules.in
|
||||
create mode 100644 sysctl.d/50-bridge.conf
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index e52db1793b..41e94575ef 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -445,7 +445,8 @@ CLEANFILES += \
|
||||
$(nodist_zshcompletion_DATA)
|
||||
|
||||
dist_sysctl_DATA = \
|
||||
- sysctl.d/50-default.conf
|
||||
+ sysctl.d/50-default.conf \
|
||||
+ sysctl.d/50-bridge.conf
|
||||
|
||||
dist_systemunit_DATA = \
|
||||
units/graphical.target \
|
||||
@@ -3281,7 +3282,8 @@ dist_udevrules_DATA += \
|
||||
rules/95-udev-late.rules
|
||||
|
||||
nodist_udevrules_DATA += \
|
||||
- rules/99-systemd.rules
|
||||
+ rules/99-systemd.rules \
|
||||
+ rules/99-bridge.rules
|
||||
|
||||
dist_udevhwdb_DATA = \
|
||||
hwdb/20-pci-vendor-model.hwdb \
|
||||
@@ -3306,10 +3308,12 @@ sharepkgconfig_DATA = \
|
||||
|
||||
EXTRA_DIST += \
|
||||
rules/99-systemd.rules.in \
|
||||
+ rules/99-bridge.rules.in \
|
||||
src/udev/udev.pc.in
|
||||
|
||||
CLEANFILES += \
|
||||
rules/99-systemd.rules \
|
||||
+ rules/99-bridge.rules \
|
||||
src/udev/udev.pc
|
||||
|
||||
EXTRA_DIST += \
|
||||
diff --git a/rules/.gitignore b/rules/.gitignore
|
||||
index 93a50ddd80..46c7f3ce91 100644
|
||||
--- a/rules/.gitignore
|
||||
+++ b/rules/.gitignore
|
||||
@@ -1 +1,2 @@
|
||||
/99-systemd.rules
|
||||
+/99-bridge.rules
|
||||
diff --git a/rules/99-bridge.rules.in b/rules/99-bridge.rules.in
|
||||
new file mode 100644
|
||||
index 0000000000..f46f96bd2e
|
||||
--- /dev/null
|
||||
+++ b/rules/99-bridge.rules.in
|
||||
@@ -0,0 +1,9 @@
|
||||
+# This file is part of systemd.
|
||||
+#
|
||||
+# systemd is free software; you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU Lesser General Public License as published by
|
||||
+# the Free Software Foundation; either version 2.1 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+# Apply sysctl settings to bridges
|
||||
+ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/net/bridge"
|
||||
diff --git a/sysctl.d/50-bridge.conf b/sysctl.d/50-bridge.conf
|
||||
new file mode 100644
|
||||
index 0000000000..b586bf15fa
|
||||
--- /dev/null
|
||||
+++ b/sysctl.d/50-bridge.conf
|
||||
@@ -0,0 +1,4 @@
|
||||
+# Disable netfilter on bridges.
|
||||
+net.bridge.bridge-nf-call-ip6tables = 0
|
||||
+net.bridge.bridge-nf-call-iptables = 0
|
||||
+net.bridge.bridge-nf-call-arptables = 0
|
|
@ -1,22 +0,0 @@
|
|||
From 6da80d4bbfaa3d8a2a8952995a108d6dbd6a1e3f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Fri, 3 Oct 2014 21:34:14 -0400
|
||||
Subject: [PATCH] fedora: disable resolv.conf symlink
|
||||
|
||||
---
|
||||
tmpfiles.d/etc.conf.m4 | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/tmpfiles.d/etc.conf.m4 b/tmpfiles.d/etc.conf.m4
|
||||
index f567c8d6ea..125d6e0a17 100644
|
||||
--- a/tmpfiles.d/etc.conf.m4
|
||||
+++ b/tmpfiles.d/etc.conf.m4
|
||||
@@ -10,8 +10,5 @@
|
||||
L /etc/os-release - - - - ../usr/lib/os-release
|
||||
L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
|
||||
L+ /etc/mtab - - - - ../proc/self/mounts
|
||||
-m4_ifdef(`ENABLE_RESOLVED',
|
||||
-L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
|
||||
-)
|
||||
C /etc/nsswitch.conf - - - -
|
||||
C /etc/pam.d - - - -
|
|
@ -1,63 +0,0 @@
|
|||
From 0256bbe384f243dbbcfbe87200c9d8613a992ecb Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 14 Jan 2014 17:48:08 -0500
|
||||
Subject: [PATCH] kernel-install: add fedora specific callouts to
|
||||
new-kernel-pkg
|
||||
|
||||
---
|
||||
src/kernel-install/kernel-install | 36 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 36 insertions(+)
|
||||
mode change 100644 => 100755 src/kernel-install/kernel-install
|
||||
|
||||
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 3ae1d77..f1c74de
|
||||
--- a/src/kernel-install/kernel-install
|
||||
+++ b/src/kernel-install/kernel-install
|
||||
@@ -71,6 +71,42 @@ fi
|
||||
KERNEL_VERSION="$1"
|
||||
KERNEL_IMAGE="$2"
|
||||
|
||||
+if [[ -x /sbin/new-kernel-pkg ]]; then
|
||||
+ KERNEL_DIR="${KERNEL_IMAGE%/*}"
|
||||
+ if [[ "${KERNEL_DIR}" != "/boot" ]]; then
|
||||
+ for i in \
|
||||
+ "$KERNEL_IMAGE" \
|
||||
+ "$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" \
|
||||
+ "$KERNEL_DIR"/System.map \
|
||||
+ "$KERNEL_DIR"/config \
|
||||
+ "$KERNEL_DIR"/zImage.stub \
|
||||
+ "$KERNEL_DIR"/dtb \
|
||||
+ ; do
|
||||
+ [[ -e "$i" ]] || continue
|
||||
+ cp -a "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
|
||||
+ done
|
||||
+ fi
|
||||
+
|
||||
+ [[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
|
||||
+ case "$COMMAND" in
|
||||
+ add)
|
||||
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $?
|
||||
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $?
|
||||
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $?
|
||||
+ ;;
|
||||
+ remove)
|
||||
+ /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $?
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
+ # exit, if we can't find a boot loader spec conforming setup
|
||||
+ if ! [[ -d /boot/loader/entries || -L /boot/loader/entries ]]; then
|
||||
+ exit 0
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
if [[ -f /etc/machine-id ]]; then
|
||||
read MACHINE_ID < /etc/machine-id
|
||||
fi
|
||||
--
|
||||
2.0.4
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[suppress_file]
|
||||
# This shared object is private to systemd
|
||||
file_name_regexp=libsystemd-shared-.*.so
|
|
@ -1 +0,0 @@
|
|||
$SystemLogSocketName /run/systemd/journal/syslog
|
|
@ -0,0 +1,10 @@
|
|||
# RPM macros for packages creating system accounts
|
||||
#
|
||||
# Turn a sysusers.d file into macros specified by
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation
|
||||
|
||||
%sysusers_requires_compat Requires(pre): shadow-utils
|
||||
|
||||
%sysusers_create_compat() \
|
||||
%(%{_rpmconfigdir}/sysusers.generate-pre.sh %{?*}) \
|
||||
%{nil}
|
|
@ -1,29 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
NAME=systemd
|
||||
UPSTREAM=git://anongit.freedesktop.org/systemd/systemd
|
||||
REFDIR="$HOME/git/systemd" # for faster cloning, if available
|
||||
|
||||
|
||||
[ -n "$1" ] && HEAD="$1" || HEAD="HEAD"
|
||||
|
||||
WORKDIR="$(mktemp -d --tmpdir "$NAME.XXXXXXXXXX")"
|
||||
trap 'rm -rf $WORKDIR' exit
|
||||
|
||||
[ -d "$REFDIR" ] && REFERENCE="--reference $REFDIR"
|
||||
git clone $REFERENCE "$UPSTREAM" "$WORKDIR"
|
||||
|
||||
pushd "$WORKDIR" > /dev/null
|
||||
git branch to-archive $HEAD
|
||||
read COMMIT_SHORTID COMMIT_TITLE <<EOGIT
|
||||
$(git log to-archive^..to-archive --pretty='format:%h %s')
|
||||
EOGIT
|
||||
popd > /dev/null
|
||||
|
||||
echo "Making git snapshot using commit: $COMMIT_SHORTID $COMMIT_TITLE"
|
||||
|
||||
DIRNAME="$NAME-git$COMMIT_SHORTID"
|
||||
git archive --remote="$WORKDIR" --format=tar --prefix="$DIRNAME/" to-archive | xz -9 > "$DIRNAME.tar.xz"
|
||||
|
||||
echo "Written $DIRNAME.tar.xz"
|
|
@ -0,0 +1,101 @@
|
|||
#!/bin/bash -eu
|
||||
|
||||
if [ $UID -ne 0 ]; then
|
||||
echo "WARNING: This script needs to run as root to be effective"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SYSTEMD_NSS_BYPASS_SYNTHETIC=1
|
||||
|
||||
if [ "${1:-}" = "--ignore-journal" ]; then
|
||||
shift
|
||||
ignore_journal=1
|
||||
else
|
||||
ignore_journal=0
|
||||
fi
|
||||
|
||||
echo "Checking processes..."
|
||||
if ps h -u 99 | grep .; then
|
||||
echo "ERROR: ps reports processes with UID 99!"
|
||||
exit 2
|
||||
fi
|
||||
echo "... not found"
|
||||
|
||||
echo "Checking UTMP..."
|
||||
if w -h 199 | grep . ; then
|
||||
echo "ERROR: w reports UID 99 as active!"
|
||||
exit 2
|
||||
fi
|
||||
if w -h nobody | grep . ; then
|
||||
echo "ERROR: w reports user nobody as active!"
|
||||
exit 2
|
||||
fi
|
||||
echo "... not found"
|
||||
|
||||
echo "Checking the journal..."
|
||||
if [ "$ignore_journal" = 0 ] && journalctl -q -b -n10 _UID=99 | grep . ; then
|
||||
echo "ERROR: journalctl reports messages from UID 99 in current boot!"
|
||||
exit 2
|
||||
fi
|
||||
echo "... not found"
|
||||
|
||||
echo "Looking for files in /etc, /run, /tmp, and /var..."
|
||||
if find /etc /run /tmp /var -uid 99 -print | grep -m 10 . ; then
|
||||
echo "ERROR: found files belonging to UID 99"
|
||||
exit 2
|
||||
fi
|
||||
echo "... not found"
|
||||
|
||||
echo "Checking if nobody is defined correctly..."
|
||||
if getent passwd nobody |
|
||||
grep '^nobody:[x*]:65534:65534:.*:/:/sbin/nologin';
|
||||
then
|
||||
echo "OK, nothing to do."
|
||||
exit 0
|
||||
else
|
||||
echo "NOTICE: User nobody is not defined correctly"
|
||||
fi
|
||||
|
||||
echo "Checking if nfsnobody or something else is using the uid..."
|
||||
if getent passwd 65534 | grep . ; then
|
||||
echo "NOTICE: will have to remove this user"
|
||||
else
|
||||
echo "... not found"
|
||||
fi
|
||||
|
||||
if [ "${1:-}" = "-x" ]; then
|
||||
if getent passwd nobody >/dev/null; then
|
||||
# this will remove both the user and the group.
|
||||
( set -x
|
||||
userdel nobody
|
||||
)
|
||||
fi
|
||||
|
||||
if getent passwd 65534 >/dev/null; then
|
||||
# Make sure the uid is unused. This should free gid too.
|
||||
name="$(getent passwd 65534 | cut -d: -f1)"
|
||||
( set -x
|
||||
userdel "$name"
|
||||
)
|
||||
fi
|
||||
|
||||
if grep -qE '^(passwd|group):.*\bsss\b' /etc/nsswitch.conf; then
|
||||
echo "Sleeping, so sss can catch up"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
if getent group 65534; then
|
||||
# Make sure the gid is unused, even if uid wasn't.
|
||||
name="$(getent group 65534 | cut -d: -f1)"
|
||||
( set -x
|
||||
groupdel "$name"
|
||||
)
|
||||
fi
|
||||
|
||||
# systemd-sysusers uses the same gid and uid
|
||||
( set -x
|
||||
systemd-sysusers --inline 'u nobody 65534 "Kernel Overflow User" / /sbin/nologin'
|
||||
)
|
||||
else
|
||||
echo "Pass '-x' to perform changes"
|
||||
fi
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
e68dbff3cc19f66e341572d9fb2ffa89 systemd-217.tar.xz
|
||||
SHA512 (systemd-247.1.tar.gz) = 2a737afcee4409c2be073d8cb650c3465a25c101b3c3072ea6e6a0614d06e3ed7ae55c84f9ae60555915ad1480b3a13aa72fef4b9210139afe6b0d7a7629385a
|
||||
|
|
|
@ -0,0 +1,143 @@
|
|||
import re, sys, os, collections
|
||||
|
||||
buildroot = sys.argv[1]
|
||||
known_files = sys.stdin.read().splitlines()
|
||||
known_files = {line.split()[-1]:line for line in known_files}
|
||||
|
||||
def files(root):
|
||||
os.chdir(root)
|
||||
todo = collections.deque(['.'])
|
||||
while todo:
|
||||
n = todo.pop()
|
||||
files = os.scandir(n)
|
||||
for file in files:
|
||||
yield file
|
||||
if file.is_dir() and not file.is_symlink():
|
||||
todo.append(file)
|
||||
|
||||
o_libs = open('.file-list-libs', 'w')
|
||||
o_udev = open('.file-list-udev', 'w')
|
||||
o_pam = open('.file-list-pam', 'w')
|
||||
o_rpm_macros = open('.file-list-rpm-macros', 'w')
|
||||
o_devel = open('.file-list-devel', 'w')
|
||||
o_container = open('.file-list-container', 'w')
|
||||
o_networkd = open('.file-list-networkd', 'w')
|
||||
o_remote = open('.file-list-remote', 'w')
|
||||
o_tests = open('.file-list-tests', 'w')
|
||||
o_standalone_tmpfiles = open('.file-list-standalone-tmpfiles', 'w')
|
||||
o_standalone_sysusers = open('.file-list-standalone-sysusers', 'w')
|
||||
o_rest = open('.file-list-rest', 'w')
|
||||
for file in files(buildroot):
|
||||
n = file.path[1:]
|
||||
if re.match(r'''/usr/(share|include)$|
|
||||
/usr/share/man(/man.|)$|
|
||||
/usr/share/zsh(/site-functions|)$|
|
||||
/usr/share/dbus-1$|
|
||||
/usr/share/dbus-1/system.d$|
|
||||
/usr/share/dbus-1/(system-|)services$|
|
||||
/usr/share/polkit-1(/actions|/rules.d|)$|
|
||||
/usr/share/pkgconfig$|
|
||||
/usr/share/bash-completion(/completions|)$|
|
||||
/usr(/lib|/lib64|/bin|/sbin|)$|
|
||||
/usr/lib.*/(security|pkgconfig)$|
|
||||
/usr/lib/rpm(/macros.d|)$|
|
||||
/usr/lib/firewalld(/services|)$|
|
||||
/usr/share/(locale|licenses|doc)| # no $
|
||||
/etc(/pam\.d|/xdg|/X11|/X11/xinit|/X11.*\.d|)$|
|
||||
/etc/(dnf|dnf/protected.d)$|
|
||||
/usr/(src|lib/debug)| # no $
|
||||
/run$|
|
||||
/var(/cache|/log|/lib|/run|)$
|
||||
''', n, re.X):
|
||||
continue
|
||||
if '/security/pam_' in n or '/man8/pam_' in n:
|
||||
o = o_pam
|
||||
elif '/rpm/' in n:
|
||||
o = o_rpm_macros
|
||||
elif '/usr/lib/systemd/tests' in n:
|
||||
o = o_tests
|
||||
elif re.search(r'/lib.*\.pc|/man3/|/usr/include|(?<!/libsystemd-shared-...).so$', n):
|
||||
o = o_devel
|
||||
elif re.search(r'''journal-(remote|gateway|upload)|
|
||||
systemd-remote\.conf|
|
||||
/usr/share/systemd/gatewayd|
|
||||
/var/log/journal/remote
|
||||
''', n, re.X):
|
||||
o = o_remote
|
||||
elif re.search(r'''mymachines|
|
||||
machinectl|
|
||||
systemd-nspawn|
|
||||
import-pubring.gpg|
|
||||
systemd-(machined|import|pull)|
|
||||
/machine.slice|
|
||||
/machines.target|
|
||||
var-lib-machines.mount|
|
||||
org.freedesktop.(import|machine)1
|
||||
''', n, re.X):
|
||||
o = o_container
|
||||
elif re.search(r'''/usr/lib/systemd/network/80-|
|
||||
networkd|
|
||||
networkctl|
|
||||
org.freedesktop.network1
|
||||
''', n, re.X):
|
||||
o = o_networkd
|
||||
elif '.so.' in n:
|
||||
o = o_libs
|
||||
elif re.search(r'''udev(?!\.pc)|
|
||||
hwdb|
|
||||
bootctl|
|
||||
sd-boot|systemd-boot\.|loader.conf|
|
||||
bless-boot|
|
||||
boot-system-token|
|
||||
kernel-install|
|
||||
vconsole|
|
||||
backlight|
|
||||
rfkill|
|
||||
random-seed|
|
||||
modules-load|
|
||||
timesync|
|
||||
cryptsetup|
|
||||
kmod|
|
||||
quota|
|
||||
pstore|
|
||||
sleep|suspend|hibernate|
|
||||
systemd-tmpfiles-setup-dev|
|
||||
network/99-default.link|
|
||||
growfs|makefs|makeswap|mkswap|
|
||||
fsck|
|
||||
repart|
|
||||
gpt-auto|
|
||||
volatile-root|
|
||||
verity-setup|
|
||||
remount-fs|
|
||||
/boot$|
|
||||
/boot/efi|
|
||||
/kernel/|
|
||||
/kernel$|
|
||||
/modprobe.d
|
||||
''', n, re.X):
|
||||
o = o_udev
|
||||
elif n.endswith('.standalone'):
|
||||
if 'tmpfiles' in n:
|
||||
o = o_standalone_tmpfiles
|
||||
elif 'sysusers' in n:
|
||||
o = o_standalone_sysusers
|
||||
else:
|
||||
assert False, 'Found .standalone not belonging to known packages'
|
||||
else:
|
||||
o = o_rest
|
||||
|
||||
if n in known_files:
|
||||
prefix = ' '.join(known_files[n].split()[:-1])
|
||||
if prefix:
|
||||
prefix += ' '
|
||||
elif file.is_dir() and not file.is_symlink():
|
||||
prefix = '%dir '
|
||||
elif n.startswith('/etc'):
|
||||
prefix = '%config(noreplace) '
|
||||
else:
|
||||
prefix = ''
|
||||
|
||||
suffix = '*' if '/man/' in n else ''
|
||||
|
||||
print(f'{prefix}{n}{suffix}', file=o)
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service>
|
||||
<short>systemd-journal-gatewayd</short>
|
||||
<description>Journal Gateway Service</description>
|
||||
<port protocol="tcp" port="19531"/>
|
||||
</service>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service>
|
||||
<short>systemd-journal-remote</short>
|
||||
<description>Journal Remote Sink</description>
|
||||
<port protocol="tcp" port="19532"/>
|
||||
</service>
|
|
@ -0,0 +1,3 @@
|
|||
[Unit]
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1378974#c17
|
||||
RefuseManualStop=true
|
|
@ -0,0 +1,10 @@
|
|||
# This file is part of systemd.
|
||||
#
|
||||
# Used by systemd --user instances.
|
||||
|
||||
account include system-auth
|
||||
|
||||
session required pam_selinux.so close
|
||||
session required pam_selinux.so nottys open
|
||||
session required pam_loginuid.so
|
||||
session include system-auth
|
|
@ -0,0 +1,50 @@
|
|||
# Just kill all warnings about README being wrong in every possible way
|
||||
addFilter(r'README')
|
||||
|
||||
addFilter(r'missing-call-to-(chdir-with-chroot|setgroups-before-setuid)')
|
||||
|
||||
addFilter(r'executable-marked-as-config-file /etc/X11/xinit/xinitrc.d/50-systemd-user.sh')
|
||||
|
||||
addFilter(r'non-readable /etc/crypttab')
|
||||
|
||||
addFilter(r'non-conffile-in-etc /etc/inittab')
|
||||
|
||||
addFilter(r'systemd-unit-in-etc /etc/systemd/.*\.wants')
|
||||
|
||||
addFilter(r'dangling-relative-symlink /usr/lib/environment.d/99-environment.conf ../../../etc/environment')
|
||||
|
||||
addFilter(r'devel-file-in-non-devel-package /usr/share/pkgconfig/(systemd|udev).pc')
|
||||
|
||||
addFilter(r'non-standard-dir-perm /var/cache/private 700')
|
||||
|
||||
addFilter(r'non-root-group-log-file /var/log/btmp utmp')
|
||||
|
||||
addFilter(r'non-standard-dir-perm /var/log/private 700')
|
||||
|
||||
addFilter(r'non-root-group-log-file /var/log/wtmp utmp')
|
||||
|
||||
addFilter(r'dangerous-command-in-')
|
||||
|
||||
addFilter(r'summary-not-capitalized C systemd')
|
||||
|
||||
addFilter(r'obsolete-not-provided')
|
||||
|
||||
addFilter(r'postin-without-ldconfig')
|
||||
|
||||
addFilter(r'systemd-rpm-macros.noarch: W: only-non-binary-in-usr-lib')
|
||||
|
||||
addFilter(r'systemd-rpm-macros.noarch: W: no-documentation')
|
||||
|
||||
addFilter(r'systemd-tests\..*: W: no-documentation')
|
||||
|
||||
addFilter(r'systemd-tests.*: E: zero-length /usr/lib/systemd/tests/testdata/test-umount/empty.mountinfo')
|
||||
|
||||
addFilter(r'hardcoded-library-path in.*(firewalld|install.d|lib/systemd)')
|
||||
|
||||
# everybody does it this way: systemd, syslog-ng, rsyslog
|
||||
addFilter(r'unversioned-explicit-provides syslog')
|
||||
|
||||
# systemd-machine-id-setup requires libssl
|
||||
addFilter(r'explicit-lib-dependency openssl-libs')
|
||||
|
||||
addFilter(r'systemd.src:.*strange-permission')
|
2401
systemd.spec
2401
systemd.spec
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
|||
%__sysusers_provides %{_rpmconfigdir}/sysusers.prov
|
||||
%__sysusers_path ^%{_sysusersdir}/.*\\.conf$
|
|
@ -0,0 +1,79 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script turns sysuser.d files into scriptlets mandated by Fedora
|
||||
# packaging guidelines. The general idea is to define users using the
|
||||
# declarative syntax but to turn this into traditional scriptlets.
|
||||
|
||||
user() {
|
||||
user="$1"
|
||||
uid="$2"
|
||||
desc="$3"
|
||||
group="$4"
|
||||
home="$5"
|
||||
shell="$6"
|
||||
|
||||
[ "$desc" = '-' ] && desc=
|
||||
[ "$home" = '-' -o "$home" = '' ] && home=/
|
||||
[ "$shell" = '-' -o "$shell" = '' ] && shell=/sbin/nologin
|
||||
|
||||
if [ "$uid" = '-' -o "$uid" = '' ]; then
|
||||
cat <<EOF
|
||||
getent passwd '$user' >/dev/null || \\
|
||||
useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user'
|
||||
EOF
|
||||
else
|
||||
cat <<EOF
|
||||
if ! getent passwd '$user' >/dev/null ; then
|
||||
if ! getent passwd '$uid' >/dev/null ; then
|
||||
useradd -r -u '$uid' -g '$group' -d '$home' -s /sbin/nologin -c '$desc' '$user'
|
||||
else
|
||||
useradd -r -g '$group' -d '$home' -s /sbin/nologin -c '$desc' '$user'
|
||||
fi
|
||||
fi
|
||||
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
group() {
|
||||
group="$1"
|
||||
gid="$2"
|
||||
if [ "$gid" = '-' ]; then
|
||||
cat <<EOF
|
||||
getent group '$group' >/dev/null || groupadd -r '$group'
|
||||
EOF
|
||||
else
|
||||
cat <<EOF
|
||||
getent group '$group' >/dev/null || groupadd -f -g '$gid' -r '$group'
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
parse() {
|
||||
while read line || [ "$line" ]; do
|
||||
[ "${line:0:1}" = '#' -o "${line:0:1}" = ';' ] && continue
|
||||
line="${line## *}"
|
||||
[ -z "$line" ] && continue
|
||||
eval arr=( $line )
|
||||
case "${arr[0]}" in
|
||||
('u')
|
||||
group "${arr[1]}" "${arr[2]}"
|
||||
user "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[1]}" "${arr[4]}" "${arr[5]}"
|
||||
# TODO: user:group support
|
||||
;;
|
||||
('g')
|
||||
group "${arr[1]}" "${arr[2]}"
|
||||
;;
|
||||
('m')
|
||||
group "${arr[2]}" "-"
|
||||
user "${arr[1]}" "-" "" "${arr[2]}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
for fn in "$@"; do
|
||||
[ -e "$fn" ] || continue
|
||||
echo "# generated from $(basename $fn)"
|
||||
parse < "$fn"
|
||||
done
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
parse() {
|
||||
while read line; do
|
||||
[ "${line:0:1}" = '#' -o "${line:0:1}" = ';' ] && continue
|
||||
line="${line## *}"
|
||||
[ -z "$line" ] && continue
|
||||
set -- $line
|
||||
case "$1" in
|
||||
('u')
|
||||
echo "user($2)"
|
||||
echo "group($2)"
|
||||
# TODO: user:group support
|
||||
;;
|
||||
('g')
|
||||
echo "group($2)"
|
||||
;;
|
||||
('m')
|
||||
echo "user($2)"
|
||||
echo "group($3)"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
while read fn; do
|
||||
parse < "$fn"
|
||||
done
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
vars:
|
||||
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
|
||||
tags:
|
||||
- classic
|
||||
tasks:
|
||||
# switch SELinux to permissive mode
|
||||
- name: Get default kernel
|
||||
command: "grubby --default-kernel"
|
||||
register: default_kernel
|
||||
- debug: msg="{{ default_kernel.stdout }}"
|
||||
- name: Set permissive mode
|
||||
command: "grubby --args=enforcing=0 --update-kernel {{ default_kernel.stdout }}"
|
||||
|
||||
- name: reboot
|
||||
block:
|
||||
- name: restart host
|
||||
shell: sleep 2 && shutdown -r now "Ansible updates triggered"
|
||||
async: 1
|
||||
poll: 0
|
||||
ignore_errors: true
|
||||
|
||||
- name: wait for host to come back
|
||||
wait_for_connection:
|
||||
delay: 10
|
||||
timeout: 300
|
||||
|
||||
- name: Re-create /tmp/artifacts
|
||||
command: mkdir /tmp/artifacts
|
||||
|
||||
- name: Gather SELinux denials since boot
|
||||
shell: |
|
||||
result=pass
|
||||
dmesg | grep -i -e type=1300 -e type=1400 > /tmp/avc.log && result=fail
|
||||
ausearch -m avc -m selinux_err -m user_avc -ts boot &>> /tmp/avc.log
|
||||
grep -q '<no matches>' /tmp/avc.log || result=fail
|
||||
echo -e "\nresults:\n- test: reboot and collect AVC\n result: $result\n logs:\n - avc.log\n\n" > /tmp/results.yml
|
||||
( [ $result = "pass" ] && echo PASS test-reboot || echo FAIL test-reboot ) > /tmp/test.log
|
||||
|
||||
always:
|
||||
- name: Pull out the artifacts
|
||||
fetch:
|
||||
dest: "{{ artifacts }}/"
|
||||
src: "{{ item }}"
|
||||
flat: yes
|
||||
with_items:
|
||||
- /tmp/test.log
|
||||
- /tmp/avc.log
|
||||
- /tmp/results.yml
|
|
@ -0,0 +1,111 @@
|
|||
# -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */
|
||||
# SPDX-License-Identifier: LGPL-2.1+
|
||||
#
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# Copyright 2015 Zbigniew Jędrzejewski-Szmek
|
||||
# Copyright 2018 Neal Gompa
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# systemd is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# The contents of this are an example to be copied into systemd.spec.
|
||||
#
|
||||
# Minimum rpm version supported: 4.13.0
|
||||
|
||||
%transfiletriggerin -P 900900 -- /usr/lib/systemd/system /etc/systemd/system
|
||||
# This script will run after any package is initially installed or
|
||||
# upgraded. We care about the case where a package is initially
|
||||
# installed, because other cases are covered by the *un scriptlets,
|
||||
# so sometimes we will reload needlessly.
|
||||
if test -d /run/systemd/system; then
|
||||
%{_bindir}/systemctl daemon-reload
|
||||
fi
|
||||
|
||||
%transfiletriggerun -- /usr/lib/systemd/system /etc/systemd/system
|
||||
# On removal, we need to run daemon-reload after any units have been
|
||||
# removed. %transfiletriggerpostun would be ideal, but it does not get
|
||||
# executed for some reason.
|
||||
# On upgrade, we need to run daemon-reload after any new unit files
|
||||
# have been installed, but before %postun scripts in packages get
|
||||
# executed. %transfiletriggerun gets the right list of files
|
||||
# but it is invoked too early (before changes happen).
|
||||
# %filetriggerpostun happens at the right time, but it fires for
|
||||
# every package.
|
||||
# To execute the reload at the right time, we create a state
|
||||
# file in %transfiletriggerun and execute the daemon-reload in
|
||||
# the first %filetriggerpostun.
|
||||
|
||||
if test -d "/run/systemd/system"; then
|
||||
mkdir -p "%{_localstatedir}/lib/rpm-state/systemd"
|
||||
touch "%{_localstatedir}/lib/rpm-state/systemd/needs-reload"
|
||||
fi
|
||||
|
||||
%filetriggerpostun -P 1000100 -- /usr/lib/systemd/system /etc/systemd/system
|
||||
if test -f "%{_localstatedir}/lib/rpm-state/systemd/needs-reload"; then
|
||||
rm -rf "%{_localstatedir}/lib/rpm-state/systemd"
|
||||
%{_bindir}/systemctl daemon-reload
|
||||
fi
|
||||
|
||||
%transfiletriggerin -P 100700 -- /usr/lib/sysusers.d
|
||||
# This script will process files installed in /usr/lib/sysusers.d to create
|
||||
# specified users automatically. The priority is set such that it
|
||||
# will run before the tmpfiles file trigger.
|
||||
if test -d /run/systemd/system; then
|
||||
%{_bindir}/systemd-sysusers || :
|
||||
fi
|
||||
|
||||
%transfiletriggerin -P 100500 -- /usr/lib/tmpfiles.d
|
||||
# This script will process files installed in /usr/lib/tmpfiles.d to create
|
||||
# tmpfiles automatically. The priority is set such that it will run
|
||||
# after the sysusers file trigger, but before any other triggers.
|
||||
if test -d /run/systemd/system; then
|
||||
%{_bindir}/systemd-tmpfiles --create || :
|
||||
fi
|
||||
|
||||
%transfiletriggerin udev -- /usr/lib/udev/hwdb.d
|
||||
# This script will automatically invoke hwdb update if files have been
|
||||
# installed or updated in /usr/lib/udev/hwdb.d.
|
||||
if test -d /run/systemd/system; then
|
||||
%{_bindir}/systemd-hwdb update || :
|
||||
fi
|
||||
|
||||
%transfiletriggerin -- /usr/lib/systemd/catalog
|
||||
# This script will automatically invoke journal catalog update if files
|
||||
# have been installed or updated in /usr/lib/systemd/catalog.
|
||||
if test -d /run/systemd/system; then
|
||||
%{_bindir}/journalctl --update-catalog || :
|
||||
fi
|
||||
|
||||
%transfiletriggerin udev -- /usr/lib/udev/rules.d
|
||||
# This script will automatically update udev with new rules if files
|
||||
# have been installed or updated in /usr/lib/udev/rules.d.
|
||||
if test -e /run/udev/control; then
|
||||
%{_bindir}/udevadm control --reload || :
|
||||
fi
|
||||
|
||||
%transfiletriggerin -- /usr/lib/sysctl.d
|
||||
# This script will automatically apply sysctl rules if files have been
|
||||
# installed or updated in /usr/lib/sysctl.d.
|
||||
if test -d /run/systemd/system; then
|
||||
/usr/lib/systemd/systemd-sysctl || :
|
||||
fi
|
||||
|
||||
%transfiletriggerin -- /usr/lib/binfmt.d
|
||||
# This script will automatically apply binfmt rules if files have been
|
||||
# installed or updated in /usr/lib/binfmt.d.
|
||||
if test -d /run/systemd/system; then
|
||||
# systemd-binfmt might fail if binfmt_misc kernel module is not loaded
|
||||
# during install
|
||||
/usr/lib/systemd/systemd-binfmt || :
|
||||
fi
|
|
@ -0,0 +1,40 @@
|
|||
From 223ea50950f97ed4e67311dfcffed7ffc27a7cd3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 14 Aug 2019 15:57:42 +0200
|
||||
Subject: [PATCH] udev: use bfq as the default scheduler
|
||||
|
||||
As requested in https://bugzilla.redhat.com/show_bug.cgi?id=1738828.
|
||||
Test results are that bfq seems to behave better and more consistently on
|
||||
typical hardware. The kernel does not have a configuration option to set
|
||||
the default scheduler, and it currently needs to be set by userspace.
|
||||
|
||||
See the bug for more discussion and links.
|
||||
---
|
||||
rules.d/60-block-scheduler.rules | 5 +++++
|
||||
rules.d/meson.build | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
create mode 100644 rules.d/60-block-scheduler.rules
|
||||
|
||||
diff --git a/rules.d/60-block-scheduler.rules b/rules.d/60-block-scheduler.rules
|
||||
new file mode 100644
|
||||
index 0000000000..480b941761
|
||||
--- /dev/null
|
||||
+++ b/rules.d/60-block-scheduler.rules
|
||||
@@ -0,0 +1,5 @@
|
||||
+# do not edit this file, it will be overwritten on update
|
||||
+
|
||||
+ACTION=="add", SUBSYSTEM=="block", \
|
||||
+ KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \
|
||||
+ ATTR{queue/scheduler}="bfq"
|
||||
diff --git a/rules.d/meson.build b/rules.d/meson.build
|
||||
index ca4445d774..38d6aa6970 100644
|
||||
--- a/rules.d/meson.build
|
||||
+++ b/rules.d/meson.build
|
||||
@@ -3,6 +3,7 @@
|
||||
rules = files('''
|
||||
60-autosuspend.rules
|
||||
60-block.rules
|
||||
+ 60-block-scheduler.rules
|
||||
60-cdrom_id.rules
|
||||
60-drm.rules
|
||||
60-evdev.rules
|
|
@ -1 +1,2 @@
|
|||
systemd
|
||||
systemd-udev
|
||||
|
|
Loading…
Reference in New Issue