import systemd-250-6.el9_0.1
This commit is contained in:
parent
61a255dfc9
commit
9bd9d34420
68
SOURCES/0056-shutdown-get-only-active-md-arrays.patch
Normal file
68
SOURCES/0056-shutdown-get-only-active-md-arrays.patch
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
From 375a8c43cc683af6cc6c8c4be50e100ba0fa0b58 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
||||||
|
Date: Tue, 29 Mar 2022 12:49:54 +0200
|
||||||
|
Subject: [PATCH] shutdown: get only active md arrays.
|
||||||
|
|
||||||
|
Current md_list_get() implementation filters all block devices, started from
|
||||||
|
"md*". This is ambiguous because list could contain:
|
||||||
|
- partitions created upon md device (mdXpY)
|
||||||
|
- external metadata container- specific type of md array.
|
||||||
|
|
||||||
|
For partitions there is no issue, because they aren't handle STOP_ARRAY
|
||||||
|
ioctl sent later. It generates misleading errors only.
|
||||||
|
|
||||||
|
Second case is more problematic because containers are not locked in kernel.
|
||||||
|
They are stopped even if container member array is active. For that reason
|
||||||
|
reboot or shutdown flow could be blocked because metadata manager cannot be
|
||||||
|
restarted after switch root on shutdown.
|
||||||
|
|
||||||
|
Add filters to remove partitions and containers from md_list. Partitions
|
||||||
|
can be excluded by DEVTYPE. Containers are determined by MD_LEVEL
|
||||||
|
property, we are excluding all with "container" value.
|
||||||
|
|
||||||
|
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
||||||
|
(cherry picked from commit 3a3b022d2cc112803ea7b9beea98bbcad110368a)
|
||||||
|
|
||||||
|
Resolves: #2087677
|
||||||
|
---
|
||||||
|
src/shutdown/umount.c | 18 +++++++++++++++++-
|
||||||
|
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
|
||||||
|
index f5a2cb20c1..6b08d9de74 100644
|
||||||
|
--- a/src/shutdown/umount.c
|
||||||
|
+++ b/src/shutdown/umount.c
|
||||||
|
@@ -352,9 +352,14 @@ static int md_list_get(MountPoint **head) {
|
||||||
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
+ /* Filter out partitions. */
|
||||||
|
+ r = sd_device_enumerator_add_match_property(e, "DEVTYPE", "disk");
|
||||||
|
+ if (r < 0)
|
||||||
|
+ return r;
|
||||||
|
+
|
||||||
|
FOREACH_DEVICE(e, d) {
|
||||||
|
_cleanup_free_ char *p = NULL;
|
||||||
|
- const char *dn;
|
||||||
|
+ const char *dn, *md_level;
|
||||||
|
MountPoint *m;
|
||||||
|
dev_t devnum;
|
||||||
|
|
||||||
|
@@ -362,6 +367,17 @@ static int md_list_get(MountPoint **head) {
|
||||||
|
sd_device_get_devname(d, &dn) < 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
+ r = sd_device_get_property_value(d, "MD_LEVEL", &md_level);
|
||||||
|
+ if (r < 0) {
|
||||||
|
+ log_warning_errno(r, "Failed to get MD_LEVEL property for %s, ignoring: %m", dn);
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* MD "containers" are a special type of MD devices, used for external metadata.
|
||||||
|
+ * Since it doesn't provide RAID functionality in itself we don't need to stop it. */
|
||||||
|
+ if (streq(md_level, "container"))
|
||||||
|
+ continue;
|
||||||
|
+
|
||||||
|
p = strdup(dn);
|
||||||
|
if (!p)
|
||||||
|
return -ENOMEM;
|
@ -0,0 +1,41 @@
|
|||||||
|
From abf906d35843be10a9321a43062c8f9e411ccc1b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||||||
|
Date: Wed, 9 Feb 2022 22:35:03 +0100
|
||||||
|
Subject: [PATCH] test: lvm 2.03.15 dropped the static autoactivation
|
||||||
|
|
||||||
|
so install the respective generator only if we're running with older
|
||||||
|
lvm versions.
|
||||||
|
|
||||||
|
See: https://sourceware.org/git/?p=lvm2.git;a=commit;h=ee8fb0310c53ed003a43b324c99cdfd891dd1a7c
|
||||||
|
(cherry picked from commit d10d562bd4b9f93130fb2b23f2b0d0d4126ea7d4)
|
||||||
|
|
||||||
|
Related: #2087677
|
||||||
|
---
|
||||||
|
test/test-functions | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/test-functions b/test/test-functions
|
||||||
|
index 4827b6bedf..dcc893733c 100644
|
||||||
|
--- a/test/test-functions
|
||||||
|
+++ b/test/test-functions
|
||||||
|
@@ -973,16 +973,19 @@ install_lvm() {
|
||||||
|
image_install lvm
|
||||||
|
image_install "${ROOTLIBDIR:?}"/system/lvm2-lvmpolld.{service,socket}
|
||||||
|
image_install "${ROOTLIBDIR:?}"/system/{blk-availability,lvm2-monitor}.service
|
||||||
|
- image_install "${ROOTLIBDIR:?}"/system-generators/lvm2-activation-generator
|
||||||
|
image_install -o "/lib/tmpfiles.d/lvm2.conf"
|
||||||
|
if get_bool "$LOOKS_LIKE_DEBIAN"; then
|
||||||
|
inst_rules 56-lvm.rules 69-lvm-metad.rules
|
||||||
|
else
|
||||||
|
# Support the new udev autoactivation introduced in lvm 2.03.14
|
||||||
|
# https://sourceware.org/git/?p=lvm2.git;a=commit;h=67722b312390cdab29c076c912e14bd739c5c0f6
|
||||||
|
+ # Static autoactivation (via lvm2-activation-generator) was dropped
|
||||||
|
+ # in lvm 2.03.15
|
||||||
|
+ # https://sourceware.org/git/?p=lvm2.git;a=commit;h=ee8fb0310c53ed003a43b324c99cdfd891dd1a7c
|
||||||
|
if [[ -f /lib/udev/rules.d/69-dm-lvm.rules ]]; then
|
||||||
|
inst_rules 11-dm-lvm.rules 69-dm-lvm.rules
|
||||||
|
else
|
||||||
|
+ image_install "${ROOTLIBDIR:?}"/system-generators/lvm2-activation-generator
|
||||||
|
image_install "${ROOTLIBDIR:?}"/system/lvm2-pvscan@.service
|
||||||
|
inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules
|
||||||
|
fi
|
@ -0,0 +1,35 @@
|
|||||||
|
From b91a67f2fdd11710c67b4a965bcbecce2833c8d5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||||||
|
Date: Wed, 13 Jul 2022 11:12:36 +0200
|
||||||
|
Subject: [PATCH] ci: limit which env variables we pass through `sudo`
|
||||||
|
|
||||||
|
to work around #23987.
|
||||||
|
|
||||||
|
(cherry picked from commit d46e7c7cfd6c286a38298c067f16ac784c2a26f0)
|
||||||
|
|
||||||
|
Related: #2087677
|
||||||
|
---
|
||||||
|
.github/workflows/unit_tests.yml | 10 ++++++++--
|
||||||
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml
|
||||||
|
index 2afde5d59d..58b7b7cdb2 100644
|
||||||
|
--- a/.github/workflows/unit_tests.yml
|
||||||
|
+++ b/.github/workflows/unit_tests.yml
|
||||||
|
@@ -28,8 +28,14 @@ jobs:
|
||||||
|
- name: Repository checkout
|
||||||
|
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||||
|
- name: Install build dependencies
|
||||||
|
- run: sudo -E .github/workflows/unit_tests.sh SETUP
|
||||||
|
+ run: |
|
||||||
|
+ # Drop XDG_* stuff from /etc/environment, so we don't get the user
|
||||||
|
+ # XDG_* variables when running under sudo
|
||||||
|
+ sudo sed -i '/^XDG_/d' /etc/environment
|
||||||
|
+ # Pass only specific env variables through sudo, to avoid having
|
||||||
|
+ # the already existing XDG_* stuff on the "other side"
|
||||||
|
+ sudo --preserve-env=CRYPTOLIB,GITHUB_ACTIONS,CI .github/workflows/unit_tests.sh SETUP
|
||||||
|
- name: Build & test (${{ matrix.run_phase }}-${{ matrix.cryptolib }})
|
||||||
|
- run: sudo -E .github/workflows/unit_tests.sh RUN_${{ matrix.run_phase }}
|
||||||
|
+ run: sudo --preserve-env=CRYPTOLIB,GITHUB_ACTIONS,CI .github/workflows/unit_tests.sh RUN_${{ matrix.run_phase }}
|
||||||
|
env:
|
||||||
|
CRYPTOLIB: ${{ matrix.cryptolib }}
|
@ -0,0 +1,27 @@
|
|||||||
|
From 98d9cc40b6c159af8b44c9b54c2bf1af56c43a3c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daan De Meyer <daan.j.demeyer@gmail.com>
|
||||||
|
Date: Mon, 9 May 2022 09:50:32 +0200
|
||||||
|
Subject: [PATCH] shared: Fix memory leak in bus_append_execute_property()
|
||||||
|
|
||||||
|
Fixes #23317
|
||||||
|
|
||||||
|
(cherry picked from commit 2aaf6d407e8541985a15b7106abf6fbdfed0766a)
|
||||||
|
|
||||||
|
Related: #2087677
|
||||||
|
---
|
||||||
|
src/shared/bus-unit-util.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
|
||||||
|
index dcce530c99..ef134bcee4 100644
|
||||||
|
--- a/src/shared/bus-unit-util.c
|
||||||
|
+++ b/src/shared/bus-unit-util.c
|
||||||
|
@@ -1952,7 +1952,7 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con
|
||||||
|
path_simplify(source);
|
||||||
|
|
||||||
|
if (isempty(destination)) {
|
||||||
|
- r = strv_extend(&sources, TAKE_PTR(source));
|
||||||
|
+ r = strv_consume(&sources, TAKE_PTR(source));
|
||||||
|
if (r < 0)
|
||||||
|
return bus_log_create_error(r);
|
||||||
|
} else {
|
@ -21,7 +21,7 @@
|
|||||||
Name: systemd
|
Name: systemd
|
||||||
Url: https://www.freedesktop.org/wiki/Software/systemd
|
Url: https://www.freedesktop.org/wiki/Software/systemd
|
||||||
Version: 250
|
Version: 250
|
||||||
Release: 6%{?dist}
|
Release: 6%{?dist}.1
|
||||||
# For a breakdown of the licensing, see README
|
# For a breakdown of the licensing, see README
|
||||||
License: LGPLv2+ and MIT and GPLv2+
|
License: LGPLv2+ and MIT and GPLv2+
|
||||||
Summary: System and Service Manager
|
Summary: System and Service Manager
|
||||||
@ -133,6 +133,10 @@ Patch0052: 0052-kernel-install-search-harder-for-kernel-image-initrd.patch
|
|||||||
Patch0053: 0053-kernel-install-add-new-inspect-verb-showing-paths-an.patch
|
Patch0053: 0053-kernel-install-add-new-inspect-verb-showing-paths-an.patch
|
||||||
Patch0054: 0054-bus-Use-OrderedSet-for-introspection.patch
|
Patch0054: 0054-bus-Use-OrderedSet-for-introspection.patch
|
||||||
Patch0055: 0055-udev-net_id-avoid-slot-based-names-only-for-single-f.patch
|
Patch0055: 0055-udev-net_id-avoid-slot-based-names-only-for-single-f.patch
|
||||||
|
Patch0056: 0056-shutdown-get-only-active-md-arrays.patch
|
||||||
|
Patch0057: 0057-test-lvm-2.03.15-dropped-the-static-autoactivation.patch
|
||||||
|
Patch0058: 0058-ci-limit-which-env-variables-we-pass-through-sudo.patch
|
||||||
|
Patch0059: 0059-shared-Fix-memory-leak-in-bus_append_execute_propert.patch
|
||||||
|
|
||||||
# Downstream-only patches (9000–9999)
|
# Downstream-only patches (9000–9999)
|
||||||
|
|
||||||
@ -914,6 +918,12 @@ getent passwd systemd-oom &>/dev/null || useradd -r -l -g systemd-oom -d / -s /s
|
|||||||
%files standalone-sysusers -f .file-list-standalone-sysusers
|
%files standalone-sysusers -f .file-list-standalone-sysusers
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 20 2022 systemd maintenance team <systemd-maint@redhat.com> - 250-6.1
|
||||||
|
- shutdown: get only active md arrays. (#2087677)
|
||||||
|
- test: lvm 2.03.15 dropped the static autoactivation (#2087677)
|
||||||
|
- ci: limit which env variables we pass through `sudo` (#2087677)
|
||||||
|
- shared: Fix memory leak in bus_append_execute_property() (#2087677)
|
||||||
|
|
||||||
* Thu Apr 07 2022 systemd maintenance team <systemd-maint@redhat.com> - 250-6
|
* Thu Apr 07 2022 systemd maintenance team <systemd-maint@redhat.com> - 250-6
|
||||||
- udev/net_id: avoid slot based names only for single function devices (#2070097)
|
- udev/net_id: avoid slot based names only for single function devices (#2070097)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user