Discussion:
Bug#1090859: lintian-brush: upstream metadata fixer crashes
Add Reply
Martin-Éric Racine
2024-12-20 10:40:01 UTC
Reply
Permalink
Package: lintian-brush
Version: 0.160
Severity: important
X-Debbugs-Cc: martin-***@iki.fi

$ lintian-brush
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 154/154No changes made.
Some fixer scripts failed to run:
upstream-metadata-file: Script failed: /usr/share/lintian-brush/fixers/upstream-metadata-file.py (exit code 1) (stderr: thread '<unnamed>' panicked at library/alloc/src/raw_vec.rs:25:5:
capacity overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
File "/usr/share/lintian-brush/fixers/upstream-metadata-file.py", line 123, in <module>
guess_upstream_metadata_items(
pyo3_runtime.PanicException: capacity overflow
)
pubkey: Script failed: /usr/share/lintian-brush/fixers/pubkey.py (exit code 1) (stderr:
Traceback (most recent call last):
File "/usr/share/lintian-brush/fixers/pubkey.py", line 80, in <module>
sorted(entry.discover(source_package_name()), reverse=True)
File "/usr/lib/python3/dist-packages/debmutate/watch.py", line 227, in __lt__
return Version(self.version) < Version(other.version)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/debian/debian_support.py", line 287, in __init__
super(AptPkgVersion, self).__init__(version)
File "/usr/lib/python3/dist-packages/debian/debian_support.py", line 168, in __init__
self.full_version = version
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/debian/debian_support.py", line 197, in __setattr__
self._set_full_version(str(value))
File "/usr/lib/python3/dist-packages/debian/debian_support.py", line 174, in _set_full_version
raise ValueError("Invalid version string %r" % version)
ValueError: Invalid version string 'https://www.cups-pdf.de/src/cups-pdf_3.0beta2.tar.gz'
)
Run with --verbose for details.

***

It seems that the above fixer is incapable of dealing with unusual version numbers, which makes it crash.

Martin-Éric

-- System Information:
Debian Release: trixie/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (x86_64)

Kernel: Linux 6.1.0-28-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8), LANGUAGE=fi:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lintian-brush depends on:
ii devscripts 2.24.8
ii libc6 2.40-4
ii libgcc-s1 14.2.0-11
ii liblzma5 5.6.3-1+b1
ii libpython3.12t64 3.12.8-3
ii libssl3t64 3.3.2-2
ii python3 3.12.7-1
ii python3-breezy 3.3.9-1+b1
ii python3-debian 0.1.49
ii python3-debmutate 0.70
ii python3-distro-info 1.12
ii python3-dulwich 0.22.7-1
ii python3-iniparse 0.5.1-1
ii python3-iso8601 2.1.0-2
ii python3-psycopg2 2.9.10-1
ii python3-ruamel.yaml 0.18.6+ds-3
ii python3-semver 2.10.2-3
ii python3-tomlkit 0.13.2-1
ii python3-upstream-ontologist 0.1.44-1+b1

Versions of packages lintian-brush recommends:
ii debhelper 13.22
ii decopy 0.2.4.8-0.1
ii dos2unix 7.5.2-1
ii gpg 2.2.45-2
ii lintian 2.121.1
ii ognibuild 0.0.32-1
ii python3-bs4 4.12.3-3
ii python3-levenshtein 0.26.1-1

Versions of packages lintian-brush suggests:
ii brz-debian 2.8.79
ii git-buildpackage 0.9.35
pn gnome-pkg-tools <none>
ii po-debconf 1.0.21+nmu1
pn postgr
Martin-Éric Racine
2024-12-20 17:30:01 UTC
Reply
Permalink
This still doesn't solve the crash:

$ lintian-brush
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
154/154No changes made.
Some fixer scripts failed to run:
upstream-metadata-file: Script failed:
/usr/share/lintian-brush/fixers/upstream-metadata-file.py (exit code
1) (stderr: thread '<unnamed>' panicked at
library/alloc/src/raw_vec.rs:25:5:
capacity overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
File "/usr/share/lintian-brush/fixers/upstream-metadata-file.py",
line 123, in <module>
guess_upstream_metadata_items(
pyo3_runtime.PanicException: capacity overflow
)
Run with --verbose for details.

On Fri, 20 Dec 2024 13:04:23 +0000 Debian FTP Masters
Source: debmutate
Source-Version: 0.71
We believe that the bug you reported is fixed in the latest version of
debmutate, 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
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 20 Dec 2024 12:33:49 +0000
Source: debmutate
Architecture: source
Version: 0.71
Distribution: unstable
Urgency: medium
Closes: 1090859
debmutate (0.71) unstable; urgency=medium
.
* Fix argument order for watch entries. Closes: #1090859
86400cda27b7defec7f9b8ce761e90b3f98cf555 1472 debmutate_0.71.dsc
00fed392326eecfdafb67e90bb22061e0a6d02ba 60300 debmutate_0.71.tar.xz
7632343b2f3b7bd474f5ea9425446fa8384e94ae 9435 debmutate_0.71_source.buildinfo
1aea66c99cf455190960e9e9c07ab6b3cc0f8c8a327d2d74408ad34922daa7ca 1472 debmutate_0.71.dsc
ccd335d63ffd33e8f38f70095e341b57bdb098988141be791cdcf3fc8e5a0563 60300 debmutate_0.71.tar.xz
eac26e1d9130f3346890318c33c0ab2034c081148fc9bd5a9807a8cb3720b63a 9435 debmutate_0.71_source.buildinfo
a20879fb54f387e609605c4deed35063 1472 python optional debmutate_0.71.dsc
9ae7c0db2596918caec2f723f740300a 60300 python optional debmutate_0.71.tar.xz
54b94efe9773174dfa66360d38aa15cb 9435 python optional debmutate_0.71_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEgIoEfJX3ae+y722SMG8hYYBCUGYFAmdlZn8ACgkQMG8hYYBC
UGYAeggAiR2BLwMedByrlWBQzHH6OAtm6yqPLKQ/nolLkhDBvPR0zh1usprpQlrB
AVTwuGtJ/v1o0fHX5XI1nBTqi5TZcS7mRsdnmslcxRjXzHyXC6bUgFSfE18OppZ0
ViUn5xwDMXY4jAXHr1qnRbp4HtDwnztRmPxJWqldgj12gtB97gcCJm4iVV9wR/ik
RQ38jNKY/6YCVPIr5HaKzrNdri120DapzuRjOnCf+nQjB2dqlekgOrJgmWA2b3oj
Jelmer Vernooij
2024-12-21 12:50:01 UTC
Reply
Permalink
Ah, sorry.

There were two distinct bugs in your original bug report - one in the upstream-metadata fixer and one in the pubkey fixer.

I just noticed the second one originally. That should be addressed by this change in debmutate.

The first one is tracked in #1076245, or at least I believe that's the same issue you're hitting.
Post by Martin-Éric Racine
$ lintian-brush
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
154/154No changes made.
/usr/share/lintian-brush/fixers/upstream-metadata-file.py (exit code
1) (stderr: thread '<unnamed>' panicked at
capacity overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
File "/usr/share/lintian-brush/fixers/upstream-metadata-file.py", line 123, in <module>
guess_upstream_metadata_items(
pyo3_runtime.PanicException: capacity overflow
)
Run with --verbose for details.
On Fri, 20 Dec 2024 13:04:23 +0000 Debian FTP Masters
Source: debmutate
Source-Version: 0.71
We believe that the bug you reported is fixed in the latest version of
debmutate, 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
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 20 Dec 2024 12:33:49 +0000
Source: debmutate
Architecture: source
Version: 0.71
Distribution: unstable
Urgency: medium
Closes: 1090859
debmutate (0.71) unstable; urgency=medium
.
* Fix argument order for watch entries. Closes: #1090859
86400cda27b7defec7f9b8ce761e90b3f98cf555 1472 debmutate_0.71.dsc
00fed392326eecfdafb67e90bb22061e0a6d02ba 60300 debmutate_0.71.tar.xz
7632343b2f3b7bd474f5ea9425446fa8384e94ae 9435 debmutate_0.71_source.buildinfo
1aea66c99cf455190960e9e9c07ab6b3cc0f8c8a327d2d74408ad34922daa7ca 1472 debmutate_0.71.dsc
ccd335d63ffd33e8f38f70095e341b57bdb098988141be791cdcf3fc8e5a0563 60300 debmutate_0.71.tar.xz
eac26e1d9130f3346890318c33c0ab2034c081148fc9bd5a9807a8cb3720b63a 9435 debmutate_0.71_source.buildinfo
a20879fb54f387e609605c4deed35063 1472 python optional debmutate_0.71.dsc
9ae7c0db2596918caec2f723f740300a 60300 python optional debmutate_0.71.tar.xz
54b94efe9773174dfa66360d38aa15cb 9435 python optional debmutate_0.71_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEgIoEfJX3ae+y722SMG8hYYBCUGYFAmdlZn8ACgkQMG8hYYBC
UGYAeggAiR2BLwMedByrlWBQzHH6OAtm6yqPLKQ/nolLkhDBvPR0zh1usprpQlrB
AVTwuGtJ/v1o0fHX5XI1nBTqi5TZcS7mRsdnmslcxRjXzHyXC6bUgFSfE18OppZ0
ViUn5xwDMXY4jAXHr1qnRbp4HtDwnztRmPxJWqldgj12gtB97gcCJm4iVV9wR/ik
RQ38jNKY/6YCVPIr5HaKzrNdri120DapzuRjOnCf+nQjB2dqlekgOrJgmWA2b3oj
Loading...