]> git.pld-linux.org Git - packages/systemd.git/commitdiff
initrd-fstab-generator.patchfix fstab-generator for dracut
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 5 Oct 2017 07:55:07 +0000 (09:55 +0200)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 5 Oct 2017 07:56:30 +0000 (09:56 +0200)
Fixes bug which causes dracut-generated initramfs to fail with 'cannot
mount /sysroot/sysroot/usr' on some systems.

https://github.com/systemd/systemd/pull/6411

initrd-fstab-generator.patch [new file with mode: 0644]
systemd.spec

diff --git a/initrd-fstab-generator.patch b/initrd-fstab-generator.patch
new file mode 100644 (file)
index 0000000..45b2fed
--- /dev/null
@@ -0,0 +1,29 @@
+From c7b2630c9154722e2295f3dbfbb19f3305676ecf Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald@redhat.com>
+Date: Thu, 20 Jul 2017 13:38:46 +0200
+Subject: [PATCH] call chase_symlinks without the /sysroot prefix
+
+In case fstab-generator is called in the initrd, chase_symlinks()
+returns with a canonical path "/sysroot/sysroot/<mountpoint>", if the
+"/sysroot" prefix is present in the path.
+
+This patch skips the "/sysroot" prefix for the chase_symlinks() call,
+because "/sysroot" is already the root directory and chase_symlinks()
+prepends the root directory in the canonical path returned.
+---
+ src/fstab-generator/fstab-generator.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
+index ea5ceb39ca..8fc4c8d179 100644
+--- a/src/fstab-generator/fstab-generator.c
++++ b/src/fstab-generator/fstab-generator.c
+@@ -526,7 +526,7 @@ static int parse_fstab(bool initrd) {
+                         continue;
+                 }
+-                where = initrd ? strappend("/sysroot/", me->mnt_dir) : strdup(me->mnt_dir);
++                where = strdup(me->mnt_dir);
+                 if (!where)
+                         return log_oom();
index 07f5d2e613446b7b8cbb520075424046e3a15062..0e34af1632e71eb5de2521ba0dfcd3bd34762d73 100644 (file)
@@ -26,7 +26,7 @@ Summary(pl.UTF-8):    systemd - zarządca systemu i usług dla Linuksa
 Name:          systemd
 # Verify ChangeLog and NEWS when updating (since there are incompatible/breaking changes very often)
 Version:       234
-Release:       2
+Release:       3
 Epoch:         1
 License:       GPL v2+ (udev), LGPL v2.1+ (the rest)
 Group:         Base
@@ -75,6 +75,7 @@ Patch14:      pld-pam-%{name}-user.patch
 Patch15:       %{name}-seccomp_disable_on_i386.patch
 Patch16:       %{name}-path.patch
 Patch17:       cryptsetup-fix-infinite-timeout-6486.patch
+Patch18:       initrd-fstab-generator.patch
 URL:           http://www.freedesktop.org/wiki/Software/systemd
 BuildRequires: acl-devel
 %{?with_audit:BuildRequires:   audit-libs-devel}
@@ -642,6 +643,7 @@ Uzupełnianie parametrów w zsh dla poleceń udev.
 %patch15 -p1
 %patch16 -p1
 %patch17 -p1
+%patch18 -p1
 
 cp -p %{SOURCE2} src/systemd_booted.c
 
This page took 0.433729 seconds and 4 git commands to generate.