From 2d8ec0c8ee4c28c58dafbeee920df3e4f9567b5c Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 10 Aug 2022 17:01:02 +0200 Subject: [PATCH] Use dbus-broker as default D-Bus broker (#2053) * Bump buildroot * buildroot 99b62b8bd3...97287bbebf (3): > package/dbus-broker: bump to release 32 > package/dbus-broker: new package > Merge pull request #3 from home-assistant/2022.02.x-haos-cgroup-v2 * Use dbus-broker as default D-Bus broker The dbus-broker (Linux D-Bus Message Broker) aims to be a high performance and reliable D-Bus broker which can be used as a drop in replacement to the reference implementation D-Bus broker. In tests it showed significantly better performance especially when routing BLE messages. * Allow dbus-broker to start early For HAOS device wipe feature we need haos-agent.service and udisk2.service early. Both require a working D-Bus broker. The options PrivateTmp and PrivateDevices add additional After= orderings which doesn't allow dbus-broker to be started early. * Fix D-Bus dependency D-Bus services should just depend on dbus.socket. --- buildroot | 2 +- buildroot-external/configs/generic_aarch64_defconfig | 1 + buildroot-external/configs/generic_x86_64_defconfig | 1 + buildroot-external/configs/khadas_vim3_defconfig | 1 + buildroot-external/configs/odroid_c2_defconfig | 1 + buildroot-external/configs/odroid_c4_defconfig | 1 + buildroot-external/configs/odroid_n2_defconfig | 1 + buildroot-external/configs/odroid_xu4_defconfig | 1 + buildroot-external/configs/ova_defconfig | 1 + buildroot-external/configs/rpi2_defconfig | 1 + buildroot-external/configs/rpi3_64_defconfig | 1 + buildroot-external/configs/rpi3_defconfig | 1 + buildroot-external/configs/rpi4_64_defconfig | 1 + buildroot-external/configs/rpi4_defconfig | 1 + buildroot-external/configs/tinker_defconfig | 1 + buildroot-external/configs/yellow_defconfig | 1 + .../etc/systemd/system/dbus-broker.service.d/haos.conf | 3 +++ .../usr/lib/systemd/system/hassos-supervisor.service | 4 ++-- 18 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 buildroot-external/rootfs-overlay/etc/systemd/system/dbus-broker.service.d/haos.conf diff --git a/buildroot b/buildroot index 99b62b8bd..97287bbeb 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 99b62b8bd3ceb58bcd003b8ac15c5ae92122b5c8 +Subproject commit 97287bbebf63f48b9f9b28f52b42acb42e75cac5 diff --git a/buildroot-external/configs/generic_aarch64_defconfig b/buildroot-external/configs/generic_aarch64_defconfig index b975dbe31..ff3ce5481 100644 --- a/buildroot-external/configs/generic_aarch64_defconfig +++ b/buildroot-external/configs/generic_aarch64_defconfig @@ -72,6 +72,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/generic_x86_64_defconfig b/buildroot-external/configs/generic_x86_64_defconfig index cf8c91361..7c6de27bd 100644 --- a/buildroot-external/configs/generic_x86_64_defconfig +++ b/buildroot-external/configs/generic_x86_64_defconfig @@ -72,6 +72,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/khadas_vim3_defconfig b/buildroot-external/configs/khadas_vim3_defconfig index 062029eca..cca921d10 100644 --- a/buildroot-external/configs/khadas_vim3_defconfig +++ b/buildroot-external/configs/khadas_vim3_defconfig @@ -60,6 +60,7 @@ BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/odroid_c2_defconfig b/buildroot-external/configs/odroid_c2_defconfig index a4ceec6e6..ff489755e 100644 --- a/buildroot-external/configs/odroid_c2_defconfig +++ b/buildroot-external/configs/odroid_c2_defconfig @@ -60,6 +60,7 @@ BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/odroid_c4_defconfig b/buildroot-external/configs/odroid_c4_defconfig index 1c65bac04..d7351d28a 100644 --- a/buildroot-external/configs/odroid_c4_defconfig +++ b/buildroot-external/configs/odroid_c4_defconfig @@ -58,6 +58,7 @@ BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index 78e6706a2..b712207f4 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -60,6 +60,7 @@ BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/odroid_xu4_defconfig b/buildroot-external/configs/odroid_xu4_defconfig index bdbef6eee..5805acfe9 100644 --- a/buildroot-external/configs/odroid_xu4_defconfig +++ b/buildroot-external/configs/odroid_xu4_defconfig @@ -60,6 +60,7 @@ BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/ova_defconfig b/buildroot-external/configs/ova_defconfig index 906cee68d..0832a7f96 100644 --- a/buildroot-external/configs/ova_defconfig +++ b/buildroot-external/configs/ova_defconfig @@ -72,6 +72,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/rpi2_defconfig b/buildroot-external/configs/rpi2_defconfig index 64b3f4c12..78a0a7241 100644 --- a/buildroot-external/configs/rpi2_defconfig +++ b/buildroot-external/configs/rpi2_defconfig @@ -63,6 +63,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/rpi3_64_defconfig b/buildroot-external/configs/rpi3_64_defconfig index 58664eed4..e422d55be 100644 --- a/buildroot-external/configs/rpi3_64_defconfig +++ b/buildroot-external/configs/rpi3_64_defconfig @@ -65,6 +65,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/rpi3_defconfig b/buildroot-external/configs/rpi3_defconfig index c1e05fad2..59870f148 100644 --- a/buildroot-external/configs/rpi3_defconfig +++ b/buildroot-external/configs/rpi3_defconfig @@ -66,6 +66,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/rpi4_64_defconfig b/buildroot-external/configs/rpi4_64_defconfig index 2b4328a8b..696198c32 100644 --- a/buildroot-external/configs/rpi4_64_defconfig +++ b/buildroot-external/configs/rpi4_64_defconfig @@ -66,6 +66,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/rpi4_defconfig b/buildroot-external/configs/rpi4_defconfig index 872086df2..0b8f6c52c 100644 --- a/buildroot-external/configs/rpi4_defconfig +++ b/buildroot-external/configs/rpi4_defconfig @@ -65,6 +65,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/tinker_defconfig b/buildroot-external/configs/tinker_defconfig index 595ea4c5f..11f8f0f32 100644 --- a/buildroot-external/configs/tinker_defconfig +++ b/buildroot-external/configs/tinker_defconfig @@ -61,6 +61,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/configs/yellow_defconfig b/buildroot-external/configs/yellow_defconfig index 1c7380e21..bef0b5b96 100644 --- a/buildroot-external/configs/yellow_defconfig +++ b/buildroot-external/configs/yellow_defconfig @@ -65,6 +65,7 @@ BR2_PACKAGE_LIBCGROUP_TOOLS=y BR2_PACKAGE_BLUEZ5_UTILS=y BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y +BR2_PACKAGE_DBUS_BROKER=y BR2_PACKAGE_DHCP=y BR2_PACKAGE_DHCP_CLIENT=y BR2_PACKAGE_DROPBEAR=y diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/dbus-broker.service.d/haos.conf b/buildroot-external/rootfs-overlay/etc/systemd/system/dbus-broker.service.d/haos.conf new file mode 100644 index 000000000..59a41f02e --- /dev/null +++ b/buildroot-external/rootfs-overlay/etc/systemd/system/dbus-broker.service.d/haos.conf @@ -0,0 +1,3 @@ +[Service] +PrivateTmp=false +PrivateDevices=false diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-supervisor.service b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-supervisor.service index 41aa09219..cafa026fb 100644 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-supervisor.service +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-supervisor.service @@ -1,8 +1,8 @@ [Unit] Description=HassOS supervisor -Requires=docker.service rauc.service dbus.service +Requires=docker.service rauc.service dbus.socket Wants=network-online.target hassos-apparmor.service time-sync.target systemd-journal-gatewayd.socket -After=docker.service rauc.service dbus.service network-online.target hassos-apparmor.service time-sync.target systemd-journal-gatewayd.socket +After=docker.service rauc.service dbus.socket network-online.target hassos-apparmor.service time-sync.target systemd-journal-gatewayd.socket RequiresMountsFor=/mnt/data /mnt/boot /mnt/overlay StartLimitIntervalSec=30m StartLimitBurst=3