Backport another patch for systemd journal

Resolves: #1265295
This commit is contained in:
Colin Walters 2016-09-20 17:41:02 -04:00
parent af4b821a66
commit 8cc78ff4ea
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,41 @@
From 318430dc700973fbc54c5469343c45aaab4701a7 Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <jlebon@redhat.com>
Date: Tue, 20 Sep 2016 11:45:57 -0400
Subject: [PATCH] ostree_sysroot_init_osname: also create /var/log
/var/log is another one of those core directories that should be made
available and properly labeled during early boot before tmpfiles.d
starts up.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1265295
Closes: #513
Approved by: cgwalters
---
src/libostree/ostree-sysroot.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index de92691..ee87128 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -1487,6 +1487,16 @@ ostree_sysroot_init_osname (OstreeSysroot *self,
goto out;
}
+ /* This needs to be available and properly labeled early during the boot
+ * process (before tmpfiles.d kicks in), so that journald can flush logs from
+ * the first boot there. https://bugzilla.redhat.com/show_bug.cgi?id=1265295
+ * */
+ if (mkdirat (dfd, "var/log", 0755) < 0)
+ {
+ glnx_set_prefix_error_from_errno (error, "Creating %s", "var/log");
+ goto out;
+ }
+
if (symlinkat ("../run", dfd, "var/run") < 0)
{
glnx_set_prefix_error_from_errno (error, "Symlinking %s", "var/run");
--
2.7.4

View File

@ -1,7 +1,7 @@
Summary: Tool for managing bootable, immutable filesystem trees
Name: ostree
Version: 2016.10
Release: 6%{?dist}
Release: 8%{?dist}
#VCS: git:git://git.gnome.org/ostree
Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
Source1: 91-ostree.preset
@ -13,6 +13,7 @@ Patch0: 0001-pull-Do-allow-executing-deltas-when-mirroring-into-b.patch
Patch2: 0001-ostree-remount-Explicitly-set-tmp-to-01777.patch
Patch3: 0001-boot-Ensure-we-remount-var-writable-before-systemd-d.patch
Patch4: 0001-ostree_sysroot_init_osname-also-create-var-log.patch
BuildRequires: git
# We always run autogen.sh
@ -129,6 +130,10 @@ install -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system-pres
%endif
%changelog
* Tue Sep 20 2016 walters@redhat.com - 2016.10-8
- Backport another patch for systemd journal
Resolves: #1265295
* Fri Sep 16 2016 walters@verbum.org - 2016.10-6
- Set --with-dracut=yesbutnoconf
Resolves: #1331369