diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
commit | 2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch) | |
tree | c8af0fd04194aed03cf067d44e53c7edd3e9ab84 /sys-apps/systemd | |
parent | e9d044d4b9b71200a96adfa280848858c0f468c9 (diff) |
gentoo resync : 05.12.2021
Diffstat (limited to 'sys-apps/systemd')
-rw-r--r-- | sys-apps/systemd/Manifest | 11 | ||||
-rw-r--r-- | sys-apps/systemd/files/249.5-coredumpctl.patch | 31 | ||||
-rw-r--r-- | sys-apps/systemd/files/249.5-revert-unit-start-rate-limiting.patch | 483 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-249.4-r4.ebuild | 8 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-249.6-r1.ebuild | 505 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-249.6.ebuild (renamed from sys-apps/systemd/systemd-249.5-r1.ebuild) | 19 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-9999.ebuild | 31 |
7 files changed, 536 insertions, 552 deletions
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest index 12d61efe1f3e..6950461c43b3 100644 --- a/sys-apps/systemd/Manifest +++ b/sys-apps/systemd/Manifest @@ -3,8 +3,6 @@ AUX 249-fido2.patch 2323 BLAKE2B 5977ec0bed24f25ef3c152aab8e8b40cc91c115256cad91 AUX 249-home-secret-assert.patch 5057 BLAKE2B 59fada3228e726110ed865e80f85c62d2faca852b3c3fdc47135123da622697e448a8c2d8826c140240210513b7474d27e71383f6d41b561790135d67d9324c1 SHA512 2ad4e15a900a27c55ca32b065ff91ea51344eeb0b5508ab6310efe2537a66e5eaa80c4acd287fb57b2d531c79528577c6fd0599e29e862c05cf81dc439a6a7f6 AUX 249-libudev-static.patch 1454 BLAKE2B 420f9452066ccf951033c1ae1e215284fa9d11f24777c68ecd0178db5c7571ee881451300d409468c1ba3f3b2ad4b35adca5b2761309c84b315bbabd45f6b97f SHA512 4d616b4b02981c4622951a46f23519e03c2d1228453837d31fe060db70afa24722883ca57c08c55cd9fd35c720a5ef2ecb11ab3313867e1b3cfc3682e45e3f45 AUX 249-network-renaming.patch 1801 BLAKE2B e87caaee0a304589633683a0bc4ba302b0deb4f1a04b7a7c2cc5d791638a4a8134f655b11e8b6bbabf5dbbc853b4d3e2bb78b82555e66081026a19da17aa4793 SHA512 eb03b8ac0cb0793d04d77a47d108621313ac4504f75c2a3811ed8399e391a716036a248efa817ef996238eb28ef7bff9fea4ced10a801c9a3c8bf98a608d466d -AUX 249.5-coredumpctl.patch 1218 BLAKE2B 29ba11b0a98f6ef725acd99d4238e4fbefeda75eaa72d428488c0815e7c71c836ef8739a9c8c46393afe80e721df8ccc61d1127a16584cc9c21dc6aa1b8f90aa SHA512 f9adce83bfc4b1dbf3de70f7ecd913309c087c99c964dad57028917ec3cf651726ac83d02400796d680d744dee1a2627ebe64a4e15b3fbfa31dd5c11f8669f3b -AUX 249.5-revert-unit-start-rate-limiting.patch 15810 BLAKE2B b82d8f8fda19c576575cf08b6b9187c03076f4198ebd4a309d9bab6f909a82c6b9caf3c0a63db42d0455b7e9bd4f6392cfa187f4d50bcd4ae0af23bee504f31a SHA512 3d92129f03e2a647609bec88c6f755ee38d8cd5344dabff9523e03a33e38d45e5defdbaa9a3a1a84d6e59ab3916939bfc7625296c25305525595f482a4525f1f AUX gentoo-generator-path-r2.patch 994 BLAKE2B 2bfb42623221291030fa9f7310e9bf747351a26f6ffd842628298787b74d4ec562bacaa9fc5365f7e854f695dab5f74bc06883fefc1f210dce4fd415926817ac SHA512 98054222ea232e120625573b6a532c312eccc02fe657152610b7d056b964bb2165fffae9d17fd986cf547af885d44c26b117fe68df5b24e2607d37f3729d0ada AUX gentoo-journald-audit.patch 1485 BLAKE2B 9cba28ce907330bbc1eafcf04a837987ed68272fcfa9cc34a309ff5d4cc2230f71a6f7fed42c79afb1c96605df141e8e40b2d8290d12ad3c18038269814f2df8 SHA512 d77d4dae9f8a7819c6d4855476f3163ee19f52b20f66a93e25818f0747404462c47e3cafbd82ba85ce1b3d2fdbabdd96a0398b71149b318c540d82403f8ad0ad AUX gentoo-systemctl-disable-sysv-sync-r1.patch 821 BLAKE2B f5ef796725e023bb1ed83b34a3e4d45bb008de9a134892a5321b37b56809c7a44530d18e33c7877177e8b64b2d89dfc2de844bed433db6d5e57831d20fbfb456 SHA512 8d697dbd305f6b95a4ddc47cf9d99a0e954f54e161bd59164917b62a78ff5c23fa2d5be2614569c0a2297595dae59e1ee71bb04da72cbe0c0807e1abd7da974d @@ -12,8 +10,9 @@ AUX nsswitch.conf 734 BLAKE2B 5f5a7821a84f6c8aa31fe9a68c29a1a0f24be578d427a623f1 AUX org.freedesktop.hostname1_no_polkit.conf 471 BLAKE2B 50d9f86b2c4813a90eac8a31f0f762eb1b9e0272024419bfffd1d8c4dbe9955541df5c1e5a14e1663db3c0194e95a8984e5ec0c8a65eb74d279f021c3ef3d348 SHA512 af38bfed2230a75e03de6831a5202e21af6c01e13670df1a5b1b454203bd9db47428a61aa9cf0a21841a11e7caa889e3f6147342ba5411649e00f334a8e03639 AUX systemd-user.pam 122 BLAKE2B cccc07cab47dfc0481438e503c34fa1a0b2c6b1f8ab282197719a523421d2a526f19230bb459e0347cbeb2046e35a407c78178a3fb5b79619e987cbc4ac7d5e4 SHA512 c5437677ff00fbb45798fe594e8d61b1c2bfc2d103105d7bd82e476240452477ac263700800f5d0ba91ddc895eb85f4517d5cb15c80611ec1680a686d47cd781 DIST systemd-stable-249.4.tar.gz 10593723 BLAKE2B 466b3cb27c4bc6c85c9ba50f6614175b2c31a4c177d452542faa1395e99511440029b1a093dc80a5a1a0135eed09d8b1849572f36dba4e18a1396230bfc31adb SHA512 5b9ec28102538bc3dcb632ee16389ff20dccf4b723186f6ae2da119a1809d84db0d8bcecf9b75c5e2da8427f5543e1da281bbed1a154e529d8a82ea5128c465c -DIST systemd-stable-249.5.tar.gz 10597897 BLAKE2B 5c573322ef9bcd9d019776d6e2d8625a741c1535c0d06661b5666c2438a70cfc4dc182919bb419829de27a4d93c16717ce24e668faf9bd6b09e57f8bd88be725 SHA512 d6f1a5a6f03f0ed05b111aee75da509c5868c523af6209f33e630724dd0c7e0d0abf16920795d587e6c31a5915d247ebc613cf26d4aecf39f82ebb0690fab75f -EBUILD systemd-249.4-r4.ebuild 15099 BLAKE2B 7076124a49b1beeb8153cbca7868a1e828cb0ae9b2c0e5e3fa60db5473f2f1d3870a7010d5b9dda71acb81d98cff970758595d32b2944761c4f59dcd7f65463f SHA512 e4be3bdf1c30aa36b02ffcda10502371543bc616988ad8cd558651f01efc55a813532af9ad42590e13831be8025f674af273e0001fe670929b9442319c812bf2 -EBUILD systemd-249.5-r1.ebuild 15086 BLAKE2B dad65d652cbf7723121b07b2a623dbaae414d97179341fd2b78c86aa0b64c12086dd128fbbdb616e22201ac95932e96d29272a93c3bf14d52a4c1b253ebac7fa SHA512 a1cf432f246af2bddf5d90fce671cde62b227d2401b48f142480a71dbbda984ba57c7bf6fab23a20a0d86ea70bc116d4f3fc149d231d06bf72d12b8bf28393ba -EBUILD systemd-9999.ebuild 15447 BLAKE2B 57772e77237210d88b764e48a3117a9eca0c55621b9d5c1e4d032c7ce2048833949cfd86dbab0e5f7ba7b54e91e82435c9c4d03cdba386045b460e194f6c1df8 SHA512 edc4591b9762d207bcbdceb1c7a99489fbaecd24f6729330e9d8d95d89ad5850527ffa4039ed0944d2901346445aa5f96ef40e1c793256b8ef755740d3cc908b +DIST systemd-stable-249.6.tar.gz 10599611 BLAKE2B 9c0cbaa4319f2ce9a78dbe820d1b6df5191e6c632e2eac9f71f9ff9817564d9b3fc177d2aec0c0daea8ac33bbdc2066ad68a8967cf8857f4af3668b9a3e7d3bf SHA512 7a7791dfe4923c00987b924adcb1cd08c4d17af2b17b4c6c6c701856c6810cfda61f06821c39787339fc05293853c0ea61b9973fcf4495c7bf4f8054ecfae66f +EBUILD systemd-249.4-r4.ebuild 15205 BLAKE2B 680eebb0d80ac2632a0544cb853fe368da8b25f1272dc0e6f79a53176874c0e07f623bff51e83fede85b5c5587183257ffaf1b1f174bac451a692d7b549f4cb4 SHA512 94042f7c52369dc4bff28e7edc739461845068448551f4983ed160ddd5678cfdd2d3a0053af15f13ab01ff6d118602cf41de22762e77f613255695b617f4ac5a +EBUILD systemd-249.6-r1.ebuild 14737 BLAKE2B 50016925e397ab5fc909dad7e27ea890fbf8208513bfa57c66f51e9ddf763567e13145cefeaffe4ee989209aa21ba8f837d086ddfa082ae723fdb2893253d88d SHA512 0f7a9424d254bd2fc9c686cf2543fdf23a29a04e872505a24ed4d38c7efb4e7edc807fed02b4e1762be5673943bec3c0ebeaf990540a2ac7d6b6dd810b5fe37a +EBUILD systemd-249.6.ebuild 14916 BLAKE2B e6c09e9542b550a4800b46d5907356c67cf9ac8e37bd1014553be57d264285a27f12a3dce34e6ccae2b3d56bc7da95248345473e6eec7b536fd9347f51a7aebc SHA512 9d24b376257a7f8f47ade1fb0eae68c951edc8c95f297fe115b74b3f75cf97349222716dcd6522e556ec99396fc242afa28c197bafaf179fdeb6097d5fb0814d +EBUILD systemd-9999.ebuild 15239 BLAKE2B c3afd49031d4614ccfc93a7382a9a3f3356ec7f31070ed2bc8b2ce45b60fa558285b1c6560c67c2be3fd0c88b89f981f7d8f5cc45b0fe5063e291aca187f32d0 SHA512 e767442ab69a25a2554b0691d240cb822ac5ec633627a99d02460e477f57f9b05a349d06ceb7cea4b72101799be850290055c75a5dac56291972e000d7bffcfd MISC metadata.xml 2623 BLAKE2B f07eb8074cfbd61dfb5580b1ec83d6f26dc3aff248d3dcb6932c164921b96681d829516fc9106d3e95f152412f5da4665506402d3c07db58ebd6120f32c9c1a5 SHA512 d2579bdef5d5715fc0d2a699c547ed3dcd938a91ab586fa6b8ee6f9c251af3ea8d04bfd0fd1db60fc943064a12e2ead4efed11894846fcf31d304cb18ee8c43a diff --git a/sys-apps/systemd/files/249.5-coredumpctl.patch b/sys-apps/systemd/files/249.5-coredumpctl.patch deleted file mode 100644 index 2892f3477137..000000000000 --- a/sys-apps/systemd/files/249.5-coredumpctl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 473627e1c9fcdf8f819ced2bb79cb7e9ff598b0c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> -Date: Tue, 12 Oct 2021 19:46:25 +0200 -Subject: [PATCH] coredumpctl: stop truncating information about coredump -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -With the changes to limit that print 'Found module …' over and over, we were -hitting the journal field message limit, effectively truncating the info output. - -Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1998488. - -(cherry picked from commit 384c6207669eb0d92aa0043dbc01957c6c7ff41e) ---- - src/coredump/coredumpctl.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c -index 3d44e51e32..7eba8330d7 100644 ---- a/src/coredump/coredumpctl.c -+++ b/src/coredump/coredumpctl.c -@@ -555,6 +555,8 @@ static int print_info(FILE *file, sd_journal *j, bool need_space) { - assert(file); - assert(j); - -+ (void) sd_journal_set_data_threshold(j, 0); -+ - SD_JOURNAL_FOREACH_DATA(j, d, l) { - RETRIEVE(d, l, "MESSAGE_ID", mid); - RETRIEVE(d, l, "COREDUMP_PID", pid); diff --git a/sys-apps/systemd/files/249.5-revert-unit-start-rate-limiting.patch b/sys-apps/systemd/files/249.5-revert-unit-start-rate-limiting.patch deleted file mode 100644 index 6d070e8d30d1..000000000000 --- a/sys-apps/systemd/files/249.5-revert-unit-start-rate-limiting.patch +++ /dev/null @@ -1,483 +0,0 @@ -From 4fa9d8f14523982482386d398d2b2669902f2098 Mon Sep 17 00:00:00 2001 -From: Yu Watanabe <watanabe.yu+github@gmail.com> -Date: Mon, 18 Oct 2021 14:11:53 +0900 -Subject: [PATCH] Revert "core: Check unit start rate limiting earlier" - -This reverts commit ed8fbbf1745c6a2dc0b8cd560ac8a3353f72e979. - -This was causing problems during boot, see -https://bodhi.fedoraproject.org/updates/FEDORA-2021-a1a52487e6, -https://bugzilla.redhat.com/show_bug.cgi?id=2013386. -https://github.com/systemd/systemd/issues/21025 ---- - src/core/automount.c | 23 ++++++----------------- - src/core/mount.c | 23 ++++++----------------- - src/core/path.c | 23 ++++++----------------- - src/core/service.c | 25 +++++++------------------ - src/core/socket.c | 23 ++++++----------------- - src/core/swap.c | 23 ++++++----------------- - src/core/timer.c | 23 ++++++----------------- - src/core/unit.c | 7 ------- - src/core/unit.h | 4 ---- - test/TEST-63-ISSUE-17433/Makefile | 1 - - test/TEST-63-ISSUE-17433/test.sh | 9 --------- - test/meson.build | 2 -- - test/testsuite-10.units/test10.service | 3 --- - test/testsuite-63.units/test63.path | 2 -- - test/testsuite-63.units/test63.service | 5 ----- - test/units/testsuite-63.service | 16 ---------------- - 16 files changed, 43 insertions(+), 169 deletions(-) - delete mode 120000 test/TEST-63-ISSUE-17433/Makefile - delete mode 100755 test/TEST-63-ISSUE-17433/test.sh - delete mode 100644 test/testsuite-63.units/test63.path - delete mode 100644 test/testsuite-63.units/test63.service - delete mode 100644 test/units/testsuite-63.service - -diff --git a/src/core/automount.c b/src/core/automount.c -index 0722abef23..edc9588165 100644 ---- a/src/core/automount.c -+++ b/src/core/automount.c -@@ -814,6 +814,12 @@ static int automount_start(Unit *u) { - if (r < 0) - return r; - -+ r = unit_test_start_limit(u); -+ if (r < 0) { -+ automount_enter_dead(a, AUTOMOUNT_FAILURE_START_LIMIT_HIT); -+ return r; -+ } -+ - r = unit_acquire_invocation_id(u); - if (r < 0) - return r; -@@ -1059,21 +1065,6 @@ static bool automount_supported(void) { - return supported; - } - --static int automount_test_start_limit(Unit *u) { -- Automount *a = AUTOMOUNT(u); -- int r; -- -- assert(a); -- -- r = unit_test_start_limit(u); -- if (r < 0) { -- automount_enter_dead(a, AUTOMOUNT_FAILURE_START_LIMIT_HIT); -- return r; -- } -- -- return 0; --} -- - static const char* const automount_result_table[_AUTOMOUNT_RESULT_MAX] = { - [AUTOMOUNT_SUCCESS] = "success", - [AUTOMOUNT_FAILURE_RESOURCES] = "resources", -@@ -1136,6 +1127,4 @@ const UnitVTable automount_vtable = { - [JOB_FAILED] = "Failed to unset automount %s.", - }, - }, -- -- .test_start_limit = automount_test_start_limit, - }; -diff --git a/src/core/mount.c b/src/core/mount.c -index 9bec190cb6..af39db214b 100644 ---- a/src/core/mount.c -+++ b/src/core/mount.c -@@ -1168,6 +1168,12 @@ static int mount_start(Unit *u) { - - assert(IN_SET(m->state, MOUNT_DEAD, MOUNT_FAILED)); - -+ r = unit_test_start_limit(u); -+ if (r < 0) { -+ mount_enter_dead(m, MOUNT_FAILURE_START_LIMIT_HIT); -+ return r; -+ } -+ - r = unit_acquire_invocation_id(u); - if (r < 0) - return r; -@@ -2137,21 +2143,6 @@ static int mount_can_clean(Unit *u, ExecCleanMask *ret) { - return exec_context_get_clean_mask(&m->exec_context, ret); - } - --static int mount_test_start_limit(Unit *u) { -- Mount *m = MOUNT(u); -- int r; -- -- assert(m); -- -- r = unit_test_start_limit(u); -- if (r < 0) { -- mount_enter_dead(m, MOUNT_FAILURE_START_LIMIT_HIT); -- return r; -- } -- -- return 0; --} -- - static const char* const mount_exec_command_table[_MOUNT_EXEC_COMMAND_MAX] = { - [MOUNT_EXEC_MOUNT] = "ExecMount", - [MOUNT_EXEC_UNMOUNT] = "ExecUnmount", -@@ -2249,6 +2240,4 @@ const UnitVTable mount_vtable = { - [JOB_TIMEOUT] = "Timed out unmounting %s.", - }, - }, -- -- .test_start_limit = mount_test_start_limit, - }; -diff --git a/src/core/path.c b/src/core/path.c -index 2b659696a4..e098e83a31 100644 ---- a/src/core/path.c -+++ b/src/core/path.c -@@ -590,6 +590,12 @@ static int path_start(Unit *u) { - if (r < 0) - return r; - -+ r = unit_test_start_limit(u); -+ if (r < 0) { -+ path_enter_dead(p, PATH_FAILURE_START_LIMIT_HIT); -+ return r; -+ } -+ - r = unit_acquire_invocation_id(u); - if (r < 0) - return r; -@@ -805,21 +811,6 @@ static void path_reset_failed(Unit *u) { - p->result = PATH_SUCCESS; - } - --static int path_test_start_limit(Unit *u) { -- Path *p = PATH(u); -- int r; -- -- assert(p); -- -- r = unit_test_start_limit(u); -- if (r < 0) { -- path_enter_dead(p, PATH_FAILURE_START_LIMIT_HIT); -- return r; -- } -- -- return 0; --} -- - static const char* const path_type_table[_PATH_TYPE_MAX] = { - [PATH_EXISTS] = "PathExists", - [PATH_EXISTS_GLOB] = "PathExistsGlob", -@@ -874,6 +865,4 @@ const UnitVTable path_vtable = { - .reset_failed = path_reset_failed, - - .bus_set_property = bus_path_set_property, -- -- .test_start_limit = path_test_start_limit, - }; -diff --git a/src/core/service.c b/src/core/service.c -index 701c145565..7b90822f68 100644 ---- a/src/core/service.c -+++ b/src/core/service.c -@@ -2456,6 +2456,13 @@ static int service_start(Unit *u) { - - assert(IN_SET(s->state, SERVICE_DEAD, SERVICE_FAILED)); - -+ /* Make sure we don't enter a busy loop of some kind. */ -+ r = unit_test_start_limit(u); -+ if (r < 0) { -+ service_enter_dead(s, SERVICE_FAILURE_START_LIMIT_HIT, false); -+ return r; -+ } -+ - r = unit_acquire_invocation_id(u); - if (r < 0) - return r; -@@ -4451,22 +4458,6 @@ static const char *service_finished_job(Unit *u, JobType t, JobResult result) { - return NULL; - } - --static int service_test_start_limit(Unit *u) { -- Service *s = SERVICE(u); -- int r; -- -- assert(s); -- -- /* Make sure we don't enter a busy loop of some kind. */ -- r = unit_test_start_limit(u); -- if (r < 0) { -- service_enter_dead(s, SERVICE_FAILURE_START_LIMIT_HIT, false); -- return r; -- } -- -- return 0; --} -- - static const char* const service_restart_table[_SERVICE_RESTART_MAX] = { - [SERVICE_RESTART_NO] = "no", - [SERVICE_RESTART_ON_SUCCESS] = "on-success", -@@ -4629,6 +4620,4 @@ const UnitVTable service_vtable = { - }, - .finished_job = service_finished_job, - }, -- -- .test_start_limit = service_test_start_limit, - }; -diff --git a/src/core/socket.c b/src/core/socket.c -index 31d88b71ff..f362a5baa8 100644 ---- a/src/core/socket.c -+++ b/src/core/socket.c -@@ -2515,6 +2515,12 @@ static int socket_start(Unit *u) { - - assert(IN_SET(s->state, SOCKET_DEAD, SOCKET_FAILED)); - -+ r = unit_test_start_limit(u); -+ if (r < 0) { -+ socket_enter_dead(s, SOCKET_FAILURE_START_LIMIT_HIT); -+ return r; -+ } -+ - r = unit_acquire_invocation_id(u); - if (r < 0) - return r; -@@ -3423,21 +3429,6 @@ static int socket_can_clean(Unit *u, ExecCleanMask *ret) { - return exec_context_get_clean_mask(&s->exec_context, ret); - } - --static int socket_test_start_limit(Unit *u) { -- Socket *s = SOCKET(u); -- int r; -- -- assert(s); -- -- r = unit_test_start_limit(u); -- if (r < 0) { -- socket_enter_dead(s, SOCKET_FAILURE_START_LIMIT_HIT); -- return r; -- } -- -- return 0; --} -- - static const char* const socket_exec_command_table[_SOCKET_EXEC_COMMAND_MAX] = { - [SOCKET_EXEC_START_PRE] = "ExecStartPre", - [SOCKET_EXEC_START_CHOWN] = "ExecStartChown", -@@ -3564,6 +3555,4 @@ const UnitVTable socket_vtable = { - [JOB_TIMEOUT] = "Timed out stopping %s.", - }, - }, -- -- .test_start_limit = socket_test_start_limit, - }; -diff --git a/src/core/swap.c b/src/core/swap.c -index b25f68fb7d..3843b19500 100644 ---- a/src/core/swap.c -+++ b/src/core/swap.c -@@ -933,6 +933,12 @@ static int swap_start(Unit *u) { - if (UNIT(other)->job && UNIT(other)->job->state == JOB_RUNNING) - return -EAGAIN; - -+ r = unit_test_start_limit(u); -+ if (r < 0) { -+ swap_enter_dead(s, SWAP_FAILURE_START_LIMIT_HIT); -+ return r; -+ } -+ - r = unit_acquire_invocation_id(u); - if (r < 0) - return r; -@@ -1582,21 +1588,6 @@ static int swap_can_clean(Unit *u, ExecCleanMask *ret) { - return exec_context_get_clean_mask(&s->exec_context, ret); - } - --static int swap_test_start_limit(Unit *u) { -- Swap *s = SWAP(u); -- int r; -- -- assert(s); -- -- r = unit_test_start_limit(u); -- if (r < 0) { -- swap_enter_dead(s, SWAP_FAILURE_START_LIMIT_HIT); -- return r; -- } -- -- return 0; --} -- - static const char* const swap_exec_command_table[_SWAP_EXEC_COMMAND_MAX] = { - [SWAP_EXEC_ACTIVATE] = "ExecActivate", - [SWAP_EXEC_DEACTIVATE] = "ExecDeactivate", -@@ -1692,6 +1683,4 @@ const UnitVTable swap_vtable = { - [JOB_TIMEOUT] = "Timed out deactivating swap %s.", - }, - }, -- -- .test_start_limit = swap_test_start_limit, - }; -diff --git a/src/core/timer.c b/src/core/timer.c -index 5ecc9f35cf..e064ad9a2d 100644 ---- a/src/core/timer.c -+++ b/src/core/timer.c -@@ -635,6 +635,12 @@ static int timer_start(Unit *u) { - if (r < 0) - return r; - -+ r = unit_test_start_limit(u); -+ if (r < 0) { -+ timer_enter_dead(t, TIMER_FAILURE_START_LIMIT_HIT); -+ return r; -+ } -+ - r = unit_acquire_invocation_id(u); - if (r < 0) - return r; -@@ -895,21 +901,6 @@ static int timer_can_clean(Unit *u, ExecCleanMask *ret) { - return 0; - } - --static int timer_test_start_limit(Unit *u) { -- Timer *t = TIMER(u); -- int r; -- -- assert(t); -- -- r = unit_test_start_limit(u); -- if (r < 0) { -- timer_enter_dead(t, TIMER_FAILURE_START_LIMIT_HIT); -- return r; -- } -- -- return 0; --} -- - static const char* const timer_base_table[_TIMER_BASE_MAX] = { - [TIMER_ACTIVE] = "OnActiveSec", - [TIMER_BOOT] = "OnBootSec", -@@ -969,6 +960,4 @@ const UnitVTable timer_vtable = { - .timezone_change = timer_timezone_change, - - .bus_set_property = bus_timer_set_property, -- -- .test_start_limit = timer_test_start_limit, - }; -diff --git a/src/core/unit.c b/src/core/unit.c -index 69ed43578e..38d3eb703f 100644 ---- a/src/core/unit.c -+++ b/src/core/unit.c -@@ -1851,13 +1851,6 @@ int unit_start(Unit *u) { - - assert(u); - -- /* Check start rate limiting early so that failure conditions don't cause us to enter a busy loop. */ -- if (UNIT_VTABLE(u)->test_start_limit) { -- int r = UNIT_VTABLE(u)->test_start_limit(u); -- if (r < 0) -- return r; -- } -- - /* If this is already started, then this will succeed. Note that this will even succeed if this unit - * is not startable by the user. This is relied on to detect when we need to wait for units and when - * waiting is finished. */ -diff --git a/src/core/unit.h b/src/core/unit.h -index 9babd07188..759104ffa7 100644 ---- a/src/core/unit.h -+++ b/src/core/unit.h -@@ -649,10 +649,6 @@ typedef struct UnitVTable { - * of this type will immediately fail. */ - bool (*supported)(void); - -- /* If this function is set, it's invoked first as part of starting a unit to allow start rate -- * limiting checks to occur before we do anything else. */ -- int (*test_start_limit)(Unit *u); -- - /* The strings to print in status messages */ - UnitStatusMessageFormats status_message_formats; - -diff --git a/test/TEST-63-ISSUE-17433/Makefile b/test/TEST-63-ISSUE-17433/Makefile -deleted file mode 120000 -index e9f93b1104..0000000000 ---- a/test/TEST-63-ISSUE-17433/Makefile -+++ /dev/null -@@ -1 +0,0 @@ --../TEST-01-BASIC/Makefile -\ No newline at end of file -diff --git a/test/TEST-63-ISSUE-17433/test.sh b/test/TEST-63-ISSUE-17433/test.sh -deleted file mode 100755 -index c595a9f2de..0000000000 ---- a/test/TEST-63-ISSUE-17433/test.sh -+++ /dev/null -@@ -1,9 +0,0 @@ --#!/usr/bin/env bash --set -e -- --TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/17433" -- --# shellcheck source=test/test-functions --. "${TEST_BASE_DIR:?}/test-functions" -- --do_test "$@" -diff --git a/test/meson.build b/test/meson.build -index 6f8f257c2d..47c7f4d49a 100644 ---- a/test/meson.build -+++ b/test/meson.build -@@ -33,8 +33,6 @@ if install_tests - install_dir : testdata_dir) - install_subdir('testsuite-52.units', - install_dir : testdata_dir) -- install_subdir('testsuite-63.units', -- install_dir : testdata_dir) - - testsuite08_dir = testdata_dir + '/testsuite-08.units' - install_data('testsuite-08.units/-.mount', -diff --git a/test/testsuite-10.units/test10.service b/test/testsuite-10.units/test10.service -index 2fb476b986..d0be786b01 100644 ---- a/test/testsuite-10.units/test10.service -+++ b/test/testsuite-10.units/test10.service -@@ -1,9 +1,6 @@ - [Unit] - Requires=test10.socket - ConditionPathExistsGlob=/tmp/nonexistent --# Make sure we hit the socket trigger limit in the test and not the service start limit. --StartLimitInterval=1000 --StartLimitBurst=1000 - - [Service] - ExecStart=true -diff --git a/test/testsuite-63.units/test63.path b/test/testsuite-63.units/test63.path -deleted file mode 100644 -index a6573bda0a..0000000000 ---- a/test/testsuite-63.units/test63.path -+++ /dev/null -@@ -1,2 +0,0 @@ --[Path] --PathExists=/tmp/test63 -diff --git a/test/testsuite-63.units/test63.service b/test/testsuite-63.units/test63.service -deleted file mode 100644 -index c83801874d..0000000000 ---- a/test/testsuite-63.units/test63.service -+++ /dev/null -@@ -1,5 +0,0 @@ --[Unit] --ConditionPathExists=!/tmp/nonexistent -- --[Service] --ExecStart=true -diff --git a/test/units/testsuite-63.service b/test/units/testsuite-63.service -deleted file mode 100644 -index 04122723d4..0000000000 ---- a/test/units/testsuite-63.service -+++ /dev/null -@@ -1,16 +0,0 @@ --[Unit] --Description=TEST-63-ISSUE-17433 -- --[Service] --ExecStartPre=rm -f /failed /testok --Type=oneshot --ExecStart=rm -f /tmp/nonexistent --ExecStart=systemctl start test63.path --ExecStart=touch /tmp/test63 --# Make sure systemd has sufficient time to hit the start limit for test63.service. --ExecStart=sleep 2 --ExecStart=sh -x -c 'test "$(systemctl show test63.service -P ActiveState)" = failed' --ExecStart=sh -x -c 'test "$(systemctl show test63.service -P Result)" = start-limit-hit' --ExecStart=sh -x -c 'test "$(systemctl show test63.path -P ActiveState)" = failed' --ExecStart=sh -x -c 'test "$(systemctl show test63.path -P Result)" = unit-start-limit-hit' --ExecStart=sh -x -c 'echo OK >/testok' diff --git a/sys-apps/systemd/systemd-249.4-r4.ebuild b/sys-apps/systemd/systemd-249.4-r4.ebuild index 01503d4fcf00..722d9f6b3f04 100644 --- a/sys-apps/systemd/systemd-249.4-r4.ebuild +++ b/sys-apps/systemd/systemd-249.4-r4.ebuild @@ -177,7 +177,7 @@ pkg_pretend() { fi local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS - ~KCMP ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE + ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH @@ -190,6 +190,12 @@ pkg_pretend() { kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" + if kernel_is -lt 5 10 20; then + CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" + else + CONFIG_CHECK+=" ~KCMP" + fi + if linux_config_exists; then local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then diff --git a/sys-apps/systemd/systemd-249.6-r1.ebuild b/sys-apps/systemd/systemd-249.6-r1.ebuild new file mode 100644 index 000000000000..5f4dc1168d11 --- /dev/null +++ b/sys-apps/systemd/systemd-249.6-r1.ebuild @@ -0,0 +1,505 @@ +# Copyright 2011-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{8..10} ) + +# Avoid QA warnings +TMPFILES_OPTIONAL=1 + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/systemd/systemd.git" + inherit git-r3 +else + if [[ ${PV} == *.* ]]; then + MY_PN=systemd-stable + else + MY_PN=systemd + fi + MY_PV=${PV/_/-} + MY_P=${MY_PN}-${MY_PV} + S=${WORKDIR}/${MY_P} + SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +inherit bash-completion-r1 linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript + +DESCRIPTION="System and service manager for Linux" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0/2" +IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils fido2 +gcrypt gnuefi homed http idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd" + +REQUIRED_USE=" + homed? ( cryptsetup pam ) + importd? ( curl gcrypt lzma ) + pwquality? ( homed ) +" +RESTRICT="!test? ( test )" + +MINKV="3.11" + +OPENSSL_DEP=">=dev-libs/openssl-1.1.0:0=" + +COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] + sys-libs/libcap:0=[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + acl? ( sys-apps/acl:0= ) + apparmor? ( sys-libs/libapparmor:0= ) + audit? ( >=sys-process/audit-2:0= ) + cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) + curl? ( net-misc/curl:0= ) + dns-over-tls? ( >=net-libs/gnutls-3.6.0:0= ) + elfutils? ( >=dev-libs/elfutils-0.158:0= ) + fido2? ( dev-libs/libfido2:0= ) + gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) + homed? ( ${OPENSSL_DEP} ) + http? ( + >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] + >=net-libs/gnutls-3.1.4:0= + ) + idn? ( net-dns/libidn2:= ) + importd? ( + app-arch/bzip2:0= + sys-libs/zlib:0= + ) + kmod? ( >=sys-apps/kmod-15:0= ) + lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) + nat? ( net-firewall/iptables:0= ) + pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) + pkcs11? ( app-crypt/p11-kit:0= ) + pcre? ( dev-libs/libpcre2 ) + pwquality? ( dev-libs/libpwquality:0= ) + qrcode? ( media-gfx/qrencode:0= ) + repart? ( ${OPENSSL_DEP} ) + seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) + selinux? ( sys-libs/libselinux:0= ) + tpm? ( app-crypt/tpm2-tss:0= ) + xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) + zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) +" + +# Newer linux-headers needed by ia64, bug #480218 +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-${MINKV} + gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) +" + +# baselayout-2.2 has /run +RDEPEND="${COMMON_DEPEND} + >=acct-group/adm-0-r1 + >=acct-group/wheel-0-r1 + >=acct-group/kmem-0-r1 + >=acct-group/tty-0-r1 + >=acct-group/utmp-0-r1 + >=acct-group/audio-0-r1 + >=acct-group/cdrom-0-r1 + >=acct-group/dialout-0-r1 + >=acct-group/disk-0-r1 + >=acct-group/input-0-r1 + >=acct-group/kvm-0-r1 + >=acct-group/lp-0-r1 + >=acct-group/render-0-r1 + acct-group/sgx + >=acct-group/tape-0-r1 + acct-group/users + >=acct-group/video-0-r1 + >=acct-group/systemd-journal-0-r1 + >=acct-user/root-0-r1 + acct-user/nobody + >=acct-user/systemd-journal-remote-0-r1 + >=acct-user/systemd-coredump-0-r1 + >=acct-user/systemd-network-0-r1 + acct-user/systemd-oom + >=acct-user/systemd-resolve-0-r1 + >=acct-user/systemd-timesync-0-r1 + >=sys-apps/baselayout-2.2 + selinux? ( sec-policy/selinux-base-policy[systemd] ) + sysv-utils? ( + !sys-apps/openrc[sysv-utils(-)] + !sys-apps/sysvinit + ) + !sysv-utils? ( sys-apps/sysvinit ) + resolvconf? ( !net-dns/openresolv ) + !build? ( || ( + sys-apps/util-linux[kill(-)] + sys-process/procps[kill(+)] + sys-apps/coreutils[kill(-)] + ) ) + !sys-apps/hwids[udev] + !sys-auth/nss-myhostname + !sys-fs/eudev + !sys-fs/udev +" + +# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) +PDEPEND=">=sys-apps/dbus-1.9.8[systemd] + >=sys-fs/udev-init-scripts-34 + policykit? ( sys-auth/polkit ) + !vanilla? ( sys-apps/gentoo-systemd-integration )" + +BDEPEND=" + app-arch/xz-utils:0 + dev-util/gperf + >=dev-util/meson-0.46 + >=sys-apps/coreutils-8.16 + sys-devel/gettext + virtual/pkgconfig + test? ( + app-text/tree + dev-lang/perl + sys-apps/dbus + ) + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt:0 + $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') + $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') +" + +python_check_deps() { + has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" && + has_version -b "dev-python/lxml[${PYTHON_USEDEP}]" +} + +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" +QA_EXECSTACK="usr/lib/systemd/boot/efi/*" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + if use test && has pid-sandbox ${FEATURES}; then + ewarn "Tests are known to fail with PID sandboxing enabled." + ewarn "See https://bugs.gentoo.org/674458." + fi + + local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS + ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE + ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS + ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS + ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH + ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED + ~!SYSFS_DEPRECATED_V2" + + use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" + use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" + kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" + kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" + kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" + + if kernel_is -lt 5 10 20; then + CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" + else + CONFIG_CHECK+=" ~KCMP" + fi + + if linux_config_exists; then + local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) + if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then + ewarn "It's recommended to set an empty value to the following kernel config option:" + ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" + fi + if linux_chkconfig_present X86; then + CONFIG_CHECK+=" ~DMIID" + fi + fi + + if kernel_is -lt ${MINKV//./ }; then + ewarn "Kernel version at least ${MINKV} required" + fi + + check_extra_config + fi +} + +pkg_setup() { + : +} + +src_unpack() { + default + [[ ${PV} != 9999 ]] || git-r3_src_unpack +} + +src_prepare() { + # Do NOT add patches here + local PATCHES=() + + [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) + + # Add local patches here + PATCHES+=( + ) + + if ! use vanilla; then + PATCHES+=( + "${FILESDIR}/gentoo-generator-path-r2.patch" + "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch" + "${FILESDIR}/gentoo-journald-audit.patch" + ) + fi + + default +} + +src_configure() { + # Prevent conflicts with i686 cross toolchain, bug 559726 + tc-export AR CC NM OBJCOPY RANLIB + + python_setup + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( + --localstatedir="${EPREFIX}/var" + -Dsupport-url="https://gentoo.org/support/" + -Dpamlibdir="$(getpam_mod_dir)" + # avoid bash-completion dep + -Dbashcompletiondir="$(get_bashcompdir)" + # make sure we get /bin:/sbin in PATH + $(meson_use split-usr) + -Dsplit-bin=true + -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" + -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" + # Avoid infinite exec recursion, bug 642724 + -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" + # no deps + -Dima=true + -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) + # Optional components/dependencies + $(meson_native_use_bool acl) + $(meson_native_use_bool apparmor) + $(meson_native_use_bool audit) + $(meson_native_use_bool cryptsetup libcryptsetup) + $(meson_native_use_bool curl libcurl) + $(meson_native_use_bool dns-over-tls dns-over-tls) + $(meson_native_use_bool elfutils) + $(meson_native_use_bool fido2 libfido2) + $(meson_use gcrypt) + $(meson_native_use_bool gnuefi gnu-efi) + -Defi-includedir="${ESYSROOT}/usr/include/efi" + -Defi-ld="$(tc-getLD)" + -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" + $(meson_native_use_bool homed) + $(meson_native_use_bool http microhttpd) + $(meson_native_use_bool idn) + $(meson_native_use_bool importd) + $(meson_native_use_bool importd bzip2) + $(meson_native_use_bool importd zlib) + $(meson_native_use_bool kmod) + $(meson_use lz4) + $(meson_use lzma xz) + $(meson_use zstd) + $(meson_native_use_bool nat libiptc) + $(meson_use pam) + $(meson_native_use_bool pkcs11 p11kit) + $(meson_native_use_bool pcre pcre2) + $(meson_native_use_bool policykit polkit) + $(meson_native_use_bool pwquality) + $(meson_native_use_bool qrcode qrencode) + $(meson_native_use_bool repart) + $(meson_native_use_bool seccomp) + $(meson_native_use_bool selinux) + $(meson_native_use_bool tpm tpm2) + $(meson_native_use_bool test dbus) + $(meson_native_use_bool xkb xkbcommon) + -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" + # Breaks screen, tmux, etc. + -Ddefault-kill-user-processes=false + -Dcreate-log-dirs=false + + # multilib options + $(meson_native_true backlight) + $(meson_native_true binfmt) + $(meson_native_true coredump) + $(meson_native_true environment-d) + $(meson_native_true firstboot) + $(meson_native_true hibernate) + $(meson_native_true hostnamed) + $(meson_native_true ldconfig) + $(meson_native_true localed) + $(meson_native_true man) + $(meson_native_true networkd) + $(meson_native_true quotacheck) + $(meson_native_true randomseed) + $(meson_native_true rfkill) + $(meson_native_true sysusers) + $(meson_native_true timedated) + $(meson_native_true timesyncd) + $(meson_native_true tmpfiles) + $(meson_native_true vconsole) + ) + + meson_src_configure "${myconf[@]}" +} + +multilib_src_test() { + unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR + meson_src_test +} + +multilib_src_install_all() { + local rootprefix=$(usex split-usr '' /usr) + + # meson doesn't know about docdir + mv "${ED}"/usr/share/doc/{systemd,${PF}} || die + + einstalldocs + dodoc "${FILESDIR}"/nsswitch.conf + + if ! use resolvconf; then + rm -f "${ED}${rootprefix}"/sbin/resolvconf || die + fi + + rm "${ED}"/etc/init.d/README || die + rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die + + if ! use sysv-utils; then + rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die + rm "${ED}"/usr/share/man/man1/init.1 || die + rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die + fi + + if ! use resolvconf && ! use sysv-utils; then + rmdir "${ED}${rootprefix}"/sbin || die + fi + + # https://bugs.gentoo.org/761763 + rm -r "${ED}"/usr/lib/sysusers.d || die + + # Preserve empty dirs in /etc & /var, bug #437008 + keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} + keepdir /etc/kernel/install.d + keepdir /etc/systemd/{network,system,user} + keepdir /etc/udev/rules.d + + keepdir /etc/udev/hwdb.d + + keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} + keepdir /usr/lib/{binfmt.d,modules-load.d} + keepdir /usr/lib/systemd/user-generators + keepdir /var/lib/systemd + keepdir /var/log/journal + + # Symlink /etc/sysctl.conf for easy migration. + dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf + + if use pam; then + newpamd "${FILESDIR}"/systemd-user.pam systemd-user + fi + + if use split-usr; then + # Avoid breaking boot/reboot + dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd + dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown + fi + + gen_usr_ldscript -a systemd udev +} + +migrate_locale() { + local envd_locale_def="${EROOT}/etc/env.d/02locale" + local envd_locale=( "${EROOT}"/etc/env.d/??locale ) + local locale_conf="${EROOT}/etc/locale.conf" + + if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then + # If locale.conf does not exist... + if [[ -e ${envd_locale} ]]; then + # ...either copy env.d/??locale if there's one + ebegin "Moving ${envd_locale} to ${locale_conf}" + mv "${envd_locale}" "${locale_conf}" + eend ${?} || FAIL=1 + else + # ...or create a dummy default + ebegin "Creating ${locale_conf}" + cat > "${locale_conf}" <<-EOF + # This file has been created by the sys-apps/systemd ebuild. + # See locale.conf(5) and localectl(1). + + # LANG=${LANG} + EOF + eend ${?} || FAIL=1 + fi + fi + + if [[ ! -L ${envd_locale} ]]; then + # now, if env.d/??locale is not a symlink (to locale.conf)... + if [[ -e ${envd_locale} ]]; then + # ...warn the user that he has duplicate locale settings + ewarn + ewarn "To ensure consistent behavior, you should replace ${envd_locale}" + ewarn "with a symlink to ${locale_conf}. Please migrate your settings" + ewarn "and create the symlink with the following command:" + ewarn "ln -s -n -f ../locale.conf ${envd_locale}" + ewarn + else + # ...or just create the symlink if there's nothing here + ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" + ln -n -s ../locale.conf "${envd_locale_def}" + eend ${?} || FAIL=1 + fi + fi +} + +pkg_preinst() { + if ! use split-usr; then + local dir + for dir in bin sbin lib; do + if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then + eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." + eerror "One of them should be a symbolic link to the other one." + FAIL=1 + fi + done + if [[ ${FAIL} ]]; then + eerror "Migration to system layout with merged directories must be performed before" + eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." + die "System layout with split directories still used" + fi + fi +} + +pkg_postinst() { + systemd_update_catalog + + # Keep this here in case the database format changes so it gets updated + # when required. + systemd-hwdb --root="${ROOT}" update + + udev_reload || FAIL=1 + + # Bug 465468, make sure locales are respected, and ensure consistency + # between OpenRC & systemd + migrate_locale + + if [[ -z ${REPLACING_VERSIONS} ]]; then + if type systemctl &>/dev/null; then + systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 + fi + elog "To enable a useful set of services, run the following:" + elog " systemctl preset-all --preset-mode=enable-only" + fi + + if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then + rm "${EROOT}/var/lib/systemd/timesync" + fi + + if [[ ${FAIL} ]]; then + eerror "One of the postinst commands failed. Please check the postinst output" + eerror "for errors. You may need to clean up your system and/or try installing" + eerror "systemd again." + eerror + fi +} + +pkg_prerm() { + # If removing systemd completely, remove the catalog database. + if [[ ! ${REPLACED_BY_VERSION} ]]; then + rm -f -v "${EROOT}"/var/lib/systemd/catalog/database + fi +} diff --git a/sys-apps/systemd/systemd-249.5-r1.ebuild b/sys-apps/systemd/systemd-249.6.ebuild index e47a7beaa3d1..b0ff3632f09e 100644 --- a/sys-apps/systemd/systemd-249.5-r1.ebuild +++ b/sys-apps/systemd/systemd-249.6.ebuild @@ -20,7 +20,7 @@ else MY_P=${MY_PN}-${MY_PV} S=${WORKDIR}/${MY_P} SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" fi inherit bash-completion-r1 linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript @@ -177,7 +177,7 @@ pkg_pretend() { fi local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS - ~KCMP ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE + ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH @@ -190,6 +190,12 @@ pkg_pretend() { kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" + if kernel_is -lt 5 10 20; then + CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" + else + CONFIG_CHECK+=" ~KCMP" + fi + if linux_config_exists; then local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then @@ -226,9 +232,6 @@ src_prepare() { # Add local patches here PATCHES+=( - "${FILESDIR}/249-libudev-static.patch" - "${FILESDIR}/249.5-coredumpctl.patch" - "${FILESDIR}/249.5-revert-unit-start-rate-limiting.patch" ) if ! use vanilla; then @@ -495,12 +498,6 @@ pkg_postinst() { rm "${EROOT}/var/lib/systemd/timesync" fi - if [[ -z ${ROOT} && -d /run/systemd/system ]]; then - ebegin "Reexecuting system manager" - systemctl daemon-reexec - eend $? - fi - if [[ ${FAIL} ]]; then eerror "One of the postinst commands failed. Please check the postinst output" eerror "for errors. You may need to clean up your system and/or try installing" diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild index 485b6498181e..b422ee6c0681 100644 --- a/sys-apps/systemd/systemd-9999.ebuild +++ b/sys-apps/systemd/systemd-9999.ebuild @@ -30,7 +30,7 @@ HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" LICENSE="GPL-2 LGPL-2.1 MIT public-domain" SLOT="0/2" -IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils fido2 +gcrypt gnuefi homed hostnamed-fallback http +hwdb idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd" +IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils fido2 +gcrypt gnuefi homed hostnamed-fallback http idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd" REQUIRED_USE=" homed? ( cryptsetup pam ) @@ -134,6 +134,7 @@ RDEPEND="${COMMON_DEPEND} sys-process/procps[kill(+)] sys-apps/coreutils[kill(-)] ) ) + !sys-apps/hwids[udev] !sys-auth/nss-myhostname !sys-fs/eudev !sys-fs/udev @@ -141,7 +142,6 @@ RDEPEND="${COMMON_DEPEND} # sys-apps/dbus: the daemon only (+ build-time lib dep for tests) PDEPEND=">=sys-apps/dbus-1.9.8[systemd] - hwdb? ( sys-apps/hwids[systemd(+),udev] ) >=sys-fs/udev-init-scripts-34 policykit? ( sys-auth/polkit ) !vanilla? ( sys-apps/gentoo-systemd-integration )" @@ -182,7 +182,7 @@ pkg_pretend() { fi local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS - ~KCMP ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE + ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH @@ -195,6 +195,12 @@ pkg_pretend() { kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" + if kernel_is -lt 5 10 20; then + CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" + else + CONFIG_CHECK+=" ~KCMP" + fi + if linux_config_exists; then local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then @@ -285,7 +291,6 @@ multilib_src_configure() { -Defi-ld="$(tc-getLD)" -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" $(meson_native_use_bool homed) - $(meson_native_use_bool hwdb) $(meson_native_use_bool http microhttpd) $(meson_native_use_bool idn) $(meson_native_use_bool importd) @@ -378,9 +383,7 @@ multilib_src_install_all() { keepdir /etc/systemd/{network,system,user} keepdir /etc/udev/rules.d - if use hwdb; then - keepdir /etc/udev/hwdb.d - fi + keepdir /etc/udev/hwdb.d keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} keepdir /usr/lib/{binfmt.d,modules-load.d} @@ -395,10 +398,6 @@ multilib_src_install_all() { newpamd "${FILESDIR}"/systemd-user.pam systemd-user fi - if use hwdb; then - rm -r "${ED}${rootprefix}"/lib/udev/hwdb.d || die - fi - if use split-usr; then # Avoid breaking boot/reboot dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd @@ -485,9 +484,7 @@ pkg_postinst() { # Keep this here in case the database format changes so it gets updated # when required. - if use hwdb; then - systemd-hwdb --root="${ROOT}" update - fi + systemd-hwdb --root="${ROOT}" update udev_reload || FAIL=1 @@ -507,12 +504,6 @@ pkg_postinst() { rm "${EROOT}/var/lib/systemd/timesync" fi - if [[ -z ${ROOT} && -d /run/systemd/system ]]; then - ebegin "Reexecuting system manager" - systemctl daemon-reexec - eend $? - fi - if [[ ${FAIL} ]]; then eerror "One of the postinst commands failed. Please check the postinst output" eerror "for errors. You may need to clean up your system and/or try installing" |