Merge ~enr0n/ubuntu/+source/systemd:ubuntu-jammy into ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-jammy

Proposed by Nick Rosbrook
Status: Merged
Merged at revision: 231aae0993d7533796dfa07d2e64bdd3936282a3
Proposed branch: ~enr0n/ubuntu/+source/systemd:ubuntu-jammy
Merge into: ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-jammy
Diff against target: 105 lines (+72/-1)
4 files modified
debian/changelog (+6/-1)
debian/patches/lp1979952-Revert-core-mount-fail-early-if-directory-cannot-be-creat.patch (+33/-0)
debian/patches/lp1979952-core-mount-downgrade-log-level-about-several-mkdir-failur.patch (+31/-0)
debian/patches/series (+2/-0)
Reviewer Review Type Date Requested Status
Lukas Märdian Approve
Review via email: mp+428423@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Nick Rosbrook (enr0n) wrote :

I will link PPA autopkgtest results when able.

Revision history for this message
Lukas Märdian (slyon) wrote :

+1, matches the upstream fixes and PPA build is green (https://launchpad.net/~enr0n/+archive/ubuntu/systemd-249/+packages).

We can merge this after a passing PPA autopkgtest log is provided.

review: Approve
Revision history for this message
Lukas Märdian (slyon) wrote :

Ah, one more note: We still need to prepare the SRU template in LP: #1979952, we should do this before merging, too.

Revision history for this message
Nick Rosbrook (enr0n) wrote :
Revision history for this message
Lukas Märdian (slyon) wrote :

Thanks, merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 2892adb..da2d281 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -16,8 +16,13 @@ systemd (249.11-0ubuntu3.5) UNRELEASED; urgency=medium
6 * pstore: do not try to load mtdpstore (LP: #1981622)
7 File: debian/patches/lp1978079-efi-pstore-not-cleared-on-boot.patch
8 https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=15225032c3657f5906ee49d48929f9295a8664a0
9+ * core/mount: downgrade log level about several mkdir failures (LP: #1979952)
10+ Files:
11+ - debian/patches/lp1979952-Revert-core-mount-fail-early-if-directory-cannot-be-creat.patch
12+ - debian/patches/lp1979952-core-mount-downgrade-log-level-about-several-mkdir-failur.patch
13+ https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=ee8cfcf500698fab2e990de291ecf4c3ab87a4ae
14
15- -- Nick Rosbrook <nick.rosbrook@canonical.com> Fri, 22 Jul 2022 15:27:16 -0400
16+ -- Nick Rosbrook <nick.rosbrook@canonical.com> Tue, 16 Aug 2022 17:45:46 -0400
17
18 systemd (249.11-0ubuntu3.4) jammy; urgency=medium
19
20diff --git a/debian/patches/lp1979952-Revert-core-mount-fail-early-if-directory-cannot-be-creat.patch b/debian/patches/lp1979952-Revert-core-mount-fail-early-if-directory-cannot-be-creat.patch
21new file mode 100644
22index 0000000..3469980
23--- /dev/null
24+++ b/debian/patches/lp1979952-Revert-core-mount-fail-early-if-directory-cannot-be-creat.patch
25@@ -0,0 +1,33 @@
26+From: Yu Watanabe <watanabe.yu+github@gmail.com>
27+Date: Tue, 26 Jul 2022 23:15:01 +0900
28+Subject: Revert "core/mount: fail early if directory cannot be created"
29+
30+Origin: upstream, https://github.com/systemd/systemd/commit/e5e6b7c225987551ebda14d2d7feadb66a64fb3c
31+Bug-Ubuntu: https://launchpad.net/bugs/1979952
32+
33+This reverts commit e4de58c8231e47509ffeb3aa47620ca42f22d7f6.
34+
35+If mkdir() fails and the path does exist, then the later mount
36+command fails anyway. Hence, it is not necessary to fail here.
37+
38+Fixes #24120.
39+---
40+ src/core/mount.c | 4 +---
41+ 1 file changed, 1 insertion(+), 3 deletions(-)
42+
43+diff --git a/src/core/mount.c b/src/core/mount.c
44+index 673eec3..af39db2 100644
45+--- a/src/core/mount.c
46++++ b/src/core/mount.c
47+@@ -1035,10 +1035,8 @@ static void mount_enter_mounting(Mount *m) {
48+ r = mkdir_p_label(p->what, m->directory_mode);
49+ /* mkdir_p_label() can return -EEXIST if the target path exists and is not a directory - which is
50+ * totally OK, in case the user wants us to overmount a non-directory inode. */
51+- if (r < 0 && r != -EEXIST) {
52++ if (r < 0 && r != -EEXIST)
53+ log_unit_error_errno(UNIT(m), r, "Failed to make bind mount source '%s': %m", p->what);
54+- goto fail;
55+- }
56+ }
57+
58+ if (p) {
59diff --git a/debian/patches/lp1979952-core-mount-downgrade-log-level-about-several-mkdir-failur.patch b/debian/patches/lp1979952-core-mount-downgrade-log-level-about-several-mkdir-failur.patch
60new file mode 100644
61index 0000000..5f2e1cc
62--- /dev/null
63+++ b/debian/patches/lp1979952-core-mount-downgrade-log-level-about-several-mkdir-failur.patch
64@@ -0,0 +1,31 @@
65+From: Yu Watanabe <watanabe.yu+github@gmail.com>
66+Date: Tue, 26 Jul 2022 23:23:01 +0900
67+Subject: core/mount: downgrade log level about several mkdir failures
68+
69+Origin: upstream, https://github.com/systemd/systemd/commit/574febda6b0e00aae164b18b70aa80744d950500
70+Bug-Ubuntu: https://launchpad.net/bugs/1979952
71+
72+---
73+ src/core/mount.c | 8 ++++++--
74+ 1 file changed, 6 insertions(+), 2 deletions(-)
75+
76+diff --git a/src/core/mount.c b/src/core/mount.c
77+index af39db2..ca8a6cf 100644
78+--- a/src/core/mount.c
79++++ b/src/core/mount.c
80+@@ -1034,9 +1034,13 @@ static void mount_enter_mounting(Mount *m) {
81+ if (p && mount_is_bind(p)) {
82+ r = mkdir_p_label(p->what, m->directory_mode);
83+ /* mkdir_p_label() can return -EEXIST if the target path exists and is not a directory - which is
84+- * totally OK, in case the user wants us to overmount a non-directory inode. */
85++ * totally OK, in case the user wants us to overmount a non-directory inode. Also -EROFS can be
86++ * returned on read-only filesystem. Moreover, -EACCES (and also maybe -EPERM?) may be returned
87++ * when the path is on NFS. See issue #24120. All such errors will be logged in the debug level. */
88+ if (r < 0 && r != -EEXIST)
89+- log_unit_error_errno(UNIT(m), r, "Failed to make bind mount source '%s': %m", p->what);
90++ log_unit_full_errno(UNIT(m),
91++ (r == -EROFS || ERRNO_IS_PRIVILEGE(r)) ? LOG_DEBUG : LOG_WARNING,
92++ r, "Failed to make bind mount source '%s', ignoring: %m", p->what);
93+ }
94+
95+ if (p) {
96diff --git a/debian/patches/series b/debian/patches/series
97index 3ac0c71..eb05e93 100644
98--- a/debian/patches/series
99+++ b/debian/patches/series
100@@ -93,3 +93,5 @@ lp1975667-Ensure-dns_search_domain_unlink_marked-removes-all-marked.patch
101 lp1981042-core-firstboot-workaround-timezone-issues-caused-by-Ubunt.patch
102 lp1979951-network-do-not-remove-localhost-address.patch
103 lp1982462-units-remove-the-restart-limit-on-the-modprobe-.service.patch
104+lp1979952-Revert-core-mount-fail-early-if-directory-cannot-be-creat.patch
105+lp1979952-core-mount-downgrade-log-level-about-several-mkdir-failur.patch

Subscribers

People subscribed via source and target branches