Hi Stefano Rivera,

Sorry for the late reply.

Could you please check if this patch works on your environment?

https://salsa.debian.org/debian/usbauth/-/merge_requests/24/diffs

Thanks,

Alvin Chen
On Wed, 13 May 2020 17:32:55 -0700 Stefano Rivera <stefa...@debian.org> wrote:
> Package: usbauth
> Version: 1.0.2-1
> Severity: normal
> Tags: patch
>
> On Ubuntu, the "service dbus start" doesn't work.
>
> | # service dbus start
> | Failed to start dbus.service: Operation refused, unit dbus.service may be 
> requested by dependency only (it is configured to refuse manual start/stop).
> | See system logs and 'systemctl status dbus.service' for details.
> |
> | # cat /lib/systemd/system/dbus.service
> | [Unit]
> | Description=D-Bus System Message Bus
> | Documentation=man:dbus-daemon(1)
> | Requires=dbus.socket
> | # we don't properly stop D-Bus (see ExecStop=), thus disallow restart
> | RefuseManualStart=yes
> |
> | [Service]
> | ExecStart=/usr/bin/dbus-daemon --system --address=systemd: --nofork 
> --nopidfile --systemd-activation --syslog-only
> | ExecReload=/usr/bin/dbus-send --print-reply --system --type=method_call 
> --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
> | ExecStop=/bin/true
> | KillMode=none
> | OOMScoreAdjust=-900
>
> What you can safely do is systemctl start dbus.socket, which will ensure
> that DBus starts, and is running.
>
> Stopping DBus is almost never a good idea, so the test probably
> shouldn't do that. If it did, it should declare the isolation-container
> restriction.
>
> So, how about this patch:
>
> diff -Nru usbauth-1.0.2/debian/tests/control 
> usbauth-1.0.2/debian/tests/control
> --- usbauth-1.0.2/debian/tests/control 2019-12-10 18:14:31.000000000 -0800
> +++ usbauth-1.0.2/debian/tests/control 2020-05-13 17:22:36.000000000 -0700
> @@ -1,3 +1,3 @@
>  Tests: test
> -Depends: @, libc-bin, usbauth-notifier, dbus
> +Depends: dbus, libc-bin, systemd, usbauth-notifier, @
>  Restrictions: needs-root, allow-stderr
> diff -Nru usbauth-1.0.2/debian/tests/test usbauth-1.0.2/debian/tests/test
> --- usbauth-1.0.2/debian/tests/test 2019-12-10 17:46:36.000000000 -0800
> +++ usbauth-1.0.2/debian/tests/test 2020-05-13 17:22:10.000000000 -0700
> @@ -8,9 +8,8 @@
>  echo "run: Test"
>
>  echo "allow all" | tee /etc/usbauth.conf
> -service dbus start
> +systemctl start dbus.socket
>  usbauth init
> -service dbus stop
>
>  echo "run: Successful"
>  exit 0
>
> It works for me with the schroot, lxd, and qemu backends, so it should pass on
> both Debian and Ubuntu's CI environments.

Reply via email to