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

Bug#832771: marked as done (lintian: c/systemd: Warn about .service files with a missing Install key)



Your message dated Sat, 13 Aug 2016 22:08:09 +0000
with message-id <E1bYh69-00073P-WC@franck.debian.org>
and subject line Bug#832771: fixed in lintian 2.5.46
has caused the Debian Bug report #832771,
regarding lintian: c/systemd: Warn about .service files with a missing Install key
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.)


-- 
832771: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832771
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: lintian
Version: 2.5.45
Severity: wishlist
Tags: patch

Hi,


Attached is the following:

  commit 58a167f6f89dd33d29806919966cc839ccf8e0f5
  Author: Chris Lamb <lamby@debian.org>
  Date:   Thu Jul 28 12:57:16 2016 -0400
  
      c/systemd: Warn about .service files with a missing WantedBy target.
      
      Signed-off-by: Chris Lamb <lamby@debian.org>
  
   checks/systemd.desc                                          | 12 ++++++++++++
   checks/systemd.pm                                            |  2 ++
   .../systemd-complex-service-file/debian/debian/test3.service |  3 +++
   t/tests/systemd-complex-service-file/desc                    |  1 +
   t/tests/systemd-complex-service-file/tags                    |  1 +
   5 files changed, 19 insertions(+)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
From 58a167f6f89dd33d29806919966cc839ccf8e0f5 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Thu, 28 Jul 2016 12:57:16 -0400
Subject: [PATCH] c/systemd: Warn about .service files with a missing WantedBy
 target.

Signed-off-by: Chris Lamb <lamby@debian.org>
---
 checks/systemd.desc                                          | 12 ++++++++++++
 checks/systemd.pm                                            |  2 ++
 .../systemd-complex-service-file/debian/debian/test3.service |  3 +++
 t/tests/systemd-complex-service-file/desc                    |  1 +
 t/tests/systemd-complex-service-file/tags                    |  1 +
 5 files changed, 19 insertions(+)

diff --git a/checks/systemd.desc b/checks/systemd.desc
index 07dea64..a5063c7 100644
--- a/checks/systemd.desc
+++ b/checks/systemd.desc
@@ -126,3 +126,15 @@ Info: The systemd service file does not contain a <tt>Documentation</tt> key.
  Documentation for systemd service files can be automatically viewed using
  <tt>systemctl help servicename</tt> if this field is present.
 Ref: systemd.unit(5)
+
+Tag: systemd-service-file-missing-wanted-by-key
+Severity: normal
+Certainty: certain
+Info: The systemd service file does not contain a <tt>WantedBy=multi-user.target</tt> key
+ in its <tt>[Install]</tt> section.
+ .
+ Forgetting to add such a line (eg. <tt>WantedBy=multi-user.target</tt>)
+ results in the service file not being started by default.
+ .
+ If this is intentional, please override this warning.
+Ref: systemd.unit(5)
diff --git a/checks/systemd.pm b/checks/systemd.pm
index face504..4ef82ae 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -201,6 +201,8 @@ sub check_systemd_service_file {
     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);
+        tag 'systemd-service-file-missing-wanted-by-key', $file,
+          unless extract_service_file_values($file, 'Install', 'WantedBy',1);
     }
 
     return 1;
diff --git a/t/tests/systemd-complex-service-file/debian/debian/test3.service b/t/tests/systemd-complex-service-file/debian/debian/test3.service
index 5fe96f6..3862626 100644
--- a/t/tests/systemd-complex-service-file/debian/debian/test3.service
+++ b/t/tests/systemd-complex-service-file/debian/debian/test3.service
@@ -3,3 +3,6 @@
 [Unit]
 After=
 After = syslog.target
+
+[Install]
+WantedBy=multi-user.target
diff --git a/t/tests/systemd-complex-service-file/desc b/t/tests/systemd-complex-service-file/desc
index 98ec594..a7d5d4f 100644
--- a/t/tests/systemd-complex-service-file/desc
+++ b/t/tests/systemd-complex-service-file/desc
@@ -7,3 +7,4 @@ Test-For:
  service-key-has-whitespace
  systemd-service-file-refers-to-obsolete-target
  systemd-service-file-missing-documentation-key
+ systemd-service-file-missing-wanted-by-key
diff --git a/t/tests/systemd-complex-service-file/tags b/t/tests/systemd-complex-service-file/tags
index 34cb40a..00a01d9 100644
--- a/t/tests/systemd-complex-service-file/tags
+++ b/t/tests/systemd-complex-service-file/tags
@@ -1,4 +1,5 @@
 E: systemd-complex-service-file: service-key-has-whitespace lib/systemd/system/test3.service at line 3
 I: systemd-complex-service-file: systemd-service-file-missing-documentation-key lib/systemd/system/test3.service
+W: systemd-complex-service-file: systemd-service-file-missing-wanted-by-key lib/systemd/system/test2.service
 W: systemd-complex-service-file: systemd-service-file-refers-to-obsolete-target lib/systemd/system/test.service dbus.target
 W: systemd-complex-service-file: systemd-service-file-refers-to-obsolete-target lib/systemd/system/test2.service syslog.target
-- 
2.8.1


--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 2.5.46

We believe that the bug you reported is fixed in the latest version of
lintian, 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 832771@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <niels@thykier.net> (supplier of updated lintian 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 ftpmaster@ftp-master.debian.org)


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

Format: 1.8
Date: Sat, 13 Aug 2016 19:53:23 +0000
Source: lintian
Binary: lintian
Architecture: source
Version: 2.5.46
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Niels Thykier <niels@thykier.net>
Description:
 lintian    - Debian package checker
Closes: 802964 823326 827158 828719 828773 828933 828934 829047 829545 829592 829635 830930 832096 832771 833015 833052
Changes:
 lintian (2.5.46) unstable; urgency=medium
 .
   * Summary of tag changes:
     + Added:
       - systemd-service-file-missing-install-key
       - typo-in-debhelper-override-target
     + Removed:
       - package-depends-on-lower-priority-package
 .
   * checks/cruft.pm:
     + [NT] Ignore mentions of /usr/lib/perl5 in patches as they might
       be a way of fixing said mentions.  Thanks to Robert Luberda
       for reporting the bug.  (Closes: #802964)
   * checks/debhelper.{desc,pm}:
     + [JW] Apply patch from Chris Lamb to check for common typos in
       debian/rules target names.  (Closes: #832096)
     + [JW, NT] Add some more (indirect) "dh" build-systems.
       (Closes: #828773)
   * checks/files.desc:
     + [JW] Fix typos.
   * checks/group-checks.{desc,pm}:
     + [NT] Drop "lower priorities" check as the general consensus seems to
       be that priorities changes are mostly busy work.  Thanks to Dominic
       Hargreaves for the report.  (Closes: #823326)
   * checks/infofiles.desc:
     + [JW] Fix typo.
   * checks/java.pm:
     + [JW] Don't emit javalib-but-no-public-jars for transitional packages.
       Thanks to Jeremy Bicha for the bug report.  (Closes: #829047)
   * checks/manpages.desc:
     + [JW] Fix typos.
   * checks/phppear.desc:
     + [JW] Fix typos.
   * checks/scripts.pm:
     + [JW] Fix false positive unusual-interpreter when the script had
       "#!/usr/bin/env" shebang and the interpreter was shipped in the same
       package.  Thanks to Sergio Durigan Junior for the bug report and the
       initial patch.  (Closes: #828933)
   * checks/shared-libs.desc:
     + [JW] Fix typo.
   * checks/systemd.{desc,pm}:
     + [JW] Fix typos.
     + [JW, NT] Apply from Chris Lamb to check for a possibly missing
       "WantedBy" target in service files.  (Closes: #832771)
     + [JW, NT] Improve wording about the "systemd" sequence of a tag.
   * checks/version-substvars.desc:
     + [JW] Make maybe-not-arch-all-binnmuable a classification tag.
   * checks/watch-file.desc:
     + [JW] Fix typo.
 .
   * collection/*:
     + [JW,NT] Remove "." from Perl's search path.  (Mitigates: #588017)
 .
   * commands/{info.pm,lintian}:
     + [NT] Drop the necessary bits for supporting translated tag
       descriptions.
   * commands/lintian:
     + [NT,JW] Remove "." from Perl's search path.  (Mitigates: #588017)
   * commands/reporting-html-reports.pm:
     + [NT] Fix typo in named parameter that made the raw lintain.log
       unavailable on lintian.debian.org.  Thanks to Guillem Jover
       for reporting the issue.  (Closes: #828719)
     + [NT] Install the lintian log file as a resource so it can be
       handled (e.g. cached) like other resources.
   * commands/reporting-lintian-harness.pm:
     + [NT] Attempt to terminate the run timely if it overruns the time
       limit.
   * commands/reporting-sync-state.pm:
     + [NT] Remove redundant "area" field from all binary packages in
       the harness state cache.
     + [NT] Drop existing instances of the "sha1" field from all packages
       in the harness state cache.
 .
   * data/common/source-fields:
     + [NT] Apply patch from Edward Betts to add Testsuite-Triggers as
       a known source field.  (Closes: #829545)
   * data/debhelper/*:
     + [NT] Refresh against unstable.
   * data/debhelper/dh_{addons,commands}-manual:
     + [JW, NT] Add the systemd sequence and related tools now that
       debhelper is taking over the dh-systemd helpers.  Thanks to
       Christian Hofstaedtler for the report.  (Closes: #830930)
   * data/fields/essential:
     + [JW] Add init-system-helpers; remove sysvinit and mktemp.  Thanks to
       Felipe Sateler for the bug report.  (Closes: #833015)
   * data/fields/obsolete-packages:
     + [NT] Remove "debmake" as the package is now reintroduced with a
       different purpose.  Thanks to Paul Wise for the report.
       (Closes: #827158)
   * data/files/fonts:
     + [NT] Refresh against unstable.
   * data/java/constants:
     + [NT] Bump known java-class versions.  Thanks to Hideki Yamane for
       the report.  (Closes: #829592)
   * data/scripts/interpreters:
     + [JW] Apply patch from Sergio Durigan Junior to add newLISP as a
       known interpreter.  (Closes: #828934)
   * data/spelling/corrections:
     + [JW] Add more corrections.
 .
   * debian/control:
     + [NT] Drop now unnecessary po4a Build-Dependency.
   * debian/rules:
     + [NT] Drop code for handling translations.
 .
   * doc/lintian.xml:
     + [JW] Fix typo.
 .
   * frontend/dplint:
     + [JW,NT] Remove "." from Perl's search path.  (Mitigates: #588017)
 .
   * helpers/coll/*:
     + [JW,NT] Remove "." from Perl's search path.  (Mitigates: #588017)
 .
   * lib/*.pm:
     + [NT] Drop support for translations of tag descriptions.  It never
       got used.
   * lib/Lintian/*.pm:
     + [JW] Fix typos.
   * lib/Lintian/Tags.pm:
     + [JW, NT] Fix mojibake in UTF-8 encoded comments for overrides.
       (Closes: #833052)
   * lib/Lintian/Util.pm:
     + [NT] Shuffle the harness backlog a bit to reduce the risk of a lot
       of very large package groups being scheduled in the same run.
 .
   * man/lintian.pod.in:
     + [JW] Fix typo.
     + [JW] Remove unneeded "file:" in front of a pathname.
 .
   * po4a:
     + [NT] Drop as it was not used.
 .
   * t:
     + [JW,NT] Update tests to work now that dpkg validates
       debian/tests/control.  (Closes: #829635)
     + [NT] Apply patch from Adam Conrad to make some tests work
       when the compiler uses -fPIE by default.
Checksums-Sha1:
 9a1020c2711af60e302a2f921566086683635d2a 2821 lintian_2.5.46.dsc
 1875580f0571234aa2dd1463c4e33e4d458deedd 1222444 lintian_2.5.46.tar.xz
Checksums-Sha256:
 5ebc3461755aafb235192f2779ce46da4cb6d6afd6a59f41330f10b839d3030a 2821 lintian_2.5.46.dsc
 0673fc865e80ed9b8bffd034fe62a2300b7eb1aa1ae68051cd0489ee44939224 1222444 lintian_2.5.46.tar.xz
Files:
 c7ff30bf261d1297b6783054054b2c91 2821 devel optional lintian_2.5.46.dsc
 1dba94e96804073b2f1083634b19fdaf 1222444 devel optional lintian_2.5.46.tar.xz

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

iQIcBAEBCAAGBQJXr3zdAAoJEAVLu599gGRCijcQAIf0xyvjq3ZDP/AD7k3Lv/OT
Csk7U1w7Nwdh/YZ/qzLe1XrmgMgp4Tr8K7hu6GR2Rg4LrP5MNzDfOnBniTXIb9w5
BS0toGHaCvEYJtZcw7+81FtNQtl1KIMUFOYZECON/mIeTTBASgegGrU/zIo9Btj5
hLaeh/PDkJYJcITE2t58lof6EBFDAT+SN6hRofBQIbGri2gvZOteILQS0Xtxb5r0
5nAGLuFsHF+3JTFbXlU6OHe9u8UGVGLSD+zLw/4xEjkl5O5kENjID58mVcCUmNox
MEQg/BbAOi+aRMHmXyOGQUxsfDhD4ciLJq//CxgeDZ7KAL4lEte2pQVv8ukWQAhh
cS/++zOrXa1iyHDUoIKBZTNvXb0JImVX0+3cArWXGLxAGAgr6viXoALAG7+2EqCV
hdtUnHJRc5Ts15miMfml2DMptLdC4/BRhxjANWSl8DvTiIuStpAQPglF0VGO8xRv
a3ewJ3wSVjmjOKKqTebJYdme8fQbydQ0npoRnHjqZJXV+UCGbW77vnR0RHYktObI
2/IewtJ9ptpr3V9ecaSPNVexuEQzd/HW5Sibo2DHe0C2LNTiFfhBaT1GKK2pDCWu
yGujn+kBNqqm8pEn5msCh9dsZ8oWkCywdKp4PeJ2h1/x2JPTlfNAkgEobJ7yWS4i
o3cVwhjKsjWIAcnQ2oc5
=x9O7
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: