Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/skeleton-init-systemd: create a symlink /var/run to ../run
@ 2018-02-22 22:10 Romain Naour
  2018-02-23 18:25 ` Trent Piepho
  0 siblings, 1 reply; 7+ messages in thread
From: Romain Naour @ 2018-02-22 22:10 UTC (permalink / raw)
  To: buildroot

As reported by J?r?my Rosen [1] and Jan Kundr?t (RO case)[2], systemd
looks for the dbus socket in /run/dbus instead of /var/run/dbus which
is not where dbus puts the socket. This is a change introduced with
the last version bump v237 [3].

The file /usr/lib/tmpfiles.d/var.con will create automatically that
symlink at bootup /var/run doesn't exist yet. But dbus creates, at
install time, the directory /var/run/dbus without taking care of
/var/run. So we end up with two different directories /run and
/var/run. This bug affects more or less all systemd-provided
utilities, including logind and systemd itself.

This patch create the correct symlink run -> ../run when systemd
is used as init system.

[1] http://lists.busybox.net/pipermail/buildroot/2018-February/214129.html
[2] http://lists.busybox.net/pipermail/buildroot/2018-February/213420.html
[3] https://github.com/systemd/systemd/commit/15ca0a42c7db49146a7169dbcb0683f0836cf8c2

Reported-by: J?r?my Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/skeleton-init-systemd/skeleton-init-systemd.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/skeleton-init-systemd/skeleton-init-systemd.mk b/package/skeleton-init-systemd/skeleton-init-systemd.mk
index 95142904f5..d435aa54ee 100644
--- a/package/skeleton-init-systemd/skeleton-init-systemd.mk
+++ b/package/skeleton-init-systemd/skeleton-init-systemd.mk
@@ -20,6 +20,7 @@ ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
 define SKELETON_INIT_SYSTEMD_ROOT_RO_OR_RW
 	echo "/dev/root / auto rw 0 1" >$(TARGET_DIR)/etc/fstab
 	mkdir -p $(TARGET_DIR)/var
+	ln -s ../run $(TARGET_DIR)/var/run
 endef
 
 else
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-27 21:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-22 22:10 [Buildroot] [PATCH] package/skeleton-init-systemd: create a symlink /var/run to ../run Romain Naour
2018-02-23 18:25 ` Trent Piepho
2018-02-24 18:15   ` Arnout Vandecappelle
2018-02-27 19:28     ` Trent Piepho
2018-02-25 19:16   ` Romain Naour
2018-02-27 18:37     ` Trent Piepho
2018-02-27 21:24       ` Pierre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox