From 61cdc9cff21f4e9053d53ddde48ceedf17c5f02f Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 27 Jul 2020 22:14:21 +0200 Subject: [PATCH] Rebase patches --- .../patches/Fix-build-with-httpd-0.9.71.patch | 65 -------- ...d-dependency-on-systemd-remount-fs.s.patch | 2 +- ...o-restore-the-control-command-id-too.patch | 2 +- ...Add-support-for-TuxOnIce-hibernation.patch | 4 +- ...step-back-again-for-nspawn-we-actual.patch | 4 +- ...-RLIMIT_CORE-to-unlimited-by-default.patch | 4 +- ...rk-as-redundant-if-deps-are-relevant.patch | 143 ------------------ ...check-if-already-done-by-the-initram.patch | 2 +- ...-ignore-gateway-provided-by-DHCP-ser.patch | 8 +- ...Gateway-default-to-UseRoutes-setting.patch | 8 +- ...user-units-inherit-their-umask-from-.patch | 8 +- debian/patches/series | 2 - 12 files changed, 21 insertions(+), 231 deletions(-) delete mode 100644 debian/patches/Fix-build-with-httpd-0.9.71.patch delete mode 100644 debian/patches/debian/Revert-job-Don-t-mark-as-redundant-if-deps-are-relevant.patch diff --git a/debian/patches/Fix-build-with-httpd-0.9.71.patch b/debian/patches/Fix-build-with-httpd-0.9.71.patch deleted file mode 100644 index 48afb300d..000000000 --- a/debian/patches/Fix-build-with-httpd-0.9.71.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= -Date: Tue, 30 Jun 2020 09:56:10 +0200 -Subject: =?utf-8?q?Fix_build_with_=C2=B5httpd_0=2E9=2E71?= - -The return type of callbacks was changed from int to an enum. - -(cherry picked from commit d17eabb1052e7c8c432331a7a782845e36164f01) ---- - src/journal-remote/journal-gatewayd.c | 4 ++-- - src/journal-remote/journal-remote-main.c | 2 +- - src/journal-remote/microhttpd-util.h | 6 ++++++ - 3 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c -index 459d8e8..825f43c 100644 ---- a/src/journal-remote/journal-gatewayd.c -+++ b/src/journal-remote/journal-gatewayd.c -@@ -351,7 +351,7 @@ static int request_parse_range( - return 0; - } - --static int request_parse_arguments_iterator( -+static mhd_result request_parse_arguments_iterator( - void *cls, - enum MHD_ValueKind kind, - const char *key, -@@ -798,7 +798,7 @@ static int request_handler_machine( - return MHD_queue_response(connection, MHD_HTTP_OK, response); - } - --static int request_handler( -+static mhd_result request_handler( - void *cls, - struct MHD_Connection *connection, - const char *url, -diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c -index 551b841..1c8e7ab 100644 ---- a/src/journal-remote/journal-remote-main.c -+++ b/src/journal-remote/journal-remote-main.c -@@ -253,7 +253,7 @@ static int process_http_upload( - return mhd_respond(connection, MHD_HTTP_ACCEPTED, "OK."); - }; - --static int request_handler( -+static mhd_result request_handler( - void *cls, - struct MHD_Connection *connection, - const char *url, -diff --git a/src/journal-remote/microhttpd-util.h b/src/journal-remote/microhttpd-util.h -index d90c6bb..4ca9a5c 100644 ---- a/src/journal-remote/microhttpd-util.h -+++ b/src/journal-remote/microhttpd-util.h -@@ -47,6 +47,12 @@ - # define MHD_create_response_from_fd_at_offset64 MHD_create_response_from_fd_at_offset - #endif - -+#if MHD_VERSION >= 0x00097002 -+# define mhd_result enum MHD_Result -+#else -+# define mhd_result int -+#endif -+ - void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0); - - /* respond_oom() must be usable with return, hence this form. */ diff --git a/debian/patches/core-automatically-add-dependency-on-systemd-remount-fs.s.patch b/debian/patches/core-automatically-add-dependency-on-systemd-remount-fs.s.patch index a6c7e68ca..c8fad8f15 100644 --- a/debian/patches/core-automatically-add-dependency-on-systemd-remount-fs.s.patch +++ b/debian/patches/core-automatically-add-dependency-on-systemd-remount-fs.s.patch @@ -19,7 +19,7 @@ systemd-pstore.service. 1 file changed, 10 insertions(+) diff --git a/src/core/unit.c b/src/core/unit.c -index 8758580..0e0166e 100644 +index 2ddd0b3..5967d4a 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1046,6 +1046,16 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) { diff --git a/debian/patches/core-make-sure-to-restore-the-control-command-id-too.patch b/debian/patches/core-make-sure-to-restore-the-control-command-id-too.patch index 1813c14f3..e4741d326 100644 --- a/debian/patches/core-make-sure-to-restore-the-control-command-id-too.patch +++ b/debian/patches/core-make-sure-to-restore-the-control-command-id-too.patch @@ -9,7 +9,7 @@ Fixes: #15356 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/service.c b/src/core/service.c -index 9a26271..40760b6 100644 +index db8cf37..3036bd3 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2826,9 +2826,10 @@ static int service_deserialize_exec_command(Unit *u, const char *key, const char diff --git a/debian/patches/debian/Add-support-for-TuxOnIce-hibernation.patch b/debian/patches/debian/Add-support-for-TuxOnIce-hibernation.patch index ff1a60d05..9a7ec41e2 100644 --- a/debian/patches/debian/Add-support-for-TuxOnIce-hibernation.patch +++ b/debian/patches/debian/Add-support-for-TuxOnIce-hibernation.patch @@ -12,10 +12,10 @@ Forwarded: http://lists.freedesktop.org/archives/systemd-devel/2014-April/018960 1 file changed, 6 insertions(+) diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c -index 6dbdff7..1a03dad 100644 +index f8e23f9..7286773 100644 --- a/src/shared/sleep-config.c +++ b/src/shared/sleep-config.c -@@ -455,6 +455,12 @@ static bool enough_swap_for_hibernation(void) { +@@ -458,6 +458,12 @@ static bool enough_swap_for_hibernation(void) { if (getenv_bool("SYSTEMD_BYPASS_HIBERNATION_MEMORY_CHECK") > 0) return true; diff --git a/debian/patches/debian/Revert-core-one-step-back-again-for-nspawn-we-actual.patch b/debian/patches/debian/Revert-core-one-step-back-again-for-nspawn-we-actual.patch index 3e841eb79..04062007a 100644 --- a/debian/patches/debian/Revert-core-one-step-back-again-for-nspawn-we-actual.patch +++ b/debian/patches/debian/Revert-core-one-step-back-again-for-nspawn-we-actual.patch @@ -14,10 +14,10 @@ Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1141137 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/core/unit.c b/src/core/unit.c -index 0e0166e..06635ee 100644 +index 5967d4a..77f814f 100644 --- a/src/core/unit.c +++ b/src/core/unit.c -@@ -4861,16 +4861,7 @@ int unit_kill_context( +@@ -4874,16 +4874,7 @@ int unit_kill_context( } else if (r > 0) { diff --git a/debian/patches/debian/Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch b/debian/patches/debian/Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch index 3241a6c46..b38d627a1 100644 --- a/debian/patches/debian/Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch +++ b/debian/patches/debian/Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch @@ -19,10 +19,10 @@ Bug-Debian: https://bugs.debian.org/815020 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/main.c b/src/core/main.c -index 9efd92f..9faf791 100644 +index 380a809..96f106e 100644 --- a/src/core/main.c +++ b/src/core/main.c -@@ -2531,8 +2531,6 @@ int main(int argc, char *argv[]) { +@@ -2532,8 +2532,6 @@ int main(int argc, char *argv[]) { kernel_timestamp = DUAL_TIMESTAMP_NULL; } diff --git a/debian/patches/debian/Revert-job-Don-t-mark-as-redundant-if-deps-are-relevant.patch b/debian/patches/debian/Revert-job-Don-t-mark-as-redundant-if-deps-are-relevant.patch deleted file mode 100644 index 7b73f76e3..000000000 --- a/debian/patches/debian/Revert-job-Don-t-mark-as-redundant-if-deps-are-relevant.patch +++ /dev/null @@ -1,143 +0,0 @@ -From: Michael Biebl -Date: Thu, 12 Mar 2020 13:37:08 +0100 -Subject: Revert "job: Don't mark as redundant if deps are relevant" - -This reverts commit 097537f07a2fab3cb73aef7bc59f2a66aa93f533. - -See https://github.com/systemd/systemd/issues/15091 - -Closes: #953670 ---- - src/core/job.c | 51 +++++++------------------------------------------- - src/core/job.h | 3 +-- - src/core/transaction.c | 8 ++++---- - 3 files changed, 12 insertions(+), 50 deletions(-) - -diff --git a/src/core/job.c b/src/core/job.c -index bcfdb9d..4f9336f 100644 ---- a/src/core/job.c -+++ b/src/core/job.c -@@ -383,62 +383,25 @@ JobType job_type_lookup_merge(JobType a, JobType b) { - return job_merging_table[(a - 1) * a / 2 + b]; - } - --bool job_later_link_matters(Job *j, JobType type, unsigned generation) { -- JobDependency *l; -- -- assert(j); -- -- j->generation = generation; -- -- LIST_FOREACH(subject, l, j->subject_list) { -- UnitActiveState state = _UNIT_ACTIVE_STATE_INVALID; -- -- /* Have we seen this before? */ -- if (l->object->generation == generation) -- continue; -- -- state = unit_active_state(l->object->unit); -- switch (type) { -- -- case JOB_START: -- return IN_SET(state, UNIT_INACTIVE, UNIT_FAILED) || -- job_later_link_matters(l->object, type, generation); -- -- case JOB_STOP: -- return IN_SET(state, UNIT_ACTIVE, UNIT_RELOADING) || -- job_later_link_matters(l->object, type, generation); -- -- default: -- assert_not_reached("Invalid job type"); -- } -- } -- -- return false; --} -- --bool job_is_redundant(Job *j, unsigned generation) { -- -- assert(j); -- -- UnitActiveState state = unit_active_state(j->unit); -- switch (j->type) { -+bool job_type_is_redundant(JobType a, UnitActiveState b) { -+ switch (a) { - - case JOB_START: -- return IN_SET(state, UNIT_ACTIVE, UNIT_RELOADING) && !job_later_link_matters(j, JOB_START, generation); -+ return IN_SET(b, UNIT_ACTIVE, UNIT_RELOADING); - - case JOB_STOP: -- return IN_SET(state, UNIT_INACTIVE, UNIT_FAILED) && !job_later_link_matters(j, JOB_STOP, generation); -+ return IN_SET(b, UNIT_INACTIVE, UNIT_FAILED); - - case JOB_VERIFY_ACTIVE: -- return IN_SET(state, UNIT_ACTIVE, UNIT_RELOADING); -+ return IN_SET(b, UNIT_ACTIVE, UNIT_RELOADING); - - case JOB_RELOAD: - return -- state == UNIT_RELOADING; -+ b == UNIT_RELOADING; - - case JOB_RESTART: - return -- state == UNIT_ACTIVATING; -+ b == UNIT_ACTIVATING; - - case JOB_NOP: - return true; -diff --git a/src/core/job.h b/src/core/job.h -index 02b057e..03ad640 100644 ---- a/src/core/job.h -+++ b/src/core/job.h -@@ -196,8 +196,7 @@ _pure_ static inline bool job_type_is_superset(JobType a, JobType b) { - return a == job_type_lookup_merge(a, b); - } - --bool job_later_link_matters(Job *j, JobType type, unsigned generation); --bool job_is_redundant(Job *j, unsigned generation); -+bool job_type_is_redundant(JobType a, UnitActiveState b) _pure_; - - /* Collapses a state-dependent job type into a simpler type by observing - * the state of the unit which it is going to be applied to. */ -diff --git a/src/core/transaction.c b/src/core/transaction.c -index 49f43e0..6dc4e95 100644 ---- a/src/core/transaction.c -+++ b/src/core/transaction.c -@@ -279,7 +279,7 @@ static int transaction_merge_jobs(Transaction *tr, sd_bus_error *e) { - return 0; - } - --static void transaction_drop_redundant(Transaction *tr, unsigned generation) { -+static void transaction_drop_redundant(Transaction *tr) { - bool again; - - /* Goes through the transaction and removes all jobs of the units whose jobs are all noops. If not -@@ -299,7 +299,7 @@ static void transaction_drop_redundant(Transaction *tr, unsigned generation) { - - LIST_FOREACH(transaction, k, j) - if (tr->anchor_job == k || -- !job_is_redundant(k, generation) || -+ !job_type_is_redundant(k->type, unit_active_state(k->unit)) || - (k->unit->job && job_type_is_conflicting(k->type, k->unit->job->type))) { - keep = true; - break; -@@ -732,7 +732,7 @@ int transaction_activate( - transaction_minimize_impact(tr); - - /* Third step: Drop redundant jobs */ -- transaction_drop_redundant(tr, generation++); -+ transaction_drop_redundant(tr); - - for (;;) { - /* Fourth step: Let's remove unneeded jobs that might -@@ -774,7 +774,7 @@ int transaction_activate( - } - - /* Eights step: Drop redundant jobs again, if the merging now allows us to drop more. */ -- transaction_drop_redundant(tr, generation++); -+ transaction_drop_redundant(tr); - - /* Ninth step: check whether we can actually apply this */ - r = transaction_is_destructive(tr, mode, e); diff --git a/debian/patches/debian/Skip-filesystem-check-if-already-done-by-the-initram.patch b/debian/patches/debian/Skip-filesystem-check-if-already-done-by-the-initram.patch index 69930093c..20ccf1d1f 100644 --- a/debian/patches/debian/Skip-filesystem-check-if-already-done-by-the-initram.patch +++ b/debian/patches/debian/Skip-filesystem-check-if-already-done-by-the-initram.patch @@ -15,7 +15,7 @@ Closes: #810748 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c -index bc1bcb2..da539f5 100644 +index 7cdfbc0..15c94a1 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -327,6 +327,7 @@ static int add_mount( diff --git a/debian/patches/network-add-a-flag-to-ignore-gateway-provided-by-DHCP-ser.patch b/debian/patches/network-add-a-flag-to-ignore-gateway-provided-by-DHCP-ser.patch index 049820638..282c5b40f 100644 --- a/debian/patches/network-add-a-flag-to-ignore-gateway-provided-by-DHCP-ser.patch +++ b/debian/patches/network-add-a-flag-to-ignore-gateway-provided-by-DHCP-ser.patch @@ -57,7 +57,7 @@ index 13e3e32..3f65804 100644 r = sd_dhcp_lease_get_router(lease, &router); diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf -index fb726c8..d3dda3d 100644 +index 920ac41..f3c7377 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -162,6 +162,7 @@ DHCPv4.UseMTU, config_parse_bool, @@ -69,10 +69,10 @@ index fb726c8..d3dda3d 100644 DHCPv4.Anonymize, config_parse_bool, 0, offsetof(Network, dhcp_anonymize) DHCPv4.SendHostname, config_parse_bool, 0, offsetof(Network, dhcp_send_hostname) diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c -index 2e716b2..c643419 100644 +index 255aaed..6b0d74c 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c -@@ -383,6 +383,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi +@@ -384,6 +384,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi .dhcp_use_dns = true, .dhcp_use_hostname = true, .dhcp_use_routes = true, @@ -81,7 +81,7 @@ index 2e716b2..c643419 100644 .dhcp_send_hostname = true, .dhcp_send_release = true, diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h -index 266e40c..0d46dbb 100644 +index 4738a18..a2b9cd9 100644 --- a/src/network/networkd-network.h +++ b/src/network/networkd-network.h @@ -110,6 +110,7 @@ struct Network { diff --git a/debian/patches/network-change-UseGateway-default-to-UseRoutes-setting.patch b/debian/patches/network-change-UseGateway-default-to-UseRoutes-setting.patch index 57ff350b0..05376f9a6 100644 --- a/debian/patches/network-change-UseGateway-default-to-UseRoutes-setting.patch +++ b/debian/patches/network-change-UseGateway-default-to-UseRoutes-setting.patch @@ -34,7 +34,7 @@ index 120347d..5175704 100644 diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf -index d3dda3d..1a07ae9 100644 +index f3c7377..41fe9da 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -162,7 +162,7 @@ DHCPv4.UseMTU, config_parse_bool, @@ -47,7 +47,7 @@ index d3dda3d..1a07ae9 100644 DHCPv4.Anonymize, config_parse_bool, 0, offsetof(Network, dhcp_anonymize) DHCPv4.SendHostname, config_parse_bool, 0, offsetof(Network, dhcp_send_hostname) diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c -index c643419..093d298 100644 +index 6b0d74c..5d2612e 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -265,6 +265,9 @@ int network_verify(Network *network) { @@ -60,7 +60,7 @@ index c643419..093d298 100644 if (network->dhcp_critical >= 0) { if (network->keep_configuration >= 0) log_warning("%s: Both KeepConfiguration= and deprecated CriticalConnection= are set. " -@@ -383,7 +386,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi +@@ -384,7 +387,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi .dhcp_use_dns = true, .dhcp_use_hostname = true, .dhcp_use_routes = true, @@ -70,7 +70,7 @@ index c643419..093d298 100644 .dhcp_send_hostname = true, .dhcp_send_release = true, diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h -index 0d46dbb..6231618 100644 +index a2b9cd9..fcba7e1 100644 --- a/src/network/networkd-network.h +++ b/src/network/networkd-network.h @@ -110,7 +110,7 @@ struct Network { diff --git a/debian/patches/pid1-by-default-make-user-units-inherit-their-umask-from-.patch b/debian/patches/pid1-by-default-make-user-units-inherit-their-umask-from-.patch index b300ed8d7..91ba75873 100644 --- a/debian/patches/pid1-by-default-make-user-units-inherit-their-umask-from-.patch +++ b/debian/patches/pid1-by-default-make-user-units-inherit-their-umask-from-.patch @@ -30,7 +30,7 @@ Fixes #6077. 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml -index e693af4..8ae9f98 100644 +index f7995e6..764c6ac 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -655,8 +655,13 @@ CapabilityBoundingSet=~CAP_B CAP_C @@ -50,7 +50,7 @@ index e693af4..8ae9f98 100644 diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 5de366f..b84515f 100644 +index 0a1dac7..728d38b 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -628,6 +628,23 @@ int get_process_ppid(pid_t pid, pid_t *_ppid) { @@ -78,7 +78,7 @@ index 5de366f..b84515f 100644 siginfo_t dummy; diff --git a/src/basic/process-util.h b/src/basic/process-util.h -index 4160af4..ca98252 100644 +index 5116d79..e0b5224 100644 --- a/src/basic/process-util.h +++ b/src/basic/process-util.h @@ -45,6 +45,7 @@ int get_process_cwd(pid_t pid, char **cwd); @@ -90,7 +90,7 @@ index 4160af4..ca98252 100644 int wait_for_terminate(pid_t pid, siginfo_t *status); diff --git a/src/core/unit.c b/src/core/unit.c -index c306183..8758580 100644 +index 92c37fc..2ddd0b3 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -187,8 +187,16 @@ static void unit_init(Unit *u) { diff --git a/debian/patches/series b/debian/patches/series index 31fb8916c..3305a2e2a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -17,7 +17,6 @@ basic-add-_cleanup_-wrappers-for-pthread_mutex_-lock-unlo.patch nss-systemd-use-_cleanup_-for-pthread_mutex_-lock-unlock.patch nss-systemd-don-t-synthesize-root-nobody-when-iterating.patch core-make-sure-to-restore-the-control-command-id-too.patch -Fix-build-with-httpd-0.9.71.patch debian/Use-Debian-specific-config-files.patch debian/Bring-tmpfiles.d-tmp.conf-in-line-with-Debian-defaul.patch debian/Make-run-lock-tmpfs-an-API-fs.patch @@ -36,4 +35,3 @@ debian/Drop-seccomp-system-call-filter-for-udev.patch debian/blacklist-upstream-test-25.patch debian/blacklist-upstream-test-24-ppc64el.patch debian/udev-drop-SystemCallArchitectures-native-from-systemd-ude.patch -debian/Revert-job-Don-t-mark-as-redundant-if-deps-are-relevant.patch