Control: found 861771 0.13-1
Control: tags 861771 + patch

On Mon, 08 May 2017 at 20:14:28 +0100, Simon McVittie wrote:
> If you try to downgrade to 0.13-1 (in testing), do you still get this?

I can reproduce this with 0.13-1, so it should not block migration.

> I think the attached patch should hopefully fix this bug (thanks to
> Ansgar Burchardt for suggesting this approach)

This doesn't work: if an ExecStartPre command exits with the
SuccessExitStatus then systemd proceeds to ExecStart, so I don't think
we can have an ExecStartPre that cancels start without marking the service
as failed (which would in turn make the postinst fragment fail). But it
can be adapted by using a non-trivial ExecStartPre, as in the attached.

The long-term solution would be to not enable the display manager at
the update-rc.d level) if it wasn't enabled by the user, and migrate
enabledness like this pseudocode:

    if (enabled, using the same algorithm as invoke-rc.d &&
        enabled in /etc/default/nodm) {
            update-rc.d nodm enable
    } else {
            update-rc.d nodm disable
    }

then remove NODM_ENABLED from /etc/default/nodm. openarena-server has
code in its preinst to do something similar.

But that definitely seems like a job for post-stretch, particularly
if it gets entangled with a new approach to registering for the
display-manager.service symlink (#852125).

    S
From: Simon McVittie <s...@debian.org>
Date: Mon, 8 May 2017 17:01:40 +0100
Subject: nodm.service: Don't respawn or fail if disabled in
 /etc/default

Bug-Debian: https://bugs.debian.org/861771
---
 nodm.service.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/nodm.service.in b/nodm.service.in
index 0b7e95b..b53fef8 100644
--- a/nodm.service.in
+++ b/nodm.service.in
@@ -5,8 +5,11 @@ After=plymouth-quit.service systemd-user-sessions.service
 
 [Service]
 EnvironmentFile=-/etc/default/nodm
-ExecStartPre=/usr/bin/test ${NODM_ENABLED} != no -a ${NODM_ENABLED} != false
-ExecStart=@sbindir@/nodm $NODM_OPTIONS
+# 77 is EX_NOPERM, and doesn't seem to be used by nodm itself
+# Don't respawn or mark as failed if disabled via /etc/default/nodm
+RestartPreventExitStatus=77
+SuccessExitStatus=77
+ExecStart=/bin/sh -c 'if test ${NODM_ENABLED} = no || test ${NODM_ENABLED} = false; then exit 77; else exec @sbindir@/nodm $NODM_OPTIONS; fi'
 Restart=always
 KillMode=mixed
 TimeoutStopSec=10
_______________________________________________
pkg-fso-maint mailing list
pkg-fso-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-fso-maint

Reply via email to