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

Bug#799083: marked as done (lintian: Please emit when systemd service files are missing a Documentation key)



Your message dated Sat, 05 Mar 2016 22:55:21 +0000
with message-id <E1acL6X-0002ax-25@franck.debian.org>
and subject line Bug#799083: fixed in lintian 2.5.42
has caused the Debian Bug report #799083,
regarding lintian: Please emit when systemd service files are missing a Documentation 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.)


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

Hi,

Documentation for systemd service files can be "automatically" viewed
using:

  $ systemctl help servicename

You can read more here:

  http://0pointer.de/blog/projects/self-documented-boot.html

It would be nice if lintian emitted a tag if this is missing. (I first
tried using "Severity: pedantic" but it meant it wasn't testable..?)

Patch attached.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
diff --git a/checks/systemd.desc b/checks/systemd.desc
index 701ad41..6559bfc 100644
--- a/checks/systemd.desc
+++ b/checks/systemd.desc
@@ -108,3 +108,11 @@ Info: The systemd service file contains space in the key definitions
  have been known to break.
  .
  Please remove the spaces surrounding the key definition.
+
+Tag: systemd-service-file-missing-documentation-key
+Severity: wishlist
+Certainty: certain
+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.
diff --git a/checks/systemd.pm b/checks/systemd.pm
index e59510e..df60074 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -187,6 +187,10 @@ sub check_systemd_service_file {
     my @obsolete = grep { /^(?:syslog|dbus)\.target$/ } @values;
     tag 'systemd-service-file-refers-to-obsolete-target', $file, $_
       for @obsolete;
+
+    tag 'systemd-service-file-missing-documentation-key', $file, unless
+    	extract_service_file_values($info, $file, 'Unit', 'Documentation', 1);
+
     return 1;
 }
 
diff --git a/t/tests/systemd-complex-service-file/debian/debian/test.service b/t/tests/systemd-complex-service-file/debian/debian/test.service
index 820b731..35df4d4 100644
--- a/t/tests/systemd-complex-service-file/debian/debian/test.service
+++ b/t/tests/systemd-complex-service-file/debian/debian/test.service
@@ -1,5 +1,6 @@
 [Unit]
 After=dbus.target
+Documentation=http://www.freedesktop.org/wiki/Software/dbus/
 
 [Service]
 ExecStart=/usr/bin/test
diff --git a/t/tests/systemd-complex-service-file/debian/debian/test2.service b/t/tests/systemd-complex-service-file/debian/debian/test2.service
index 71c1297..509e0d8 100644
--- a/t/tests/systemd-complex-service-file/debian/debian/test2.service
+++ b/t/tests/systemd-complex-service-file/debian/debian/test2.service
@@ -3,3 +3,4 @@
 [Unit]
 After=
 After=syslog.target
+Documentation=http://www.freedesktop.org/wiki/Software/dbus/
diff --git a/t/tests/systemd-complex-service-file/desc b/t/tests/systemd-complex-service-file/desc
index d06284f..98ec594 100644
--- a/t/tests/systemd-complex-service-file/desc
+++ b/t/tests/systemd-complex-service-file/desc
@@ -6,3 +6,4 @@ Description: Verifies the .service file parser properly handles .include within
 Test-For:
  service-key-has-whitespace
  systemd-service-file-refers-to-obsolete-target
+ systemd-service-file-missing-documentation-key
diff --git a/t/tests/systemd-complex-service-file/tags b/t/tests/systemd-complex-service-file/tags
index 61a9669..34cb40a 100644
--- a/t/tests/systemd-complex-service-file/tags
+++ b/t/tests/systemd-complex-service-file/tags
@@ -1,3 +1,4 @@
 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-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

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

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 799083@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, 05 Mar 2016 19:38:32 +0000
Source: lintian
Binary: lintian
Architecture: source
Version: 2.5.42
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: 789878 795641 799083 816599
Changes:
 lintian (2.5.42) unstable; urgency=medium
 .
   * Summary of tag changes:
     + Added:
       - systemd-service-file-missing-documentation-key
     + Removed:
       - dh_scrollkeeper-is-deprecated
       - dh_suidregister-is-obsolete
 .
   * checks/copyright-file.pm:
     + [NT] Apply patch from Rafael Kitover to avoid some
       false-positives with the DEP-5 copyright format.
       (Closes: #795641)
   * checks/debhelper.{desc,pm}:
     + [NT] Remove tags for dh_scrollkeeper and dh_suidregister,
       which are removed in the next version of debhelper.
   * checks/files.desc:
     + [JW] Update freedesktop.org specification URL.
   * checks/menu-format.desc:
     + [JW] Update freedesktop.org specification URLs.
   * checks/systemd.{desc,pm}:
     + [NT] Apply patch from Chris Lamb to flag systemd units
       without the "Documentation" key.  (Closes: #799083)
 .
   * data/scripts/interpreters:
     + [JW] Add hhvm as a known interpreter.  (Closes: #789878)
   * data/spelling/corrections:
     + [JW] Add more corrections.
     + [JW] Remove correction for "homogenous".  (Closes: #816599)
       Thanks to IOhannes m zmölnig for the bug report.
 .
   * debian/control:
     + [NT] Add (Build-)Dependency on libdata-alias-perl due
       to patch from Rafael Kitover.
 .
   * doc/lintianrc.example:
     + [NT] Remove LINTIAN_LAB - most people will never need it.
 .
   * lib/Lintian/Tag/Info.pm:
     + [JW] Allow "." characters in manual page references.
Checksums-Sha1:
 cd1f74daa8e34c6ea89b20de6e163088661a32a6 2809 lintian_2.5.42.dsc
 5c2ed26af43dd8240ce84ed5c5d0435e1de5947b 1292956 lintian_2.5.42.tar.xz
Checksums-Sha256:
 6ac9efc56b5718a1f7b3cee45784b9e795ea47747db05869234b2f71515219bb 2809 lintian_2.5.42.dsc
 1f719263e728c19cff667c28fcedf71121192a7857cf8049ce300169887eac21 1292956 lintian_2.5.42.tar.xz
Files:
 22d9c4b235c525aecae6e78fe0e7066a 2809 devel optional lintian_2.5.42.dsc
 76eea453e18a0cc85daa7aa23714ff1a 1292956 devel optional lintian_2.5.42.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJW20gVAAoJEAVLu599gGRCq7wQAKi37Iv12WjMa8877RYLByUu
MzI5H6DqFn4l99m3xaH7q4vT+ahH9iJ8kekIKtRF0oBpGgq4nwKmwMJCVSq4XBTA
8Hytzzzz1K5as4HgNqw6WOhiZnfEw9tOjFCD4fIObR40u+cs+GIk+pCgrISRCrBB
IiWptH8alJZJTg1v5dtuy9t36uJGIHKu/HAw2o+BjopYXgel6P0+ImP7CHtdtp2w
LvbwEuSX0cqOpnmdoKhJ7lW06Y8EzBghxs0mj20IdVvuQQiROeJ3Vh8A6paz3Kzc
tiNSXMfyan1LljCASBkxrum7rawCwWxjXpAR16Abl3r6TFi5sBfCAktxmJwALYBJ
5pJuzsnCp4MWUl0GxSXMsab63hYZric/Sp3cnApE5uhhEfdaVOq6PkOXhq5Rlz7V
ByVwnCTPOCA+QeJmvvcrDCOt3WZfxUHfX958wTxM3VHIJi3UKmmJTCE4eu7/RuDl
TM5I4BLuVXC1FUWx49OUHqBfw8kIVx5CMNRun6hzCi9erIMs8u/378SnULQL+yBC
9O4v1HYqI1ntRV/yD1czRb/+sfo99K/hwrbzmHAeXskhloKuXmv2R61Xfra5FWw4
t4F56aLheFv8mQvbji31hd4jKXfEWbH0dkwHT4SNUoFT5ni7NiZFBmAlx3kbhwS+
aK1aZ16C6pMMNr4f+MHS
=MlYM
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: