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

Bug#837057: marked as done (lintian: Please catch some false-positives in systemd-service-file-missing-install-key)



Your message dated Sun, 11 Sep 2016 16:20:36 +0000
with message-id <E1bj7Ui-0002UN-HJ@franck.debian.org>
and subject line Bug#837057: fixed in lintian 2.5.47
has caused the Debian Bug report #837057,
regarding lintian: Please catch some false-positives in systemd-service-file-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.)


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

Hi,

Attached is the following:

  commit 78664328f5fe568ea15f7e57a4c5378425301e22
  Author: Chris Lamb <lamby@debian.org>
  Date:   Thu Sep 8 12:24:05 2016 +0100
  
      c/systemd: Reduce certainty of systemd-service-file-missing-install-key.
      
      Signed-off-by: Chris Lamb <lamby@debian.org>
  
   checks/systemd.desc                       | 4 +---
   t/tests/systemd-complex-service-file/tags | 2 +-
   2 files changed, 2 insertions(+), 4 deletions(-)
  
  commit 7c6c8b12b962993fd3e06ee9453e25f3fef685fb
  Author: Chris Lamb <lamby@debian.org>
  Date:   Thu Sep 8 12:33:36 2016 +0100
  
      c/systemd.pm: Don't emit systemd-service-file-missing-install-key for "template" .service files.
      
      Signed-off-by: Chris Lamb <lamby@debian.org>
  
   checks/systemd.pm                                                | 3 ++-
   t/tests/systemd-complex-service-file/debian/debian/install       | 3 ++-
   t/tests/systemd-complex-service-file/debian/debian/test@.service | 5 +++++
   3 files changed, 9 insertions(+), 2 deletions(-)
  
  commit b4584f232df1f64dbabacbbac3b1496ccf2418f2
  Author: Chris Lamb <lamby@debian.org>
  Date:   Thu Sep 8 12:36:57 2016 +0100
  
      c/systemd: Don't emit systemd-service-file-missing-install-key if it contain an "Also=" section.
      
      Signed-off-by: Chris Lamb <lamby@debian.org>
  
   checks/systemd.pm                                                | 1 +
   t/tests/systemd-complex-service-file/debian/debian/install       | 1 +
   t/tests/systemd-complex-service-file/debian/debian/test4.service | 8 ++++++++
   3 files changed, 10 insertions(+)
  
  commit b380c64f21805dca56cfa84c48b83cca5381b3ef
  Author: Chris Lamb <lamby@debian.org>
  Date:   Thu Sep 8 12:48:09 2016 +0100
  
      c/systemd: Don't emit systemd-service-file-missing-install-key for Type=oneshot.
  
   checks/systemd.pm                                                | 1 +
   t/tests/systemd-complex-service-file/debian/debian/install       | 1 +
   t/tests/systemd-complex-service-file/debian/debian/test5.service | 6 ++++++
   3 files changed, 8 insertions(+)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
From 78664328f5fe568ea15f7e57a4c5378425301e22 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Thu, 8 Sep 2016 12:24:05 +0100
Subject: [PATCH 1/4] c/systemd: Reduce certainty of
 systemd-service-file-missing-install-key.

Signed-off-by: Chris Lamb <lamby@debian.org>
---
 checks/systemd.desc                       | 4 +---
 t/tests/systemd-complex-service-file/tags | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/checks/systemd.desc b/checks/systemd.desc
index 86bfa51..d4aea02 100644
--- a/checks/systemd.desc
+++ b/checks/systemd.desc
@@ -129,12 +129,10 @@ Ref: systemd.unit(5)
 
 Tag: systemd-service-file-missing-install-key
 Severity: normal
-Certainty: possible
+Certainty: wild-guess
 Info: The systemd service file does not contain a <tt>WantedBy=</tt> or
  <tt>RequiredBy=</tt> key in its <tt>[Install]</tt> section.
  .
  Forgetting to add such a line (e.g. <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/t/tests/systemd-complex-service-file/tags b/t/tests/systemd-complex-service-file/tags
index fafa0e8..11095e2 100644
--- a/t/tests/systemd-complex-service-file/tags
+++ b/t/tests/systemd-complex-service-file/tags
@@ -1,5 +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-install-key lib/systemd/system/test2.service
+I: systemd-complex-service-file: systemd-service-file-missing-install-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.9.3

From 7c6c8b12b962993fd3e06ee9453e25f3fef685fb Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Thu, 8 Sep 2016 12:33:36 +0100
Subject: [PATCH 2/4] c/systemd.pm: Don't emit
 systemd-service-file-missing-install-key for "template" .service files.

Signed-off-by: Chris Lamb <lamby@debian.org>
---
 checks/systemd.pm                                                | 3 ++-
 t/tests/systemd-complex-service-file/debian/debian/install       | 3 ++-
 t/tests/systemd-complex-service-file/debian/debian/test@.service | 5 +++++
 3 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 t/tests/systemd-complex-service-file/debian/debian/test@.service

diff --git a/checks/systemd.pm b/checks/systemd.pm
index b6a2153..aa0e1d0 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -203,7 +203,8 @@ sub check_systemd_service_file {
           unless extract_service_file_values($file, 'Unit', 'Documentation',1);
         tag 'systemd-service-file-missing-install-key', $file,
           unless extract_service_file_values($file, 'Install', 'WantedBy',1)
-          or extract_service_file_values($file, 'Install', 'RequiredBy',1);
+          or extract_service_file_values($file, 'Install', 'RequiredBy',1)
+          or $file =~ m,@\.service$,;
     }
 
     return 1;
diff --git a/t/tests/systemd-complex-service-file/debian/debian/install b/t/tests/systemd-complex-service-file/debian/debian/install
index f4ca3c8..10c1616 100644
--- a/t/tests/systemd-complex-service-file/debian/debian/install
+++ b/t/tests/systemd-complex-service-file/debian/debian/install
@@ -1,3 +1,4 @@
 debian/test.service lib/systemd/system/
 debian/test2.service lib/systemd/system/
-debian/test3.service lib/systemd/system/
\ No newline at end of file
+debian/test3.service lib/systemd/system/
+debian/test@.service lib/systemd/system/
diff --git a/t/tests/systemd-complex-service-file/debian/debian/test@.service b/t/tests/systemd-complex-service-file/debian/debian/test@.service
new file mode 100644
index 0000000..d54ea5d
--- /dev/null
+++ b/t/tests/systemd-complex-service-file/debian/debian/test@.service
@@ -0,0 +1,5 @@
+[Unit]
+Documentation=https://www.example.com/
+
+[Service]
+ExecStart=/usr/bin/test
-- 
2.9.3

From b4584f232df1f64dbabacbbac3b1496ccf2418f2 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Thu, 8 Sep 2016 12:36:57 +0100
Subject: [PATCH 3/4] c/systemd: Don't emit
 systemd-service-file-missing-install-key if it contain an "Also=" section.

Signed-off-by: Chris Lamb <lamby@debian.org>
---
 checks/systemd.pm                                                | 1 +
 t/tests/systemd-complex-service-file/debian/debian/install       | 1 +
 t/tests/systemd-complex-service-file/debian/debian/test4.service | 8 ++++++++
 3 files changed, 10 insertions(+)
 create mode 100644 t/tests/systemd-complex-service-file/debian/debian/test4.service

diff --git a/checks/systemd.pm b/checks/systemd.pm
index aa0e1d0..b670c37 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -204,6 +204,7 @@ sub check_systemd_service_file {
         tag 'systemd-service-file-missing-install-key', $file,
           unless extract_service_file_values($file, 'Install', 'WantedBy',1)
           or extract_service_file_values($file, 'Install', 'RequiredBy',1)
+          or extract_service_file_values($file, 'Install', 'Also',1)
           or $file =~ m,@\.service$,;
     }
 
diff --git a/t/tests/systemd-complex-service-file/debian/debian/install b/t/tests/systemd-complex-service-file/debian/debian/install
index 10c1616..a4ea934 100644
--- a/t/tests/systemd-complex-service-file/debian/debian/install
+++ b/t/tests/systemd-complex-service-file/debian/debian/install
@@ -1,4 +1,5 @@
 debian/test.service lib/systemd/system/
 debian/test2.service lib/systemd/system/
 debian/test3.service lib/systemd/system/
+debian/test4.service lib/systemd/system/
 debian/test@.service lib/systemd/system/
diff --git a/t/tests/systemd-complex-service-file/debian/debian/test4.service b/t/tests/systemd-complex-service-file/debian/debian/test4.service
new file mode 100644
index 0000000..d63a719
--- /dev/null
+++ b/t/tests/systemd-complex-service-file/debian/debian/test4.service
@@ -0,0 +1,8 @@
+[Unit]
+Documentation=https://www.example.com/
+
+[Service]
+ExecStart=/usr/bin/test
+
+[Install]
+Also=test3
-- 
2.9.3

From b380c64f21805dca56cfa84c48b83cca5381b3ef Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Thu, 8 Sep 2016 12:48:09 +0100
Subject: [PATCH 4/4] c/systemd: Don't emit
 systemd-service-file-missing-install-key for Type=oneshot.

---
 checks/systemd.pm                                                | 1 +
 t/tests/systemd-complex-service-file/debian/debian/install       | 1 +
 t/tests/systemd-complex-service-file/debian/debian/test5.service | 6 ++++++
 3 files changed, 8 insertions(+)
 create mode 100644 t/tests/systemd-complex-service-file/debian/debian/test5.service

diff --git a/checks/systemd.pm b/checks/systemd.pm
index b670c37..d22140c 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -205,6 +205,7 @@ sub check_systemd_service_file {
           unless extract_service_file_values($file, 'Install', 'WantedBy',1)
           or extract_service_file_values($file, 'Install', 'RequiredBy',1)
           or extract_service_file_values($file, 'Install', 'Also',1)
+          or grep { /^oneshot$/ } extract_service_file_values($file, 'Service', 'Type')
           or $file =~ m,@\.service$,;
     }
 
diff --git a/t/tests/systemd-complex-service-file/debian/debian/install b/t/tests/systemd-complex-service-file/debian/debian/install
index a4ea934..763129d 100644
--- a/t/tests/systemd-complex-service-file/debian/debian/install
+++ b/t/tests/systemd-complex-service-file/debian/debian/install
@@ -2,4 +2,5 @@ debian/test.service lib/systemd/system/
 debian/test2.service lib/systemd/system/
 debian/test3.service lib/systemd/system/
 debian/test4.service lib/systemd/system/
+debian/test5.service lib/systemd/system/
 debian/test@.service lib/systemd/system/
diff --git a/t/tests/systemd-complex-service-file/debian/debian/test5.service b/t/tests/systemd-complex-service-file/debian/debian/test5.service
new file mode 100644
index 0000000..64a7562
--- /dev/null
+++ b/t/tests/systemd-complex-service-file/debian/debian/test5.service
@@ -0,0 +1,6 @@
+[Unit]
+Documentation=https://www.example.com/
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/test
-- 
2.9.3


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

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 837057@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: Sun, 11 Sep 2016 14:34:34 +0000
Source: lintian
Binary: lintian
Architecture: source
Version: 2.5.47
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: 798983 805076 831864 833656 834370 834797 835449 836017 837057
Changes:
 lintian (2.5.47) unstable; urgency=medium
 .
   * Summary of tag changes:
     + Added:
       - package-contains-python-coverage-file
 .
   * checks/changelog-file.desc:
     + [JW] Fix typo.
   * checks/copyright-file.pm:
     + [JW] Stop using Data::Alias.  Thanks to Niko Tyni for the bug report.
       (Closes: #834797)
   * checks/cruft.desc:
     + [JW] Fix typo.
   * checks/debhelper.pm:
     + [NT] Remove logic for CDBS creating a compat file when it is absent
       as debhelper now requires a compat file unconditionally.
     + [NT] Support the new named compat levels in debhelper.
     + [NT] Apply patch from Chris Lamb to improve the tag for typoed
       debhelper override targets.  (Closes: #834370)
   * checks/duplicate-files.desc:
     + [JW] Fix typo.
   * checks/fields.{desc,pm}:
     + [JW] Fix typos.
     + [JW] Escape dots in some regexps.
     + [NT] Apply patch from Chris Lamb to check that libjs-* packages
       are in the "web" section.  (Closes: #798983)
   * checks/files.{desc,pm}:
     + [JW] Fix typos.
     + [NT] Apply patch from Chris Lamb to catch ".coverage" files in
       packages.  (Closes: #831864)
   * checks/java.desc:
     + [JW] Fix typo.
   * checks/patch-systems.desc:
     + [JW] Fix formatting of some filenames.
   * checks/phppear.{desc,pm}:
     + [JW] Fix typo.
     + [NT] Apply patch from Jochen Sprickerhof to skip this check if the
       package does not contain any php files.  (Closes: #805076)
   * checks/rules.desc:
     + [JW] Fix typo.
     + [JW] Fix tag description formatting.
   * checks/shared-libs.desc:
     + [JW] Fix typos.
   * checks/systemd.{desc,pm}:
     + [NT] Apply patches from Chris Lamb to fix some false positives with
       systemd-service-file-missing-install-key.  (Closes: #837057)
 .
   * data/debhelper/compat-level:
     + [NT] Bump debhelper compat versions with the release of debhelper
       10.
   * data/debhelper/dh_{addons,commands}-manual:
     + [JW] Add dh-autoreconf, which is now a dependency of debhelper.
       Thanks to Michael Biebl for the bug report.  (Closes: #835449)
   * data/debhelper/named-compat-levels:
     + [NT] New file.
   * data/output/manual-references:
     + [JW] Refresh.
   * data/scripts/interpreters:
     + [JW] Add pypy as a known interpreter. Thanks to Sebastian Ramacher
       for the bug report.  (Closes: #836017)
   * data/spelling/corrections*:
     + [JW] Add more corrections.
       Thanks to Paul Wise for patches for some of them.
 .
   * debian/control:
     + [JW] Drop now-unused libdata-alias-perl from (Build-)Depends.
 .
   * lib/Lintian/Relation/Version.pm:
     + [NT] Apply change from Brendan O'Dea to avoid (implicitly) messing
       with the global APT "_config" object.  (Closes: #833656)
 .
   * private/refresh-manual-refs:
     + [JW] Fix path to Debian policy for Java.
 .
   * reporting/templates/head.tmpl:
     + [NT] Add subresource integrity fields to all <link> tags.
     + [NT] Add Content-Security-Policy header (via <meta http-equiv>).
Checksums-Sha1:
 926313601893fc17500c046e3dec48fdb982c5ab 2801 lintian_2.5.47.dsc
 8730d9315c63902d6cfcc1cc35fb7decfce4d6da 1227808 lintian_2.5.47.tar.xz
Checksums-Sha256:
 074d21f59284a559f65049cd986766962a14cb0f220ecdc30558965c6b0bd413 2801 lintian_2.5.47.dsc
 4bd518e98998b5dbcce6f951c9a2c92d2e72ebbdb35d1fd7cb1b25c0958b2ae4 1227808 lintian_2.5.47.tar.xz
Files:
 946e2ab5518af76e94d42ada73a2d529 2801 devel optional lintian_2.5.47.dsc
 a01bcfac375cdbffedc07c1a8f77a0f4 1227808 devel optional lintian_2.5.47.tar.xz

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

iQIcBAEBCAAGBQJX1XTRAAoJEAVLu599gGRCiCsP+wTsjMYc/tVbpU5lCdgQFxCO
XVi0FB6TR44QqjxP2GCQSWbdMD+IgUd/oY7yGC35b8vKQvAbRLd8K33QvlzEchtO
clov6zG6kz6D0oPdp/r0ggb7BmNJFGDmIqK32FOcL7qeT6FbKwAro8Stz8F72Rh3
h9ZwT1v3S2C4Ch33GTQxD+k00wS/+1Y8C/p7t/MJmQ9v3cH9YVStLPlfyJje24H+
JkN38hntssZI+jt5WPaRo2x+96poMYUn4XkiiWNb8xUCEo1L/9xG1v5T37w9/7UV
FMfB5xsPzVfL6MrKQst4ZbGhvJK+QTFlEPwwa+CCLslSmM2xJ+MY+O00DTUtgvwl
pjcP/qDENmzFIgSRkfcBtKmZBL9IyyZnEHs56+XMLghA8VPOcaC+LRSoWq+UiVuH
IkgaITIXTrapLmO0yuvYI02xNAici+XSe9kS5l/YFwb0GcRyPMZDeW0Y2Gsv3t5S
C5qVd3ShVlIuBhAuobfX4VqNm5XfSHWdhW6w9MKivwWQo2nRgHCyFNXppelFis8D
qY9KFL6ckoZiUDbWP8yJBsN4b/Czb21g69OG1E4oCz//mjD0brHGr1v0swbd0/ou
pV2uVAL5YPKDMY6q4Q0wHm/GjpaxsiYHN25BH8woK34Jy4UaegDJ4VuB2vejNIy7
EFzArFlraK+PsGcKV7HZ
=558m
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: