Your message dated Thu, 10 Oct 2024 06:35:42 +0000
with message-id <[email protected]>
and subject line Bug#1084842: fixed in fair 0.5.3-4
has caused the Debian Bug report #1084842,
regarding Use canonical way to enable systemd service units
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 [email protected]
immediately.)


-- 
1084842: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1084842
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fair
Version: 0.5.3-3
Severity: important
Tags: patch
X-Debbugs-Cc: наб <[email protected]>, [email protected]

Hi,

your latest upload of fair added native systemd service units.
Thanks for that!

Unfortunately, it uses an anti-pattern that should not be used, i.e.
ENABLE/DISABLE flags in /etc/default/$package which are then processed
by shell, in case of fair debian/fair.default contains:

CARROUSEL=false
TRANSPONDER=false

and the corresponding .service units have

ExecStart=/bin/sh -c 'if $CARROUSEL; then exec /usr/sbin/carrousel; fi'


Please don't do that. The benefit of having one service unit per service
is, that they can be enabled/disabled via systemctl enable/disable. By
introducing another mechanism to enable/disable a service, the end
result is inconsistent behaviour for the user.

A better way is to deprecate/remove the usage of CARROUSEL and
TRANSPONDER from the systemd service units and start the binaries
directly i.e.

ExecStart=/usr/sbin/carrousel
and
ExecStart=/usr/sbin/transponder $BALANCERS

As the default is to have the services disabled upon installation
use dh_installsystemd's --no-enable switch.

The attached patch tries to address this.

Michael
diff -Nru fair-0.5.3/debian/changelog fair-0.5.3/debian/changelog
--- fair-0.5.3/debian/changelog 2024-10-05 22:14:34.000000000 +0200
+++ fair-0.5.3/debian/changelog 2024-10-09 18:21:15.000000000 +0200
@@ -1,3 +1,11 @@
+fair (0.5.3-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Deprecate usage of fair.default for enabling fair-carrousel.service and
+    fair-transponder.service.
+
+ -- Michael Biebl <[email protected]>  Wed, 09 Oct 2024 18:21:15 +0200
+
 fair (0.5.3-3) unstable; urgency=medium
 
   [ Andreas Tille ]
diff -Nru fair-0.5.3/debian/fair.default fair-0.5.3/debian/fair.default
--- fair-0.5.3/debian/fair.default      2024-10-05 21:03:46.000000000 +0200
+++ fair-0.5.3/debian/fair.default      2024-10-09 18:21:15.000000000 +0200
@@ -1,6 +1,10 @@
 # $Id: fair.default 8058 2005-07-07 13:06:53Z guus $
 # $URL: 
https://infix.uvt.nl/its-id/trunk/sources/fair/package/debian/fair.default $
 
+# The following two parameters are only relevant for SysV init.
+# When running systemd, please use systemctl enable fair-carrousel.service or
+# systemctl enable fair-transponder.service to enable those services.
 CARROUSEL=false
 TRANSPONDER=false
+
 BALANCERS=
diff -Nru fair-0.5.3/debian/fair.fair-carrousel.service 
fair-0.5.3/debian/fair.fair-carrousel.service
--- fair-0.5.3/debian/fair.fair-carrousel.service       2024-10-05 
21:47:43.000000000 +0200
+++ fair-0.5.3/debian/fair.fair-carrousel.service       2024-10-09 
17:54:24.000000000 +0200
@@ -7,8 +7,7 @@
 
 [Service]
 Type=forking
-EnvironmentFile=/etc/default/fair
-ExecStart=/bin/sh -c 'if $CARROUSEL; then exec /usr/sbin/carrousel; fi'
+ExecStart=/usr/sbin/carrousel
 
 [Install]
 WantedBy=multi-user.target
diff -Nru fair-0.5.3/debian/fair.fair-transponder.service 
fair-0.5.3/debian/fair.fair-transponder.service
--- fair-0.5.3/debian/fair.fair-transponder.service     2024-10-05 
21:48:25.000000000 +0200
+++ fair-0.5.3/debian/fair.fair-transponder.service     2024-10-09 
17:55:27.000000000 +0200
@@ -8,7 +8,7 @@
 [Service]
 Type=forking
 EnvironmentFile=/etc/default/fair
-ExecStart=/bin/sh -c 'if $TRANSPONDER; then exec /usr/sbin/transponder -- 
"$@"; fi' _ $BALANCERS
+ExecStart=/usr/sbin/transponder $BALANCERS
 
 [Install]
 WantedBy=multi-user.target
diff -Nru fair-0.5.3/debian/rules fair-0.5.3/debian/rules
--- fair-0.5.3/debian/rules     2024-10-05 21:56:33.000000000 +0200
+++ fair-0.5.3/debian/rules     2024-10-09 18:21:15.000000000 +0200
@@ -6,8 +6,8 @@
        dh $@
 
 override_dh_installsystemd:
-       dh_installsystemd --name fair-carrousel
-       dh_installsystemd --name fair-transponder
+       dh_installsystemd --name fair-carrousel --no-enable
+       dh_installsystemd --name fair-transponder --no-enable
 
 override_dh_auto_install:
        dh_auto_install

--- End Message ---
--- Begin Message ---
Source: fair
Source-Version: 0.5.3-4
Done: Michael Biebl <[email protected]>

We believe that the bug you reported is fixed in the latest version of
fair, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Biebl <[email protected]> (supplier of updated fair package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 09 Oct 2024 17:39:40 +0200
Source: fair
Architecture: source
Version: 0.5.3-4
Distribution: unstable
Urgency: medium
Maintainer: Package Salvaging Team <[email protected]>
Changed-By: Michael Biebl <[email protected]>
Closes: 1084838 1084842
Changes:
 fair (0.5.3-4) unstable; urgency=medium
 .
   * Team upload.
 .
   [ наб ]
   * Move aliased files from / to /usr (DEP17) (Closes: #1084838)
 .
   [ Michael Biebl ]
   * Deprecate usage of /etc/default/fair for enabling
     fair-carrousel.service and fair-transponder.service.
     Closes: #1084842
Checksums-Sha1:
 2cbb9a1117de4855a0c7bec97dab6f7986c47ea1 1924 fair_0.5.3-4.dsc
 651d756abfc5b752459e10b20b51b7a338549b50 6548 fair_0.5.3-4.debian.tar.xz
 e62a705e5b94eee148120368f5d7a0456414dbee 6175 fair_0.5.3-4_amd64.buildinfo
Checksums-Sha256:
 4b1b97f2294fedab7e1c861a2e7c0bbe7c7637d297a550377f5beb16283112b9 1924 
fair_0.5.3-4.dsc
 a40310cee7131cb141b14a43cebbe69b1f52443fdd9dfeadf5cd9d68dafe9724 6548 
fair_0.5.3-4.debian.tar.xz
 3b766e4598beb769d1696958634631819018958350230a2781748fa582d1477d 6175 
fair_0.5.3-4_amd64.buildinfo
Files:
 6964d8f8bf7a124d1a9bf1133e7b6df3 1924 net optional fair_0.5.3-4.dsc
 44197d19934218ea6b22d63eb60f9fe5 6548 net optional fair_0.5.3-4.debian.tar.xz
 ebb7fd6175f498971f1d05c20710c068 6175 net optional fair_0.5.3-4_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCAAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmcHbuMRHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtE4Mg//ZK5SXsZLW29hMSiRlkTTkUT0clYmiy04
jWbS0tpp2mwXCQ956bwAmP0wkwuwkPRNU9sBqtjqUY0xGInvWJOPlNdehzOzJ9We
6laZc32FzOChSSIQ8uJwOAAa2KyAG191TxCSPmSNIIO6DTKJFxXoaRbk+q9apne/
V6qQU/WOvdCEaA1uxxR80gyRTbRB0XQ2y+oEbB19Nb2tYpcbPsfSF9ciWl6pguD/
m+0RLqf/3OEVeBcm+NL+ZiEBnXb8LDomfVei/gnAKqACYodZmHdbFUGscl+J+AyD
DCv7JH6dt73x2acEG+J3KIt9jpgEJvchS+4om9HnXwaNX0GQ3djtWZCSxvjToKQK
kSTUgr9ta2Dh6MgMxxIA8HV8/aBGr7+AszoC4u3ZBUwYrPPf/YJLzQ8Guonf/Cwy
WUVEqTgtBiv5mbnZZW1rjFpiMFWHpIFu9HCVcOuD0g069Gw1aEteEI6vyE3YRG+8
P6/+JeQmkeJWN9PsUuULB/sij8Hyckft7SfaFtx+aW3Xd9kt82BzkrmQSAG2NReK
G0+oYgAB2McUHFcHc/fIwgIxpwJvTcQmjhUksjDitkcCGYNQ3aa08LXFMfWNjdOh
o1Lh9va81NBCbsXHEmbUZyRSriyHpYx2sfASkc8UjiZ3ZpfUjvUu6cR5X4G4QywU
kfV+WpLzbf4=
=zLQq
-----END PGP SIGNATURE-----

Attachment: pgp3krkSe1Vsq.pgp
Description: PGP signature


--- End Message ---

Reply via email to