[Tts-project] Bug#1084827: speech-dispatcher: systemd .service file using Alias= and not symlink

Michael Biebl biebl at debian.org
Fri Oct 18 16:55:00 BST 2024


Control: tags -1 + patch

Hi Samuel, hi bigon!

Am 18.10.24 um 17:01 schrieb Michael Biebl:
> On Wed, 09 Oct 2024 10:44:59 +0200 Laurent Bigonville <bigon at debian.org> 
> wrote:
>> Package: speech-dispatcher
>> Version: 0.11.4-2
>> Severity: serious
>> Tags: sid trixie
>>
>> Hello,
>>
>> The systemd .service file using Alias= and not symlink but as service is
>> not enabled, the symlink is not created.
>>
>> That means that the LSB script and the systemd service are not linked
>> together.
> 
> Correct, such aliasing symlinks to align sysv and systemd names should 
> be shipped as static symlinks in the package and not be created 
> dynamically.
> 
>> Best is to drop the Alias= statement of the service and create a symlink
>> next to it (speech-dispatcher.service -> speech-dispatcherd.service)
> In addition to that, any existing, dynamically created symlink in /etc 
> should be removed on upgrades, i.e.
> /etc/systemd/system/speech-dispatcher.service

I've uploaded the attached patch to DELAYED/14.

Please let me know if I should cancel the NMU if you don't agree with it 
or if you plan a maintainer upload in that timeframe anyway.
In that case, I would appreciate, if you could incorporate the changes 
from this debdiff.

Regards,
Michael



-------------- next part --------------
diff -Nru speech-dispatcher-0.11.5/debian/changelog speech-dispatcher-0.11.5/debian/changelog
--- speech-dispatcher-0.11.5/debian/changelog	2024-09-07 17:44:47.000000000 +0200
+++ speech-dispatcher-0.11.5/debian/changelog	2024-10-18 17:07:25.000000000 +0200
@@ -1,3 +1,13 @@
+speech-dispatcher (0.11.5-5.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Ship alias for speech-dispatcherd.service as static symlink in the package
+    instead of creating it on enable only (Closes: #1084827)
+  * Do not attempt a start of speech-dispatcherd.service after a fresh
+    install, as the service is disabled by default.
+
+ -- Michael Biebl <biebl at debian.org>  Fri, 18 Oct 2024 17:07:25 +0200
+
 speech-dispatcher (0.11.5-5) unstable; urgency=medium
 
   [ Nathan Teodosio ]
diff -Nru speech-dispatcher-0.11.5/debian/patches/systemd-debian speech-dispatcher-0.11.5/debian/patches/systemd-debian
--- speech-dispatcher-0.11.5/debian/patches/systemd-debian	2024-04-29 01:09:49.000000000 +0200
+++ speech-dispatcher-0.11.5/debian/patches/systemd-debian	2024-10-18 17:07:20.000000000 +0200
@@ -2,9 +2,11 @@
  speech-dispatcherd.service.in |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
---- a/speech-dispatcherd.service.in
-+++ b/speech-dispatcherd.service.in
-@@ -3,7 +3,9 @@ Description=Speech-Dispatcher, common in
+Index: speech-dispatcher-0.11.5/speech-dispatcherd.service.in
+===================================================================
+--- speech-dispatcher-0.11.5.orig/speech-dispatcherd.service.in	2023-06-06 00:03:00.000000000 +0200
++++ speech-dispatcher-0.11.5/speech-dispatcherd.service.in	2024-10-18 17:07:15.525407293 +0200
+@@ -18,9 +18,10 @@
  
  [Service]
  Type=forking
@@ -15,3 +17,5 @@
  ExecReload=/bin/kill -HUP $MAINPID
  
  [Install]
+ WantedBy=multi-user.target
+-Alias=speech-dispatcher.service
diff -Nru speech-dispatcher-0.11.5/debian/rules speech-dispatcher-0.11.5/debian/rules
--- speech-dispatcher-0.11.5/debian/rules	2024-07-13 19:35:54.000000000 +0200
+++ speech-dispatcher-0.11.5/debian/rules	2024-10-18 17:07:25.000000000 +0200
@@ -65,7 +65,7 @@
 	dh_gencontrol ${builddeb_overrides}
 
 override_dh_installsystemd:
-	dh_installsystemd --no-enable
+	dh_installsystemd --no-enable --no-start
 
 # Switch to main rules
 main:
diff -Nru speech-dispatcher-0.11.5/debian/speech-dispatcher.links speech-dispatcher-0.11.5/debian/speech-dispatcher.links
--- speech-dispatcher-0.11.5/debian/speech-dispatcher.links	1970-01-01 01:00:00.000000000 +0100
+++ speech-dispatcher-0.11.5/debian/speech-dispatcher.links	2024-10-18 17:07:25.000000000 +0200
@@ -0,0 +1,2 @@
+# Align SysV init script name with systemd service name
+/usr/lib/systemd/system/speech-dispatcherd.service /usr/lib/systemd/system/speech-dispatcher.service
diff -Nru speech-dispatcher-0.11.5/debian/speech-dispatcher.postinst speech-dispatcher-0.11.5/debian/speech-dispatcher.postinst
--- speech-dispatcher-0.11.5/debian/speech-dispatcher.postinst	2024-04-29 01:09:49.000000000 +0200
+++ speech-dispatcher-0.11.5/debian/speech-dispatcher.postinst	2024-10-18 17:07:25.000000000 +0200
@@ -38,3 +38,8 @@
 then
 	dpkg-maintscript-helper rm_conffile /etc/speech-dispatcher/modules/kali.conf 0.10.2-1\~ speech-dispatcher -- "$@"
 fi
+
+# clean up dynamically created alias symlink which is now shipped in the package itself
+if dpkg --compare-versions "$2" lt "0.11.5-5.1~"; then
+	rm -f /etc/systemd/system/speech-dispatcher.service
+fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/tts-project/attachments/20241018/81d68cf3/attachment.sig>


More information about the Tts-project mailing list