Skip to contentSkip to conversation

dbus: fix system_bus_socket location

PATCH New Adam Duskett 3 participants 5 messages Feb 8, 2018 – Feb 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dbus: fix system_bus_socket location

systemd237 changed the default location it uses for system_bus_socket from /var/run/dbus/system_bus_socket to /run/dbus/system_bus_socket

see:
https://github.com/systemd/systemd/commit/15ca0a42c7db49146a7169dbcb0683f0836cf8c2

Change the default location for dbus from /var/run/dbus/system_bus_socket to /run/dbus/system_bus_socket to fix the issue.

---
 package/dbus/dbus.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/dbus/dbus.mk +1 -1
index 22ba22e17e..19f9b7ace8 100644
@@ -27,7 +27,7 @@ DBUS_CONF_OPTS = \
 	--disable-xml-docs \
 	--disable-doxygen-docs \
 	--with-xml=expat \
-	--with-system-socket=/var/run/dbus/system_bus_socket \
+	--with-system-socket=/run/dbus/system_bus_socket \
 	--with-system-pid-file=/var/run/messagebus.pid
 
 ifeq ($(BR2_STATIC_LIBS),y)
Signature · 1 line
2.14.3
#1 lore raw

PATCH 1/1 dbus: fix system_bus_socket location

Hi Adam,

Quoted 10 lines · Adam Duskett

systemd237 changed the default location it uses for system_bus_socket from /var/run/dbus/system_bus_socket to /run/dbus/system_bus_socket

see:
https://github.com/systemd/systemd/commit/15ca0a42c7db49146a7169dbcb0683f0836cf8c2

Change the default location for dbus from /var/run/dbus/system_bus_socket to /run/dbus/system_bus_socket to fix the issue.

Jan Kundr?t suggested a different solution.

http://patchwork.ozlabs.org/patch/870834/

baruch

Quoted 17 lines
---
 package/dbus/dbus.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/dbus/dbus.mk +1 -1
index 22ba22e17e..19f9b7ace8 100644
@@ -27,7 +27,7 @@ DBUS_CONF_OPTS = \
 	--disable-xml-docs \
 	--disable-doxygen-docs \
 	--with-xml=expat \
-	--with-system-socket=/var/run/dbus/system_bus_socket \
+	--with-system-socket=/run/dbus/system_bus_socket \
 	--with-system-pid-file=/var/run/messagebus.pid
 
 ifeq ($(BR2_STATIC_LIBS),y)
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 dbus: fix system_bus_socket location

Hi Baruch;

Quoted 12 lines · Baruch Siach

Hi Adam,

Quoted 9 lines · Adam Duskett

systemd237 changed the default location it uses for system_bus_socket from /var/run/dbus/system_bus_socket to /run/dbus/system_bus_socket

see:
https://github.com/systemd/systemd/commit/15ca0a42c7db49146a7169dbcb0683f0836cf8c2

Change the default location for dbus from /var/run/dbus/system_bus_socket to /run/dbus/system_bus_socket to fix the issue.

Quoted 8 lines
Quoted 1 line

Jan Kundr?t suggested a different solution.

http://patchwork.ozlabs.org/patch/870834/

baruch

That solution won't work on a rootfs with that is read/write. My own filing system doesn't have a symlink from /var/run to ./run

Perhaps it's just me?

Quoted 22 lines
Quoted 9 lines
---
 package/dbus/dbus.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/dbus/dbus.mk +0 -0
index 22ba22e17e..19f9b7ace8 100644

package/dbus/dbus.mk DBUS_CONF_OPTS = \ · line 33

Quoted 8 lines
package/dbus/dbus.mk +1 -1
@@ -27,7 +27,7 @@ DBUS_CONF_OPTS = \
      --disable-xml-docs \
      --disable-doxygen-docs \
      --with-xml=expat \
-     --with-system-socket=/var/run/dbus/system_bus_socket \
+     --with-system-socket=/run/dbus/system_bus_socket \
      --with-system-pid-file=/var/run/messagebus.pid
 
 ifeq ($(BR2_STATIC_LIBS),y)

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

#3 lore raw

PATCH 1/1 dbus: fix system_bus_socket location

Quoted 4 lines

That solution won't work on a rootfs with that is read/write. My own filing system doesn't have a symlink from /var/run to ./run

Perhaps it's just me?

Hi Adam, according to both D-Bus and systemd upstreams, having separate /run from /var/run is broken. New enough systemd also warns against that.

Just changing the D-Bus socket location won't work. My patch links a bugreport where people have mentioned that the /var/run/dbus essentially cannot change because it's hard-coded in other SW as well.

Can you investigate which part creates /run and /var/run on your configuration of buildroot, but with a fresh-from-scratch build? Grepping for "/run" in build/packages-file-list.txt should answer that.

Cheers,
Jan

#4 lore raw

PATCH 1/1 dbus: fix system_bus_socket location

Hey Jan;

I am going to reject my own patch. After more research, it seems like I was using a very
old setup script that removed a bunch of symlinks from /var and setup them as actual
folders due to selinux context concerns.

Newer versions of selinux handle these symlinks fine. So in the end, my setup was broken.

Thanks!

Adam

Quoted 20 lines · Jan Kundr?t
Quoted 5 lines

That solution won't work on a rootfs with that is read/write. My own filing
system doesn't have a symlink from /var/run to ./run

Perhaps it's just me?

Hi Adam, according to both D-Bus and systemd upstreams, having separate /run from /var/run is broken. New enough systemd also warns against that.

Just changing the D-Bus socket location won't work. My patch links a bugreport where people have mentioned that the /var/run/dbus essentially cannot change because it's hard-coded in other SW as well.

Can you investigate which part creates /run and /var/run on your configuration of buildroot, but with a fresh-from-scratch build? Grepping for "/run" in build/packages-file-list.txt should answer that.

Cheers,
Jan