[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#750529: marked as done (systemd unit: Respect default file)



Your message dated Thu, 5 Jun 2014 08:35:44 +0200
with message-id <20140605063544.GD3416@piware.de>
and subject line Re: Bug#750529: systemd unit: Respect default file
has caused the Debian Bug report #750529,
regarding systemd unit: Respect default file
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
750529: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750529
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: brltty
Version: 5.0-2
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch utopic

Hello,

brltty's systemd unit unconditionally starts the service. This
mis-matches the behaviour of the init.d file which checks
RUN_BRLTTY in /etc/default/brltty. The attached debdiff adjusts the
unit to do the same. It's not pretty, but seems to work well enough.

In the long run this hackery should stop of course; systemd units are
rather fundamentally incompatible with the idea of enabling/disabling
units with a default file instead of using "update-rc.d
enable/disable" (which works for SysV init, systemd, and upstart). But
as long as we have these options in the default file they should be
respected.

Alternatively, to fix this bug it also seems fine to me to drop the
RUN_BRLTTY option altogether. This is a change which conceptually
affects a lot of Debian packages though, so perhaps should be
discussed on a wider scale (d-devel@?)

Thanks for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
diff -Nru brltty-5.0/debian/brltty.service brltty-5.0/debian/brltty.service
--- brltty-5.0/debian/brltty.service	2014-03-14 05:17:05.000000000 +0100
+++ brltty-5.0/debian/brltty.service	2014-06-04 08:56:01.000000000 +0200
@@ -10,14 +10,13 @@
 
 [Service]
 
-Type=forking
 PIDFile=/run/brltty.pid
-ExecStart=/sbin/brltty -q -P /run/brltty.pid
+ExecStart=/bin/sh -c "grep -sq '^ *RUN_BRLTTY=no' /etc/default/brltty || exec /sbin/brltty -f -q -P /run/brltty.pid"
 
 TimeoutStartSec=5
 TimeoutStopSec=10
 
-Restart=always
+Restart=on-failure
 RestartSec=30
 
 Nice=-10
diff -Nru brltty-5.0/debian/changelog brltty-5.0/debian/changelog
--- brltty-5.0/debian/changelog	2014-03-31 20:35:18.000000000 +0200
+++ brltty-5.0/debian/changelog	2014-06-04 08:58:01.000000000 +0200
@@ -1,3 +1,11 @@
+brltty (5.0-2ubuntu3) utopic; urgency=medium
+
+  * debian/brltty.service: Respect disabling of brltty in the /etc/default
+    file. Turn this into a "Type=simple" job by running in the foreground so
+    that the unit can tell apart "disabled" from "running". (LP: #1316804)
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Wed, 04 Jun 2014 08:56:22 +0200
+
 brltty (5.0-2ubuntu2) trusty; urgency=medium
 
   * No change rebuild to drop python3.3 compiled extension.

--- End Message ---
--- Begin Message ---
Hey Mario,

Mario Lang [2014-06-05  8:23 +0200]:
> While this might apply to the Ubuntu package, it is not
> true for the Debian package.  We have never used RUN_BRLTTY in
> /etc/init.d/brltty.  IOW, I have never merged this ugly hack back to Debian.

Ah, sorry about the noise then. Thanks! Closing. (you sent to "-cloe")

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

--- End Message ---

Reply to: