--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: lintian: false positives for missing-systemd-timer-for-cron-script?
- From: "Francesco Poli (wintermute)" <invernomuto@paranoici.org>
- Date: Thu, 25 Apr 2019 18:06:40 +0200
- Message-id: <155620840049.12475.12884094392443023086.reportbug@crunch>
Package: lintian
Version: 2.12.0
Severity: normal
Hello,
on last Monday (April, the 22nd) I rebuilt my package (apt-listbugs)
inside a pbuilder-managed sid chroot environment and checked the
result with lintian/2.12.0 (that was the version available from sid
on that day: however, it seems to me that nothing relevant has
changed in version 2.13.0).
I got a new complaint from "lintian -EviIL +pedantic" :
missing-systemd-timer-for-cron-script
Well, nothing to say, that's true: apt-listbugs currently lacks
any systemd timer, but ships a cron.daily script.
Hence, I began doing some research on the proper way to ship a
systemd timer along with an equivalent cron script (while avoiding
conflicts between the two).
I looked for examples in other packages which seem to have already
done this. I think two examples could be man-db and logrotate,
is that correct?
$ dpkg -L man-db | grep 'cron\|systemd\/system\/[^\/]\+\.timer'
/etc/cron.daily
/etc/cron.daily/man-db
/etc/cron.weekly
/etc/cron.weekly/man-db
/lib/systemd/system/man-db.timer
$ dpkg -L logrotate | grep 'cron\|systemd\/system\/[^\/]\+\.timer'
/etc/cron.daily
/etc/cron.daily/logrotate
/lib/systemd/system/logrotate.timer
I even looked inside these files, and it seems to me that the systemd
timer is really equivalent to the cron script (in both cases).
But, to my great surprise, I see that lintian [complains] [about] those
two packages, as well!
[complains]: <https://lintian.debian.org/full/cjwatson@debian.org.html#man-db_2.8.5-2>
[about]: <https://lintian.debian.org/full/cgzones@googlemail.com.html#logrotate_3.14.0-4>
Are these false positives?
I took a look at the [code] that implements the check.
[code]: <https://salsa.debian.org/lintian/lintian/blob/master/checks/systemd.pm>
I have a question: is the following line
return if any { m,^/lib/systemd/system/\.timer$, } $info->sorted_index;
missing something in the regexp?
Should it be
return if any { m,^/lib/systemd/system/[^\/]+\.timer$, } $info->sorted_index;
or anyway something able to catch some characters between
"system/" and ".timer" ?
I am not sure this is the cause of the false positives, though.
Of course, I can well be completely off-track, so please bear with me!
Please clarify.
Thanks for your time!
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages lintian depends on:
ii binutils 2.31.1-16
ii bzip2 1.0.6-9
ii diffstat 1.62-1
ii dpkg 1.19.6
ii dpkg-dev 1.19.6
ii file 1:5.35-4
ii gettext 0.19.8.1-9
ii gpg 2.2.12-1
ii intltool-debian 0.35.0+20060710.5
ii libapt-pkg-perl 0.1.34+b1
ii libarchive-zip-perl 1.64-1
ii libcapture-tiny-perl 0.48-1
ii libcgi-pm-perl 4.40-1
ii libclass-accessor-perl 0.51-1
ii libclone-perl 0.41-1+b1
pn libdigest-sha-perl <none>
ii libdpkg-perl 1.19.6
ii libemail-valid-perl 1.202-1
ii libfile-basedir-perl 0.08-1
ii libio-async-perl 0.72-1
ii libipc-run-perl 20180523.0-1
ii liblist-moreutils-perl 0.416-1+b4
ii libparse-debianchangelog-perl 1.2.0-13
ii libpath-tiny-perl 0.108-1
ii libtext-levenshtein-perl 0.13-1
ii libtimedate-perl 2.3000-2
ii libtry-tiny-perl 0.30-1
ii liburi-perl 1.76-1
ii libxml-simple-perl 2.25-1
ii libyaml-libyaml-perl 0.76+repack-1
ii man-db 2.8.5-2
ii patchutils 0.3.4-2
ii perl 5.28.1-6
ii t1utils 1.41-3
ii xz-utils 5.2.4-1
Versions of packages lintian recommends:
ii libperlio-gzip-perl 0.19-1+b5
Versions of packages lintian suggests:
pn binutils-multiarch <none>
ii libhtml-parser-perl 3.72-3+b3
ii libtext-template-perl 1.55-1
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 2.15.0
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 927970@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Chris Lamb <lamby@debian.org> (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, 26 May 2019 14:12:53 +0000
Source: lintian
Binary: lintian
Architecture: source all
Version: 2.15.0
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Chris Lamb <lamby@debian.org>
Description:
lintian - Debian package checker
Closes: 927970 929428 929430 929501
Changes:
lintian (2.15.0) unstable; urgency=medium
.
[ Chris Lamb ]
* t/bin/runtests: Correct equality operator preventing the correct
parsing of --onlyrun="" used when (eg.) executing autopkgtests and
apply a patch from Felix Lechner to specify a missing --work-dir
argument when building test packages. (Closes: #929430)
* Add references to Debian Policy §4.9.2 and §5.6.31 for checks
regarding Rules-Requires-Root. (Closes: #929428)
* Correct more false-positives for missing-systemd-timer-for-cron-script
due to an incorrect regular expression. Thanks again to Francesco Poli
(wintermute) for the patch. (Closes: #927970)
* Remove unnecessary commas from tag long descriptions and
improve grammar in the description of testsuite-autopkgtest-missing.
.
[ Vagrant Cascadian ]
* Add Guile 2.0 & 2.2 to and remove "ancient" versions 1.6 & 1.8 from the
list of versioned interpreters. (Closes: #929501)
.
[ Paul Wise ]
* spelling: Add several corrections
Checksums-Sha1:
d3427db5f0cbff7b0ec121eac569ad685642bbcc 3878 lintian_2.15.0.dsc
3310b8c84dcbd5fd668e689c733c63800650cc1e 1713420 lintian_2.15.0.tar.xz
bae8b544b340806bf32de374fde16cb70ccf21d4 1181408 lintian_2.15.0_all.deb
ceecf48d27b4e7460e984d709d48b8e3b771e1e7 18114 lintian_2.15.0_amd64.buildinfo
Checksums-Sha256:
803be7db6a3fe196fad780791d926093a1e0dde9bb492dea40f2f18c7ef32899 3878 lintian_2.15.0.dsc
e8b69c925f06cbdacfa8ffce2b7686299f0cd0cf95b0cfca85061f7d37199c0b 1713420 lintian_2.15.0.tar.xz
d98de401cdbc137c4a19b35e688149c767818829d70b5f5a89c48aceb2a81767 1181408 lintian_2.15.0_all.deb
fc09faf7980818779dbc529cd0df1c8c495613859e58f562606de7290fb47246 18114 lintian_2.15.0_amd64.buildinfo
Files:
9607acd0d4908ed5246af70de17ecd2e 3878 devel optional lintian_2.15.0.dsc
81f4ff718dcca00cfa9fb4521c164407 1713420 devel optional lintian_2.15.0.tar.xz
636ddd3f8a7de56202a902120f8b6507 1181408 devel optional lintian_2.15.0_all.deb
6404176d2d5a902880b0571c9edda828 18114 devel optional lintian_2.15.0_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlzqo5MACgkQHpU+J9Qx
Hlg6ABAAm1NtR91919krPKrPNM5X5Fu12IISA5ma8d6H0QFRg2KmteNlI7QwUkh/
ko+in08/ZPUDlFE/kE+s/QgjmQp0pNLFUOOvIF+P53PLL705DQmv4kewR0PwTf9p
W6KHnTCtPGPodeSLItI9DHzbEoY04tVS074OOkC62TmPCMGs41UpbA3u+NnS8xW8
VLyDv0XaQNxMO3PxCb+6AO8LK7N0O83M7OKFhWzZpizI+lxCDgj87n/ba+77CKKY
9Xv4F5iCwZOMul7TUnl/loTDT284sgFqmc7EZkx7pEO1o+di/EOWagMmFIWDIco7
ouw/G/kN4hPIcfmzx1k5M7GJsCsNc8FVZA7zOOiLPHrdew36LmN/vJtHXJw4xRoy
rYhjo6y6tOW1Kvgnr+xlaqlHff1z+hTkv3U8tIlJJsETUUx0vGgLzfCiXa6vGepI
Zrveq80rJy+J6+FpcHkreLd541JrfgyZW0rt9HFGmOa8pXDt4Zpoq3bsmDyrjK2J
XBzK1lm8bdd7kWyqEUG5V0SE1oWTvEZUhpWgt7RuYnGQAYFYRpa7wOm/s9upARgx
1Vv3XYCkwIiApUwh7LCWrF2DoHQHIQAyQo/wjazB+rGdCqotGcteQFR3h8K7/wMI
0138wf1Yw3Ch+cEFmd6iYnpCaT5SLbLuWZ5kMfjiEJBmo4BaMHM=
=kcbv
-----END PGP SIGNATURE-----
--- End Message ---