#1003272 lintian: chokes on overrides with "(" but no ")"

Package:
lintian
Source:
lintian
Submitter:
Tobias Frost
Date:
2022-06-20 14:39:14 UTC
Severity:
serious
Tags:
#1003272#5
Date:
2022-01-07 10:53:34 UTC
From:
To:
Documentation seems to imply. that overrides only use * [1]  and ? [2]
as wildcards.

However, if I have the following override:

solarpowerlog: skip-systemd-native-flag-missing-pre-depends (does not satisfy init-system-helpers*

lintian breaks with:

Unmatched ( in regex; marked by <-- HERE in m/( <-- HERE does not satisfy init-system-helpers.*/ at /usr/share/lintian/bin/../lib/Lintian/Processable/Overrides.pm line 228.

Not sure if thi is just an documentation issue (is there intentional regexp support?) or unintended behaviour.



[1] from: file:///usr/share/doc/lintian/lintian.html#overrides
Many tags can occur more than once (e.g. if the same error is found in more than one file). You can override a tag either completely by specifying its name (first line in the examples) or only one occurrence of it by specifying the additional info, too (second line in the examples). If you add an asterisk (*) in the additional info, this will match arbitrary strings similar to the shell wildcard. For example:

[2] inconsitent/different from [1], additionally https://lintian.debian.org/tags/mismatched-override?version=2.104.325 says
that:
"You can use wildcards, such as * or ? in the context to make a match more likely."

#1003272#10
Date:
2022-01-07 12:50:37 UTC
From:
To:
Hi,

That is a consequence of switching to Text::Glob for overrides. I
would suggest '[(]' and '[)]' as probable fixes (backslashes do not
work) but more changes are coming to override files.

We recently introduced 'pointed hints' which allow live links on our
website to sources.d.o and soon others. In terminal output, they are
shown as

    tag annotation [file pointer]

but that format is not great for overrides.

We will likely allow globbing on the file pointer, regular expressions
on the annotation and require literal matches for the tag name. To
keep those fields separate, we may switch to a Deb822 format for
override files, but hope to provide automated tools for migration and
management similar to those we already use internally to interactively
recalibrate Lintian's test suite.

Kind regards
Felix Lechner

#1003272#15
Date:
2022-01-07 18:18:52 UTC
From:
To:
FWIIW, escaping with a backslash, e.g "\(" *did* work for me earlier today...
#1003272#20
Date:
2022-01-07 18:23:17 UTC
From:
To:
Hi,

Okay, thanks!

I just knew backslashes do not work for square brackets, which are
perhaps more common right now. There, the awkward notation [[] is
required until I implement the new override format.

Kind regards
Felix Lechner

#1003272#41
Date:
2022-06-13 02:28:49 UTC
From:
To:
Hi,

Tobias Frost wrote:

Felix Lechner wrote:

No. That feature only came _after_ 2.114.0 against which Tobias
reported the bug:

https://salsa.debian.org/lintian/lintian/-/commit/139009d5a54225ebff4509ec37b979cb898c17fe

~/lintian/lintian → git describe
139009d5a54225ebff4509ec37b979cb898c17fe
2.114.0-32-g139009d5a

So it came 32 commits _after_ the 2.114.0 release. gitk confirms this
as well.

Ack. For the current version in git, I suggest using "?" or "*" to
match problematic characters. E.g. for myself

  links2 source: very-long-line-length-in-source-file * > 512 *graphics/font/*

worked while

  links2 source: very-long-line-length-in-source-file * > 512 [graphics/font/*

bailed out with a regexp syntax error, but now at
"/usr/share/perl5/Text/Glob.pm line 18", which might be actually a bug
in Text::Glob which does not seem to catch unproper shell bracket
wildcards.

Given that Felix quit working on Lintian, this will likely not happen
unless someone steps up and continues the ideas and his work.

I will only try to fix things for now. (And I'm not sure how I'll
handle this, maybe mitigate it by more fitting documentation and
maybe some sanity checks.)

		Regards, Axel

#1003272#46
Date:
2022-06-13 03:15:19 UTC
From:
To:
unmerge 1003272
unmerge 1003353
unmerge 1007002
tag 1003272 + pending
notfound 1003272 2.114.123
retitle 1003353 lintian: Override processing defective for square brackets and curly brackets
notfound 1003353 2.114.0
severity 1007002 important
notfound 1007002 2.114.123
tag 1007002 + wontfix
kthxbye

Hi again,

I disagree that #1003272, #1003353 and #1007002 are the same bug. The
former two are similar, but not identical and the latter was only the
reason why the second one is showing up more often. Hence unmerging
all three.

Axel Beckert wrote in #1003272:

And it actually fixed Tobias' issue. I can reproduce Tobias' issue
with 2.114.0, but no more the current git HEAD (which is approximately
2.114.211, git commit 1c7bb81662e5e23a64fc272a008ddfc75c855537 or so).

This is actually #1003353 which claims that processing of parentheses
is broken, too, but actually only seems to be about brackets.

This issue is still present in the current git HEAD. Will handle that
one separately later.

And #1007002 is only (!) about design decision to change nearly all
tag formats involving file paths and line numbers. It has nothing to
do with the other two real bugs and I have no idea why they have been
merged.

While I was (and still am) annoyed by these changes, I do value the
goal behind it. I currently suspect that we're mostly through this
migration and I do hope that no such mass-changes will ever be needed
again. Especially since — as I wrote — the following will likely never
happen without Felix working on Lintian:

Since at least I will not revert such huge changes, I'll tag #1007002
as "wontfix" for now and downgrade it to its original severity.

We can continue working on that bug report if we find someone who
either will work on reverting all the related work (although I think,
it's both, too late and also probably way too much work given all the
other recent changes) or, probably much better, provide either a
migration script or some code which also accepts the old override
formats. In that case, I'd remove the "wontfix" again. (Sorry, Simon,
I generally agree with #1007002, but we currently have way more severe
issues with Lintian than #1007002. Hence I also didn't remove the
confirmed tag.)

		Regards, Axel

#1003272#61
Date:
2022-06-20 14:34:13 UTC
From:
To:
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 1003272@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Axel Beckert <abe@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)
Format: 1.8
Date: Mon, 20 Jun 2022 13:23:02 +0200
Source: lintian
Architecture: source
Version: 2.115.0
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Axel Beckert <abe@debian.org>
Closes: 657390 932634 941656 963099 989381 995286 996740 999768 999810 1000234 1000977 1001655 1002828 1003131 1003272 1003353 1003456 1003668 1003817 1003913 1003941 1004231 1004239 1004240 1004660 1005046 1005184 1005762 1006390 1006859 1007140 1007257 1012090
Changes:
 lintian (2.115.0) unstable; urgency=medium
 .
   The Lintian Resurrection Release.
 .
   * Summary of tag changes:
     + Added:
       - alien-tag
       - chown-with-dot
       - conflicting-test-fields
       - declare-python-versions-for-test
       - drop-python-version-declaration
       - invalid-override-restriction
       - missing-prerequisite-for-pyproject-backend
       - old-devhelp-standard
       - stray-devhelp-documentation
       - test-leaves-python-version-untested
       - uses-poetry-cli
     + Removed:
       - crossing-screens
       - debhelper-compatibility-level-not-a-number
       - debian-tests-control-and-control-autodep8
       - exclusive-runtime-tests-field
       - package-contains-devhelp-file-without-symlink
 .
   [ Axel Beckert ]
   * Adopting Lintian. (Changes #1012289 from ITA to pure RFH.)
     + Remove Chris Lamb from Uploaders (see #1012289) and re-add myself.
   * Workarounds until
https://github.com/Perl-Critic/Perl-Critic/issues/925 is fixed:
     + Replace all occurrences of "Copyright ©" with "Copyright (C)" again.
     + Remove unnecessary usage of UTF-8 from bin/lintian.
     + Replace UTF-8 characters in mostly Copyright comments.
     + Replace UTF-8 characters in code with \N{…}.
   * Remove literal unicode character U+0334 COMBINING TILDE OVERLAY which
     likely had been added accidentally. (Triggered by the symptoms of
https://github.com/Perl-Critic/Perl-Critic/issues/925, but permanent.)
   * Update copyright years in debian/copyright.
   * Run perltidy over lib, bin/lintian, private/refresh-perl-provides,
     private/runtests and several files in t/scripts/.
   * data/…/perl-provides updated by running "debian/rules
     refresh-perl-provides".
   * Add Felix Lechner to debian/copyright based on copyright statements
     elsewhere. Thanks for all your contributions!
   * Update t/recipes/README: "debian/rules runtests" → "private/runtests"
   * Follow module renaming: Perl::Critic::Freenode → Perl::…::Community.
   * t/s…/h…/tag-coverage.t: Replace "$ENV{'LINTIAN_BASE'}" with
     "$ENV{'LINTIAN_BASE'} // '.'" to be able to run it with "prove -l".
   * init.d-general check: Avoid relying on line numbers in #DEBHELPER#
     replacement code.
   * very-long-line-length-in-source-file: Ignore files listed in new data
     file binary-file-extensions. (Closes: #1005046)
   * Fix false positives for adopted-extended-field with X- prefixed
     fields. (Closes: #999768)
     + Empty hints files seem to require a Test-Against field in desc.
   * Update own source lintian-overrides for "pointed hints".
     + Make them work with old and new lintian versions by using wildcards.
   * Rename README.developers to have a proper file suffix (.pod).
   * Switch syntax marker of README.developers.pod from "perl" to "pod".
   * Documentation update: Replace directory "frontend/" with "bin/".
   * Fix a bunch of "Use of uninitialized value $_ in concatenation"
     warnings when running tests with "prove -l" directly.
   * README.developers.pod: Explain the difference between check and test.
   * lintian(1): Drop mentioning of never existing --no-overrides option.
   * Replace unfitting Text::Glob with more flexible Regexp::Wildcards
     (Closes: #1003353)
     + Add unit test for Lintian::Util::match_glob. The current testsuite
       does not seem to be able to cover such a case.
   * Declare compliance with Debian Policy 4.6.1. (No changes needed.)
   * Refresh data using private/refresh-data. Skip unreleased policy though
     for now.
   * Fix "Use of uninitialized value $step in concatenation" in
     Lintian::Version which showed up as unrecognized tag (!) when running
     the test suite on the git repo already tagged for a release.
   * debian/gbp.conf: Declare so far used tag format so that gbp uses it.
   * Add lintian override for very-long-line-length-in-source-file in
     Lintian::Check::Cruft as well as test-leaves-python-version-untested.
   * Use versioned Breaks instead of Conflicts against lzd, see #1001655.
     Thanks Lintian for reporting ;-) and Paul Gevers for the sanity check!
 .
   [ Felix Lechner ]
   * Refresh manual references.
   * Use Text::Glob to match hint contexts with override patterns. Replaces
     a trusted homegrown routine. (Closes: #1003272)
   * Refresh list of available Debhelper commands.
   * Refresh list of installable fonts.
   * Generate section references for Lintian manual from repo; point to
     website.
   * Accept globbing patterns in profiles when enabling and disabling
     checks or tags.
   * Refresh data sources in parallel.
   * Add the New Maintainer's Guide to the list of quotable authorities.
   * Eliminate unpredictable output in the check siles/privacy-breach.
   * Honor the environment variable NO_COLOR as specified in
https://no-color.org/.
   * More attempts to eliminate unpredictable output in the check
     files/privacy-breach.
   * Drop the tag debian-tests-control-and-control-autodep8.
   * Set authority references apart from other data sources.
   * Provide rudimentary Emacs integration. (See: #968758)
   * Associate Emacs modules with the 'editors' archive section.
   * Recognize /usr/bin/raku as a known interpreter for scripts. (Closes:
     #1002828)
   * Do not depend on any particular Lzip implementation. (Closes:
     #1001655)
   * Exempt installables designated as documentation from warning about new
     Python2 packages. (Closes: #995286)
   * Update citations in two tags. (Closes: #1003131)
   * Drop version requirement from
     skip-systemd-native-flag-missing-pre-depends. (See: #1003271)
   * Import new CSS style sheet from the website.
   * Recognize dh-sequence-sphinxdoc as a valid prerequisite for
     dh_sphinxdoc. (Closes: #999810)
   * Tolerate multiarch acceptors in prerequisites for Debhelper commands
     and addons. (Closes: #1000234)
   * Issue yet more pointed hints.
   * Recognize pybuild-plugin-pyproject as a valid prerequisite for the
     python3 Debhelper plugin. (Closes: #1003668)
   * Exempt bullseye backports from changelog-file-missing-explicit-entry.
     (Closes: #941656)
   * Mask long source lines in autotools-generated files. (Closes: #996740)
   * Turn embedded-library into a classification tag. (Closes: #932634)
   * Require the targets build-arch and build-indep in debian/rules.
     (Closes: #657390)
   * Do not insist on a particular name for unversioned links to a shared
     library. (Closes: #963099)
   * Exempt the names of Debian folks associated with a package from
     spelling checks. (Closes: #989381)
   * Require py3version invocation consistent with presence of
     X-Python3-Version in d/control. (See: #1001677)
   * Exempt CGI scripts from executable-in-usr-lib. (Closes: #1003941)
   * CGI scripts can be ELF executables. (See: #1003941)
   * Exempt Python's .dist-info and .egg-info folders everywhere from
     documentation-outside-usr-share. (Closes: #1003913)
   * Flag an outdated Debian copyright just once; use the most recent
     year. (Closes: #1003817)
   * Implement '--no-show-overrides'; honor it for overrides and masks
     alike. (See: #1004240)
   * Allow the command-line option '--no-info' to reverse 'info=yes' in the
     configuration file. (Closes: #1004240)
   * Elide manual references to ancient Lintian versions; use modern
     examples. (Closes: #1004231)
   * Deprecate --no-tag-display-limit for '--tag-display-limit 0'; update
     documentation. (Closes: #1004239)
   * Also provide a default output width for
     lintian-annotate-hints. (Closes: #1004660)
   * Mask examples in tests from
     package-does-not-install-examples. (Closes: #1005184)
   * Recognize Java 18 in unstable, and Java 19 as otherwise
     available. (Closes: #1005762)
   * Leave default Java bytecode version at 56. (See: #1005762)
   * Adjust documentation reference to manual page for dh_make. (Closes:
     #1006390)
   * Warn about devhelp index files that use version 1. (Closes: #1006859)
   * Store ELF information from readelf in an MLDBM database. (Closes:
     #1003456)
   * Issue pedantic hint for dot in 'chown user.group' instead of a
     colon. (Closes: #1007140)
   * Upgrade missing-systemd-timer-for-cron-script to warning; no longer
     experimental. (Closes: #1007257)
 .
   [ Ryan Finnie ]
   * Provide a constant citation for
     systemd-service-file-uses-nobody-or-nogroup. (Closes: !385)
 .
   [ Louis-Philippe Véronneau ]
   * Check that tests pulling in all Python versions also query which ones
     are available. (Closes: !361)
   * Add new Python tags for pyproject.toml build backends according to
     PEP-517. (Closes: !384)
   * Rename 'python3-flit' to 'flit', as there is no 'python3-flit'
     package. (Closes: !386)
 .
   [ Daniel Kahn Gillmor ]
   * Correct lintian-annotate-hints manpage.
 .
   [ Simon McVittie ]
   * Silence a very widespread false positive for detached debug symbols.
     (Closes: #1000977, !387)
 .
   [ Simon Quigley ]
   * Add "kinetic" as a known Ubuntu distribution. (Closes: !392)
 .
   [ xiao sheng wen(肖盛文) ]
   * Add riscv64 support (Closes: #1012090, !394)
 .
   [ Damyan Ivanov ]
   * Update releases.json data for Debian policy releases (4.6.1 added;
     closes: !393)
 .
   [ Paul Wise ]
   * Add more obsolete domains for former source code hosting services.
Checksums-Sha1:
 863a51cffc5b8359ef133d6e6f150d9cac148eb3 2503 lintian_2.115.0.dsc
 e20194c63f481a7361969fab6ea7739f3f6e03d5 2170172 lintian_2.115.0.tar.xz
 3453b48f59dd2f58e2e78523e9018c58a42faebe 7274 lintian_2.115.0_source.buildinfo
Checksums-Sha256:
 431a025b52e185cac6cbf2fedca8b6c60e2f7dfa55d89d86fcd543a34e8232b9 2503 lintian_2.115.0.dsc
 f353d372d036daa6ad0341b418728cfe73c11688708b6c3a33d50acb445d2b53 2170172 lintian_2.115.0.tar.xz
 e1c1bd41b7f5a8014231f9db422c1711e97cf50146eab83a1d113370735f02d9 7274 lintian_2.115.0_source.buildinfo
Files:
 4484e31abe39a15def23b119f92ef3ab 2503 devel optional lintian_2.115.0.dsc
 9d7922b69d30a63693825120e049ea00 2170172 devel optional lintian_2.115.0.tar.xz
 12f2494d410df4c2bf03f82075ce5f60 7274 devel optional lintian_2.115.0_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEERoyJeTtCmBnp12Ema+Zjx1o1yXUFAmKwZiIACgkQa+Zjx1o1
yXUIng/5ARDjo8W4NggeM79xaeIgqtRbCao5XuBX6VyAE6hupaK8vHH/konnGmwg
jfRvPQK6YCXfqHggIKNQnToJgKUxdI+U3e10PYrbc5qt2UWFMiRfEHGqG3cfu+uA
JhqldKXfRkvmY4+9WPChWZ4C8qjdPZNcQwwdwm1Rg6gKMreYDGNIWJ94Hh7BkNsC
lNowSbDW6uE0XLBxVVeHhQGrn0Aki8fkx82W+Hod2A26sCXv/Gx7OSb8KVERa3+7
D05KDZd+ZGXBIdk/zRn/AeCxwcLXXMCS7qNDsfbJ8oUeYyy7y7QrQbGeFrBdOTyk
JbqqG0rTGbvfg3UcviOm/rvkr5QHdA5OMLUKRoljApMJEzbASGzYqNiUSmZNWH8x
v9EZ/qTHrcPFL/bIC9POvjD3FhSs3EkgQxXCuVPWZRruurgEme6DmnxHEj9TAe6L
GcUr+6DDHMw+j9SlO04VDDpUFVO2ftPfMcSckNCNM3eMxfig4XjPmyay3m6BjgaF
Rq6ckTUCUt5hsm7T48I0PAjXMRcAbemfI3PmVOUgwIf3BvzcdvJew0h90ULOY94N
cCWdsZ5SwC1hoz6EsBVmD16XxxYvZM7/wcf40PJkJ+YwtJu2Wm3dAv5WPK8UTrYr
qK1s62DfByho45eV9rXKeLnjvRN37rQYOWl7WwYy6YfpzQYDFWU=
=3dK3
-----END PGP SIGNATURE-----