summaryrefslogtreecommitdiffstats
path: root/debian/patches/progress-linux
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:31:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:31:14 +0000
commit61b1fef191e25d1ff90de497bec1806fa6d72308 (patch)
treeb8dd3077a9dfc5624cbf659f861eadfaf697c034 /debian/patches/progress-linux
parentReserving virtual terminal on position 2 in logind. (diff)
downloadsystemd-61b1fef191e25d1ff90de497bec1806fa6d72308.tar.xz
systemd-61b1fef191e25d1ff90de497bec1806fa6d72308.zip
Mounting /etc/hostname as /run/host/hostname in systemd-nspawn container.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/progress-linux')
-rw-r--r--debian/patches/progress-linux/0005-nspawn-hostname.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/debian/patches/progress-linux/0005-nspawn-hostname.patch b/debian/patches/progress-linux/0005-nspawn-hostname.patch
new file mode 100644
index 0000000..275ed17
--- /dev/null
+++ b/debian/patches/progress-linux/0005-nspawn-hostname.patch
@@ -0,0 +1,17 @@
+Author: Daniel Baumann <daniel.baumann@progress-linux.org>
+Description: Mount /etc/hostname as /run/host/hostname in systemd-nspawn container.
+
+diff -Naurp systemd.orig/src/nspawn/nspawn-mount.c systemd/src/nspawn/nspawn-mount.c
+--- systemd.orig/src/nspawn/nspawn-mount.c
++++ systemd/src/nspawn/nspawn-mount.c
+@@ -553,6 +553,10 @@ int mount_all(const char *dest,
+ MOUNT_FATAL|MOUNT_MKDIR },
+ { "/run/host", "/run/host", NULL, NULL, MS_BIND,
+ MOUNT_FATAL|MOUNT_MKDIR|MOUNT_PREFIX_ROOT }, /* Prepare this so that we can make it read-only when we are done */
++ { "/etc/hostname", "/run/host/hostname", NULL, NULL, MS_BIND,
++ MOUNT_TOUCH }, /* As per kernel interface requirements, bind mount first (creating mount points) and make read-only later */
++ { NULL, "/run/host/hostname", NULL, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT,
++ MOUNT_FATAL },
+ { "/etc/os-release", "/run/host/os-release", NULL, NULL, MS_BIND,
+ MOUNT_TOUCH }, /* As per kernel interface requirements, bind mount first (creating mount points) and make read-only later */
+ { "/usr/lib/os-release", "/run/host/os-release", NULL, NULL, MS_BIND,