systemd-215-14

- Fixed booting into a RO NFS root
Resolves: rhbz#1133814
This commit is contained in:
Harald Hoyer 2014-09-03 13:41:18 +02:00
parent e8e6a0c6f5
commit e139c527b2
3 changed files with 75 additions and 1 deletions

View File

@ -0,0 +1,41 @@
From d518b11f1023c52183c5e05cee7fd29b5d7bbea8 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 3 Sep 2014 13:22:40 +0200
Subject: [PATCH] base_filesystem_create: do not try to create "/root" if it
exists
The check, if the directory/file already exists is only executed, if
there is a symlink target specified. In case of "/root", there is none,
so it is unconditionally tried to create the directory.
In case of a readonly filesystem, errno != EEXIST, but errno == EROFS,
so base_filesystem_create() and switch_root does not succeed.
This patch checks for existance not only in the symlink case.
(cherry picked from commit 6f4f8056d3f972c1e6ee7f5fc40ed283fd93152a)
---
src/shared/base-filesystem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
index addd26c..ba8b829 100644
--- a/src/shared/base-filesystem.c
+++ b/src/shared/base-filesystem.c
@@ -62,13 +62,13 @@ int base_filesystem_create(const char *root) {
return -errno;
for (i = 0; i < ELEMENTSOF(table); i ++) {
+ if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+ continue;
+
if (table[i].target) {
const char *target = NULL;
const char *s;
- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
- continue;
-
/* check if one of the targets exists */
NULSTR_FOREACH(s, table[i].target) {
if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)

View File

@ -0,0 +1,27 @@
From acdc59d98a6ab4cd40bab6fc9486478b453cbcfb Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 3 Sep 2014 13:28:31 +0200
Subject: [PATCH] initrd-parse-etc.service: ignore return code of daemon-reload
It seems the return code of systemctl daemon-reload can be !=0 in some
circumstances, which causes a failure of the unit and breaks booting in
the initrd.
(cherry picked from commit f3b8fbb1da6519e14985ea444f8304673d20ad3f)
---
units/initrd-parse-etc.service.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/units/initrd-parse-etc.service.in b/units/initrd-parse-etc.service.in
index c0b2543..42c059b 100644
--- a/units/initrd-parse-etc.service.in
+++ b/units/initrd-parse-etc.service.in
@@ -16,7 +16,7 @@ ConditionPathExists=/etc/initrd-release
[Service]
Type=oneshot
-ExecStartPre=@rootbindir@/systemctl daemon-reload
+ExecStartPre=-@rootbindir@/systemctl daemon-reload
# we have to retrigger initrd-fs.target after daemon-reload
ExecStart=-@rootbindir@/systemctl --no-block start initrd-fs.target
ExecStart=@rootbindir@/systemctl --no-block start initrd-cleanup.service

View File

@ -16,7 +16,7 @@
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 215
Release: 13%{?gitcommit:.git%{gitcommit}}%{?dist}
Release: 14%{?gitcommit:.git%{gitcommit}}%{?dist}
# For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+
Summary: A System and Service Manager
@ -122,6 +122,8 @@ Patch080: 0080-bash-completion-p-option-for-journalctl.patch
Patch081: 0081-sysusers-fix-selinux-context-of-backup-files.patch
Patch082: 0082-update-done-set-proper-selinux-context-for-.updated.patch
Patch083: 0083-Added-arch-tuple-for-PPC64LE.patch
Patch084: 0084-base_filesystem_create-do-not-try-to-create-root-if-.patch
Patch085: 0085-initrd-parse-etc.service-ignore-return-code-of-daemo.patch
# Presently not accepted upstream, but we disable systemd-resolved in
# the presets anyways, and this unbreaks anaconda/lorax/livecd-creator
@ -874,6 +876,10 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd
%{_datadir}/systemd/gatewayd
%changelog
* Wed Sep 03 2014 Harald Hoyer <harald@redhat.com> 215-14
- Fixed booting into a RO NFS root
Resolves: rhbz#1133814
* Thu Aug 28 2014 Peter Robinson <pbrobinson@fedoraproject.org> 215-13
- Drop no LTO build option for aarch64/s390 now it's fixed in binutils (RHBZ 1091611)