Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/skeleton-init-systemd: create a symlink /var/run to ../run
Date: Thu, 22 Feb 2018 23:10:14 +0100	[thread overview]
Message-ID: <20180222221014.19584-1-romain.naour@gmail.com> (raw)

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

             reply	other threads:[~2018-02-22 22:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 22:10 Romain Naour [this message]
2018-02-23 18:25 ` [Buildroot] [PATCH] package/skeleton-init-systemd: create a symlink /var/run to ../run 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180222221014.19584-1-romain.naour@gmail.com \
    --to=romain.naour@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox