# # spec file for package dbus-broker # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: dbus-broker Version: 36 Release: 2.3 Summary: XDG message bus implementation License: Apache-2.0 Group: System/Daemons URL: https://github.com/bus1/dbus-broker Source: https://github.com/bus1/dbus-broker/releases/download/v%version/dbus-broker-%version.tar.xz Source2: https://github.com/bus1/dbus-broker/releases/download/v%version/dbus-broker-%version.tar.xz.asc Source10: allow-restart.conf Source11: block-restart.conf BuildRequires: linux-glibc-devel >= 4.17 BuildRequires: meson BuildRequires: pkg-config BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(audit) >= 3.0 # dbus-1 requires dbus-broker, break that dep to avoid a cycle. #!BuildIgnore: dbus-broker BuildRequires: pkgconfig(dbus-1) >= 1.10 BuildRequires: pkgconfig(expat) >= 2.2.3 BuildRequires: pkgconfig(glib-2.0) >= 2.50 BuildRequires: pkgconfig(libcap-ng) >= 0.6 BuildRequires: pkgconfig(libselinux) >= 3.2 BuildRequires: pkgconfig(libsystemd) >= 230 BuildRequires: pkgconfig(systemd) >= 230 Requires(pre): systemd >= 253.6 Provides: dbus-service Provides: bundled(c-dvar) = 1+ Provides: bundled(c-ini) = 1+ Provides: bundled(c-list) = 3+git9 Provides: bundled(c-rbtree) = 3+git34 Provides: bundled(c-shquote) = 1+ Provides: bundled(c-stdaux) = 1+ Provides: bundled(c-utf8) = 1+ Requires: dbus-broker-restart-behavior = %version Suggests: dbus-broker-block-restart = %version %{?systemd_ordering} %description dbus-broker is an implementation of a message bus as defined by the D-Bus specification. It has some different characteristics/features from classic D-Bus: * No shared medium * No IPC to implement IPC * User-based accounting * Reliable messages * Just the bus implementation, no external communication * Local only, no remote transport * Support for SASL pipelining * Runtime broker control %package allow-restart Summary: Restart behavior configuration for dbus-broker - Allow restarting Provides: dbus-broker-restart-behavior = %version-%release Conflicts: dbus-broker-restart-behavior BuildArch: noarch %description allow-restart This package configures how the service behave to the systemctl restart command. By installing this package dbus-broker will be allowed to restart %package block-restart Summary: Restart behavior configuration for dbus-broker - Block restarting Provides: dbus-broker-restart-behavior = %version-%release Conflicts: dbus-broker-restart-behavior BuildArch: noarch %description block-restart This package configures how the service behave to the systemctl restart command. By installing this package dbus-broker will be blocked to restart %prep %autosetup -p1 %build ln -s /bin/true rst2man %meson -Daudit=true -Dselinux=false %meson_build %install %meson_install for mode in allow block ; do install -Dpm0644 "%_sourcedir/$mode-restart.conf" "%buildroot/%_unitdir/dbus-broker.service.d/$mode-restart.conf" install -Dpm0644 "%_sourcedir/$mode-restart.conf" "%buildroot/%_userunitdir/dbus-broker.service.d/$mode-restart.conf" done %pre %service_add_pre dbus-broker.service %systemd_user_pre dbus-broker.service %post %service_add_post dbus-broker.service %systemd_user_post dbus-broker.service %preun %service_del_preun dbus-broker.service %postun %service_del_postun_without_restart dbus-broker.service %files %_bindir/dbus-broker* %_unitdir/*.service %_userunitdir/*.service %_journalcatalogdir/* %license LICENSE %files allow-restart %license LICENSE %dir %_unitdir/dbus-broker.service.d/ %dir %_userunitdir/dbus-broker.service.d/ %_unitdir/dbus-broker.service.d/allow-restart.conf %_userunitdir/dbus-broker.service.d/allow-restart.conf %files block-restart %license LICENSE %dir %_unitdir/dbus-broker.service.d/ %dir %_userunitdir/dbus-broker.service.d/ %_unitdir/dbus-broker.service.d/block-restart.conf %_userunitdir/dbus-broker.service.d/block-restart.conf %changelog * Thu Dec 19 2024 Simon Lees - Requires(pre): systemd >= 253.6 to ensure scripts in %%post are run correctly, (bsc#1234697) Thanks to Thorsten for the detailed report. * Tue Aug 6 2024 Simon Lees - Looks like we need systemd_user_ scripts for some upgrades to work * Fri Apr 12 2024 Jan Engelhardt - Update to release 36 * Fix possible file-descriptor use-after-close * More verbose activation failures * Tue Jan 16 2024 Marcus Rueckert - Make provides versioned - Ensure that not both packages can be installed at the same time by adding a conflicts * Tue Jan 16 2024 Marcus Rueckert - Downgrade the recommends to suggests based on suggestion from dimstar * Tue Jan 16 2024 Marcus Rueckert - Make restart behavior an admin decision: - drop feature-suse-refuse-manual-start-stop.patch - introduce 2 new subpackages: dbus-broker-allow-restart dbus-broker-block-restart (default to reflect the old patch behavior) one of the 2 packages is required and leaves the admin the choice if they want to be able to restart dbus-broker without reboot or not. * Wed Dec 20 2023 Jan Engelhardt - Update to release 35 * drop an error-checking remnant of old dir-iteration * Thu Dec 14 2023 Jan Engelhardt - Update to release 34 * Use AT_RANDOM for libexpat initialization to avoid a hidden dependency in libexpat-hashtables on `/dev/urandom` at runtime. * Check for SELinux Enforcing-mode and honor its value. * Support the new `ProcessFD` key in `GetConnectionCredentials()`. * Loading files from a directory will not enumerate the files in a predictable order rather than the pseudo-random order returned by the kernel. * Tue Dec 12 2023 Callum Farmer - Update feature-suse-refuse-manual-start-stop.patch: prevent killing user service aswell * Fri Sep 29 2023 Fabian Vogt - Add BuildIgnore to break cycle with dbus-1. * Thu Sep 21 2023 Simon Lees - Make dbus-broker start by default as it is now the only supported system bus. - Add feature-suse-refuse-manual-start-stop.patch We don't allow dbus services to be restarted as it breaks many many things. * Fri Feb 3 2023 Jan Engelhardt - Update to release 33 * Fix a race-condition when starting systemd-services from the launcher. * Changes in dbus service-files will no longer affect ongoing activation attempts. * Fri Aug 5 2022 Jan Engelhardt - Update to release 32 * Fix several bugs in the d-bus marshalling layer c-dvar, including out-of-bound reads. * Fix ubsan and asan warnings in c-stdaux and related subprojects. * Thu May 26 2022 Simon Lees - Provide dbus-service so from a packaging perspective its easier to replace dbus-daemon in the future. * Mon May 16 2022 Jan Engelhardt - Update to release 31 * Fix assertion failures in the user accounting, uncovered by the changes to accounting in v30. * Fix a memory leak in service-file re-loading, in particular in the command-line argument handling. * Tue May 10 2022 Jan Engelhardt - Update to release 30 * Failed service activations now report more detailed information on the activation failure back through the activating client. * The broker now runs in `session.slice` if applicable. * The `GetStats()` call on `org.freedeskop.DBus.Debug` now properly returns reply-owner statistics. Before, those were always set to 0. * Wed Jun 2 2021 Jan Engelhardt - Update to release 29 * Improve SELinux audit messages. * Linux >=4.17 is now a hard requirement. * Fix startup failures when at-console users have consecutive UIDs. * Wed Mar 17 2021 Jan Engelhardt - Update to release 28 * Further improvements to the service activation tracking. This better tracks units in systemd and closes some races where a repeated activation would incorrectly fail. * Fix a crash where duplicate monitor matches would be incorrectly installed in the broker. * Mon Feb 15 2021 Jan Engelhardt - Update to release 27 * Fix several bugs with the new service-activation tracking, including a race-condition when restarting activatable services. * Be more verbose about denied configuration access and print the file-path for better diagnostics. * Thu Jan 21 2021 Jan Engelhardt - Update to release 26 * Improve the service activation tracking of the compatibility launcher. We now track spawned systemd units for their entire lifetime, so we can properly detect when activations fail. * Work around a kernel off-by-one error in the socket queue accounting to fix a race-condition where dbus clients might not be dispatched. * Support running without `shmem` configured in the kernel. This will make the broker run better on limited embedded devices. * Thu Dec 3 2020 Jan Engelhardt - Update to release 25 * Fix an assertion failure when disconnecting monitors with active unique-name matches. * Fix the selinux error-handling to no longer mark all errors as auditable by default. * Fri Sep 4 2020 Jan Engelhardt - Update to release 24 * Make audit-events properly typed and prevent non-auditable events from being forwarded to the linux audit system. * Tue May 12 2020 Jan Engelhardt - Update to release 23 * Expose supplementary groups as `UnixGroupIDs` as defined by the dbus specification in 0.53. * The broker now uses the peer-pid from `SO_PEERCRED` on the controller socket, rather than relying on `getppid()`. This allows creating the broker from intermediate processes without having any credentials of the intermediate leak into the broker. * Mon Feb 24 2020 Jan Engelhardt - Update to release 22 * Implement org.freedesktop.DBus.Debug.Stats in the driver. * Support no-op activation files. * The new configuration option `linux-4-17`, if set to true (default is false), makes dbus-broker assume it runs on linux-v4.17 or newer. It will make use of features introduced up to linux-v4.17. This allows to forcibly disable workarounds for old kernels. * Tue Jun 11 2019 Jan Engelhardt - Update to new upstream release 21 * Previously, resource limits were incorrectly calculated, leading too limits that were higher than intended. * Messages are now directly forwarded to the journal and amended with additional fields. The journal-catalog now contains entries with background information on runtime log messages. * Thu Feb 21 2019 Jan Engelhardt - Update to new upstream release 18 * The compatibility launcher is no longer isolated in its own network namespace, since the SELinux APIs require access to the root network namespace. * Mon Jan 28 2019 Jan Engelhardt - Update RPM group. * Wed Jan 2 2019 Jan Engelhardt - Update to new upstream release 17 * The compatibility launcher now namespaces transient systemd units based on its own name on the scope-bus. * The launcher now respects the `NAME' configuration and correctly drops privileges of the broker and itself after startup. * Messages with file-descriptors will now be refused if the client did not negotiate file-descriptor passing before. - Drop use-system-deps.diff * Mon Mar 5 2018 jengelh@inai.de - Update to new upstream release 11 * The policy-type of the dbus-broker API has been simplified. It is now reduced to a policy-batch indexed by uids, in combination with a policy-batch indexed either by gid or uid-range. * The launcher now supports a `--config-file PATH` commandline option to override the root configuration file, which is still deduced based on the passed scope parameter. * Tue Feb 6 2018 jengelh@inai.de - Update to new upstream release 9 * AddListener() on org.bus1.DBus.Broker now supports UID ranges. * dbus-broker.service unit is now ordered before basic.target. * The launcher now uses instantiated systemd template units when activating a service that has no associated systemd service file. * The launcher now supports configuration reloading. * Activated units now inherit their user from the actual D-Bus service, if provided. * Sun Sep 10 2017 jengelh@inai.de - Update to new upstream release 4 * Support for sending SELinux AVC violations to audit rather than syslog. * Units will now be activated via explicit calls to StartUnit() rather than faking a ActivationRequest directed signal. This allows to catch startup failures (or rejections) and allows to reject all pending activation requests right away. * The broker now logs policy violations to the system log. - Add use-system-deps.diff * Fri Aug 25 2017 jengelh@inai.de - Initial package (version 3) for build.opensuse.org