Page MenuHomePhabricator

Enhance debian-glue job packages validation
Open, LowPublic

Description

From a chat with @Volans


We already run linter, and there are artifcats from it's output but it's not shown in the console output so might be overlooked/missed.


Another useful output is: debc ${package_name}.changes to see the compiled dependencies, and all the files and directories installed by the package. See also: https://www.debian.org/doc/manuals/maint-guide/checkit.en.html


Another couple of enhancement that could be done for lintian, looking at the source code at https://github.com/mika/jenkins-debian-glue/blob/16f0ba5565435e12cb211c686bd5a49cb073252e/scripts/lintian-junit-report are:

  • pass the '-w', '--warnings' option to show also lintian warnings
  • pass the lintian -I option to show also the info messages, seems that could be done with --lintian-opt=-I
  • it might make sense to tee the output of lintian to the console either as is or without the --info option that shows the reasoning behind each error/warning/info line, reducing its size.

The automatic generated changelog version actually creates spurious linter errors in lintian-binary.txt

1W: cumin source: binary-nmu-debian-revision-in-source 0.0.1-1+0~20170218004036.670+jessie+wikimedia~1.gbpfd657d
2N:
3N: The version number of your source package ends in +b and a number or has
4N: a Debian revision containing three parts. These version numbers are used
5N: by binary NMUs and should not be used as the source version. (The +b
6N: form is the current standard; the three-part version number now
7N: obsolete.)
8N:
9N: Refer to Debian Developer's Reference section 5.10.2.1 (Recompilation or
10N: binary-only NMU) for details.
11N:
12N: Severity: normal, Certainty: certain
13N:
14N: Check: fields, Type: binary, udeb, source
15N:
16W: cumin source: changelog-should-mention-nmu
17N:
18N: When you NMU a package, that fact should be mentioned on the first line
19N: in the changelog entry. Use the words "NMU" or "Non-maintainer upload"
20N: (case insensitive).
21N:
22N: Maybe you didn't intend this upload to be a NMU, in that case, please
23N: double-check that the most recent entry in the changelog is
24N: byte-for-byte identical to the maintainer or one of the uploaders. If
25N: this is a local package (not intended for Debian), you can suppress this
26N: warning by putting "local" in the version number or "local package" on
27N: the first line of the changelog entry.
28N:
29N: Refer to Debian Developer's Reference section 5.11.3 (Using the DELAYED/
30N: queue) for details.
31N:
32N: Severity: normal, Certainty: certain
33N:
34N: Check: nmu, Type: source
35N:
36W: cumin source: source-nmu-has-incorrect-version-number 0.0.1-1+0~20170218004036.670+jessie+wikimedia~1.gbpfd657d
37N:
38N: A source NMU should have a Debian revision of "-x.x" (or "+nmuX" for a
39N: native package). This is to prevent stealing version numbers from the
40N: maintainer.
41N:
42N: Maybe you didn't intend this upload to be a NMU, in that case, please
43N: double-check that the most recent entry in the changelog is
44N: byte-for-byte identical to the maintainer or one of the uploaders. If
45N: this is a local package (not intended for Debian), you can suppress this
46N: warning by putting "local" in the version number or "local package" on
47N: the first line of the changelog entry.
48N:
49N: Refer to Debian Developer's Reference section 5.11.2 (NMUs and
50N: debian/changelog) for details.
51N:
52N: Severity: normal, Certainty: certain
53N:
54N: Check: nmu, Type: source
55N:

Event Timeline

Another couple of enhancement that could be done for lintian, looking at the source code at https://github.com/mika/jenkins-debian-glue/blob/16f0ba5565435e12cb211c686bd5a49cb073252e/scripts/lintian-junit-report are:

  • pass the '-w', '--warnings' option to show also lintian warnings
  • pass the lintian -I option to show also the info messages, seems that could be done with --lintian-opt=-I
  • it might make sense to tee the output of lintian to the console either as is or without the --info option that shows the reasoning behind each error/warning/info line, reducing its size.

Regarding debc seems that they have already a script scripts/jdg-debc upstream that we could use.

Change 338752 had a related patch set uploaded (by Hashar):
debian-glue: only lintian against *.changes

https://gerrit.wikimedia.org/r/338752

Change 338752 merged by jenkins-bot:
debian-glue: only lintian against *.changes

https://gerrit.wikimedia.org/r/338752

Change 338760 had a related patch set uploaded (by Hashar):
debian-glue: add debc to dump packages content

https://gerrit.wikimedia.org/r/338760

Change 338760 merged by jenkins-bot:
debian-glue: add debc to dump packages content

https://gerrit.wikimedia.org/r/338760