Bug#960564: usbauth: autopkgtest fails on Ubuntu

2021-01-12 Thread Logan Rosen
Hi,

On Mon, 10 Aug 2020 11:41:08 +0800 Alvin Chen  wrote:
> Could you please check if this patch works on your environment?
>
> https://salsa.debian.org/debian/usbauth/-/merge_requests/24/diffs

I synced 1.0.3-1 (which contains that patch) to Ubuntu, and the
autopkgtest succeeded [1]. You can feel free to close this out
accordingly.

Thanks,
Logan

[1] https://autopkgtest.ubuntu.com/packages/u/usbauth/hirsute/amd64



Bug#960564: usbauth: autopkgtest fails on Ubuntu

2020-08-09 Thread Alvin Chen
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  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.0 -0800
> +++ usbauth-1.0.2/debian/tests/control 2020-05-13 17:22:36.0 -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.0 -0800
> +++ usbauth-1.0.2/debian/tests/test 2020-05-13 17:22:10.0 -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.



Bug#960564: usbauth: autopkgtest fails on Ubuntu

2020-05-23 Thread 蔡昆宏
Hi SR,

Thanks for reporting this bug and mentioning the service startup issue on
Ubuntu.
I will make a new update for this soon.


KUN-HUNG


Bug#960564: usbauth: autopkgtest fails on Ubuntu

2020-05-13 Thread Stefano Rivera
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.0 -0800
+++ usbauth-1.0.2/debian/tests/control  2020-05-13 17:22:36.0 -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.0 -0800
+++ usbauth-1.0.2/debian/tests/test 2020-05-13 17:22:10.0 -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.

SR