Bug#1014584: lintian: False positive binary-nmu-debian-revision-in-source and source-nmu-has-incorrect-version-number with Ubuntu version

2022-07-11 Thread Mattia Rizzolo
On Fri, Jul 08, 2022 at 01:34:49PM +0200, Axel Beckert wrote:
> Hi,
> 
> Alberto Contreras wrote:
> > When I invoke `lintian` over a package with a version like
> > `22.2-64-g1fcd55d6-0ubuntu1~22.10.1` it emits
> > `binary-nmu-debian-revision-in-source` and
> > `source-nmu-has-incorrect-version-number` source warnings.  This looks like

ISTR that source-nmu-* just wasn't issued under ubuntu (i.e. with
--profile=ubutnu), did it start to be issued now?  I don't have any
recollection about binary-nmu-*

If I dreamt the whole thing, then perhaps it should be done, because the
concept of NMU doesn't exist in Ubuntu, so the tag as a whole doesn't
make sense.

That said, AFAIK -0ubuntu1~22.10.1 is not a formally documented version
anywhere, though I have seen it a few times.

Alberto: what kind of upload is this?  22.10 is the current dev version,
so it's not some kind of backport.  With such context, I can guess that
this is some kind of package that your team is maintianing for multiple
ubuntu branches, in which case I'd expect you to follow the SRU
versioning, which prescribe -0ubuntu0.22.10.1 instead.
https://wiki.ubuntu.com/SecurityTeam/UpdatePreparation#Update_the_packaging


I must also add that using . instead of ~ is fraught with catches, as
documented by, for example, 
https://lintian.debian.org/tags/dfsg-version-with-period
So I'd advocate a change in that policy, which hasn't been touched for
at least a decade (when I started contributing to ubuntu packages…)

> Note to myself: There's a similar albeit not identical issue reported
> in https://bugs.debian.org/1001399.

♥ Axel :)

-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
More about me:  https://mapreri.org : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-


signature.asc
Description: PGP signature


Bug#1014584: lintian: False positive binary-nmu-debian-revision-in-source and source-nmu-has-incorrect-version-number with Ubuntu version

2022-07-08 Thread Axel Beckert
Hi,

Alberto Contreras wrote:
> When I invoke `lintian` over a package with a version like
> `22.2-64-g1fcd55d6-0ubuntu1~22.10.1` it emits
> `binary-nmu-debian-revision-in-source` and
> `source-nmu-has-incorrect-version-number` source warnings.  This looks like
> a false positive.
[…]
> We think it could be related to the following
> detection:
> https://salsa.debian.org/lintian/lintian/-/blob/ecc04980869462c5c71f4f71e9b8a71bd5b944b5/lib/Lintian/Check/Fields/Version.pm#L87
> regex:
> https://salsa.debian.org/lintian/lintian/-/blob/ecc04980869462c5c71f4f71e9b8a71bd5b944b5/lib/Lintian/Check/Fields/Version.pm#L65

Nope, it's likely
https://salsa.debian.org/lintian/lintian/-/blob/ecc04980869462c5c71f4f71e9b8a71bd5b944b5/lib/Lintian/Check/Fields/Version.pm#L70
which needs to be updated.

Note to myself: There's a similar albeit not identical issue reported
in https://bugs.debian.org/1001399.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug#1014584: lintian: False positive binary-nmu-debian-revision-in-source and source-nmu-has-incorrect-version-number with Ubuntu version

2022-07-08 Thread Alberto Contreras
Package: lintian
Version: 2.115.2

When I invoke `lintian` over a package with a version like
`22.2-64-g1fcd55d6-0ubuntu1~22.10.1` it emits
`binary-nmu-debian-revision-in-source` and
`source-nmu-has-incorrect-version-number` source warnings.  This looks like
a false positive.
Here is a transcript:

$ wget -q \

https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/cloud-init/22.2-64-g1fcd55d6-0ubuntu1~22.10.1/cloud-init_22.2-64-g1fcd55d6.orig.tar.gz
\

https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/cloud-init/22.2-64-g1fcd55d6-0ubuntu1~22.10.1/cloud-init_22.2-64-g1fcd55d6-0ubuntu1~22.10.1.debian.tar.xz
\

https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/cloud-init/22.2-64-g1fcd55d6-0ubuntu1~22.10.1/cloud-init_22.2-64-g1fcd55d6-0ubuntu1~22.10.1.dsc
> /dev/null

$ lintian cloud-init_22.2-64-g1fcd55d6-0ubuntu1~22.10.1.dsc
...
W: cloud-init source: binary-nmu-debian-revision-in-source
22.2-64-g1fcd55d6-0ubuntu1~22.10.1
W: cloud-init source: source-nmu-has-incorrect-version-number
22.2-64-g1fcd55d6-0ubuntu1~22.10.1
...

We think it could be related to the following
detection:
https://salsa.debian.org/lintian/lintian/-/blob/ecc04980869462c5c71f4f71e9b8a71bd5b944b5/lib/Lintian/Check/Fields/Version.pm#L87
regex:
https://salsa.debian.org/lintian/lintian/-/blob/ecc04980869462c5c71f4f71e9b8a71bd5b944b5/lib/Lintian/Check/Fields/Version.pm#L65

The warnings happen in:
- Debian 12, lintian 2.115.2
- Debian 11, lintian 2.104.0
- Debian 10, lintian 2.15.0
- Debian 9, lintian 2.5.50.4

I have created a pastebin with a full reproducer:
https://pastebin.ubuntu.com/p/85q7kXbZTW/