From 479574bc008a6b5d3738942d6e41df6030443b93 Mon Sep 17 00:00:00 2001 From: xujing Date: Mon, 18 Apr 2022 16:27:03 +0800 Subject: [PATCH] rename patches name and use patch from upstream (cherry picked from commit 68e94e5447622114ee014d8d62ecad65aa6254b9) --- ...lso-be-coldpluged-after-deserization.patch | 53 ---------------- ...vd.service-start-after-systemd-remou.patch | 0 ...step-back-again-for-nspawn-we-actual.patch | 0 ...e-must-be-restarted-when-reactivated.patch | 0 ...lug-both-job-and-nop_job-if-possible.patch | 44 +++++++++++++ ...mmand_prev-is-null-before-assigning-.patch | 0 ...-device-to-dead-in-manager_catchup-d.patch | 0 ...-a-service-can-not-be-auto-restarted.patch | 0 ...ck.patch => disable-initialize_clock.patch | 0 ...h => fix-capsh-drop-but-ping-success.patch | 0 ...urnal-file-descriptors-leak-problems.patch | 0 ...rtual-machines-have-same-mac-address.patch | 0 ...able-systemd-journald-audit.socket-b.patch | 0 ...nd-set-RemoveIPC-to-false-by-default.patch | 0 ...tTasksMax-to-80-of-the-kernel-pid.ma.patch | 0 ...rint-the-real-reason-for-link-update.patch | 0 ...e-etc-resolv.conf-symlink-at-runtime.patch | 0 ...evator-kernel-command-line-parameter.patch | 0 ...or-naming-Dell-iDRAC-USB-Virtual-NIC.patch | 0 ...le-that-adds-elevator-kernel-command.patch | 0 ...d-bus-properly-initialize-containers.patch | 0 ...tch => systemd-change-time-log-level.patch | 0 ...m-of-dbus-service-can-not-be-started.patch | 0 ...at-rsyslog-reads-journal-s-object-of.patch | 0 systemd.spec | 61 ++++++++++--------- ...dd-actions-while-rename-netif-failed.patch | 0 ...n-vm.patch => udev-virsh-shutdown-vm.patch | 0 ...nit-don-t-add-Requires-for-tmp.mount.patch | 0 ...its-add-Install-section-to-tmp.mount.patch | 0 ...-rtc-with-system-clock-when-shutdown.patch | 0 30 files changed, 76 insertions(+), 82 deletions(-) delete mode 100644 0018-nop_job-of-a-unit-must-also-be-coldpluged-after-deserization.patch rename 0010-Make-systemd-udevd.service-start-after-systemd-remou.patch => Make-systemd-udevd.service-start-after-systemd-remou.patch (100%) rename 0013-Revert-core-one-step-back-again-for-nspawn-we-actual.patch => Revert-core-one-step-back-again-for-nspawn-we-actual.patch (100%) rename 0021-activation-service-must-be-restarted-when-reactivated.patch => activation-service-must-be-restarted-when-reactivated.patch (100%) create mode 100644 backport-unit-coldplug-both-job-and-nop_job-if-possible.patch rename 0026-check-whether-command_prev-is-null-before-assigning-.patch => check-whether-command_prev-is-null-before-assigning-.patch (100%) rename 0028-core-skip-change-device-to-dead-in-manager_catchup-d.patch => core-skip-change-device-to-dead-in-manager_catchup-d.patch (100%) rename 0023-delay-to-restart-when-a-service-can-not-be-auto-restarted.patch => delay-to-restart-when-a-service-can-not-be-auto-restarted.patch (100%) rename 0024-disable-initialize_clock.patch => disable-initialize_clock.patch (100%) rename 0016-fix-capsh-drop-but-ping-success.patch => fix-capsh-drop-but-ping-success.patch (100%) rename 0020-fix-journal-file-descriptors-leak-problems.patch => fix-journal-file-descriptors-leak-problems.patch (100%) rename 0003-fix-two-VF-virtual-machines-have-same-mac-address.patch => fix-two-VF-virtual-machines-have-same-mac-address.patch (100%) rename 0014-journal-don-t-enable-systemd-journald-audit.socket-b.patch => journal-don-t-enable-systemd-journald-audit.socket-b.patch (100%) rename 0004-logind-set-RemoveIPC-to-false-by-default.patch => logind-set-RemoveIPC-to-false-by-default.patch (100%) rename 0019-pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch => pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch (100%) rename 0027-print-the-real-reason-for-link-update.patch => print-the-real-reason-for-link-update.patch (100%) rename 0017-resolved-create-etc-resolv.conf-symlink-at-runtime.patch => resolved-create-etc-resolv.conf-symlink-at-runtime.patch (100%) rename 0007-rules-add-elevator-kernel-command-line-parameter.patch => rules-add-elevator-kernel-command-line-parameter.patch (100%) rename 0005-rules-add-rule-for-naming-Dell-iDRAC-USB-Virtual-NIC.patch => rules-add-rule-for-naming-Dell-iDRAC-USB-Virtual-NIC.patch (100%) rename 0008-rules-add-the-rule-that-adds-elevator-kernel-command.patch => rules-add-the-rule-that-adds-elevator-kernel-command.patch (100%) rename 0012-sd-bus-properly-initialize-containers.patch => sd-bus-properly-initialize-containers.patch (100%) rename 0015-systemd-change-time-log-level.patch => systemd-change-time-log-level.patch (100%) rename 0022-systemd-core-fix-problem-of-dbus-service-can-not-be-started.patch => systemd-core-fix-problem-of-dbus-service-can-not-be-started.patch (100%) rename 0025-systemd-solve-that-rsyslog-reads-journal-s-object-of.patch => systemd-solve-that-rsyslog-reads-journal-s-object-of.patch (100%) rename 0002-udev-add-actions-while-rename-netif-failed.patch => udev-add-actions-while-rename-netif-failed.patch (100%) rename 0011-udev-virsh-shutdown-vm.patch => udev-virsh-shutdown-vm.patch (100%) rename 0006-unit-don-t-add-Requires-for-tmp.mount.patch => unit-don-t-add-Requires-for-tmp.mount.patch (100%) rename 0009-units-add-Install-section-to-tmp.mount.patch => units-add-Install-section-to-tmp.mount.patch (100%) rename 0001-update-rtc-with-system-clock-when-shutdown.patch => update-rtc-with-system-clock-when-shutdown.patch (100%) diff --git a/0018-nop_job-of-a-unit-must-also-be-coldpluged-after-deserization.patch b/0018-nop_job-of-a-unit-must-also-be-coldpluged-after-deserization.patch deleted file mode 100644 index afca3e7..0000000 --- a/0018-nop_job-of-a-unit-must-also-be-coldpluged-after-deserization.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 07e13151c566588b5f679e2576d3dfc2125c6e7c Mon Sep 17 00:00:00 2001 -From: huangkaibin -Date: Sun, 22 Apr 2018 18:49:19 +0800 -Subject: [PATCH] systemd-core: nop_job of a unit must also be coldpluged -after deserization. - -When a unit is not in-active, and systemctl try-restart is executed for -this unit, -systemd will do nothing for it and just accept it as a nop_job for the -unit. -When then nop-job is still in the running queue, then daemon-reload is -performed, this nop job -will be dropped from the unit since it is not coldpluged in the -unit_coldplug function. -After then, the systemctl try-restart command will hang forever since no -JOB_DONE dbus signal will be sent -to it from systemd. -This patch fix this problem by do coldplug for the nop_job in -unit_coldplug function. ---- - src/core/unit.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -diff --git a/src/core/unit.c b/src/core/unit.c -index 0a2f3c8..b9bd102 100644 ---- a/src/core/unit.c -+++ b/src/core/unit.c -@@ -3601,11 +3601,17 @@ int unit_coldplug(Unit *u) { - r = q; - } - -- uj = u->job ?: u->nop_job; -- if (uj) { -- q = job_coldplug(uj); -- if (q < 0 && r >= 0) -- r = q; -+ if (u->job || u->nop_job) { -+ if (u->job) { -+ q = job_coldplug(u->job); -+ if (q < 0 && r >= 0) -+ r = q; -+ } -+ if (u->nop_job) { -+ q = job_coldplug(u->nop_job); -+ if (q < 0 && r >= 0) -+ r = q; -+ } - } - - return r; --- -2.27.0 - diff --git a/0010-Make-systemd-udevd.service-start-after-systemd-remou.patch b/Make-systemd-udevd.service-start-after-systemd-remou.patch similarity index 100% rename from 0010-Make-systemd-udevd.service-start-after-systemd-remou.patch rename to Make-systemd-udevd.service-start-after-systemd-remou.patch diff --git a/0013-Revert-core-one-step-back-again-for-nspawn-we-actual.patch b/Revert-core-one-step-back-again-for-nspawn-we-actual.patch similarity index 100% rename from 0013-Revert-core-one-step-back-again-for-nspawn-we-actual.patch rename to Revert-core-one-step-back-again-for-nspawn-we-actual.patch diff --git a/0021-activation-service-must-be-restarted-when-reactivated.patch b/activation-service-must-be-restarted-when-reactivated.patch similarity index 100% rename from 0021-activation-service-must-be-restarted-when-reactivated.patch rename to activation-service-must-be-restarted-when-reactivated.patch diff --git a/backport-unit-coldplug-both-job-and-nop_job-if-possible.patch b/backport-unit-coldplug-both-job-and-nop_job-if-possible.patch new file mode 100644 index 0000000..054c286 --- /dev/null +++ b/backport-unit-coldplug-both-job-and-nop_job-if-possible.patch @@ -0,0 +1,44 @@ +From 7dbd330c7ef28852db0fb044503ed6f072477d50 Mon Sep 17 00:00:00 2001 +From: Geass-LL +Date: Fri, 2 Apr 2021 11:27:59 +0800 +Subject: [PATCH] unit: coldplug both job and nop_job if possible + +Sometimes, both job and nop_job are deserialized. In this case, +if we only cold plug the job, the nop_job will also stuck in the +job list. +--- + src/core/unit.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/core/unit.c b/src/core/unit.c +index 7c39e4d0f8..2f7f022ef3 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -3588,7 +3588,6 @@ int unit_add_blockdev_dependency(Unit *u, const char *what, UnitDependencyMask m + int unit_coldplug(Unit *u) { + int r = 0, q; + char **i; +- Job *uj; + + assert(u); + +@@ -3611,9 +3610,13 @@ int unit_coldplug(Unit *u) { + r = q; + } + +- uj = u->job ?: u->nop_job; +- if (uj) { +- q = job_coldplug(uj); ++ if (u->job) { ++ q = job_coldplug(u->job); ++ if (q < 0 && r >= 0) ++ r = q; ++ } ++ if (u->nop_job) { ++ q = job_coldplug(u->nop_job); + if (q < 0 && r >= 0) + r = q; + } +-- +2.27.0 + diff --git a/0026-check-whether-command_prev-is-null-before-assigning-.patch b/check-whether-command_prev-is-null-before-assigning-.patch similarity index 100% rename from 0026-check-whether-command_prev-is-null-before-assigning-.patch rename to check-whether-command_prev-is-null-before-assigning-.patch diff --git a/0028-core-skip-change-device-to-dead-in-manager_catchup-d.patch b/core-skip-change-device-to-dead-in-manager_catchup-d.patch similarity index 100% rename from 0028-core-skip-change-device-to-dead-in-manager_catchup-d.patch rename to core-skip-change-device-to-dead-in-manager_catchup-d.patch diff --git a/0023-delay-to-restart-when-a-service-can-not-be-auto-restarted.patch b/delay-to-restart-when-a-service-can-not-be-auto-restarted.patch similarity index 100% rename from 0023-delay-to-restart-when-a-service-can-not-be-auto-restarted.patch rename to delay-to-restart-when-a-service-can-not-be-auto-restarted.patch diff --git a/0024-disable-initialize_clock.patch b/disable-initialize_clock.patch similarity index 100% rename from 0024-disable-initialize_clock.patch rename to disable-initialize_clock.patch diff --git a/0016-fix-capsh-drop-but-ping-success.patch b/fix-capsh-drop-but-ping-success.patch similarity index 100% rename from 0016-fix-capsh-drop-but-ping-success.patch rename to fix-capsh-drop-but-ping-success.patch diff --git a/0020-fix-journal-file-descriptors-leak-problems.patch b/fix-journal-file-descriptors-leak-problems.patch similarity index 100% rename from 0020-fix-journal-file-descriptors-leak-problems.patch rename to fix-journal-file-descriptors-leak-problems.patch diff --git a/0003-fix-two-VF-virtual-machines-have-same-mac-address.patch b/fix-two-VF-virtual-machines-have-same-mac-address.patch similarity index 100% rename from 0003-fix-two-VF-virtual-machines-have-same-mac-address.patch rename to fix-two-VF-virtual-machines-have-same-mac-address.patch diff --git a/0014-journal-don-t-enable-systemd-journald-audit.socket-b.patch b/journal-don-t-enable-systemd-journald-audit.socket-b.patch similarity index 100% rename from 0014-journal-don-t-enable-systemd-journald-audit.socket-b.patch rename to journal-don-t-enable-systemd-journald-audit.socket-b.patch diff --git a/0004-logind-set-RemoveIPC-to-false-by-default.patch b/logind-set-RemoveIPC-to-false-by-default.patch similarity index 100% rename from 0004-logind-set-RemoveIPC-to-false-by-default.patch rename to logind-set-RemoveIPC-to-false-by-default.patch diff --git a/0019-pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch b/pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch similarity index 100% rename from 0019-pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch rename to pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch diff --git a/0027-print-the-real-reason-for-link-update.patch b/print-the-real-reason-for-link-update.patch similarity index 100% rename from 0027-print-the-real-reason-for-link-update.patch rename to print-the-real-reason-for-link-update.patch diff --git a/0017-resolved-create-etc-resolv.conf-symlink-at-runtime.patch b/resolved-create-etc-resolv.conf-symlink-at-runtime.patch similarity index 100% rename from 0017-resolved-create-etc-resolv.conf-symlink-at-runtime.patch rename to resolved-create-etc-resolv.conf-symlink-at-runtime.patch diff --git a/0007-rules-add-elevator-kernel-command-line-parameter.patch b/rules-add-elevator-kernel-command-line-parameter.patch similarity index 100% rename from 0007-rules-add-elevator-kernel-command-line-parameter.patch rename to rules-add-elevator-kernel-command-line-parameter.patch diff --git a/0005-rules-add-rule-for-naming-Dell-iDRAC-USB-Virtual-NIC.patch b/rules-add-rule-for-naming-Dell-iDRAC-USB-Virtual-NIC.patch similarity index 100% rename from 0005-rules-add-rule-for-naming-Dell-iDRAC-USB-Virtual-NIC.patch rename to rules-add-rule-for-naming-Dell-iDRAC-USB-Virtual-NIC.patch diff --git a/0008-rules-add-the-rule-that-adds-elevator-kernel-command.patch b/rules-add-the-rule-that-adds-elevator-kernel-command.patch similarity index 100% rename from 0008-rules-add-the-rule-that-adds-elevator-kernel-command.patch rename to rules-add-the-rule-that-adds-elevator-kernel-command.patch diff --git a/0012-sd-bus-properly-initialize-containers.patch b/sd-bus-properly-initialize-containers.patch similarity index 100% rename from 0012-sd-bus-properly-initialize-containers.patch rename to sd-bus-properly-initialize-containers.patch diff --git a/0015-systemd-change-time-log-level.patch b/systemd-change-time-log-level.patch similarity index 100% rename from 0015-systemd-change-time-log-level.patch rename to systemd-change-time-log-level.patch diff --git a/0022-systemd-core-fix-problem-of-dbus-service-can-not-be-started.patch b/systemd-core-fix-problem-of-dbus-service-can-not-be-started.patch similarity index 100% rename from 0022-systemd-core-fix-problem-of-dbus-service-can-not-be-started.patch rename to systemd-core-fix-problem-of-dbus-service-can-not-be-started.patch diff --git a/0025-systemd-solve-that-rsyslog-reads-journal-s-object-of.patch b/systemd-solve-that-rsyslog-reads-journal-s-object-of.patch similarity index 100% rename from 0025-systemd-solve-that-rsyslog-reads-journal-s-object-of.patch rename to systemd-solve-that-rsyslog-reads-journal-s-object-of.patch diff --git a/systemd.spec b/systemd.spec index 9bbbbab..ac243cf 100644 --- a/systemd.spec +++ b/systemd.spec @@ -20,7 +20,7 @@ Name: systemd Url: https://www.freedesktop.org/wiki/Software/systemd Version: 249 -Release: 25 +Release: 26 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -46,34 +46,33 @@ Source105: rule_generator.functions Source106: write_net_rules Source107: detect_virt -Patch0001: 0001-update-rtc-with-system-clock-when-shutdown.patch -Patch0002: 0002-udev-add-actions-while-rename-netif-failed.patch -Patch0003: 0003-fix-two-VF-virtual-machines-have-same-mac-address.patch -Patch0004: 0004-logind-set-RemoveIPC-to-false-by-default.patch -Patch0005: 0005-rules-add-rule-for-naming-Dell-iDRAC-USB-Virtual-NIC.patch -Patch0006: 0006-unit-don-t-add-Requires-for-tmp.mount.patch -Patch0007: 0007-rules-add-elevator-kernel-command-line-parameter.patch -Patch0008: 0008-rules-add-the-rule-that-adds-elevator-kernel-command.patch -Patch0009: 0009-units-add-Install-section-to-tmp.mount.patch -Patch0010: 0010-Make-systemd-udevd.service-start-after-systemd-remou.patch -Patch0011: 0011-udev-virsh-shutdown-vm.patch -Patch0012: 0012-sd-bus-properly-initialize-containers.patch -Patch0013: 0013-Revert-core-one-step-back-again-for-nspawn-we-actual.patch -Patch0014: 0014-journal-don-t-enable-systemd-journald-audit.socket-b.patch -Patch0015: 0015-systemd-change-time-log-level.patch -Patch0016: 0016-fix-capsh-drop-but-ping-success.patch -Patch0017: 0017-resolved-create-etc-resolv.conf-symlink-at-runtime.patch -Patch0018: 0018-nop_job-of-a-unit-must-also-be-coldpluged-after-deserization.patch -Patch0019: 0019-pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch -Patch0020: 0020-fix-journal-file-descriptors-leak-problems.patch -Patch0021: 0021-activation-service-must-be-restarted-when-reactivated.patch -Patch0022: 0022-systemd-core-fix-problem-of-dbus-service-can-not-be-started.patch -Patch0023: 0023-delay-to-restart-when-a-service-can-not-be-auto-restarted.patch -Patch0024: 0024-disable-initialize_clock.patch -Patch0025: 0025-systemd-solve-that-rsyslog-reads-journal-s-object-of.patch -Patch0026: 0026-check-whether-command_prev-is-null-before-assigning-.patch -Patch0027: 0027-print-the-real-reason-for-link-update.patch -Patch0028: 0028-core-skip-change-device-to-dead-in-manager_catchup-d.patch +Patch0001: update-rtc-with-system-clock-when-shutdown.patch +Patch0002: udev-add-actions-while-rename-netif-failed.patch +Patch0003: fix-two-VF-virtual-machines-have-same-mac-address.patch +Patch0004: logind-set-RemoveIPC-to-false-by-default.patch +Patch0005: rules-add-rule-for-naming-Dell-iDRAC-USB-Virtual-NIC.patch +Patch0006: unit-don-t-add-Requires-for-tmp.mount.patch +Patch0007: rules-add-elevator-kernel-command-line-parameter.patch +Patch0008: rules-add-the-rule-that-adds-elevator-kernel-command.patch +Patch0009: units-add-Install-section-to-tmp.mount.patch +Patch0010: Make-systemd-udevd.service-start-after-systemd-remou.patch +Patch0011: udev-virsh-shutdown-vm.patch +Patch0012: sd-bus-properly-initialize-containers.patch +Patch0013: Revert-core-one-step-back-again-for-nspawn-we-actual.patch +Patch0014: journal-don-t-enable-systemd-journald-audit.socket-b.patch +Patch0015: systemd-change-time-log-level.patch +Patch0016: fix-capsh-drop-but-ping-success.patch +Patch0017: resolved-create-etc-resolv.conf-symlink-at-runtime.patch +Patch0018: pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch +Patch0019: fix-journal-file-descriptors-leak-problems.patch +Patch0020: activation-service-must-be-restarted-when-reactivated.patch +Patch0021: systemd-core-fix-problem-of-dbus-service-can-not-be-started.patch +Patch0022: delay-to-restart-when-a-service-can-not-be-auto-restarted.patch +Patch0023: disable-initialize_clock.patch +Patch0024: systemd-solve-that-rsyslog-reads-journal-s-object-of.patch +Patch0025: check-whether-command_prev-is-null-before-assigning-.patch +Patch0026: print-the-real-reason-for-link-update.patch +Patch0027: core-skip-change-device-to-dead-in-manager_catchup-d.patch #backport Patch6000: backport-core-fix-free-undefined-pointer-when-strdup-failed-i.patch @@ -103,6 +102,7 @@ Patch6023: backport-core-fix-SIGABRT-on-empty-exec-command-argv.patch Patch6024: backport-core-service-also-check-path-in-exec-commands.patch Patch6025: backport-Add-meson-option-to-disable-urlify.patch Patch6026: backport-logind.conf-Fix-name-of-option-RuntimeDirectoryInode.patch +Patch6027: backport-unit-coldplug-both-job-and-nop_job-if-possible.patch BuildRequires: gcc, gcc-c++ BuildRequires: libcap-devel, libmount-devel, pam-devel, libselinux-devel @@ -1505,6 +1505,9 @@ fi %{_libdir}/security/pam_systemd.so %changelog +* Mon Apr 18 2022 xujing - 249-26 +- rename patches name and use patch from upstream + * Tue Apr 12 2022 xujing - 249-25 - core: skip change device to dead in manager_catchup during booting diff --git a/0002-udev-add-actions-while-rename-netif-failed.patch b/udev-add-actions-while-rename-netif-failed.patch similarity index 100% rename from 0002-udev-add-actions-while-rename-netif-failed.patch rename to udev-add-actions-while-rename-netif-failed.patch diff --git a/0011-udev-virsh-shutdown-vm.patch b/udev-virsh-shutdown-vm.patch similarity index 100% rename from 0011-udev-virsh-shutdown-vm.patch rename to udev-virsh-shutdown-vm.patch diff --git a/0006-unit-don-t-add-Requires-for-tmp.mount.patch b/unit-don-t-add-Requires-for-tmp.mount.patch similarity index 100% rename from 0006-unit-don-t-add-Requires-for-tmp.mount.patch rename to unit-don-t-add-Requires-for-tmp.mount.patch diff --git a/0009-units-add-Install-section-to-tmp.mount.patch b/units-add-Install-section-to-tmp.mount.patch similarity index 100% rename from 0009-units-add-Install-section-to-tmp.mount.patch rename to units-add-Install-section-to-tmp.mount.patch diff --git a/0001-update-rtc-with-system-clock-when-shutdown.patch b/update-rtc-with-system-clock-when-shutdown.patch similarity index 100% rename from 0001-update-rtc-with-system-clock-when-shutdown.patch rename to update-rtc-with-system-clock-when-shutdown.patch