[lintian] 01/01: c/systemd: Check for obsolete BindTo= option
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit cc84a19be5435333596aab44dd468d80dc5cbe07
Author: Michael Biebl <biebl@debian.org>
Date: Wed Mar 8 20:26:21 2017 +0100
c/systemd: Check for obsolete BindTo= option
The BindTo= option has been deprecated in favour of BindsTo= which
should be used instead.
See https://github.com/systemd/systemd/commit/7f2cddae09fd2579ae24434df577bb5e5a157d86
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/systemd.desc | 9 +++++++++
checks/systemd.pm | 3 +++
debian/changelog | 3 +++
t/tests/systemd-general/debian/debian/test.service | 1 +
t/tests/systemd-general/desc | 9 +++++----
t/tests/systemd-general/tags | 6 ++++--
6 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/checks/systemd.desc b/checks/systemd.desc
index d4aea02..532f445 100644
--- a/checks/systemd.desc
+++ b/checks/systemd.desc
@@ -34,6 +34,15 @@ Info: The systemd service file refers to an obsolete target.
example, declaring <tt>After=syslog.target</tt> is unnecessary by now because
syslog is socket-activated and will therefore be started when needed.
+Tag: systemd-service-file-refers-to-obsolete-bindto
+Severity: normal
+Certainty: certain
+Info: The systemd service file refers to the obsolete BindTo= option.
+ .
+ The <tt>BindTo=</tt> option has been deprecated in favour of
+ <tt>BindsTo=</tt> which should be used instead.
+Ref: https://github.com/systemd/systemd/commit/7f2cddae09fd2579ae24434df577bb5e5a157d86
+
Tag: systemd-no-service-for-init-script
Severity: serious
Certainty: certain
diff --git a/checks/systemd.pm b/checks/systemd.pm
index a7ea9cd..5b991ce 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -200,6 +200,9 @@ sub check_systemd_service_file {
tag 'systemd-service-file-refers-to-obsolete-target', $file, $_
for @obsolete;
+ tag 'systemd-service-file-refers-to-obsolete-bindto', $file,
+ if extract_service_file_values($file, 'Unit', 'BindTo', 1);
+
if (not $file->is_symlink or $file->link ne '/dev/null') {
tag 'systemd-service-file-missing-documentation-key', $file,
unless extract_service_file_values($file, 'Unit', 'Documentation',1);
diff --git a/debian/changelog b/debian/changelog
index e8688c3..3b78bbb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -65,6 +65,9 @@ lintian (2.5.51) UNRELEASED; urgency=medium
+ [NT] Apply patch from Christopher Hoskin to except -doc packages
from the "new-package-should-not-package-python2-module" tag.
(Closes: #855243)
+ * checks/systemd.{desc,pm}:
+ + [NT] Apply patch from Michael Biebl to warn about deprecated
+ "BindTo" option in systemd service files. (Closes: #857194)
* checks/testsuite.{desc,pm}:
+ [NT] Apply patch from Lucas Kanashiro to add a tag for recommending
packagers to create an autopkgtest for their package.
diff --git a/t/tests/systemd-general/debian/debian/test.service b/t/tests/systemd-general/debian/debian/test.service
index 45c8e6d..e58d61c 100644
--- a/t/tests/systemd-general/debian/debian/test.service
+++ b/t/tests/systemd-general/debian/debian/test.service
@@ -1,6 +1,7 @@
[Unit]
After=network.target \
syslog.target
+BindTo=foo
[Service]
ExecStartPre = /bin/true
diff --git a/t/tests/systemd-general/desc b/t/tests/systemd-general/desc
index 4f16d76..6c931f1 100644
--- a/t/tests/systemd-general/desc
+++ b/t/tests/systemd-general/desc
@@ -7,10 +7,11 @@ Test-For:
maintainer-script-calls-systemctl
service-file-is-not-a-file
service-key-has-whitespace
- systemd-service-file-outside-lib
- systemd-tmpfiles.d-outside-usr-lib
- systemd-service-file-missing-documentation-key
- systemd-service-file-refers-to-obsolete-target
systemd-no-service-for-init-script
systemd-no-service-for-init-rcS-script
systemd-service-alias-without-extension
+ systemd-service-file-outside-lib
+ systemd-service-file-missing-documentation-key
+ systemd-service-file-refers-to-obsolete-bindto
+ systemd-service-file-refers-to-obsolete-target
+ systemd-tmpfiles.d-outside-usr-lib
diff --git a/t/tests/systemd-general/tags b/t/tests/systemd-general/tags
index fb59e2c..38aa9cc 100644
--- a/t/tests/systemd-general/tags
+++ b/t/tests/systemd-general/tags
@@ -1,8 +1,8 @@
E: systemd-general: init-script-is-not-a-file etc/init.d/fifo-pipe-as-init
E: systemd-general: init.d-script-needs-depends-on-lsb-base etc/init.d/systemd-aliasd (line 35)
E: systemd-general: service-file-is-not-a-file etc/systemd/system/fifo-pipe-as-init.service
-E: systemd-general: service-key-has-whitespace etc/systemd/system/test.service at line 3
-E: systemd-general: service-key-has-whitespace usr/lib/systemd/system/test.service at line 3
+E: systemd-general: service-key-has-whitespace etc/systemd/system/test.service at line 4
+E: systemd-general: service-key-has-whitespace usr/lib/systemd/system/test.service at line 4
E: systemd-general: special-file etc/init.d/fifo-pipe-as-init 0644
E: systemd-general: special-file etc/systemd/system/fifo-pipe-as-init.service 0644
E: systemd-general: systemd-no-service-for-init-rcS-script systemd-general
@@ -20,5 +20,7 @@ W: systemd-general: script-in-etc-init.d-not-registered-via-update-rc.d etc/init
W: systemd-general: script-in-etc-init.d-not-registered-via-update-rc.d etc/init.d/masked
W: systemd-general: systemd-service-alias-without-extension etc/systemd/system/test.service
W: systemd-general: systemd-service-alias-without-extension usr/lib/systemd/system/test.service
+W: systemd-general: systemd-service-file-refers-to-obsolete-bindto etc/systemd/system/test.service
+W: systemd-general: systemd-service-file-refers-to-obsolete-bindto usr/lib/systemd/system/test.service
W: systemd-general: systemd-service-file-refers-to-obsolete-target etc/systemd/system/test.service syslog.target
W: systemd-general: systemd-service-file-refers-to-obsolete-target usr/lib/systemd/system/test.service syslog.target
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: