forked from pool/systemd
f026ff3dde
- Add upstream patches 0001-Do-not-unescape-unit-names-in-Install-section.patch 0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch - Add upstream patch 1020-udev-keyboard-also-hook-into-change-events.patch - Add upstream patches to update keyboard data base 0001-keymap-Add-Lenovo-Enhanced-USB-Keyboard.patch 0002-keymap-Asus-EeePC-touchpad-toggle-key.patch - Add upstream patches 0001-nspawn-allow-to-bind-mount-journal-on-top-of-a-non-e.patch 0002-nspawn-restore-journal-directory-is-empty-check.patch 0003-core-never-consider-failure-when-reading-drop-ins-fa.patch 0004-socket-properly-handle-if-our-service-vanished-durin.patch - Add upstream patches 0001-Do-not-unescape-unit-names-in-Install-section.patch 0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch - Add upstream patch 1020-udev-keyboard-also-hook-into-change-events.patch - Add upstream patches to update keyboard data base 0001-keymap-Add-Lenovo-Enhanced-USB-Keyboard.patch 0002-keymap-Asus-EeePC-touchpad-toggle-key.patch - Add upstream patches 0001-nspawn-allow-to-bind-mount-journal-on-top-of-a-non-e.patch 0002-nspawn-restore-journal-directory-is-empty-check.patch 0003-core-never-consider-failure-when-reading-drop-ins-fa.patch OBS-URL: https://build.opensuse.org/request/show/235517 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=189
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From e6a4a517befe559adf6d1dbbadf425c3538849c9 Mon Sep 17 00:00:00 2001
|
|
From: Djalal Harouni <tixxdz@opendz.org>
|
|
Date: Fri, 11 Apr 2014 01:45:52 +0100
|
|
Subject: [PATCH] nspawn: allow to bind mount journal on top of a non empty
|
|
container journal dentry
|
|
|
|
Currently if nspawn was called with --link-journal=host or
|
|
--link-journal=auto and the right /var/log/journal/machine-id/ exists
|
|
then the bind mount the subdirectory into the container might fail due
|
|
to the ~/mycontainer/var/log/journal/machine-id/ of the container not
|
|
being empty.
|
|
|
|
There is no reason to check if the container journal subdir is empty
|
|
since there will be a bind mount on top of it. The user asked for a bind
|
|
mount so give it.
|
|
|
|
Note: a next call with --link-journal=guest may fail due to the
|
|
/var/log/journal/machine-id/ on the host not being empty.
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=76193
|
|
|
|
Reported-by: Tobias Hunger <tobias.hunger@gmail.com>
|
|
---
|
|
src/nspawn/nspawn.c | 5 -----
|
|
1 file changed, 5 deletions(-)
|
|
|
|
diff --git src/nspawn/nspawn.c src/nspawn/nspawn.c
|
|
index 9d9238f..ef84664 100644
|
|
--- src/nspawn/nspawn.c
|
|
+++ src/nspawn/nspawn.c
|
|
@@ -1143,11 +1143,6 @@ static int setup_journal(const char *directory) {
|
|
} else if (access(p, F_OK) < 0)
|
|
return 0;
|
|
|
|
- if (dir_is_empty(q) == 0) {
|
|
- log_error("%s not empty.", q);
|
|
- return -ENOTEMPTY;
|
|
- }
|
|
-
|
|
r = mkdir_p(q, 0755);
|
|
if (r < 0) {
|
|
log_error("Failed to create %s: %m", q);
|
|
--
|
|
1.7.9.2
|
|
|