Compare commits
594 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 | ||
|
ea19761321 | ||
|
0440dc0ca2 | ||
|
90edccda2e | ||
|
ba201ce670 | ||
|
32324f829f | ||
|
c6e31c698a | ||
|
cc4dc44dee | ||
|
2607f00f9e | ||
|
f5ff7e9460 | ||
|
db38be6409 | ||
|
f1004dc2ae | ||
|
cebcd2064c | ||
|
801ccd93e2 | ||
|
b1a5d764a3 | ||
|
6d5bee3354 | ||
|
62fe9450da | ||
|
5cdc00d6e6 | ||
|
9a5afe8dab | ||
|
0019b3e60d | ||
|
d962ba812f | ||
|
ed4e5bbcf4 | ||
|
10e6a8e59d | ||
|
c8f466444b | ||
|
039253f8be | ||
|
522fbab110 | ||
|
4dd25f856a | ||
|
92a80ac51a | ||
|
6a2a58eca0 | ||
|
bd236f8773 | ||
|
a7ae5e1ba8 | ||
|
4eb55a70f3 | ||
|
07abe5d036 | ||
|
d804568c00 | ||
|
a547c77177 | ||
|
5ea76b17b0 | ||
|
dc60e841f2 | ||
|
cfcb358dcf | ||
|
43ff24caab | ||
|
a1b71bbfb4 | ||
|
8403beacd6 | ||
|
a72e682fa2 | ||
|
1298810b87 | ||
|
cf472bed00 | ||
|
e4fbe402d9 | ||
|
3a2e601eff | ||
|
ff52563fea | ||
|
5509c00d0f | ||
|
7823b319da | ||
|
20b1bd7bf5 | ||
|
19bf972ad8 | ||
|
2ccc8c6e6d | ||
|
15a7f7ed44 | ||
|
0749053796 | ||
|
aa972ead6c | ||
|
b3df2977df | ||
|
66bb743a75 | ||
|
4b836b7c0f | ||
|
bfd0409b0a | ||
|
6742ef2e5b | ||
|
dadefab9fa | ||
|
5fb0bff53b | ||
|
3498cab60f | ||
|
cfb5e74d89 | ||
|
0bbe49d16e | ||
|
10d1847857 | ||
|
d62e12d048 | ||
|
13fd1e4253 | ||
|
dd42fcb046 | ||
|
8048dc7b46 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,8 @@
|
|||||||
|
*~
|
||||||
/systemd-*/
|
/systemd-*/
|
||||||
/.build-*.log
|
/.build-*.log
|
||||||
/x86_64/
|
/x86_64/
|
||||||
/systemd-*src.rpm
|
/systemd-*src.rpm
|
||||||
/systemd-*.tar.xz
|
/systemd-*.tar.xz
|
||||||
|
/systemd-*.tar.gz
|
||||||
/*.rpm
|
/*.rpm
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
From 2d426f2ad06032979fa7a54d11b74be52b8ec047 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Herrmann <dh.herrmann@gmail.com>
|
|
||||||
Date: Tue, 25 Feb 2014 12:20:25 +0100
|
|
||||||
Subject: [PATCH] login: fix pos-array allocation
|
|
||||||
|
|
||||||
GREEDY_REALLOC takes a pointer to the real size, not the array-width as
|
|
||||||
argument. Therefore, our array is currently way to small to keep the seat
|
|
||||||
positions.
|
|
||||||
|
|
||||||
Introduce GREEDY_REALLOC0_T() as typed version of GREEDY_REALLOC and store
|
|
||||||
the array-width instead of array-size.
|
|
||||||
|
|
||||||
(cherry picked from commit a1937e679f76758635d295287398abe526de2522)
|
|
||||||
---
|
|
||||||
src/login/logind-seat.c | 2 +-
|
|
||||||
src/shared/util.h | 9 +++++++++
|
|
||||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
|
|
||||||
index 631be5f..36ec7ed 100644
|
|
||||||
--- a/src/login/logind-seat.c
|
|
||||||
+++ b/src/login/logind-seat.c
|
|
||||||
@@ -475,7 +475,7 @@ void seat_claim_position(Seat *s, Session *session, unsigned int pos) {
|
|
||||||
if (seat_has_vts(s))
|
|
||||||
pos = session->vtnr;
|
|
||||||
|
|
||||||
- if (!GREEDY_REALLOC0(s->positions, s->position_count, pos + 1))
|
|
||||||
+ if (!GREEDY_REALLOC0_T(s->positions, s->position_count, pos + 1))
|
|
||||||
return;
|
|
||||||
|
|
||||||
seat_evict_position(s, session);
|
|
||||||
diff --git a/src/shared/util.h b/src/shared/util.h
|
|
||||||
index 9913fce..78b1444 100644
|
|
||||||
--- a/src/shared/util.h
|
|
||||||
+++ b/src/shared/util.h
|
|
||||||
@@ -723,6 +723,15 @@ void* greedy_realloc0(void **p, size_t *allocated, size_t need);
|
|
||||||
#define GREEDY_REALLOC0(array, allocated, need) \
|
|
||||||
greedy_realloc0((void**) &(array), &(allocated), sizeof((array)[0]) * (need))
|
|
||||||
|
|
||||||
+#define GREEDY_REALLOC0_T(array, count, need) \
|
|
||||||
+ ({ \
|
|
||||||
+ size_t _size = (count) * sizeof((array)[0]); \
|
|
||||||
+ void *_ptr = GREEDY_REALLOC0((array), _size, (need)); \
|
|
||||||
+ if (_ptr) \
|
|
||||||
+ (count) = _size / sizeof((array)[0]); \
|
|
||||||
+ _ptr; \
|
|
||||||
+ })
|
|
||||||
+
|
|
||||||
static inline void _reset_errno_(int *saved_errno) {
|
|
||||||
errno = *saved_errno;
|
|
||||||
}
|
|
@ -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]);
|
33
0001-test-path-util-ignore-test-failure.patch
Normal file
33
0001-test-path-util-ignore-test-failure.patch
Normal file
@ -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,51 +0,0 @@
|
|||||||
From aa6c8bcd17b37634fc7e4d5d59b6b9d93625b4a3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Herrmann <dh.herrmann@gmail.com>
|
|
||||||
Date: Tue, 25 Feb 2014 13:08:24 +0100
|
|
||||||
Subject: [PATCH] login: set pos-slot to fallback on pos-eviction
|
|
||||||
|
|
||||||
If we evict a session position, we open the position slot for future
|
|
||||||
sessions. However, there might already be another session on the same
|
|
||||||
position if both were started on the same VT. This is currently done if
|
|
||||||
gdm spawns the session on its own Xserver.
|
|
||||||
|
|
||||||
Hence, look for such a session on pos-eviction and claim the new slot
|
|
||||||
immediately.
|
|
||||||
|
|
||||||
(cherry picked from commit 3e6b205f81e743c7354ccbc69eb45afbdbebe2dc)
|
|
||||||
---
|
|
||||||
src/login/logind-seat.c | 14 +++++++++++++-
|
|
||||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
|
|
||||||
index 36ec7ed..96cf08e 100644
|
|
||||||
--- a/src/login/logind-seat.c
|
|
||||||
+++ b/src/login/logind-seat.c
|
|
||||||
@@ -459,6 +459,7 @@ int seat_stop_sessions(Seat *s, bool force) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void seat_evict_position(Seat *s, Session *session) {
|
|
||||||
+ Session *iter;
|
|
||||||
unsigned int pos = session->pos;
|
|
||||||
|
|
||||||
session->pos = 0;
|
|
||||||
@@ -466,8 +467,19 @@ void seat_evict_position(Seat *s, Session *session) {
|
|
||||||
if (!pos)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- if (pos < s->position_count && s->positions[pos] == session)
|
|
||||||
+ if (pos < s->position_count && s->positions[pos] == session) {
|
|
||||||
s->positions[pos] = NULL;
|
|
||||||
+
|
|
||||||
+ /* There might be another session claiming the same
|
|
||||||
+ * position (eg., during gdm->session transition), so lets look
|
|
||||||
+ * for it and set it on the free slot. */
|
|
||||||
+ LIST_FOREACH(sessions_by_seat, iter, s->sessions) {
|
|
||||||
+ if (iter->pos == pos) {
|
|
||||||
+ s->positions[pos] = iter;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void seat_claim_position(Seat *s, Session *session, unsigned int pos) {
|
|
@ -1,33 +0,0 @@
|
|||||||
From 0d0b9805baaed3e4e584916bbff710fec6cb1e8b Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
|
|
||||||
Date: Fri, 21 Feb 2014 18:23:17 -0500
|
|
||||||
Subject: [PATCH] login: Allow calling org.freedesktop.login1.Seat.SwitchTo
|
|
||||||
|
|
||||||
(cherry picked from commit 9c413373d2112055a0142ef522bf95af9b491b4a)
|
|
||||||
---
|
|
||||||
src/login/org.freedesktop.login1.conf | 12 ++++++++++++
|
|
||||||
1 file changed, 12 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/login/org.freedesktop.login1.conf b/src/login/org.freedesktop.login1.conf
|
|
||||||
index d677f61..1318328 100644
|
|
||||||
--- a/src/login/org.freedesktop.login1.conf
|
|
||||||
+++ b/src/login/org.freedesktop.login1.conf
|
|
||||||
@@ -141,6 +141,18 @@
|
|
||||||
send_member="ActivateSession"/>
|
|
||||||
|
|
||||||
<allow send_destination="org.freedesktop.login1"
|
|
||||||
+ send_interface="org.freedesktop.login1.Seat"
|
|
||||||
+ send_member="SwitchTo"/>
|
|
||||||
+
|
|
||||||
+ <allow send_destination="org.freedesktop.login1"
|
|
||||||
+ send_interface="org.freedesktop.login1.Seat"
|
|
||||||
+ send_member="SwitchToPrevious"/>
|
|
||||||
+
|
|
||||||
+ <allow send_destination="org.freedesktop.login1"
|
|
||||||
+ send_interface="org.freedesktop.login1.Seat"
|
|
||||||
+ send_member="SwitchToNext"/>
|
|
||||||
+
|
|
||||||
+ <allow send_destination="org.freedesktop.login1"
|
|
||||||
send_interface="org.freedesktop.login1.Session"
|
|
||||||
send_member="Activate"/>
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
From d0550e668858e1af94e2746062931680dc15b555 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomasz Torcz <tomek@pipebreaker.pl>
|
|
||||||
Date: Tue, 25 Feb 2014 12:43:55 +0100
|
|
||||||
Subject: [PATCH] fix typo in iDRAC network interface name: irdac->idrac
|
|
||||||
|
|
||||||
(cherry picked from commit b3e4387351c835766f96796a20d94971afea7d3b)
|
|
||||||
---
|
|
||||||
hwdb/20-net-ifname.hwdb | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/hwdb/20-net-ifname.hwdb b/hwdb/20-net-ifname.hwdb
|
|
||||||
index 29d2633..2408dc1 100644
|
|
||||||
--- a/hwdb/20-net-ifname.hwdb
|
|
||||||
+++ b/hwdb/20-net-ifname.hwdb
|
|
||||||
@@ -2,4 +2,4 @@
|
|
||||||
|
|
||||||
# Dell iDRAC Virtual USB NIC
|
|
||||||
usb:v413CpA102*
|
|
||||||
- ID_NET_NAME_FROM_DATABASE=irdac
|
|
||||||
+ ID_NET_NAME_FROM_DATABASE=idrac
|
|
@ -1,88 +0,0 @@
|
|||||||
From a980c3fa6bee1b4f0185d9d317c1bbf30ce6b832 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Tue, 25 Feb 2014 20:11:04 -0500
|
|
||||||
Subject: [PATCH] Replace /var/run with /run in remaining places
|
|
||||||
|
|
||||||
/run was already used almost everywhere, fix the remaining places
|
|
||||||
for consistency.
|
|
||||||
|
|
||||||
(cherry picked from commit 41a55c46ab8fb4ef6727434227071321fc762cce)
|
|
||||||
---
|
|
||||||
man/daemon.xml | 2 +-
|
|
||||||
man/runlevel.xml | 2 +-
|
|
||||||
man/tmpfiles.d.xml | 4 ++--
|
|
||||||
src/libsystemd/sd-bus/sd-bus.c | 4 ++--
|
|
||||||
src/systemctl/systemctl.c | 4 ++--
|
|
||||||
5 files changed, 8 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/man/daemon.xml b/man/daemon.xml
|
|
||||||
index 88dd082..fd29ba7 100644
|
|
||||||
--- a/man/daemon.xml
|
|
||||||
+++ b/man/daemon.xml
|
|
||||||
@@ -149,7 +149,7 @@
|
|
||||||
write the daemon PID (as returned by
|
|
||||||
<function>getpid()</function>) to a
|
|
||||||
PID file, for example
|
|
||||||
- <filename>/var/run/foobar.pid</filename>
|
|
||||||
+ <filename>/run/foobar.pid</filename>
|
|
||||||
(for a hypothetical daemon "foobar")
|
|
||||||
to ensure that the daemon cannot be
|
|
||||||
started more than once. This must be
|
|
||||||
diff --git a/man/runlevel.xml b/man/runlevel.xml
|
|
||||||
index 976753a..4db06dc 100644
|
|
||||||
--- a/man/runlevel.xml
|
|
||||||
+++ b/man/runlevel.xml
|
|
||||||
@@ -124,7 +124,7 @@
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
- <term><filename>/var/run/utmp</filename></term>
|
|
||||||
+ <term><filename>/run/utmp</filename></term>
|
|
||||||
|
|
||||||
<listitem><para>The utmp database
|
|
||||||
<command>runlevel</command> reads the
|
|
||||||
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
|
|
||||||
index 812129f..0a006d1 100644
|
|
||||||
--- a/man/tmpfiles.d.xml
|
|
||||||
+++ b/man/tmpfiles.d.xml
|
|
||||||
@@ -441,8 +441,8 @@ r! /tmp/.X[0-9]*-lock</programlisting>
|
|
||||||
<title>/etc/tmpfiles.d/screen.conf example</title>
|
|
||||||
<para><command>screen</command> needs two directories created at boot with specific modes and ownership.</para>
|
|
||||||
|
|
||||||
- <programlisting>d /var/run/screens 1777 root root 10d
|
|
||||||
-d /var/run/uscreens 0755 root root 10d12h</programlisting>
|
|
||||||
+ <programlisting>d /run/screens 1777 root root 10d
|
|
||||||
+d /run/uscreens 0755 root root 10d12h</programlisting>
|
|
||||||
</example>
|
|
||||||
<example>
|
|
||||||
<title>/etc/tmpfiles.d/abrt.conf example</title>
|
|
||||||
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
|
|
||||||
index 20f540d..1318272 100644
|
|
||||||
--- a/src/libsystemd/sd-bus/sd-bus.c
|
|
||||||
+++ b/src/libsystemd/sd-bus/sd-bus.c
|
|
||||||
@@ -794,8 +794,8 @@ static int parse_container_unix_address(sd_bus *b, const char **p, char **guid)
|
|
||||||
machine = NULL;
|
|
||||||
|
|
||||||
b->sockaddr.un.sun_family = AF_UNIX;
|
|
||||||
- strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
|
|
||||||
- b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + sizeof("/var/run/dbus/system_bus_socket") - 1;
|
|
||||||
+ strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
|
|
||||||
+ b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/run/dbus/system_bus_socket");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
|
||||||
index 34d7079..8692716 100644
|
|
||||||
--- a/src/systemctl/systemctl.c
|
|
||||||
+++ b/src/systemctl/systemctl.c
|
|
||||||
@@ -3758,8 +3758,8 @@ static int show_one(
|
|
||||||
streq(verb, "status")) {
|
|
||||||
/* According to LSB: "program not running" */
|
|
||||||
/* 0: program is running or service is OK
|
|
||||||
- * 1: program is dead and /var/run pid file exists
|
|
||||||
- * 2: program is dead and /var/lock lock file exists
|
|
||||||
+ * 1: program is dead and /run PID file exists
|
|
||||||
+ * 2: program is dead and /run/lock lock file exists
|
|
||||||
* 3: program is not running
|
|
||||||
* 4: program or service status is unknown
|
|
||||||
*/
|
|
@ -1,59 +0,0 @@
|
|||||||
From ab64c275efac13ed8fb255e4b2ccf1c287aa0bc6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Wed, 26 Feb 2014 02:47:43 +0100
|
|
||||||
Subject: [PATCH] Revert back to /var/run at a couple of problems
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This partially reverts 41a55c46ab8fb4ef6727434227071321fc762cce
|
|
||||||
|
|
||||||
Some specifications we want to stay compatibility actually document
|
|
||||||
/var/run, not /run, and we should stay compatible with that. In order to
|
|
||||||
make sure our D-Bus implementation works on any system, regardless if
|
|
||||||
running systemd or not, we should always use /var/run which is the
|
|
||||||
only path mandated by the D-Bus spec.
|
|
||||||
|
|
||||||
Similar, glibc hardcodes the utmp location to /var/run, and this is
|
|
||||||
exposed in _UTMP_PATH in limits.h, hence let's stay in sync with this
|
|
||||||
public API, too.
|
|
||||||
|
|
||||||
We simply do not support systems where /var/run is not a symlink → /run.
|
|
||||||
Hence both are equivalent. Staying compatible with upstream
|
|
||||||
specifications hence weighs more than cleaning up superficial
|
|
||||||
appearance.
|
|
||||||
|
|
||||||
(cherry picked from commit df1e02046144f41176c32ed011369fd8dba36b76)
|
|
||||||
---
|
|
||||||
man/runlevel.xml | 2 +-
|
|
||||||
src/libsystemd/sd-bus/sd-bus.c | 4 ++--
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/man/runlevel.xml b/man/runlevel.xml
|
|
||||||
index 4db06dc..976753a 100644
|
|
||||||
--- a/man/runlevel.xml
|
|
||||||
+++ b/man/runlevel.xml
|
|
||||||
@@ -124,7 +124,7 @@
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
- <term><filename>/run/utmp</filename></term>
|
|
||||||
+ <term><filename>/var/run/utmp</filename></term>
|
|
||||||
|
|
||||||
<listitem><para>The utmp database
|
|
||||||
<command>runlevel</command> reads the
|
|
||||||
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
|
|
||||||
index 1318272..636715f 100644
|
|
||||||
--- a/src/libsystemd/sd-bus/sd-bus.c
|
|
||||||
+++ b/src/libsystemd/sd-bus/sd-bus.c
|
|
||||||
@@ -794,8 +794,8 @@ static int parse_container_unix_address(sd_bus *b, const char **p, char **guid)
|
|
||||||
machine = NULL;
|
|
||||||
|
|
||||||
b->sockaddr.un.sun_family = AF_UNIX;
|
|
||||||
- strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
|
|
||||||
- b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/run/dbus/system_bus_socket");
|
|
||||||
+ strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
|
|
||||||
+ b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/var/run/dbus/system_bus_socket");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
From 10acd244847eb8689e79efbf95475aef8818bb51 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Wed, 26 Feb 2014 02:54:37 +0100
|
|
||||||
Subject: [PATCH] =?UTF-8?q?README:=20document=20that=20/var/run=20must=20b?=
|
|
||||||
=?UTF-8?q?e=20a=20symlink=20=E2=86=92=20/run?=
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
(cherry picked from commit 47bc23c18cbc87471dc832534c8565625e4a9d16)
|
|
||||||
---
|
|
||||||
README | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/README b/README
|
|
||||||
index b918132..7a227e7 100644
|
|
||||||
--- a/README
|
|
||||||
+++ b/README
|
|
||||||
@@ -190,6 +190,9 @@ WARNINGS:
|
|
||||||
about this, since this kind of file system setup is not really
|
|
||||||
supported anymore by the basic set of Linux OS components.
|
|
||||||
|
|
||||||
+ systemd requires that the /run mount point exists. systemd also
|
|
||||||
+ requires that /var/run is a a symlink → /run.
|
|
||||||
+
|
|
||||||
For more information on this issue consult
|
|
||||||
http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
|||||||
From d5194bbb174d0b9a87e81d465644624ab455bbf6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Tue, 25 Feb 2014 21:26:31 -0500
|
|
||||||
Subject: [PATCH] Use /var/run/dbus/system_bus_socket for the D-Bus socket
|
|
||||||
|
|
||||||
(cherry picked from commit 1ae383a8a3ae4824453e297352fda603d2d3fd5e)
|
|
||||||
---
|
|
||||||
man/systemd-bus-proxyd@.service.xml | 2 +-
|
|
||||||
src/libsystemd/sd-bus/PORTING-DBUS1 | 2 +-
|
|
||||||
src/shared/def.h | 2 +-
|
|
||||||
units/systemd-bus-proxyd.socket | 2 +-
|
|
||||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/man/systemd-bus-proxyd@.service.xml b/man/systemd-bus-proxyd@.service.xml
|
|
||||||
index 75a3c8b..3a5930d 100644
|
|
||||||
--- a/man/systemd-bus-proxyd@.service.xml
|
|
||||||
+++ b/man/systemd-bus-proxyd@.service.xml
|
|
||||||
@@ -59,7 +59,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
<para><filename>systemd-bus-proxyd.socket</filename> will launch
|
|
||||||
<filename>systemd-bus-proxyd@.service</filename> for connections
|
|
||||||
to the classic D-Bus socket in
|
|
||||||
- <filename>/run/dbus/system_bus_socket</filename>.</para>
|
|
||||||
+ <filename>/var/run/dbus/system_bus_socket</filename>.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-bus-proxyd@.service</filename> is launched
|
|
||||||
for an existing D-Bus connection and will use
|
|
||||||
diff --git a/src/libsystemd/sd-bus/PORTING-DBUS1 b/src/libsystemd/sd-bus/PORTING-DBUS1
|
|
||||||
index 90d184b7..0253a42 100644
|
|
||||||
--- a/src/libsystemd/sd-bus/PORTING-DBUS1
|
|
||||||
+++ b/src/libsystemd/sd-bus/PORTING-DBUS1
|
|
||||||
@@ -536,7 +536,7 @@ parameter.
|
|
||||||
Client libraries should use the following connection string when
|
|
||||||
connecting to the system bus:
|
|
||||||
|
|
||||||
- kernel:path=/dev/kdbus/0-system/bus;unix:path=/run/dbus/system_bus_socket
|
|
||||||
+ kernel:path=/dev/kdbus/0-system/bus;unix:path=/var/run/dbus/system_bus_socket
|
|
||||||
|
|
||||||
This will ensure that kdbus is preferred over the legacy AF_UNIX
|
|
||||||
socket, but compatibility is kept. For the user bus use:
|
|
||||||
diff --git a/src/shared/def.h b/src/shared/def.h
|
|
||||||
index 7777756..aa489d8 100644
|
|
||||||
--- a/src/shared/def.h
|
|
||||||
+++ b/src/shared/def.h
|
|
||||||
@@ -61,7 +61,7 @@
|
|
||||||
"/usr/lib/kbd/keymaps/\0"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#define UNIX_SYSTEM_BUS_PATH "unix:path=/run/dbus/system_bus_socket"
|
|
||||||
+#define UNIX_SYSTEM_BUS_PATH "unix:path=/var/run/dbus/system_bus_socket"
|
|
||||||
#define KERNEL_SYSTEM_BUS_PATH "kernel:path=/dev/kdbus/0-system/bus"
|
|
||||||
|
|
||||||
#ifdef ENABLE_KDBUS
|
|
||||||
diff --git a/units/systemd-bus-proxyd.socket b/units/systemd-bus-proxyd.socket
|
|
||||||
index 406e15b..6c42d38 100644
|
|
||||||
--- a/units/systemd-bus-proxyd.socket
|
|
||||||
+++ b/units/systemd-bus-proxyd.socket
|
|
||||||
@@ -9,5 +9,5 @@
|
|
||||||
Description=Legacy D-Bus Protocol Compatibility Socket
|
|
||||||
|
|
||||||
[Socket]
|
|
||||||
-ListenStream=/run/dbus/system_bus_socket
|
|
||||||
+ListenStream=/var/run/dbus/system_bus_socket
|
|
||||||
Accept=yes
|
|
@ -1,68 +0,0 @@
|
|||||||
From f230c64b5ad069b271f163da3142df52eab1202b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Wed, 26 Feb 2014 04:27:50 +0100
|
|
||||||
Subject: [PATCH] mount: don't send out PropertiesChanged message if actually
|
|
||||||
nothing got changed
|
|
||||||
|
|
||||||
(cherry picked from commit ff5f34d08c191c326c41a083745522383ac86cae)
|
|
||||||
---
|
|
||||||
src/core/mount.c | 15 ++++++++++++---
|
|
||||||
1 file changed, 12 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
||||||
index a0cea1e..75b133b 100644
|
|
||||||
--- a/src/core/mount.c
|
|
||||||
+++ b/src/core/mount.c
|
|
||||||
@@ -1388,7 +1388,7 @@ static int mount_add_one(
|
|
||||||
_cleanup_free_ char *e = NULL, *w = NULL, *o = NULL, *f = NULL;
|
|
||||||
bool load_extras = false;
|
|
||||||
MountParameters *p;
|
|
||||||
- bool delete;
|
|
||||||
+ bool delete, changed = false;
|
|
||||||
Unit *u;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
@@ -1456,6 +1456,7 @@ static int mount_add_one(
|
|
||||||
}
|
|
||||||
|
|
||||||
unit_add_to_load_queue(u);
|
|
||||||
+ changed = true;
|
|
||||||
} else {
|
|
||||||
delete = false;
|
|
||||||
|
|
||||||
@@ -1474,6 +1475,7 @@ static int mount_add_one(
|
|
||||||
/* Load in the extras later on, after we
|
|
||||||
* finished initialization of the unit */
|
|
||||||
load_extras = true;
|
|
||||||
+ changed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1485,10 +1487,16 @@ static int mount_add_one(
|
|
||||||
}
|
|
||||||
|
|
||||||
p = &MOUNT(u)->parameters_proc_self_mountinfo;
|
|
||||||
+
|
|
||||||
+ changed = changed ||
|
|
||||||
+ !streq_ptr(p->options, options) ||
|
|
||||||
+ !streq_ptr(p->what, what) ||
|
|
||||||
+ !streq_ptr(p->fstype, fstype);
|
|
||||||
+
|
|
||||||
if (set_flags) {
|
|
||||||
MOUNT(u)->is_mounted = true;
|
|
||||||
MOUNT(u)->just_mounted = !MOUNT(u)->from_proc_self_mountinfo;
|
|
||||||
- MOUNT(u)->just_changed = !streq_ptr(p->options, o);
|
|
||||||
+ MOUNT(u)->just_changed = changed;
|
|
||||||
}
|
|
||||||
|
|
||||||
MOUNT(u)->from_proc_self_mountinfo = true;
|
|
||||||
@@ -1511,7 +1519,8 @@ static int mount_add_one(
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
- unit_add_to_dbus_queue(u);
|
|
||||||
+ if (changed)
|
|
||||||
+ unit_add_to_dbus_queue(u);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From 3a144cfb90e6c0c6586a976138fc8e472b90bbaf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Wed, 26 Feb 2014 04:28:37 +0100
|
|
||||||
Subject: [PATCH] mount: don't fire PropertiesChanged signals for mounts that
|
|
||||||
are stopped
|
|
||||||
|
|
||||||
(cherry picked from commit aef831369cd2a7a1bd4a58dd96ff8628ed6a85f9)
|
|
||||||
---
|
|
||||||
src/core/mount.c | 9 ++++++---
|
|
||||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
||||||
index 75b133b..68b2e83 100644
|
|
||||||
--- a/src/core/mount.c
|
|
||||||
+++ b/src/core/mount.c
|
|
||||||
@@ -1676,20 +1676,20 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
|
|
||||||
Mount *mount = MOUNT(u);
|
|
||||||
|
|
||||||
if (!mount->is_mounted) {
|
|
||||||
- /* This has just been unmounted. */
|
|
||||||
|
|
||||||
mount->from_proc_self_mountinfo = false;
|
|
||||||
|
|
||||||
switch (mount->state) {
|
|
||||||
|
|
||||||
case MOUNT_MOUNTED:
|
|
||||||
+ /* This has just been unmounted by
|
|
||||||
+ * somebody else, follow the state
|
|
||||||
+ * change. */
|
|
||||||
mount_enter_dead(mount, MOUNT_SUCCESS);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
- mount_set_state(mount, mount->state);
|
|
||||||
break;
|
|
||||||
-
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (mount->just_mounted || mount->just_changed) {
|
|
||||||
@@ -1700,6 +1700,9 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
|
|
||||||
|
|
||||||
case MOUNT_DEAD:
|
|
||||||
case MOUNT_FAILED:
|
|
||||||
+ /* This has just been mounted by
|
|
||||||
+ * somebody else, follow the state
|
|
||||||
+ * change. */
|
|
||||||
mount_enter_mounted(mount, MOUNT_SUCCESS);
|
|
||||||
break;
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
From 494bf9d6d22406676c63822cbf941214fed3111c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Uoti Urpala <uoti.urpala@pp1.inet.fi>
|
|
||||||
Date: Thu, 20 Feb 2014 03:00:09 +0200
|
|
||||||
Subject: [PATCH] logs-show: fix corrupt output with empty messages
|
|
||||||
|
|
||||||
If a message had zero length, journalctl would print no newline, and
|
|
||||||
two output lines would be concatenated. Fix. The problem was
|
|
||||||
introduced in commit 31f7bf199452 ("logs-show: print multiline
|
|
||||||
messages"). Affected short and verbose output modes.
|
|
||||||
|
|
||||||
Before fix:
|
|
||||||
|
|
||||||
Feb 09 21:16:17 glyph dhclient[1323]: Feb 09 21:16:17 glyph NetworkManager[788]: <info> (enp4s2): DHCPv4 state changed nbi -> preinit
|
|
||||||
|
|
||||||
after:
|
|
||||||
|
|
||||||
Feb 09 21:16:17 glyph dhclient[1323]:
|
|
||||||
Feb 09 21:16:17 glyph NetworkManager[788]: <info> (enp4s2): DHCPv4 state changed nbi -> preinit
|
|
||||||
|
|
||||||
(cherry picked from commit 47d80904a1f72d559962cc5ad32fffd46672a34a)
|
|
||||||
---
|
|
||||||
src/shared/logs-show.c | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
|
|
||||||
index 61c3652..12d4a1c 100644
|
|
||||||
--- a/src/shared/logs-show.c
|
|
||||||
+++ b/src/shared/logs-show.c
|
|
||||||
@@ -124,6 +124,11 @@ static bool print_multiline(FILE *f, unsigned prefix, unsigned n_columns, Output
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* A special case: make sure that we print a newline when
|
|
||||||
+ the message is empty. */
|
|
||||||
+ if (message_len == 0)
|
|
||||||
+ fputs("\n", f);
|
|
||||||
+
|
|
||||||
for (pos = message;
|
|
||||||
pos < message + message_len;
|
|
||||||
pos = end + 1, line++) {
|
|
@ -1,29 +0,0 @@
|
|||||||
From 0c4b94ed59075c38da2aa30d162fc9f963d419aa Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Wed, 26 Feb 2014 23:01:43 -0500
|
|
||||||
Subject: [PATCH] journalctl: refuse extra arguments with --verify and similar
|
|
||||||
|
|
||||||
Positional arguments only make sense with the default action.
|
|
||||||
For other actions, complain instead of ignoring them silently.
|
|
||||||
|
|
||||||
(cherry picked from commit 0b6b7c2004317da48e5bbd3078c5662d8f0061b6)
|
|
||||||
---
|
|
||||||
src/journal/journalctl.c | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
|
|
||||||
index a328ba1..0619b25 100644
|
|
||||||
--- a/src/journal/journalctl.c
|
|
||||||
+++ b/src/journal/journalctl.c
|
|
||||||
@@ -658,6 +658,11 @@ static int parse_argv(int argc, char *argv[]) {
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (arg_action != ACTION_SHOW && optind < argc) {
|
|
||||||
+ log_error("Extraneous arguments starting with '%s'", argv[optind]);
|
|
||||||
+ return -EINVAL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
|||||||
From 2388edd10d9aab9c0f3817e73addd3dc0bc870bf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Thu, 27 Feb 2014 11:06:37 +0100
|
|
||||||
Subject: [PATCH] cdrom_id: use the old MMC fallback
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1038015
|
|
||||||
The problem seems to be that the your virtual DVD is emulating a really
|
|
||||||
old DVD device, and doing it kind of strangely.
|
|
||||||
|
|
||||||
> dracut:# /lib/udev/cdrom_id --debug /dev/sr0
|
|
||||||
> probing: '/dev/sr0'
|
|
||||||
> INQUIRY: [IMM ][Virtual CD/DVD ][0316]
|
|
||||||
> GET CONFIGURATION failed with SK=5h/ASC=24h/ACQ=00h
|
|
||||||
|
|
||||||
So your virtual drive rejects the GET CONFIGURATION command as illegal.
|
|
||||||
|
|
||||||
Other pre-MMC2 drives that don't accept this command usually return the
|
|
||||||
error
|
|
||||||
SK=5h,ASC=20h (invalid/unsupported command code), in which case cdrom_id
|
|
||||||
tries an older method, and then ID_CDROM_MEDIA_TRACK_COUNT_DATA gets set
|
|
||||||
and all the /dev/disk/by-label (etc) links get set up.
|
|
||||||
|
|
||||||
The virtual drive returns the error SK=5h,ASC=24h (invalid field in
|
|
||||||
Command Descriptor Block), which cdrom_id doesn't handle, so it gives up
|
|
||||||
and the links never get made.
|
|
||||||
|
|
||||||
The ideal solution would be to make the IMM to emulate a device that's
|
|
||||||
less than 15 years old, but I'm not going to hold my breath waiting for
|
|
||||||
that.
|
|
||||||
|
|
||||||
So probably cdrom_id should also use the old MMC fallback when the error
|
|
||||||
is SK=5h,ASC=24h, and then all of this would work as expected.
|
|
||||||
|
|
||||||
Suggested-by:Luca Miccini <lmiccini@redhat.com>
|
|
||||||
(cherry picked from commit a14f14976094650e17d39f3a7d15a1c68c93c333)
|
|
||||||
---
|
|
||||||
src/udev/cdrom_id/cdrom_id.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
|
|
||||||
index 93467c2..33b2bc3 100644
|
|
||||||
--- a/src/udev/cdrom_id/cdrom_id.c
|
|
||||||
+++ b/src/udev/cdrom_id/cdrom_id.c
|
|
||||||
@@ -556,7 +556,7 @@ static int cd_profiles(struct udev *udev, int fd)
|
|
||||||
if ((err != 0)) {
|
|
||||||
info_scsi_cmd_err(udev, "GET CONFIGURATION", err);
|
|
||||||
/* handle pre-MMC2 drives which do not support GET CONFIGURATION */
|
|
||||||
- if (SK(err) == 0x5 && ASC(err) == 0x20) {
|
|
||||||
+ if (SK(err) == 0x5 && (ASC(err) == 0x20 || ASC(err) == 0x24)) {
|
|
||||||
log_debug("drive is pre-MMC2 and does not support 46h get configuration command");
|
|
||||||
log_debug("trying to work around the problem");
|
|
||||||
ret = cd_profiles_old_mmc(udev, fd);
|
|
@ -1,25 +0,0 @@
|
|||||||
From 107e2ed29711c813a34a07e4ce626f98c3607534 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Thu, 27 Feb 2014 11:19:09 +0100
|
|
||||||
Subject: [PATCH] udev/rules: setup tty permissions and group for sclp_line,
|
|
||||||
ttysclp and 3270/tty
|
|
||||||
|
|
||||||
(cherry picked from commit c594cccee264cfd98f183ae6ec289b11e70f2d6c)
|
|
||||||
---
|
|
||||||
rules/50-udev-default.rules | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules
|
|
||||||
index 679dfdf..0bccf67 100644
|
|
||||||
--- a/rules/50-udev-default.rules
|
|
||||||
+++ b/rules/50-udev-default.rules
|
|
||||||
@@ -15,6 +15,9 @@ ACTION!="add", GOTO="default_permissions_end"
|
|
||||||
SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666"
|
|
||||||
SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666"
|
|
||||||
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"
|
|
||||||
+SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620"
|
|
||||||
+SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620"
|
|
||||||
+SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620"
|
|
||||||
SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
|
|
||||||
KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
From ff02c36bfc811fc7ecbcaebdbc3bc4bebb5f19ab Mon Sep 17 00:00:00 2001
|
|
||||||
From: Henrik Grindal Bakken <hgb@ifi.uio.no>
|
|
||||||
Date: Thu, 27 Feb 2014 21:19:13 +0100
|
|
||||||
Subject: [PATCH] architecture: Add tilegx
|
|
||||||
|
|
||||||
Add Tilera's TILE-GX processor family support.
|
|
||||||
|
|
||||||
(cherry picked from commit 46eea341c36f0caf0bdd5b2274a1ef7cb4e83e97)
|
|
||||||
---
|
|
||||||
src/shared/architecture.c | 3 +++
|
|
||||||
src/shared/architecture.h | 3 +++
|
|
||||||
2 files changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/shared/architecture.c b/src/shared/architecture.c
|
|
||||||
index ceba492..fcdb3d5 100644
|
|
||||||
--- a/src/shared/architecture.c
|
|
||||||
+++ b/src/shared/architecture.c
|
|
||||||
@@ -112,6 +112,8 @@ Architecture uname_architecture(void) {
|
|
||||||
{ "sh", ARCHITECTURE_SH },
|
|
||||||
#elif defined(__m68k__)
|
|
||||||
{ "m68k", ARCHITECTURE_M68K },
|
|
||||||
+#elif defined(__tilegx__)
|
|
||||||
+ { "tilegx", ARCHITECTURE_TILEGX },
|
|
||||||
#else
|
|
||||||
#error "Please register your architecture here!"
|
|
||||||
#endif
|
|
||||||
@@ -158,6 +160,7 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
|
|
||||||
[ARCHITECTURE_SH] = "sh",
|
|
||||||
[ARCHITECTURE_SH64] = "sh64",
|
|
||||||
[ARCHITECTURE_M68K] = "m68k",
|
|
||||||
+ [ARCHITECTURE_TILEGX] = "tilegx",
|
|
||||||
};
|
|
||||||
|
|
||||||
DEFINE_STRING_TABLE_LOOKUP(architecture, Architecture);
|
|
||||||
diff --git a/src/shared/architecture.h b/src/shared/architecture.h
|
|
||||||
index 3183645..e589a91 100644
|
|
||||||
--- a/src/shared/architecture.h
|
|
||||||
+++ b/src/shared/architecture.h
|
|
||||||
@@ -47,6 +47,7 @@ typedef enum Architecture {
|
|
||||||
ARCHITECTURE_SH,
|
|
||||||
ARCHITECTURE_SH64,
|
|
||||||
ARCHITECTURE_M68K,
|
|
||||||
+ ARCHITECTURE_TILEGX,
|
|
||||||
_ARCHITECTURE_MAX,
|
|
||||||
_ARCHITECTURE_INVALID = -1
|
|
||||||
} Architecture;
|
|
||||||
@@ -107,6 +108,8 @@ Architecture uname_architecture(void);
|
|
||||||
# define native_architecture() ARCHITECTURE_SH
|
|
||||||
#elif defined(__m68k__)
|
|
||||||
# define native_architecture() ARCHITECTURE_M68K
|
|
||||||
+#elif defined(__tilegx__)
|
|
||||||
+# define native_architecture() ARCHITECTURE_TILEGX
|
|
||||||
#else
|
|
||||||
#error "Please register your architecture here!"
|
|
||||||
#endif
|
|
@ -1,30 +0,0 @@
|
|||||||
From 0b37b2b7a3fe8e8f96f368848ff46db325a59e70 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tero Roponen <tero.roponen@gmail.com>
|
|
||||||
Date: Tue, 25 Feb 2014 17:19:35 +0200
|
|
||||||
Subject: [PATCH] nspawn: fix detection of missing /proc/self/loginuid
|
|
||||||
|
|
||||||
Running 'systemd-nspawn -D /srv/Fedora/' gave me this error:
|
|
||||||
Failed to read /proc/self/loginuid: No such file or directory
|
|
||||||
|
|
||||||
Container Fedora failed with error code 1.
|
|
||||||
|
|
||||||
This patch fixes the problem.
|
|
||||||
|
|
||||||
(cherry picked from commit 13e8ceb84e56907d73b6b07418deb37faaf0e66d)
|
|
||||||
---
|
|
||||||
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 de74a43..84b7276 100644
|
|
||||||
--- a/src/nspawn/nspawn.c
|
|
||||||
+++ b/src/nspawn/nspawn.c
|
|
||||||
@@ -1341,7 +1341,7 @@ static int reset_audit_loginuid(void) {
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
r = read_one_line_file("/proc/self/loginuid", &p);
|
|
||||||
- if (r == -EEXIST)
|
|
||||||
+ if (r == -ENOENT)
|
|
||||||
return 0;
|
|
||||||
if (r < 0) {
|
|
||||||
log_error("Failed to read /proc/self/loginuid: %s", strerror(-r));
|
|
@ -1,142 +0,0 @@
|
|||||||
From 3300150b370b2a58522d55d7ff17632e5dd58af8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Andersen <phomes@localhost.localdomain>
|
|
||||||
Date: Sat, 1 Mar 2014 03:27:49 +0100
|
|
||||||
Subject: [PATCH] bash: add completion for systemd-nspawn
|
|
||||||
|
|
||||||
(cherry picked from commit 0d6883b6a870b66c8c70e43695d22de96aab68e7)
|
|
||||||
---
|
|
||||||
Makefile.am | 1 +
|
|
||||||
shell-completion/bash/systemd-nspawn | 112 +++++++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 113 insertions(+)
|
|
||||||
create mode 100644 shell-completion/bash/systemd-nspawn
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index 529b525..8e6c392 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -353,6 +353,7 @@ dist_bashcompletion_DATA = \
|
|
||||||
shell-completion/bash/systemctl \
|
|
||||||
shell-completion/bash/systemd-analyze \
|
|
||||||
shell-completion/bash/systemd-delta \
|
|
||||||
+ shell-completion/bash/systemd-nspawn \
|
|
||||||
shell-completion/bash/systemd-run \
|
|
||||||
shell-completion/bash/udevadm \
|
|
||||||
shell-completion/bash/kernel-install
|
|
||||||
diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..5b2ac82
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/shell-completion/bash/systemd-nspawn
|
|
||||||
@@ -0,0 +1,112 @@
|
|
||||||
+# systemd-nspawn(1) completion -*- shell-script -*-
|
|
||||||
+#
|
|
||||||
+# This file is part of systemd.
|
|
||||||
+#
|
|
||||||
+# Copyright 2014 Thomas H.P. Andersen
|
|
||||||
+#
|
|
||||||
+# 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
|
|
||||||
+# 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/>.
|
|
||||||
+
|
|
||||||
+__contains_word() {
|
|
||||||
+ local w word=$1; shift
|
|
||||||
+ for w in "$@"; do
|
|
||||||
+ [[ $w = "$word" ]] && return
|
|
||||||
+ done
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+__get_users() {
|
|
||||||
+ local a b
|
|
||||||
+ loginctl list-users --no-legend --no-pager | { while read a b; do echo " $b"; done; };
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+__get_slices() {
|
|
||||||
+ local a b
|
|
||||||
+ systemctl list-units -t slice --no-legend --no-pager | { while read a b; do echo " $a"; done; };
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+_systemd_nspawn() {
|
|
||||||
+ local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
+ local i verb comps
|
|
||||||
+
|
|
||||||
+ local -A OPTS=(
|
|
||||||
+ [STANDALONE]='-h --help --version --private-network -b --boot --read-only -q --quiet --share-system --keep-unit --network-veth -j'
|
|
||||||
+ [ARG]='-D --directory -u --user --uuid --capability --drop-capability --link-journal --bind --bind-ro -M --machine
|
|
||||||
+ -S --slice --setenv -Z --selinux-context -L --selinux-apifs-context --register --network-interface --network-bridge
|
|
||||||
+ --personality'
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ _init_completion || return
|
|
||||||
+
|
|
||||||
+ if __contains_word "$prev" ${OPTS[ARG]}; then
|
|
||||||
+ case $prev in
|
|
||||||
+ --directory|-D)
|
|
||||||
+ comps=$(compgen -A directory -- "$cur" )
|
|
||||||
+ ;;
|
|
||||||
+ --user|-u)
|
|
||||||
+ comps=$( __get_users )
|
|
||||||
+ ;;
|
|
||||||
+ --uuid)
|
|
||||||
+ comps=''
|
|
||||||
+ ;;
|
|
||||||
+ --capability)
|
|
||||||
+ comps='CAP_BLOCK_SUSPEND CAP_IPC_LOCK CAP_MAC_ADMIN CAP_MAC_OVERRIDE CAP_SYS_MODULE CAP_SYS_PACCT CAP_SYS_RAWIO
|
|
||||||
+ CAP_SYS_TIME CAP_SYSLOG CAP_WAKE_ALARM CAP_NET_ADMIN'
|
|
||||||
+ ;;
|
|
||||||
+ --drop-capability)
|
|
||||||
+ comps='CAP_AUDIT_CONTROL CAP_AUDIT_WRITE CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER CAP_FSETID
|
|
||||||
+ CAP_IPC_OWNER CAP_KILL CAP_LEASE CAP_LINUX_IMMUTABLE CAP_MKNOD CAP_NET_ADMIN CAP_NET_BIND_SERVICE
|
|
||||||
+ CAP_NET_BROADCAST CAP_NET_RAW CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID CAP_SYS_ADMIN CAP_SYS_BOOT
|
|
||||||
+ CAP_SYS_CHROOT CAP_SYS_NICE CAP_SYS_PTRACE CAP_SYS_RESOURCE CAP_SYS_TTY_CONFIG'
|
|
||||||
+ ;;
|
|
||||||
+ --link-journal)
|
|
||||||
+ comps='no auto guest host'
|
|
||||||
+ ;;
|
|
||||||
+ --bind|--bind-ro)
|
|
||||||
+ comps=''
|
|
||||||
+ ;;
|
|
||||||
+ --machine|-M)
|
|
||||||
+ comps=''
|
|
||||||
+ ;;
|
|
||||||
+ --slice|-S)
|
|
||||||
+ comps=$( __get_slices )
|
|
||||||
+ ;;
|
|
||||||
+ --setenv)
|
|
||||||
+ comps=''
|
|
||||||
+ ;;
|
|
||||||
+ --selinux-context|-Z)
|
|
||||||
+ comps=''
|
|
||||||
+ ;;
|
|
||||||
+ --selinux-apifs-context|-L)
|
|
||||||
+ comps=''
|
|
||||||
+ ;;
|
|
||||||
+ --register)
|
|
||||||
+ comps='yes no'
|
|
||||||
+ ;;
|
|
||||||
+ --network-interface)
|
|
||||||
+ comps=''
|
|
||||||
+ ;;
|
|
||||||
+ --network-bridge)
|
|
||||||
+ comps=''
|
|
||||||
+ ;;
|
|
||||||
+ --personality)
|
|
||||||
+ comps='x86 x86-64'
|
|
||||||
+ ;;
|
|
||||||
+ esac
|
|
||||||
+ COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
|
||||||
+ return 0
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+complete -F _systemd_nspawn systemd-nspawn
|
|
@ -1,86 +0,0 @@
|
|||||||
From 8523c2a84f3d8a8b163a17aad5c55cb0234ebff2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
||||||
Date: Sat, 1 Mar 2014 23:08:38 +0100
|
|
||||||
Subject: [PATCH] add bash completion for systemd-cgls
|
|
||||||
|
|
||||||
(cherry picked from commit abdab4f602745952030a37b1521cd0374d51d3ea)
|
|
||||||
---
|
|
||||||
Makefile.am | 1 +
|
|
||||||
shell-completion/bash/systemd-cgls | 56 ++++++++++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 57 insertions(+)
|
|
||||||
create mode 100644 shell-completion/bash/systemd-cgls
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index 8e6c392..0b83823 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -352,6 +352,7 @@ dist_bashcompletion_DATA = \
|
|
||||||
shell-completion/bash/journalctl \
|
|
||||||
shell-completion/bash/systemctl \
|
|
||||||
shell-completion/bash/systemd-analyze \
|
|
||||||
+ shell-completion/bash/systemd-cgls \
|
|
||||||
shell-completion/bash/systemd-delta \
|
|
||||||
shell-completion/bash/systemd-nspawn \
|
|
||||||
shell-completion/bash/systemd-run \
|
|
||||||
diff --git a/shell-completion/bash/systemd-cgls b/shell-completion/bash/systemd-cgls
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..0570438
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/shell-completion/bash/systemd-cgls
|
|
||||||
@@ -0,0 +1,56 @@
|
|
||||||
+# systemd-cgls(1) completion -*- shell-script -*-
|
|
||||||
+#
|
|
||||||
+# This file is part of systemd.
|
|
||||||
+#
|
|
||||||
+# Copyright 2014 Thomas H.P. Andersen
|
|
||||||
+#
|
|
||||||
+# 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
|
|
||||||
+# 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/>.
|
|
||||||
+
|
|
||||||
+__contains_word() {
|
|
||||||
+ local w word=$1; shift
|
|
||||||
+ for w in "$@"; do
|
|
||||||
+ [[ $w = "$word" ]] && return
|
|
||||||
+ done
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+__get_machines() {
|
|
||||||
+ local a b
|
|
||||||
+ machinectl list --no-legend --no-pager | { while read a b; do echo " $a"; done; };
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+_systemd_cgls() {
|
|
||||||
+ local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
+ local i verb comps
|
|
||||||
+
|
|
||||||
+ local -A OPTS=(
|
|
||||||
+ [STANDALONE]='-h --help --version --all -l --full -k --no-pager'
|
|
||||||
+ [ARG]='-M --machine'
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ _init_completion || return
|
|
||||||
+
|
|
||||||
+ if __contains_word "$prev" ${OPTS[ARG]}; then
|
|
||||||
+ case $prev in
|
|
||||||
+ --machine|-M)
|
|
||||||
+ comps=$( __get_machines )
|
|
||||||
+ ;;
|
|
||||||
+ esac
|
|
||||||
+ COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
|
||||||
+ return 0
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+complete -F _systemd_cgls systemd-cgls
|
|
@ -1,27 +0,0 @@
|
|||||||
From a63a8b12c107215fa8b84ca792e84bc2789e6163 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marcel Holtmann <marcel@holtmann.org>
|
|
||||||
Date: Sun, 2 Mar 2014 10:02:10 -0800
|
|
||||||
Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
|
|
||||||
|
|
||||||
(cherry picked from commit e525326bd07ebf3cabcfd730bc479166723f2d44)
|
|
||||||
---
|
|
||||||
hwdb/20-bluetooth-vendor-product.hwdb | 9 +++++++++
|
|
||||||
1 file changed, 9 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
|
|
||||||
index db3bc24..0335a71 100644
|
|
||||||
--- a/hwdb/20-bluetooth-vendor-product.hwdb
|
|
||||||
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
|
|
||||||
@@ -902,3 +902,12 @@ bluetooth:v0129*
|
|
||||||
|
|
||||||
bluetooth:v012A*
|
|
||||||
ID_VENDOR_FROM_DATABASE=Changzhou Yongse Infotech Co., Ltd
|
|
||||||
+
|
|
||||||
+bluetooth:v012B*
|
|
||||||
+ ID_VENDOR_FROM_DATABASE=SportIQ
|
|
||||||
+
|
|
||||||
+bluetooth:v012C*
|
|
||||||
+ ID_VENDOR_FROM_DATABASE=TEMEC Instruments B.V.
|
|
||||||
+
|
|
||||||
+bluetooth:v012D*
|
|
||||||
+ ID_VENDOR_FROM_DATABASE=Sony Corporation
|
|
@ -1,156 +0,0 @@
|
|||||||
From 4cae8946d581a6ecf0b26e154bf9c00e390024b2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Sun, 2 Mar 2014 00:05:16 -0500
|
|
||||||
Subject: [PATCH] Allow fractional parts in disk sizes
|
|
||||||
|
|
||||||
It seems natural to be able to say SystemMaxUsage=1.5G.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1047568
|
|
||||||
(cherry picked from commit 9480794b277b5ce33e467578ed669996df576bb9)
|
|
||||||
---
|
|
||||||
src/shared/util.c | 24 ++++++++++++++++++++++--
|
|
||||||
src/test/test-util.c | 42 +++++++++++++++++++++++++++++++++++++-----
|
|
||||||
2 files changed, 59 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
|
||||||
index 5cb598c..3164515 100644
|
|
||||||
--- a/src/shared/util.c
|
|
||||||
+++ b/src/shared/util.c
|
|
||||||
@@ -2198,6 +2198,8 @@ int parse_size(const char *t, off_t base, off_t *size) {
|
|
||||||
p = t;
|
|
||||||
do {
|
|
||||||
long long l;
|
|
||||||
+ unsigned long long l2;
|
|
||||||
+ double frac = 0;
|
|
||||||
char *e;
|
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
@@ -2213,14 +2215,32 @@ int parse_size(const char *t, off_t base, off_t *size) {
|
|
||||||
if (e == p)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
+ if (*e == '.') {
|
|
||||||
+ e++;
|
|
||||||
+ if (*e >= '0' && *e <= '9') {
|
|
||||||
+ char *e2;
|
|
||||||
+
|
|
||||||
+ /* strotoull itself would accept space/+/- */
|
|
||||||
+ l2 = strtoull(e, &e2, 10);
|
|
||||||
+
|
|
||||||
+ if (errno == ERANGE)
|
|
||||||
+ return -errno;
|
|
||||||
+
|
|
||||||
+ /* Ignore failure. E.g. 10.M is valid */
|
|
||||||
+ frac = l2;
|
|
||||||
+ for (; e < e2; e++)
|
|
||||||
+ frac /= 10;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
e += strspn(e, WHITESPACE);
|
|
||||||
|
|
||||||
for (i = 0; i < n_entries; i++)
|
|
||||||
if (startswith(e, table[i].suffix)) {
|
|
||||||
unsigned long long tmp;
|
|
||||||
- if ((unsigned long long) l > ULLONG_MAX / table[i].factor)
|
|
||||||
+ if ((unsigned long long) l + (frac > 0) > ULLONG_MAX / table[i].factor)
|
|
||||||
return -ERANGE;
|
|
||||||
- tmp = l * table[i].factor;
|
|
||||||
+ tmp = l * table[i].factor + (unsigned long long) (frac * table[i].factor);
|
|
||||||
if (tmp > ULLONG_MAX - r)
|
|
||||||
return -ERANGE;
|
|
||||||
|
|
||||||
diff --git a/src/test/test-util.c b/src/test/test-util.c
|
|
||||||
index b718206..74f83a2 100644
|
|
||||||
--- a/src/test/test-util.c
|
|
||||||
+++ b/src/test/test-util.c
|
|
||||||
@@ -30,6 +30,7 @@
|
|
||||||
#include "strv.h"
|
|
||||||
#include "def.h"
|
|
||||||
#include "fileio.h"
|
|
||||||
+#include "conf-parser.h"
|
|
||||||
|
|
||||||
static void test_streq_ptr(void) {
|
|
||||||
assert_se(streq_ptr(NULL, NULL));
|
|
||||||
@@ -441,17 +442,32 @@ static void test_parse_size(void) {
|
|
||||||
assert_se(parse_size("111", 1024, &bytes) == 0);
|
|
||||||
assert_se(bytes == 111);
|
|
||||||
|
|
||||||
+ assert_se(parse_size("111.4", 1024, &bytes) == 0);
|
|
||||||
+ assert_se(bytes == 111);
|
|
||||||
+
|
|
||||||
assert_se(parse_size(" 112 B", 1024, &bytes) == 0);
|
|
||||||
assert_se(bytes == 112);
|
|
||||||
|
|
||||||
- assert_se(parse_size("3 K", 1024, &bytes) == 0);
|
|
||||||
+ assert_se(parse_size(" 112.6 B", 1024, &bytes) == 0);
|
|
||||||
+ assert_se(bytes == 112);
|
|
||||||
+
|
|
||||||
+ assert_se(parse_size("3.5 K", 1024, &bytes) == 0);
|
|
||||||
+ assert_se(bytes == 3*1024 + 512);
|
|
||||||
+
|
|
||||||
+ assert_se(parse_size("3. K", 1024, &bytes) == 0);
|
|
||||||
+ assert_se(bytes == 3*1024);
|
|
||||||
+
|
|
||||||
+ assert_se(parse_size("3.0 K", 1024, &bytes) == 0);
|
|
||||||
assert_se(bytes == 3*1024);
|
|
||||||
|
|
||||||
- assert_se(parse_size(" 4 M 11K", 1024, &bytes) == 0);
|
|
||||||
- assert_se(bytes == 4*1024*1024 + 11 * 1024);
|
|
||||||
+ assert_se(parse_size("3. 0 K", 1024, &bytes) == 0);
|
|
||||||
+ assert_se(bytes == 3);
|
|
||||||
|
|
||||||
- assert_se(parse_size("3B3G", 1024, &bytes) == 0);
|
|
||||||
- assert_se(bytes == 3ULL*1024*1024*1024 + 3);
|
|
||||||
+ assert_se(parse_size(" 4 M 11.5K", 1024, &bytes) == 0);
|
|
||||||
+ assert_se(bytes == 4*1024*1024 + 11 * 1024 + 512);
|
|
||||||
+
|
|
||||||
+ assert_se(parse_size("3B3.5G", 1024, &bytes) == 0);
|
|
||||||
+ assert_se(bytes == 3ULL*1024*1024*1024 + 512*1024*1024 + 3);
|
|
||||||
|
|
||||||
assert_se(parse_size("3B3G4T", 1024, &bytes) == 0);
|
|
||||||
assert_se(bytes == (4ULL*1024 + 3)*1024*1024*1024 + 3);
|
|
||||||
@@ -464,6 +480,10 @@ static void test_parse_size(void) {
|
|
||||||
|
|
||||||
assert_se(parse_size("12X", 1024, &bytes) == -EINVAL);
|
|
||||||
|
|
||||||
+ assert_se(parse_size("12.5X", 1024, &bytes) == -EINVAL);
|
|
||||||
+
|
|
||||||
+ assert_se(parse_size("12.5e3", 1024, &bytes) == -EINVAL);
|
|
||||||
+
|
|
||||||
assert_se(parse_size("1024E", 1024, &bytes) == -ERANGE);
|
|
||||||
assert_se(parse_size("-1", 1024, &bytes) == -ERANGE);
|
|
||||||
assert_se(parse_size("-1024E", 1024, &bytes) == -ERANGE);
|
|
||||||
@@ -473,6 +493,14 @@ static void test_parse_size(void) {
|
|
||||||
assert_se(parse_size("-10B 20K", 1024, &bytes) == -ERANGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void test_config_parse_iec_off(void) {
|
|
||||||
+ off_t offset = 0;
|
|
||||||
+ assert_se(config_parse_iec_off(NULL, "/this/file", 11, "Section", 22, "Size", 0, "4M", &offset, NULL) == 0);
|
|
||||||
+ assert_se(offset == 4 * 1024 * 1024);
|
|
||||||
+
|
|
||||||
+ assert_se(config_parse_iec_off(NULL, "/this/file", 11, "Section", 22, "Size", 0, "4.5M", &offset, NULL) == 0);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void test_strextend(void) {
|
|
||||||
_cleanup_free_ char *str = strdup("0123");
|
|
||||||
strextend(&str, "456", "78", "9", NULL);
|
|
||||||
@@ -589,6 +617,9 @@ static void test_writing_tmpfile(void) {
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
+ log_parse_environment();
|
|
||||||
+ log_open();
|
|
||||||
+
|
|
||||||
test_streq_ptr();
|
|
||||||
test_first_word();
|
|
||||||
test_close_many();
|
|
||||||
@@ -618,6 +649,7 @@ int main(int argc, char *argv[]) {
|
|
||||||
test_get_process_comm();
|
|
||||||
test_protect_errno();
|
|
||||||
test_parse_size();
|
|
||||||
+ test_config_parse_iec_off();
|
|
||||||
test_strextend();
|
|
||||||
test_strrep();
|
|
||||||
test_split_pair();
|
|
@ -1,70 +0,0 @@
|
|||||||
From 6b4293393eb0a15e4f73ba9f08554178ccc4c222 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
||||||
Date: Sun, 2 Mar 2014 22:58:18 +0100
|
|
||||||
Subject: [PATCH] add bash completion for systemd-cgtop
|
|
||||||
|
|
||||||
(cherry picked from commit d9256bac4da4241cb5d97960c899390839f2c6e5)
|
|
||||||
---
|
|
||||||
Makefile.am | 1 +
|
|
||||||
shell-completion/bash/systemd-cgtop | 40 +++++++++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 41 insertions(+)
|
|
||||||
create mode 100644 shell-completion/bash/systemd-cgtop
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index 0b83823..9cabd1d 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -353,6 +353,7 @@ dist_bashcompletion_DATA = \
|
|
||||||
shell-completion/bash/systemctl \
|
|
||||||
shell-completion/bash/systemd-analyze \
|
|
||||||
shell-completion/bash/systemd-cgls \
|
|
||||||
+ shell-completion/bash/systemd-cgtop \
|
|
||||||
shell-completion/bash/systemd-delta \
|
|
||||||
shell-completion/bash/systemd-nspawn \
|
|
||||||
shell-completion/bash/systemd-run \
|
|
||||||
diff --git a/shell-completion/bash/systemd-cgtop b/shell-completion/bash/systemd-cgtop
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..d7ea42d
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/shell-completion/bash/systemd-cgtop
|
|
||||||
@@ -0,0 +1,40 @@
|
|
||||||
+# systemd-cgtop(1) completion -*- shell-script -*-
|
|
||||||
+#
|
|
||||||
+# This file is part of systemd.
|
|
||||||
+#
|
|
||||||
+# Copyright 2014 Thomas H.P. Andersen
|
|
||||||
+#
|
|
||||||
+# 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
|
|
||||||
+# 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/>.
|
|
||||||
+
|
|
||||||
+__contains_word() {
|
|
||||||
+ local w word=$1; shift
|
|
||||||
+ for w in "$@"; do
|
|
||||||
+ [[ $w = "$word" ]] && return
|
|
||||||
+ done
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+_systemd_cgtop() {
|
|
||||||
+ local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
+ local comps
|
|
||||||
+
|
|
||||||
+ local -A OPTS=(
|
|
||||||
+ [STANDALONE]='-h --help --version -p -t -c -m -i -b --batch -n --iterations -d --delay'
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ _init_completion || return
|
|
||||||
+
|
|
||||||
+ COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+complete -F _systemd_cgtop systemd-cgtop
|
|
@ -1,27 +0,0 @@
|
|||||||
From 877c2fccf76afdd7364040f9b859c8d84226b9cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mike Gilbert <floppym@gentoo.org>
|
|
||||||
Date: Sun, 2 Mar 2014 23:37:39 -0500
|
|
||||||
Subject: [PATCH] Fix systemd-stdio-bridge symlink
|
|
||||||
|
|
||||||
The symlink is created in bindir (/usr/bin), and points to a binary
|
|
||||||
which lives in rootlibexecdir (/lib/systemd or /usr/lib/systemd). A
|
|
||||||
relative symlink does not work here.
|
|
||||||
|
|
||||||
(cherry picked from commit 8100c1a8f58b2fb5d97e156420a7e16562e93bc4)
|
|
||||||
---
|
|
||||||
Makefile.am | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index 9cabd1d..bc5e719 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -1955,7 +1955,7 @@ systemd_bus_proxyd_LDADD = \
|
|
||||||
|
|
||||||
bus-proxyd-install-hook:
|
|
||||||
$(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir)
|
|
||||||
- $(AM_V_LN)$(LN_S) -f ../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
|
|
||||||
+ $(AM_V_LN)$(LN_S) -f $(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge
|
|
||||||
|
|
||||||
bus-proxyd-uninstall-hook:
|
|
||||||
rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge
|
|
@ -1,52 +0,0 @@
|
|||||||
From f0eb7735d8cdf44ebf7064613add363ddda329b0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Mon, 3 Mar 2014 17:11:39 +0100
|
|
||||||
Subject: [PATCH] execute: free directory path if we fail to remove it because
|
|
||||||
we cannot allocate a thread
|
|
||||||
|
|
||||||
(cherry picked from commit 98b47d54ce946ad3524f84eb38d2413498a333dc)
|
|
||||||
---
|
|
||||||
src/core/execute.c | 18 ++++++++++++++++--
|
|
||||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/core/execute.c b/src/core/execute.c
|
|
||||||
index a328fc2..bb06507 100644
|
|
||||||
--- a/src/core/execute.c
|
|
||||||
+++ b/src/core/execute.c
|
|
||||||
@@ -2579,6 +2579,8 @@ static void *remove_tmpdir_thread(void *p) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void exec_runtime_destroy(ExecRuntime *rt) {
|
|
||||||
+ int r;
|
|
||||||
+
|
|
||||||
if (!rt)
|
|
||||||
return;
|
|
||||||
|
|
||||||
@@ -2588,13 +2590,25 @@ void exec_runtime_destroy(ExecRuntime *rt) {
|
|
||||||
|
|
||||||
if (rt->tmp_dir) {
|
|
||||||
log_debug("Spawning thread to nuke %s", rt->tmp_dir);
|
|
||||||
- asynchronous_job(remove_tmpdir_thread, rt->tmp_dir);
|
|
||||||
+
|
|
||||||
+ r = asynchronous_job(remove_tmpdir_thread, rt->tmp_dir);
|
|
||||||
+ if (r < 0) {
|
|
||||||
+ log_warning("Failed to nuke %s: %s", rt->tmp_dir, strerror(-r));
|
|
||||||
+ free(rt->tmp_dir);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
rt->tmp_dir = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rt->var_tmp_dir) {
|
|
||||||
log_debug("Spawning thread to nuke %s", rt->var_tmp_dir);
|
|
||||||
- asynchronous_job(remove_tmpdir_thread, rt->var_tmp_dir);
|
|
||||||
+
|
|
||||||
+ r = asynchronous_job(remove_tmpdir_thread, rt->var_tmp_dir);
|
|
||||||
+ if (r < 0) {
|
|
||||||
+ log_warning("Failed to nuke %s: %s", rt->var_tmp_dir, strerror(-r));
|
|
||||||
+ free(rt->var_tmp_dir);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
rt->var_tmp_dir = NULL;
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
From 1ec5be9a85b46c697fc87405038427eaf9bebe1b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
||||||
Date: Mon, 3 Mar 2014 22:01:42 +0100
|
|
||||||
Subject: [PATCH] update bash completion for systemd-analyze
|
|
||||||
|
|
||||||
(cherry picked from commit 64ae7f1864d54f38d62e258322a7ea9756c7284b)
|
|
||||||
---
|
|
||||||
shell-completion/bash/systemd-analyze | 24 +++++++++++++++++++++++-
|
|
||||||
1 file changed, 23 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze
|
|
||||||
index 6afcd96..5575beb 100644
|
|
||||||
--- a/shell-completion/bash/systemd-analyze
|
|
||||||
+++ b/shell-completion/bash/systemd-analyze
|
|
||||||
@@ -25,10 +25,19 @@ __contains_word () {
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
+__get_machines() {
|
|
||||||
+ local a b
|
|
||||||
+ machinectl list --no-legend --no-pager | { while read a b; do echo " $a"; done; };
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
_systemd_analyze() {
|
|
||||||
local i verb comps
|
|
||||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
- local OPTS='--help --version --system --user --from-pattern --to-pattern --order --require'
|
|
||||||
+
|
|
||||||
+ local -A OPTS=(
|
|
||||||
+ [STANDALONE]='--help --version --system --user --from-pattern --to-pattern --order --require --no-pager'
|
|
||||||
+ [ARG]='-H --host -M --machine'
|
|
||||||
+ )
|
|
||||||
|
|
||||||
local -A VERBS=(
|
|
||||||
[STANDALONE]='time blame plot dump'
|
|
||||||
@@ -47,6 +56,19 @@ _systemd_analyze() {
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
+ if __contains_word "$prev" ${OPTS[ARG]}; then
|
|
||||||
+ case $prev in
|
|
||||||
+ --host|-H)
|
|
||||||
+ comps=$(compgen -A hostname)
|
|
||||||
+ ;;
|
|
||||||
+ --machine|-M)
|
|
||||||
+ comps=$( __get_machines )
|
|
||||||
+ ;;
|
|
||||||
+ esac
|
|
||||||
+ COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
|
||||||
+ return 0
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
if [[ -z $verb && $cur = -* ]]; then
|
|
||||||
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
|
||||||
return 0
|
|
@ -1,70 +0,0 @@
|
|||||||
From 191479e0e4fb43f667ce743e82aac8bcccfbd6e1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
||||||
Date: Mon, 3 Mar 2014 22:16:04 +0100
|
|
||||||
Subject: [PATCH] add bash completion for systemd-detect-virt
|
|
||||||
|
|
||||||
(cherry picked from commit 3bfe58cbd4a9b1d2520f425f95de718f3a583d39)
|
|
||||||
---
|
|
||||||
Makefile.am | 1 +
|
|
||||||
shell-completion/bash/systemd-detect-virt | 40 +++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 41 insertions(+)
|
|
||||||
create mode 100644 shell-completion/bash/systemd-detect-virt
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index bc5e719..834ed6f 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -355,6 +355,7 @@ dist_bashcompletion_DATA = \
|
|
||||||
shell-completion/bash/systemd-cgls \
|
|
||||||
shell-completion/bash/systemd-cgtop \
|
|
||||||
shell-completion/bash/systemd-delta \
|
|
||||||
+ shell-completion/bash/systemd-detect-virt \
|
|
||||||
shell-completion/bash/systemd-nspawn \
|
|
||||||
shell-completion/bash/systemd-run \
|
|
||||||
shell-completion/bash/udevadm \
|
|
||||||
diff --git a/shell-completion/bash/systemd-detect-virt b/shell-completion/bash/systemd-detect-virt
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..df06c29
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/shell-completion/bash/systemd-detect-virt
|
|
||||||
@@ -0,0 +1,40 @@
|
|
||||||
+# systemd-detect-virt(1) completion -*- shell-script -*-
|
|
||||||
+#
|
|
||||||
+# This file is part of systemd.
|
|
||||||
+#
|
|
||||||
+# Copyright 2014 Thomas H.P. Andersen
|
|
||||||
+#
|
|
||||||
+# 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
|
|
||||||
+# 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/>.
|
|
||||||
+
|
|
||||||
+__contains_word() {
|
|
||||||
+ local w word=$1; shift
|
|
||||||
+ for w in "$@"; do
|
|
||||||
+ [[ $w = "$word" ]] && return
|
|
||||||
+ done
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+_systemd_detect_virt() {
|
|
||||||
+ local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
+ local i verb comps
|
|
||||||
+
|
|
||||||
+ local -A OPTS=(
|
|
||||||
+ [STANDALONE]='-h --help --version -c --container -v --vm -q --quiet'
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ _init_completion || return
|
|
||||||
+
|
|
||||||
+ COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+complete -F _systemd_detect_virt systemd-detect-virt
|
|
@ -1,123 +0,0 @@
|
|||||||
From 799f37dd06946958dfed2aec54788c5e81bf340a Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Tue, 4 Mar 2014 09:50:26 -0500
|
|
||||||
Subject: [PATCH] Do not print invalid UTF-8 in error messages
|
|
||||||
|
|
||||||
Inexplicably, 550a40ec ('core: do not print invalid utf-8 in error
|
|
||||||
messages') only fixed two paths. Convert all of them now.
|
|
||||||
|
|
||||||
(cherry picked from commit b5d742138f71e87312541a89aac5657015f50f48)
|
|
||||||
|
|
||||||
Conflicts:
|
|
||||||
src/core/load-fragment.c
|
|
||||||
src/shared/conf-parser.c
|
|
||||||
---
|
|
||||||
src/core/load-fragment.c | 11 +++--------
|
|
||||||
src/shared/conf-parser.c | 6 ++----
|
|
||||||
src/shared/conf-parser.h | 6 ++++++
|
|
||||||
src/shared/fileio.c | 9 ++++++---
|
|
||||||
4 files changed, 17 insertions(+), 15 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
|
|
||||||
index 82aed1e..027ec5f 100644
|
|
||||||
--- a/src/core/load-fragment.c
|
|
||||||
+++ b/src/core/load-fragment.c
|
|
||||||
@@ -535,9 +535,7 @@ int config_parse_exec(const char *unit,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!utf8_is_valid(path)) {
|
|
||||||
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
|
||||||
- "Path is not UTF-8 clean, ignoring assignment: %s",
|
|
||||||
- rvalue);
|
|
||||||
+ log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
|
|
||||||
r = 0;
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
@@ -552,9 +550,7 @@ int config_parse_exec(const char *unit,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!utf8_is_valid(c)) {
|
|
||||||
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
|
||||||
- "Path is not UTF-8 clean, ignoring assignment: %s",
|
|
||||||
- rvalue);
|
|
||||||
+ log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
|
|
||||||
r = 0;
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
@@ -1959,8 +1955,7 @@ int config_parse_unit_requires_mounts_for(
|
|
||||||
return log_oom();
|
|
||||||
|
|
||||||
if (!utf8_is_valid(n)) {
|
|
||||||
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
|
||||||
- "Path is not UTF-8 clean, ignoring assignment: %s", rvalue);
|
|
||||||
+ log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
|
|
||||||
index cfa669b..b6aa856 100644
|
|
||||||
--- a/src/shared/conf-parser.c
|
|
||||||
+++ b/src/shared/conf-parser.c
|
|
||||||
@@ -656,8 +656,7 @@ int config_parse_path(const char *unit,
|
|
||||||
assert(data);
|
|
||||||
|
|
||||||
if (!utf8_is_valid(rvalue)) {
|
|
||||||
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
|
||||||
- "Path is not UTF-8 clean, ignoring assignment: %s", rvalue);
|
|
||||||
+ log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -725,8 +724,7 @@ int config_parse_strv(const char *unit,
|
|
||||||
return log_oom();
|
|
||||||
|
|
||||||
if (!utf8_is_valid(n)) {
|
|
||||||
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
|
||||||
- "String is not UTF-8 clean, ignoring: %s", rvalue);
|
|
||||||
+ log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
|
|
||||||
index 4ccdadd..7e1c493 100644
|
|
||||||
--- a/src/shared/conf-parser.h
|
|
||||||
+++ b/src/shared/conf-parser.h
|
|
||||||
@@ -124,6 +124,12 @@ int log_syntax_internal(const char *unit, int level,
|
|
||||||
config_file, config_line, \
|
|
||||||
error, __VA_ARGS__)
|
|
||||||
|
|
||||||
+#define log_invalid_utf8(unit, level, config_file, config_line, error, rvalue) { \
|
|
||||||
+ _cleanup_free_ char *__p = utf8_escape_invalid(rvalue); \
|
|
||||||
+ log_syntax(unit, level, config_file, config_line, error, \
|
|
||||||
+ "String is not UTF-8 clean, ignoring assignment: %s", __p); \
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
#define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg) \
|
|
||||||
int function(const char *unit, \
|
|
||||||
const char *filename, \
|
|
||||||
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
|
|
||||||
index 0d3f2e9..fcd1b8a 100644
|
|
||||||
--- a/src/shared/fileio.c
|
|
||||||
+++ b/src/shared/fileio.c
|
|
||||||
@@ -598,15 +598,18 @@ static int load_env_file_push(const char *filename, unsigned line,
|
|
||||||
int r;
|
|
||||||
|
|
||||||
if (!utf8_is_valid(key)) {
|
|
||||||
+ _cleanup_free_ char *t = utf8_escape_invalid(key);
|
|
||||||
+
|
|
||||||
log_error("%s:%u: invalid UTF-8 for key '%s', ignoring.",
|
|
||||||
- filename, line, key);
|
|
||||||
+ filename, line, t);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value && !utf8_is_valid(value)) {
|
|
||||||
- /* FIXME: filter UTF-8 */
|
|
||||||
+ _cleanup_free_ char *t = utf8_escape_invalid(value);
|
|
||||||
+
|
|
||||||
log_error("%s:%u: invalid UTF-8 value for key %s: '%s', ignoring.",
|
|
||||||
- filename, line, key, value);
|
|
||||||
+ filename, line, key, t);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
From b4fb5c323dc77954867e0d896dce03edd094617a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Umut Tezduyar Lindskog <umut.tezduyar@axis.com>
|
|
||||||
Date: Tue, 4 Mar 2014 13:58:35 +0100
|
|
||||||
Subject: [PATCH] architecture: Add cris
|
|
||||||
|
|
||||||
(cherry picked from commit 86bafac9540ba9e111ccba2fdf4161fe3a67cd3b)
|
|
||||||
---
|
|
||||||
src/shared/architecture.c | 3 +++
|
|
||||||
src/shared/architecture.h | 3 +++
|
|
||||||
2 files changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/shared/architecture.c b/src/shared/architecture.c
|
|
||||||
index fcdb3d5..9e0c3ef 100644
|
|
||||||
--- a/src/shared/architecture.c
|
|
||||||
+++ b/src/shared/architecture.c
|
|
||||||
@@ -114,6 +114,8 @@ Architecture uname_architecture(void) {
|
|
||||||
{ "m68k", ARCHITECTURE_M68K },
|
|
||||||
#elif defined(__tilegx__)
|
|
||||||
{ "tilegx", ARCHITECTURE_TILEGX },
|
|
||||||
+#elif defined(__cris__)
|
|
||||||
+ { "cris", ARCHITECTURE_CRIS },
|
|
||||||
#else
|
|
||||||
#error "Please register your architecture here!"
|
|
||||||
#endif
|
|
||||||
@@ -161,6 +163,7 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
|
|
||||||
[ARCHITECTURE_SH64] = "sh64",
|
|
||||||
[ARCHITECTURE_M68K] = "m68k",
|
|
||||||
[ARCHITECTURE_TILEGX] = "tilegx",
|
|
||||||
+ [ARCHITECTURE_CRIS] = "cris",
|
|
||||||
};
|
|
||||||
|
|
||||||
DEFINE_STRING_TABLE_LOOKUP(architecture, Architecture);
|
|
||||||
diff --git a/src/shared/architecture.h b/src/shared/architecture.h
|
|
||||||
index e589a91..20e848b 100644
|
|
||||||
--- a/src/shared/architecture.h
|
|
||||||
+++ b/src/shared/architecture.h
|
|
||||||
@@ -48,6 +48,7 @@ typedef enum Architecture {
|
|
||||||
ARCHITECTURE_SH64,
|
|
||||||
ARCHITECTURE_M68K,
|
|
||||||
ARCHITECTURE_TILEGX,
|
|
||||||
+ ARCHITECTURE_CRIS,
|
|
||||||
_ARCHITECTURE_MAX,
|
|
||||||
_ARCHITECTURE_INVALID = -1
|
|
||||||
} Architecture;
|
|
||||||
@@ -110,6 +111,8 @@ Architecture uname_architecture(void);
|
|
||||||
# define native_architecture() ARCHITECTURE_M68K
|
|
||||||
#elif defined(__tilegx__)
|
|
||||||
# define native_architecture() ARCHITECTURE_TILEGX
|
|
||||||
+#elif defined(__cris__)
|
|
||||||
+# define native_architecture() ARCHITECTURE_CRIS
|
|
||||||
#else
|
|
||||||
#error "Please register your architecture here!"
|
|
||||||
#endif
|
|
@ -1,87 +0,0 @@
|
|||||||
From 7f197e46c944bdb43fa1cedbd97708ac2ea72558 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
||||||
Date: Tue, 4 Mar 2014 23:16:30 +0100
|
|
||||||
Subject: [PATCH] add bash completion for systemd-cat
|
|
||||||
|
|
||||||
(cherry picked from commit 207017017db91232189226bfcf29e61926310a9b)
|
|
||||||
---
|
|
||||||
Makefile.am | 1 +
|
|
||||||
shell-completion/bash/systemd-cat | 57 +++++++++++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 58 insertions(+)
|
|
||||||
create mode 100644 shell-completion/bash/systemd-cat
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index 834ed6f..7187b8d 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -352,6 +352,7 @@ dist_bashcompletion_DATA = \
|
|
||||||
shell-completion/bash/journalctl \
|
|
||||||
shell-completion/bash/systemctl \
|
|
||||||
shell-completion/bash/systemd-analyze \
|
|
||||||
+ shell-completion/bash/systemd-cat \
|
|
||||||
shell-completion/bash/systemd-cgls \
|
|
||||||
shell-completion/bash/systemd-cgtop \
|
|
||||||
shell-completion/bash/systemd-delta \
|
|
||||||
diff --git a/shell-completion/bash/systemd-cat b/shell-completion/bash/systemd-cat
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..8d84042
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/shell-completion/bash/systemd-cat
|
|
||||||
@@ -0,0 +1,57 @@
|
|
||||||
+# systemd-cat(1) completion -*- shell-script -*-
|
|
||||||
+#
|
|
||||||
+# This file is part of systemd.
|
|
||||||
+#
|
|
||||||
+# Copyright 2014 Thomas H.P. Andersen
|
|
||||||
+#
|
|
||||||
+# 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
|
|
||||||
+# 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/>.
|
|
||||||
+
|
|
||||||
+__contains_word() {
|
|
||||||
+ local w word=$1; shift
|
|
||||||
+ for w in "$@"; do
|
|
||||||
+ [[ $w = "$word" ]] && return
|
|
||||||
+ done
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+_systemd_cat() {
|
|
||||||
+ local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
+ local i verb comps
|
|
||||||
+
|
|
||||||
+ local -A OPTS=(
|
|
||||||
+ [STANDALONE]='-h --help --version'
|
|
||||||
+ [ARG]='-t --identifier -p --priority --level-prefix'
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ _init_completion || return
|
|
||||||
+
|
|
||||||
+ if __contains_word "$prev" ${OPTS[ARG]}; then
|
|
||||||
+ case $prev in
|
|
||||||
+ --identifier|-t)
|
|
||||||
+ comps=''
|
|
||||||
+ ;;
|
|
||||||
+ --priority|-p)
|
|
||||||
+ comps='emerg alert crit err warning notice info debug'
|
|
||||||
+ ;;
|
|
||||||
+ --level-prefix)
|
|
||||||
+ comps='yes no'
|
|
||||||
+ ;;
|
|
||||||
+ esac
|
|
||||||
+ COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
|
||||||
+ return 0
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+complete -F _systemd_cat systemd-cat
|
|
@ -1,111 +0,0 @@
|
|||||||
From 4c626a758f12c2e5862b185de8ae954e0bd795d7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Wed, 5 Mar 2014 03:37:48 +0100
|
|
||||||
Subject: [PATCH] man: document missing options of systemd-run
|
|
||||||
|
|
||||||
(cherry picked from commit 981ee551945f4e00de52fcbb7780fd7476bcd47e)
|
|
||||||
---
|
|
||||||
man/systemd-run.xml | 71 ++++++++++++++++++++++++++++++++++++++++++++---------
|
|
||||||
1 file changed, 60 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/man/systemd-run.xml b/man/systemd-run.xml
|
|
||||||
index 064195a..dc44186 100644
|
|
||||||
--- a/man/systemd-run.xml
|
|
||||||
+++ b/man/systemd-run.xml
|
|
||||||
@@ -109,9 +109,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>--description=</option></term>
|
|
||||||
|
|
||||||
- <listitem><para>Provide description for the unit. If not
|
|
||||||
- specified, the command itself will be used as a description.
|
|
||||||
- See <varname>Description=</varname> in
|
|
||||||
+ <listitem><para>Provide description for the service or scope
|
|
||||||
+ unit. If not specified, the command itself will be used as a
|
|
||||||
+ description. See <varname>Description=</varname> in
|
|
||||||
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
@@ -128,10 +128,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>--remain-after-exit</option></term>
|
|
||||||
|
|
||||||
- <listitem><para>After the service's process has terminated, keep
|
|
||||||
- the service around until it is explicitly stopped. This is
|
|
||||||
- useful to collect runtime information about the service after
|
|
||||||
- it finished running. Also see
|
|
||||||
+ <listitem><para>After the service or scope process has
|
|
||||||
+ terminated, keep the service around until it is explicitly
|
|
||||||
+ stopped. This is useful to collect runtime information about
|
|
||||||
+ the service after it finished running. Also see
|
|
||||||
<varname>RemainAfterExit=</varname> in
|
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
|
||||||
</para>
|
|
||||||
@@ -141,15 +141,64 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>--send-sighup</option></term>
|
|
||||||
|
|
||||||
- <listitem><para>When terminating the scope unit, send a SIGHUP
|
|
||||||
- immediately after SIGTERM. This is useful to indicate to
|
|
||||||
- shells and shell-like processes that the connection has been
|
|
||||||
- severed. Also see <varname>SendSIGHUP=</varname> in
|
|
||||||
+ <listitem><para>When terminating the scope or service unit,
|
|
||||||
+ send a SIGHUP immediately after SIGTERM. This is useful to
|
|
||||||
+ indicate to shells and shell-like processes that the
|
|
||||||
+ connection has been severed. Also see
|
|
||||||
+ <varname>SendSIGHUP=</varname> in
|
|
||||||
<citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
+ <varlistentry>
|
|
||||||
+ <term><option>--service-type=</option></term>
|
|
||||||
+
|
|
||||||
+ <listitem><para>Sets the service type. Also see
|
|
||||||
+ <varname>Type=</varname> in
|
|
||||||
+ <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
|
|
||||||
+ option has no effect in conjunction with
|
|
||||||
+ <option>--scope</option>. Defaults to
|
|
||||||
+ <constant>simple</constant>.</para>
|
|
||||||
+ </listitem>
|
|
||||||
+ </varlistentry>
|
|
||||||
+
|
|
||||||
+ <varlistentry>
|
|
||||||
+ <term><option>--uid=</option></term>
|
|
||||||
+ <term><option>--gid=</option></term>
|
|
||||||
+
|
|
||||||
+ <listitem><para>Runs the service process under the UNIX user
|
|
||||||
+ and group. Also see <varname>User=</varname> and
|
|
||||||
+ <varname>Group=</varname> in
|
|
||||||
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
|
|
||||||
+ option has no effect in conjunction with
|
|
||||||
+ <option>--scope</option>.</para>
|
|
||||||
+ </listitem>
|
|
||||||
+ </varlistentry>
|
|
||||||
+
|
|
||||||
+ <varlistentry>
|
|
||||||
+ <term><option>--nice=</option></term>
|
|
||||||
+
|
|
||||||
+ <listitem><para>Runs the service process with the specified
|
|
||||||
+ nice level. Also see <varname>Nice=</varname> in
|
|
||||||
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
|
|
||||||
+ option has no effect in conjunction with
|
|
||||||
+ <option>--scope</option>.</para>
|
|
||||||
+ </listitem>
|
|
||||||
+ </varlistentry>
|
|
||||||
+
|
|
||||||
+ <varlistentry>
|
|
||||||
+ <term><option>--setenv=</option></term>
|
|
||||||
+
|
|
||||||
+ <listitem><para>Runs the service process with the specified
|
|
||||||
+ environment variables set. Also see
|
|
||||||
+ <varname>Environment=</varname> in
|
|
||||||
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
|
|
||||||
+ option has no effect in conjunction with
|
|
||||||
+ <option>--scope</option>.</para>
|
|
||||||
+ </listitem>
|
|
||||||
+ </varlistentry>
|
|
||||||
+
|
|
||||||
<xi:include href="user-system-options.xml" xpointer="user" />
|
|
||||||
<xi:include href="user-system-options.xml" xpointer="system" />
|
|
||||||
<xi:include href="user-system-options.xml" xpointer="host" />
|
|
@ -1,32 +0,0 @@
|
|||||||
From 37c3628037acb728660222ad836047c8bb81363f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Wed, 5 Mar 2014 03:38:36 +0100
|
|
||||||
Subject: [PATCH] systemd-run: add some extra safety checks
|
|
||||||
|
|
||||||
(cherry picked from commit 1ac67edb7c4d31a287fa98c0b554ae98bd34e71b)
|
|
||||||
---
|
|
||||||
src/run/run.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/run/run.c b/src/run/run.c
|
|
||||||
index 885d881..7f08c41 100644
|
|
||||||
--- a/src/run/run.c
|
|
||||||
+++ b/src/run/run.c
|
|
||||||
@@ -37,7 +37,7 @@ static const char *arg_description = NULL;
|
|
||||||
static const char *arg_slice = NULL;
|
|
||||||
static bool arg_send_sighup = false;
|
|
||||||
static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;
|
|
||||||
-static char *arg_host = NULL;
|
|
||||||
+static const char *arg_host = NULL;
|
|
||||||
static bool arg_user = false;
|
|
||||||
static const char *arg_service_type = NULL;
|
|
||||||
static const char *arg_exec_user = NULL;
|
|
||||||
@@ -183,7 +183,7 @@ static int parse_argv(int argc, char *argv[]) {
|
|
||||||
|
|
||||||
case ARG_NICE:
|
|
||||||
r = safe_atoi(optarg, &arg_nice);
|
|
||||||
- if (r < 0) {
|
|
||||||
+ if (r < 0 || arg_nice < PRIO_MIN || arg_nice >= PRIO_MAX) {
|
|
||||||
log_error("Failed to parse nice value");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
@ -1,68 +0,0 @@
|
|||||||
From c77f203a510d27ab08729454bc865547c6111d02 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Thu, 27 Feb 2014 00:07:29 -0500
|
|
||||||
Subject: [PATCH] journal: assume that next entry is after previous entry
|
|
||||||
|
|
||||||
With a corrupted file, we can get in a situation where two entries
|
|
||||||
in the entry array point to the same object. Then journal_file_next_entry
|
|
||||||
will find the first one using generic_arrray_bisect, and try to move to
|
|
||||||
the second one, but since the address is the same, generic_array_get will
|
|
||||||
return the first one. journal_file_next_entry ends up in an infinite loop.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1047039
|
|
||||||
(cherry picked from commit fb099c8d2af6620db2709e826a258089d10cdfe8)
|
|
||||||
---
|
|
||||||
src/journal/journal-file.c | 26 ++++++++++++++++++++------
|
|
||||||
1 file changed, 20 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
|
|
||||||
index 23c4d28..c27289c 100644
|
|
||||||
--- a/src/journal/journal-file.c
|
|
||||||
+++ b/src/journal/journal-file.c
|
|
||||||
@@ -1359,7 +1359,7 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct ChainCacheItem {
|
|
||||||
- uint64_t first; /* the array at the begin of the chain */
|
|
||||||
+ uint64_t first; /* the array at the beginning of the chain */
|
|
||||||
uint64_t array; /* the cached array */
|
|
||||||
uint64_t begin; /* the first item in the cached array */
|
|
||||||
uint64_t total; /* the total number of items in all arrays before this one in the chain */
|
|
||||||
@@ -1945,7 +1945,7 @@ int journal_file_next_entry(
|
|
||||||
direction_t direction,
|
|
||||||
Object **ret, uint64_t *offset) {
|
|
||||||
|
|
||||||
- uint64_t i, n;
|
|
||||||
+ uint64_t i, n, ofs;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
assert(f);
|
|
||||||
@@ -1986,10 +1986,24 @@ int journal_file_next_entry(
|
|
||||||
}
|
|
||||||
|
|
||||||
/* And jump to it */
|
|
||||||
- return generic_array_get(f,
|
|
||||||
- le64toh(f->header->entry_array_offset),
|
|
||||||
- i,
|
|
||||||
- ret, offset);
|
|
||||||
+ r = generic_array_get(f,
|
|
||||||
+ le64toh(f->header->entry_array_offset),
|
|
||||||
+ i,
|
|
||||||
+ ret, &ofs);
|
|
||||||
+ if (r <= 0)
|
|
||||||
+ return r;
|
|
||||||
+
|
|
||||||
+ if (p > 0 &&
|
|
||||||
+ (direction == DIRECTION_DOWN ? ofs <= p : ofs >= p)) {
|
|
||||||
+ log_debug("%s: entry array corrupted at entry %"PRIu64,
|
|
||||||
+ f->path, i);
|
|
||||||
+ return -EBADMSG;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (offset)
|
|
||||||
+ *offset = ofs;
|
|
||||||
+
|
|
||||||
+ return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int journal_file_skip_entry(
|
|
@ -1,73 +0,0 @@
|
|||||||
From c360d2f3141cdc8ec67cddef3df99e4045b6c6d8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Thu, 27 Feb 2014 00:11:54 -0500
|
|
||||||
Subject: [PATCH] journal: forget file after encountering an error
|
|
||||||
|
|
||||||
If we encounter an inconsistency in a file, let's just
|
|
||||||
ignore it. Otherwise, after previous patch, we would try,
|
|
||||||
and fail, to use this file in every invocation of sd_journal_next
|
|
||||||
or sd_journal_previous that happens afterwards.
|
|
||||||
|
|
||||||
(cherry picked from commit a9a245c128af6c0418085062c60251bc51fa4a94)
|
|
||||||
---
|
|
||||||
src/journal/sd-journal.c | 16 ++++++++++++----
|
|
||||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
|
|
||||||
index 3740a9a..2dbfda0 100644
|
|
||||||
--- a/src/journal/sd-journal.c
|
|
||||||
+++ b/src/journal/sd-journal.c
|
|
||||||
@@ -51,6 +51,8 @@
|
|
||||||
|
|
||||||
#define DEFAULT_DATA_THRESHOLD (64*1024)
|
|
||||||
|
|
||||||
+static void remove_file_real(sd_journal *j, JournalFile *f);
|
|
||||||
+
|
|
||||||
static bool journal_pid_changed(sd_journal *j) {
|
|
||||||
assert(j);
|
|
||||||
|
|
||||||
@@ -885,6 +887,7 @@ static int real_journal_next(sd_journal *j, direction_t direction) {
|
|
||||||
r = next_beyond_location(j, f, direction, &o, &p);
|
|
||||||
if (r < 0) {
|
|
||||||
log_debug("Can't iterate through %s, ignoring: %s", f->path, strerror(-r));
|
|
||||||
+ remove_file_real(j, f);
|
|
||||||
continue;
|
|
||||||
} else if (r == 0)
|
|
||||||
continue;
|
|
||||||
@@ -1339,7 +1342,7 @@ static int add_file(sd_journal *j, const char *prefix, const char *filename) {
|
|
||||||
}
|
|
||||||
|
|
||||||
static int remove_file(sd_journal *j, const char *prefix, const char *filename) {
|
|
||||||
- char *path;
|
|
||||||
+ _cleanup_free_ char *path;
|
|
||||||
JournalFile *f;
|
|
||||||
|
|
||||||
assert(j);
|
|
||||||
@@ -1351,10 +1354,17 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
f = hashmap_get(j->files, path);
|
|
||||||
- free(path);
|
|
||||||
if (!f)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
+ remove_file_real(j, f);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void remove_file_real(sd_journal *j, JournalFile *f) {
|
|
||||||
+ assert(j);
|
|
||||||
+ assert(f);
|
|
||||||
+
|
|
||||||
hashmap_remove(j->files, f->path);
|
|
||||||
|
|
||||||
log_debug("File %s removed.", f->path);
|
|
||||||
@@ -1372,8 +1382,6 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename)
|
|
||||||
journal_file_close(f);
|
|
||||||
|
|
||||||
j->current_invalidate_counter ++;
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int add_directory(sd_journal *j, const char *prefix, const char *dirname) {
|
|
@ -1,100 +0,0 @@
|
|||||||
From dd935122a989eeb31a0ab4d42ad5381f1f48446e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Thu, 6 Mar 2014 02:19:42 +0100
|
|
||||||
Subject: [PATCH] core: correctly unregister PIDs from PID hashtables
|
|
||||||
|
|
||||||
(cherry picked from commit bd44e61b0480712ec5585ff7b0295362a5f9dd36)
|
|
||||||
---
|
|
||||||
src/core/unit.c | 42 ++++++++++++++++++------------------------
|
|
||||||
1 file changed, 18 insertions(+), 24 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/core/unit.c b/src/core/unit.c
|
|
||||||
index 1bbcb39..5a5592c 100644
|
|
||||||
--- a/src/core/unit.c
|
|
||||||
+++ b/src/core/unit.c
|
|
||||||
@@ -1703,11 +1703,11 @@ int unit_watch_pid(Unit *u, pid_t pid) {
|
|
||||||
/* Watch a specific PID. We only support one or two units
|
|
||||||
* watching each PID for now, not more. */
|
|
||||||
|
|
||||||
- r = hashmap_ensure_allocated(&u->manager->watch_pids1, trivial_hash_func, trivial_compare_func);
|
|
||||||
+ r = set_ensure_allocated(&u->pids, trivial_hash_func, trivial_compare_func);
|
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
- r = set_ensure_allocated(&u->pids, trivial_hash_func, trivial_compare_func);
|
|
||||||
+ r = hashmap_ensure_allocated(&u->manager->watch_pids1, trivial_hash_func, trivial_compare_func);
|
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
@@ -1736,7 +1736,17 @@ void unit_unwatch_pid(Unit *u, pid_t pid) {
|
|
||||||
set_remove(u->pids, LONG_TO_PTR(pid));
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int watch_pids_in_path(Unit *u, const char *path) {
|
|
||||||
+void unit_unwatch_all_pids(Unit *u) {
|
|
||||||
+ assert(u);
|
|
||||||
+
|
|
||||||
+ while (!set_isempty(u->pids))
|
|
||||||
+ unit_unwatch_pid(u, PTR_TO_LONG(set_first(u->pids)));
|
|
||||||
+
|
|
||||||
+ set_free(u->pids);
|
|
||||||
+ u->pids = NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int unit_watch_pids_in_path(Unit *u, const char *path) {
|
|
||||||
_cleanup_closedir_ DIR *d = NULL;
|
|
||||||
_cleanup_fclose_ FILE *f = NULL;
|
|
||||||
int ret = 0, r;
|
|
||||||
@@ -1774,7 +1784,7 @@ static int watch_pids_in_path(Unit *u, const char *path) {
|
|
||||||
if (!p)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
- r = watch_pids_in_path(u, p);
|
|
||||||
+ r = unit_watch_pids_in_path(u, p);
|
|
||||||
if (r < 0 && ret >= 0)
|
|
||||||
ret = r;
|
|
||||||
}
|
|
||||||
@@ -1787,31 +1797,15 @@ static int watch_pids_in_path(Unit *u, const char *path) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
-
|
|
||||||
int unit_watch_all_pids(Unit *u) {
|
|
||||||
assert(u);
|
|
||||||
|
|
||||||
- if (!u->cgroup_path)
|
|
||||||
- return -ENOENT;
|
|
||||||
-
|
|
||||||
/* Adds all PIDs from our cgroup to the set of PIDs we watch */
|
|
||||||
|
|
||||||
- return watch_pids_in_path(u, u->cgroup_path);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-void unit_unwatch_all_pids(Unit *u) {
|
|
||||||
- Iterator i;
|
|
||||||
- void *e;
|
|
||||||
-
|
|
||||||
- assert(u);
|
|
||||||
-
|
|
||||||
- SET_FOREACH(e, u->pids, i) {
|
|
||||||
- hashmap_remove_value(u->manager->watch_pids1, e, u);
|
|
||||||
- hashmap_remove_value(u->manager->watch_pids2, e, u);
|
|
||||||
- }
|
|
||||||
+ if (!u->cgroup_path)
|
|
||||||
+ return -ENOENT;
|
|
||||||
|
|
||||||
- set_free(u->pids);
|
|
||||||
- u->pids = NULL;
|
|
||||||
+ return unit_watch_pids_in_path(u, u->cgroup_path);
|
|
||||||
}
|
|
||||||
|
|
||||||
void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2) {
|
|
||||||
@@ -1829,7 +1823,7 @@ void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2) {
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!pid_is_unwaited(pid))
|
|
||||||
- set_remove(u->pids, e);
|
|
||||||
+ unit_unwatch_pid(u, pid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
From b7bc83734b75499d3bf9d5446adcb43818796da5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Thu, 6 Mar 2014 04:52:31 +0100
|
|
||||||
Subject: [PATCH] logind: fix reference to systemd-user-sessions.service
|
|
||||||
|
|
||||||
(cherry picked from commit 646e392e10924454576f10b072f78d7676422816)
|
|
||||||
---
|
|
||||||
src/login/logind-session.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
|
|
||||||
index 548f049..3700522 100644
|
|
||||||
--- a/src/login/logind-session.c
|
|
||||||
+++ b/src/login/logind-session.c
|
|
||||||
@@ -490,7 +490,7 @@ static int session_start_scope(Session *s) {
|
|
||||||
if (!scope)
|
|
||||||
return log_oom();
|
|
||||||
|
|
||||||
- r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-session.service", &error, &job);
|
|
||||||
+ r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-sessions.service", &error, &job);
|
|
||||||
if (r < 0) {
|
|
||||||
log_error("Failed to start session scope %s: %s %s",
|
|
||||||
scope, bus_error_message(&error, r), error.name);
|
|
@ -1,33 +0,0 @@
|
|||||||
From bc447bbd474ed77da1a9cce0dcf85fb4f0e7cb35 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Thu, 6 Mar 2014 08:10:19 -0500
|
|
||||||
Subject: [PATCH] man: update link to LSB
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1073402
|
|
||||||
(cherry picked from commit 27d14fb331ba8144f99f4da2d13f15cf5c8b8a9f)
|
|
||||||
---
|
|
||||||
man/daemon.xml | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/man/daemon.xml b/man/daemon.xml
|
|
||||||
index fd29ba7..ab58d08 100644
|
|
||||||
--- a/man/daemon.xml
|
|
||||||
+++ b/man/daemon.xml
|
|
||||||
@@ -252,7 +252,7 @@
|
|
||||||
detect service errors and problems. It
|
|
||||||
is recommended to follow the exit code
|
|
||||||
scheme as defined in the <ulink
|
|
||||||
- url="http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html">LSB
|
|
||||||
+ url="http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html">LSB
|
|
||||||
recommendations for SysV init
|
|
||||||
scripts</ulink>.</para></listitem>
|
|
||||||
|
|
||||||
@@ -395,7 +395,7 @@
|
|
||||||
exclusively on boot (and manually by the
|
|
||||||
administrator) via SysV init scripts, as
|
|
||||||
detailed in the <ulink
|
|
||||||
- url="http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html">LSB
|
|
||||||
+ url="http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html">LSB
|
|
||||||
Linux Standard Base Core
|
|
||||||
Specification</ulink>. This method of
|
|
||||||
activation is supported ubiquitously on Linux
|
|
@ -1,27 +0,0 @@
|
|||||||
From 7117b40be2484d2f318c14d42b8c1f47d44a4465 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Zachary Cook <zachcook1991@gmail.com>
|
|
||||||
Date: Thu, 6 Mar 2014 03:49:49 -0500
|
|
||||||
Subject: [PATCH] man: systemd-bootchart - fix spacing in command
|
|
||||||
|
|
||||||
Use the same formatting as the systemd-analyze man page, so that man shows a space.
|
|
||||||
|
|
||||||
(cherry picked from commit 82ed60080d327d7301fcd55f5a1f8511f894b9d5)
|
|
||||||
---
|
|
||||||
man/systemd-bootchart.xml | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
|
|
||||||
index d0adaad..1715d5d 100644
|
|
||||||
--- a/man/systemd-bootchart.xml
|
|
||||||
+++ b/man/systemd-bootchart.xml
|
|
||||||
@@ -78,8 +78,8 @@
|
|
||||||
in which order, and where possible problems
|
|
||||||
exist in the startup sequence of the system.
|
|
||||||
It is essentially a more detailed version of
|
|
||||||
- the <command>systemd-analyze</command>
|
|
||||||
- <command>plot</command> function.
|
|
||||||
+ the <command>systemd-analyze plot</command>
|
|
||||||
+ function.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Of course, bootchart can also be used at any
|
|
@ -1,25 +0,0 @@
|
|||||||
From a478182ddc3abcacd006ecef8de8829c3ec51b13 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
||||||
Date: Thu, 6 Mar 2014 23:54:13 -0500
|
|
||||||
Subject: [PATCH] man: add missing comma
|
|
||||||
|
|
||||||
marcosf0> missing comma in udevadm "see also" section
|
|
||||||
|
|
||||||
(cherry picked from commit 7d06ef0a5cd2f0a4e021d3d12f3841cce529e0f2)
|
|
||||||
---
|
|
||||||
man/udevadm.xml | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/man/udevadm.xml b/man/udevadm.xml
|
|
||||||
index a3f8d54..21d1443 100644
|
|
||||||
--- a/man/udevadm.xml
|
|
||||||
+++ b/man/udevadm.xml
|
|
||||||
@@ -594,7 +594,7 @@
|
|
||||||
<title>See Also</title>
|
|
||||||
<para><citerefentry>
|
|
||||||
<refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
|
|
||||||
- </citerefentry>
|
|
||||||
+ </citerefentry>,
|
|
||||||
<citerefentry>
|
|
||||||
<refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum>
|
|
||||||
</citerefentry></para>
|
|
@ -1,38 +0,0 @@
|
|||||||
From 66f231f4c71dfb11dc4552cb337571d3e3019c81 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Armin K <krejzi@email.com>
|
|
||||||
Date: Tue, 4 Mar 2014 16:23:41 +0100
|
|
||||||
Subject: [PATCH] build-sys: Don't distribute generated udev rule
|
|
||||||
|
|
||||||
It contains hardcoded path to systemd-sysctl executable which
|
|
||||||
is /usr/lib/systemd/systemd-sysctl on latest stable release and
|
|
||||||
as such it will complain at runtime if rootprefix != prefix
|
|
||||||
|
|
||||||
[zj: readd the file to nodist_udevrules_DATA]
|
|
||||||
|
|
||||||
(cherry picked from commit e2eb18d56b14eeb405706970f0460d8539cdcf23)
|
|
||||||
---
|
|
||||||
Makefile.am | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index 7187b8d..8093526 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -2518,7 +2518,6 @@ dist_network_DATA = \
|
|
||||||
network/80-container-host0.network
|
|
||||||
|
|
||||||
dist_udevrules_DATA += \
|
|
||||||
- rules/99-systemd.rules \
|
|
||||||
rules/42-usb-hid-pm.rules \
|
|
||||||
rules/50-udev-default.rules \
|
|
||||||
rules/60-drm.rules \
|
|
||||||
@@ -2535,6 +2534,9 @@ dist_udevrules_DATA += \
|
|
||||||
rules/80-net-setup-link.rules \
|
|
||||||
rules/95-udev-late.rules
|
|
||||||
|
|
||||||
+nodist_udevrules_DATA += \
|
|
||||||
+ rules/99-systemd.rules
|
|
||||||
+
|
|
||||||
dist_udevhwdb_DATA = \
|
|
||||||
hwdb/20-pci-vendor-model.hwdb \
|
|
||||||
hwdb/20-pci-classes.hwdb \
|
|
@ -1,37 +0,0 @@
|
|||||||
From 50ab7a793277bd976ea68c1d74b999ce483af50b Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
|
|
||||||
Date: Fri, 7 Mar 2014 01:50:34 +0100
|
|
||||||
Subject: [PATCH] units: Do not unescape instance name in
|
|
||||||
systemd-backlight@.service
|
|
||||||
|
|
||||||
The instance name is never escaped in the udev rule, but unescaped in the unit.
|
|
||||||
This results in the following error message on Asus boards:
|
|
||||||
|
|
||||||
Failed to get backlight or LED device 'backlight:eeepc/wmi': No such file or directory
|
|
||||||
|
|
||||||
(cherry picked from commit 6c49212741253dae05b89d22374186f092ef1e5a)
|
|
||||||
---
|
|
||||||
units/systemd-backlight@.service.in | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/units/systemd-backlight@.service.in b/units/systemd-backlight@.service.in
|
|
||||||
index 5caa5d5..e945d87 100644
|
|
||||||
--- a/units/systemd-backlight@.service.in
|
|
||||||
+++ b/units/systemd-backlight@.service.in
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
-Description=Load/Save Screen Backlight Brightness of %I
|
|
||||||
+Description=Load/Save Screen Backlight Brightness of %i
|
|
||||||
Documentation=man:systemd-backlight@.service(8)
|
|
||||||
DefaultDependencies=no
|
|
||||||
RequiresMountsFor=/var/lib/systemd/backlight
|
|
||||||
@@ -17,5 +17,5 @@ Before=sysinit.target shutdown.target
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
RemainAfterExit=yes
|
|
||||||
-ExecStart=@rootlibexecdir@/systemd-backlight load %I
|
|
||||||
-ExecStop=@rootlibexecdir@/systemd-backlight save %I
|
|
||||||
+ExecStart=@rootlibexecdir@/systemd-backlight load %i
|
|
||||||
+ExecStop=@rootlibexecdir@/systemd-backlight save %i
|
|
51
20-grubby.install
Executable file
51
20-grubby.install
Executable file
@ -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
|
42
20-yama-ptrace.conf
Normal file
42
20-yama-ptrace.conf
Normal file
@ -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,114 +0,0 @@
|
|||||||
# Also see:
|
|
||||||
# https://fedoraproject.org/wiki/Starting_services_by_default
|
|
||||||
|
|
||||||
# systemd
|
|
||||||
enable remote-fs.target
|
|
||||||
enable getty@tty1.service
|
|
||||||
enable systemd-readahead-replay.service
|
|
||||||
enable systemd-readahead-collect.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
|
|
||||||
|
|
||||||
# Hardware
|
|
||||||
enable gpm.*
|
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1066421
|
|
||||||
enable gpsd.socket
|
|
||||||
|
|
||||||
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 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
|
|
||||||
enable PackageKit.service
|
|
@ -1 +0,0 @@
|
|||||||
disable *
|
|
129
f58b96d3e8d1cb0dd3666bc74fa673918b586612.patch
Normal file
129
f58b96d3e8d1cb0dd3666bc74fa673918b586612.patch
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
16
inittab
Normal file
16
inittab
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# inittab is no longer used.
|
||||||
|
#
|
||||||
|
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
|
||||||
|
#
|
||||||
|
# Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
|
||||||
|
#
|
||||||
|
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
|
||||||
|
#
|
||||||
|
# multi-user.target: analogous to runlevel 3
|
||||||
|
# graphical.target: analogous to runlevel 5
|
||||||
|
#
|
||||||
|
# To view current default target, run:
|
||||||
|
# systemctl get-default
|
||||||
|
#
|
||||||
|
# To set a default target, run:
|
||||||
|
# systemctl set-default TARGET.target
|
@ -1,42 +0,0 @@
|
|||||||
From 0fe97bc02e3108efdb844feb1b367a89ba995d83 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 | 21 +++++++++++++++++++++
|
|
||||||
1 file changed, 21 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
|
|
||||||
index 3ae1d77..3a2ac56 100644
|
|
||||||
--- a/src/kernel-install/kernel-install
|
|
||||||
+++ b/src/kernel-install/kernel-install
|
|
||||||
@@ -19,6 +19,27 @@
|
|
||||||
# You should have received a copy of the GNU Lesser General Public License
|
|
||||||
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
+if [[ -x /sbin/new-kernel-pkg ]]; then
|
|
||||||
+ [[ "$2" == *\+* ]] && flavor=-"${2##*+}"
|
|
||||||
+ case "$1" in
|
|
||||||
+ add)
|
|
||||||
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$2" || exit $?
|
|
||||||
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$2" || exit $?
|
|
||||||
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$2" || exit $?
|
|
||||||
+ ;;
|
|
||||||
+ remove)
|
|
||||||
+ /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$2" || 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
|
|
||||||
+
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
echo "Usage:"
|
|
3
libsystemd-shared.abignore
Normal file
3
libsystemd-shared.abignore
Normal file
@ -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
|
|
@ -1 +0,0 @@
|
|||||||
%_unitdir /usr/lib/systemd/system
|
|
10
macros.sysusers
Normal file
10
macros.sysusers
Normal file
@ -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"
|
|
101
purge-nobody-user
Executable file
101
purge-nobody-user
Executable file
@ -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 @@
|
|||||||
03efddf8c9eca36d4d590f9967e7e818 systemd-210.tar.xz
|
SHA512 (systemd-247.1.tar.gz) = 2a737afcee4409c2be073d8cb650c3465a25c101b3c3072ea6e6a0614d06e3ed7ae55c84f9ae60555915ad1480b3a13aa72fef4b9210139afe6b0d7a7629385a
|
||||||
|
143
split-files.py
Normal file
143
split-files.py
Normal file
@ -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)
|
10
sysctl.conf.README
Normal file
10
sysctl.conf.README
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# sysctl settings are defined through files in
|
||||||
|
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
|
||||||
|
#
|
||||||
|
# Vendors settings live in /usr/lib/sysctl.d/.
|
||||||
|
# To override a whole file, create a new file with the same in
|
||||||
|
# /etc/sysctl.d/ and put new settings there. To override
|
||||||
|
# only specific settings, add a file with a lexically later
|
||||||
|
# name in /etc/sysctl.d/ and put new settings there.
|
||||||
|
#
|
||||||
|
# For more information, see sysctl.conf(5) and sysctl.d(5).
|
6
systemd-journal-gatewayd.xml
Normal file
6
systemd-journal-gatewayd.xml
Normal file
@ -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>
|
6
systemd-journal-remote.xml
Normal file
6
systemd-journal-remote.xml
Normal file
@ -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>
|
3
systemd-udev-trigger-no-reload.conf
Normal file
3
systemd-udev-trigger-no-reload.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[Unit]
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1378974#c17
|
||||||
|
RefuseManualStop=true
|
10
systemd-user
Normal file
10
systemd-user
Normal file
@ -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
|
50
systemd.rpmlintrc
Normal file
50
systemd.rpmlintrc
Normal file
@ -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')
|
2520
systemd.spec
2520
systemd.spec
File diff suppressed because it is too large
Load Diff
2
sysusers.attr
Normal file
2
sysusers.attr
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
%__sysusers_provides %{_rpmconfigdir}/sysusers.prov
|
||||||
|
%__sysusers_path ^%{_sysusersdir}/.*\\.conf$
|
79
sysusers.generate-pre.sh
Executable file
79
sysusers.generate-pre.sh
Executable file
@ -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
|
28
sysusers.prov
Executable file
28
sysusers.prov
Executable file
@ -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
|
50
tests/tests-reboot.yml
Normal file
50
tests/tests-reboot.yml
Normal file
@ -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
|
111
triggers.systemd
Normal file
111
triggers.systemd
Normal file
@ -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
|
40
use-bfq-scheduler.patch
Normal file
40
use-bfq-scheduler.patch
Normal file
@ -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
|
||||||
|
systemd-udev
|
||||||
|
Loading…
Reference in New Issue
Block a user