[Buildroot] BUG: systemd/dbus broken in -rc1

Baruch Siach baruch at tkos.co.il
Wed Feb 21 17:22:02 UTC 2018


Hi Jérémy,

On Wed, Feb 21, 2018 at 01:42:32PM +0100, Jérémy Rosen wrote:
> I have a systemd course where I use a minimal buildroot system as my
> exercise machine.
> It is a very minimal configuration based on 86_64+systemd+not much else.
> 
> since the update of systemd to v237 there has been various problems related
> to the
> connexion between systemd and dbus. The easiest way to test is to run
> "busctl" on
> the system. It won't work complaining about "no such file or directory"
> 
> This bug affects more or less all systemd-provided utilities, including
> logind and systemd
> itself.
> 
> After investigating, the problem is that systemd looks for the dbus socket
> in /run/dbus instead of
> /var/run/dbus which is not where dbus puts the socket.
> 
> However, systemd mandates that /run be a symlink to /var/run. The file
> /usr/lib/tmpfiles.d/var.con
> will create automatically that symlink at bootup. So in theory, looking at
> the socket in /run should
> work too.
> 
> However, there is a second stacked bug. dbus creates, at install time, the
> directory /var/run/dbus.
> This breaks tmpfile.d which will not create the symlink since the directory
> already exists.
> Creating a file in /var/run makes no sense in the first place since that
> directory is a tmpfs and will
> be emptied at reboot time
> 
> Now, I am not sure what to do from here on the buildroot side. I think it
> could be usefull to have
> some sort of security to check that /var/run doesn't exist and yell loudly
> if it does, but I don't know
> how to implement that
> 
> An other approch would be for the systemd skeleton to create /var/run as a
> symlink to ../run
> (not /run) in order to let stuff be installed. The tmpfs mount at boot time
> would hide the content,
> but it should work
> 
> To sum it up :
> * systemd should look for the socket in /var/run :
> https://github.com/systemd/systemd/issues/8197
> * dbus should not create the /run/dbus directory in the first place : bug to
> be opened
> * buildroot needs to make sure /var/run is not created or is a correct
> symlink.
> 
> I'd gladly take advice on what to do to move forward on that issue...

The patch of Jan Kundrát at http://patchwork.ozlabs.org/patch/870834/ might 
solve your last issue. Not sure about the rest.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -



More information about the buildroot mailing list