Your message dated Tue, 02 May 2017 10:49:15 +0000
with message-id <e1d5vmp-0009xc...@fasolo.debian.org>
and subject line Bug#861204: fixed in init-system-helpers 1.48
has caused the Debian Bug report #861204,
regarding deb-systemd-invoke: fails to handle units with escaped characters
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 ow...@bugs.debian.org
immediately.)
--
861204: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861204
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: init-system-helpers
Version: 1.47
Severity: serious
Tags: patch
Hi,
to fix #856429 I need to handle a unit with an escaped character
correctly in the maintainer scripts generated by dh_systemd*.
Unfortunately deb-systemd-invoke does not quote the unit name
properly in a systemctl call, so it fails to handle the unit.
A patch is attached, with it deb-systemd-invoke works as expected.
I did not test my changes to t/001-deb-systemd-helper.t as I don't
have the necessary perl module installed and didn't want to mess
with CPAN. But I'd assume its correct.
Thanks for fixing,
Bernd
--
Bernd Zeimetz Debian GNU/Linux Developer
http://bzed.de http://www.debian.org
GPG Fingerprint: ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F
From f506723313b8b85e062b61ccda5e31d7adc3a176 Mon Sep 17 00:00:00 2001
From: Bernd Zeimetz <b...@debian.org>
Date: Tue, 25 Apr 2017 21:40:00 +0200
Subject: [PATCH] Handle units with escaped characters correctly.
Also see
https://www.freedesktop.org/software/systemd/man/systemd-escape.html
---
script/deb-systemd-invoke | 2 +-
t/001-deb-systemd-helper.t | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/script/deb-systemd-invoke b/script/deb-systemd-invoke
index 4255d06..a4b3fbc 100755
--- a/script/deb-systemd-invoke
+++ b/script/deb-systemd-invoke
@@ -85,7 +85,7 @@ if ($action eq "start" || $action eq "restart") {
my $global_exit_code = 0;
for my $unit (@units) {
my $unit_installed = 0;
- my $enabled_output = `/bin/systemctl is-enabled -- $unit`;
+ my $enabled_output = `/bin/systemctl is-enabled -- '$unit'`;
# matching enabled and enabled-runtime as an installed non static unit
if ($enabled_output =~ /enabled/) {
$unit_installed = 1;
diff --git a/t/001-deb-systemd-helper.t b/t/001-deb-systemd-helper.t
index 64332e3..2d5da28 100644
--- a/t/001-deb-systemd-helper.t
+++ b/t/001-deb-systemd-helper.t
@@ -54,7 +54,7 @@ unless ($ENV{'TEST_ON_REAL_SYSTEM'}) {
# ┃ Verify “is-enabled” is not true for a random, non-existing unit file. ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
-my ($fh, $random_unit) = tempfile('unitXXXXX',
+my ($fh, $random_unit) = tempfile('unit\x2dXXXXX',
SUFFIX => '.service',
TMPDIR => 1,
UNLINK => 1);
@@ -303,13 +303,13 @@ ExecStart=/bin/sleep 1
[Install]
WantedBy=multi-user.target
-Alias=footest.service
+Alias=foo\x2dtest.service
EOT
close($fh);
isnt_enabled($random_unit);
-isnt_enabled('footest.service');
-my $alias_path = "/etc/systemd/system/footest.service";
+isnt_enabled('foo\x2dtest.service');
+my $alias_path = "/etc/systemd/system/foo\x2dtest.service";
ok(! -l $alias_path, 'alias link does not exist yet');
$retval = system("DPKG_MAINTSCRIPT_PACKAGE=test $dsh enable $random_unit");
is($retval, 0, "enable command succeeded");
@@ -376,7 +376,7 @@ EOT
close($fh);
isnt_enabled($random_unit);
-isnt_enabled('footest.service');
+isnt_enabled('foo\x2dtest.service');
# note that in this case $alias_path and $mask_path are identical
$retval = system("DPKG_MAINTSCRIPT_PACKAGE=test $dsh enable $random_unit");
is($retval, 0, "enable command succeeded");
--
2.11.0
--- End Message ---
--- Begin Message ---
Source: init-system-helpers
Source-Version: 1.48
We believe that the bug you reported is fixed in the latest version of
init-system-helpers, 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 861...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Bernd Zeimetz <b...@debian.org> (supplier of updated init-system-helpers
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 ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Tue, 02 May 2017 12:20:21 +0200
Source: init-system-helpers
Binary: init-system-helpers init
Architecture: source all amd64
Version: 1.48
Distribution: unstable
Urgency: medium
Maintainer: Debian systemd Maintainers
<pkg-systemd-maintain...@lists.alioth.debian.org>
Changed-By: Bernd Zeimetz <b...@debian.org>
Description:
init - metapackage ensuring an init system is installed
init-system-helpers - helper tools for all init systems
Closes: 861204
Changes:
init-system-helpers (1.48) unstable; urgency=medium
.
* Team upload
* [fbabdc8] Handle units with escaped characters correctly.
See
https://www.freedesktop.org/software/systemd/man/systemd-escape.html
for details. (Closes: #861204)
Checksums-Sha1:
606aa875cada0064de134a7d737e0aca11afa241 1916 init-system-helpers_1.48.dsc
fce53f5266e6c371630876f06879db7cc4fff45c 43384 init-system-helpers_1.48.tar.xz
20bf16be0fa82760e86a78b708c19f0393615a48 44018 init-system-helpers_1.48_all.deb
ce3dcdfc1f00c442d4ef3b71d7ef08067f7336dd 5929
init-system-helpers_1.48_amd64.buildinfo
142b575bf5e04d6beb4b667cd97b191e20ff3dce 12010 init_1.48_amd64.deb
Checksums-Sha256:
aefcef5270cfae3380f9dfd98336de20580086dbdc65c0dfd7fe1c10f0722bd0 1916
init-system-helpers_1.48.dsc
20b4ff9df037cfa64d6c9637e383cb09135cb97114d932032160cdfaf01d08b8 43384
init-system-helpers_1.48.tar.xz
65f87fee789ccbcb8d756b4cbf5deb85924a096974ad5d429b821fd5c2e9c4bd 44018
init-system-helpers_1.48_all.deb
1943f0fecd7739a627c2a98c1720792cede08555d508242b13247901cf55297b 5929
init-system-helpers_1.48_amd64.buildinfo
c8c5fef6ed9a4c564f3a96af05be7a9d4ed0b40e58cc18e89972c1fa0602d40a 12010
init_1.48_amd64.deb
Files:
f1ad76ec27db4026229d81a388ecb724 1916 admin extra init-system-helpers_1.48.dsc
82338b2d70d3d8b4bbc4e36d871cc3a1 43384 admin extra
init-system-helpers_1.48.tar.xz
4e6caa2e99e9c4bdc39900e0f1335f9b 44018 admin required
init-system-helpers_1.48_all.deb
fc0c5eea0d751cf6cdca481ccfb2069f 5929 admin extra
init-system-helpers_1.48_amd64.buildinfo
5912709130abf909667db7eab7736a34 12010 metapackages important
init_1.48_amd64.deb
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEE7KHj8o4RJDLUhd2V6zYXGm/5Q18FAlkIXmQACgkQ6zYXGm/5
Q1/Zgw/+NZ+PFbTClAGtH6qh4QiP3OiIcBoPkATmKAtsWopXP7nE92acFIuCdfr9
1RpS1B/Zj+MVEyR2lBWhkeBNiZ+b5DFuC5L2g1pP2GnjaTedFN6KpNnuwkiWETYJ
3XMt0+QuFyrmIvkhfADLvawpkEyA0vUvNQ7DesTLCrjBTIlWbkC6Fkjws2te70nR
Xz/buqO0KQvZ+X6BwbY477SmoeUoTo6w9aHWCoW8FQT/x045AALCSLTt1NCtj7NO
QcQeBSxQE4ysv7BCgHrqTnkxuunKv9WJDKDg3QpIjWCYaT92DgmYpKWFPXCCuatF
V6woerZF6+mCiQGzHf66BwEe3BG4VvGdludzTVVourYTuC01ZmBS9diwHvPhV1xc
xi3DspbrX12KIFpg/cWBkizdsNdBzsA5W5fJJZav6YenqsXAcN50m+G3sy402Pex
2/I4crrCgHa29yIA23b18fcPErH+V5HZtvONz1hnhQYcW7go3Bs/PLcuxDWuHQnF
H3C4RvbUd8NspMXUmPI7lmcju0BwnguJRTtRQNuda0M1wYBc7rwmTaEuXKEM7hlx
A4asWQVdOBThrhMzdQy0Gk5unpCFaIrowJz7esg1L3PFzrSIAeWhrX11EQZ2vEIA
3RaIt6ez91DJc8C0YswXElhxm3MrFS1wzhtgTiyN7421dxxUQV4=
=yIKW
-----END PGP SIGNATURE-----
--- End Message ---