Your message dated Tue, 27 Feb 2018 15:10:06 +0000
with message-id <e1eqgtk-000gfu...@fasolo.debian.org>
and subject line Bug#891072: fixed in lintian 2.5.77
has caused the Debian Bug report #891072,
regarding Please add golang-missing-built-using and 
golang-built-using-on-arch-all tags
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
891072: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891072
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: lintian
Version: 2.5.72
Severity: wishlist
Tags: patch

Please review and merge the attached patch. Thanks!

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel, mipsel, arm64

Kernel: Linux 4.13.0-1-amd64 (SMP w/12 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages lintian depends on:
ii  binutils                          2.29.1-6
ii  bzip2                             1.0.6-8.1
ii  diffstat                          1.61-1+b1
ii  dpkg                              1.19.0.5
ii  file                              1:5.32-1
ii  gettext                           0.19.8.1-4
ii  intltool-debian                   0.35.0+20060710.4
ii  libapt-pkg-perl                   0.1.33
ii  libarchive-zip-perl               1.59-1
ii  libclass-accessor-perl            0.51-1
ii  libclone-perl                     0.38-2+b2
ii  libdpkg-perl                      1.19.0.5
ii  libemail-valid-perl               1.202-1
ii  libfile-basedir-perl              0.07-1
ii  libipc-run-perl                   0.96-1
ii  liblist-moreutils-perl            0.416-1+b3
ii  libparse-debianchangelog-perl     1.2.0-12
ii  libperl5.22 [libdigest-sha-perl]  5.22.2-5
ii  libperl5.26 [libdigest-sha-perl]  5.26.1-3
ii  libtext-levenshtein-perl          0.13-1
ii  libtimedate-perl                  2.3000-2
ii  liburi-perl                       1.72-2
ii  libxml-simple-perl                2.24-1
ii  libyaml-libyaml-perl              0.63-2+b2
ii  man-db                            2.7.6.1-2
ii  patchutils                        0.3.4-2
ii  perl                              5.26.1-3
ii  t1utils                           1.41-1
ii  xz-utils                          5.2.2-1.3

Versions of packages lintian recommends:
pn  libperlio-gzip-perl  <none>

Versions of packages lintian suggests:
pn  binutils-multiarch     <none>
ii  dpkg-dev               1.19.0.5
ii  libhtml-parser-perl    3.72-3+b2
ii  libtext-template-perl  1.47-1

-- no debconf information
>From 7318d47e2caff903267d0235d7ef3069d74041a5 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <stapelb...@debian.org>
Date: Thu, 22 Feb 2018 09:11:20 +0100
Subject: [PATCH] Add golang-missing-built-using and
 golang-built-using-on-arch-all

---
 checks/control-file.desc                           | 17 +++++++++
 checks/control-file.pm                             | 15 ++++++++
 .../binaries-golang-built-using/debian/Makefile    | 16 +++++++++
 t/tests/binaries-golang-built-using/debian/basic.c | 12 +++++++
 .../debian/debian/control.in                       | 40 ++++++++++++++++++++++
 t/tests/binaries-golang-built-using/desc           |  6 ++++
 t/tests/binaries-golang-built-using/tags           |  1 +
 t/tests/binaries-golang/desc                       |  1 +
 t/tests/binaries-golang/tags                       |  1 +
 9 files changed, 109 insertions(+)
 create mode 100644 t/tests/binaries-golang-built-using/debian/Makefile
 create mode 100644 t/tests/binaries-golang-built-using/debian/basic.c
 create mode 100644 t/tests/binaries-golang-built-using/debian/debian/control.in
 create mode 100644 t/tests/binaries-golang-built-using/desc
 create mode 100644 t/tests/binaries-golang-built-using/tags

diff --git a/checks/control-file.desc b/checks/control-file.desc
index 2b2516bfc..9743aad81 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -350,3 +350,20 @@ Info: This package builds a binary package containing at 
least one path
  Please specify (eg.) <tt>Rules-Requires-Root: binary-targets</tt> in
  the <tt>debian/control</tt> source stanza.
 Ref: /usr/share/doc/dpkg-dev/rootless-builds.txt.gz
+
+Tag: golang-missing-built-using
+Severity: wishlist
+Certainty: certain
+Info: This package builds a binary package which is not including
+ ${misc:Built-Using} in its Built-Using control field.
+ .
+ The ${misc:Built-Using} substvar is populated by <tt>dh-golang(1)</tt>
+ and used for scheduling binNMUs.
+
+Tag: golang-built-using-on-arch-all
+Severity: wishlist
+Certainty: certain
+Info: This package builds a binary arch:all package which incorrectly
+ specifies a Built-Using control field.
+ .
+ Built-Using only applies to architecture-specific packages.
diff --git a/checks/control-file.pm b/checks/control-file.pm
index f2a97b24d..8d8a1caac 100644
--- a/checks/control-file.pm
+++ b/checks/control-file.pm
@@ -427,6 +427,21 @@ sub run {
           unless $relation->implies('${gir:Depends}');
     }
 
+    # Verify that golang binary packages set Built-Using (except for arch:all
+    # library packages).
+    if ($info->relation('build-depends')->implies('golang-go | golang-any')) {
+        foreach my $bin (@package_names) {
+            my $bu = $info->binary_field($bin, 'built-using');
+            my $arch = $info->binary_field($bin, 'architecture');
+            if ($arch eq 'all' && defined($bu)) {
+                tag 'golang-built-using-on-arch-all', $bin;
+            }
+            if ($arch ne 'all' && (!defined($bu) || $bu !~ 
/\$\{misc:Built-Using\}/)) {
+                tag 'golang-missing-built-using', $bin;
+            }
+        }
+    }
+
     return;
 }
 
diff --git a/t/tests/binaries-golang-built-using/debian/Makefile 
b/t/tests/binaries-golang-built-using/debian/Makefile
new file mode 100644
index 000000000..f04b342de
--- /dev/null
+++ b/t/tests/binaries-golang-built-using/debian/Makefile
@@ -0,0 +1,16 @@
+NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS))
+NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS))
+COMPILE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS)
+
+all:
+       # static version
+       $(COMPILE) -static -o basic.static basic.c
+
+install:
+       install -d $(DESTDIR)/usr/lib/foo/
+       install -m 755 basic.static $(DESTDIR)/usr/lib/foo/static
+
+clean distclean:
+       rm -f basic
+
+check test:
diff --git a/t/tests/binaries-golang-built-using/debian/basic.c 
b/t/tests/binaries-golang-built-using/debian/basic.c
new file mode 100644
index 000000000..7dea5a030
--- /dev/null
+++ b/t/tests/binaries-golang-built-using/debian/basic.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+int
+main(void)
+{
+    char t[10];
+    printf("Hello world!\n");
+    /* Bad choice for reading from stdin, but it forces a stack
+       protector, so meh.
+     */
+    gets (t);
+}
diff --git a/t/tests/binaries-golang-built-using/debian/debian/control.in 
b/t/tests/binaries-golang-built-using/debian/debian/control.in
new file mode 100644
index 000000000..136a3cb65
--- /dev/null
+++ b/t/tests/binaries-golang-built-using/debian/debian/control.in
@@ -0,0 +1,40 @@
+Source: {$source}
+Section: net
+Priority: optional
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends},
+ golang-go (>= 2:1.1.1-4)
+
+Package: {$source}
+Architecture: {$architecture}
+Depends: $\{misc:Depends\}
+Built-Using: $\{misc:Built-Using\}
+Description: {$description}
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.  It may
+ be an empty package.
+
+Package: {$source}-dev
+Architecture: all
+Depends: $\{misc:Depends\}
+Built-Using: $\{misc:Built-Using\}
+Description: {$description} (dev)
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.  It may
+ be an empty package.
+ .
+ This package contains the source.
+
+Package: {$source}-clean-dev
+Architecture: all
+Depends: $\{misc:Depends\}
+Description: {$description} (clean dev)
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.  It may
+ be an empty package.
+ .
+ This package contains the source, without a built-using tag.
diff --git a/t/tests/binaries-golang-built-using/desc 
b/t/tests/binaries-golang-built-using/desc
new file mode 100644
index 000000000..85118b21f
--- /dev/null
+++ b/t/tests/binaries-golang-built-using/desc
@@ -0,0 +1,6 @@
+Testname: binaries-golang-built-using
+Version: 1.0
+Description: False-positive test for Built-Using field
+Architecture: any
+Test-Against: golang-missing-built-using
+Test-For: golang-built-using-on-arch-all
diff --git a/t/tests/binaries-golang-built-using/tags 
b/t/tests/binaries-golang-built-using/tags
new file mode 100644
index 000000000..5724c0cd7
--- /dev/null
+++ b/t/tests/binaries-golang-built-using/tags
@@ -0,0 +1 @@
+I: binaries-golang-built-using source: golang-built-using-on-arch-all 
binaries-golang-built-using-dev
diff --git a/t/tests/binaries-golang/desc b/t/tests/binaries-golang/desc
index 0a13b1901..7cc04dd02 100644
--- a/t/tests/binaries-golang/desc
+++ b/t/tests/binaries-golang/desc
@@ -4,3 +4,4 @@ Extra-Build-Depends: golang-go (>= 2:1.1.1-4)
 Description: Misc errors related to golang binaries
 Architecture: any
 Test-Against: statically-linked-binary
+Test-For: golang-missing-built-using
diff --git a/t/tests/binaries-golang/tags b/t/tests/binaries-golang/tags
index e69de29bb..e287ae798 100644
--- a/t/tests/binaries-golang/tags
+++ b/t/tests/binaries-golang/tags
@@ -0,0 +1 @@
+I: binaries-golang source: golang-missing-built-using binaries-golang
-- 
2.15.1


--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 2.5.77

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 891...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Chris Lamb <la...@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 ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 27 Feb 2018 13:41:26 +0000
Source: lintian
Binary: lintian
Architecture: source all
Version: 2.5.77
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-ma...@debian.org>
Changed-By: Chris Lamb <la...@debian.org>
Description:
 lintian    - Debian package checker
Closes: 726589 891072 891184 891301 891387
Changes:
 lintian (2.5.77) unstable; urgency=medium
 .
   * Summary of tag changes:
     + Added:
       - built-using-field-on-arch-all-package
       - missing-built-using-field-for-golang-package
       - missing-xs-go-import-path-for-golang-package
 .
   * checks/control-file.{desc,pm}:
     + [CL] Apply a patch from Michael Stapelberg to detect Golang packages
       with invalid or missing Built-Using headers.  (Closes: #891072)
     + [CL] Apply patch from Michael Stapelberg to warn when packages do not
       specify a XS-Go-Import-Path.  (Closes: #891184)
   * checks/rules.pm:
     + [CL] Allow rel="generator" and others; they do not cause internet
       access by default.  Thanks to Raphaƫl Hertzog for the report.
       (Closes: #891301)
   * checks/version-substvars.pm:
     + [CL] Fix a bug in version-substvar-for-external-package parsing to
       prevent false-positives when the LHS of the binary relation contains
       a substvar.  Thanks to Andreas Beckmann.  (Closes: #726589)
 .
   * data/common/architectures, etc.:
     + [CL] Update architecture lists to ensure the inclusion of riscv64.
       This will change everything.  (Closes: #891387)
   * data/spelling/corrections:
     + [PW] Add a number of corrections.
Checksums-Sha1:
 ed99a185149b7c2ae025f4becaac4bdaefa65e9b 3505 lintian_2.5.77.dsc
 68abcaa40cfcd3887c53a7818eff2162efb0721f 1540100 lintian_2.5.77.tar.xz
 6fbbc6b725f87c4fec0734c1a83d8b98d4a94b8a 1108020 lintian_2.5.77_all.deb
 e4413dfaca19fc5edbd7d93807fd6754cc168524 16080 lintian_2.5.77_amd64.buildinfo
Checksums-Sha256:
 95b7cc3da4a508b811d8743971254d5ec4ca6da535c2e6fca0798dc5ce1a02ce 3505 
lintian_2.5.77.dsc
 3212a0b4fcc156250d77a5c86295439149a863e1ccc83cd331e963152ccc9fbf 1540100 
lintian_2.5.77.tar.xz
 ece11272b4010e491b06882a1cfea4920e0b2053871544fbd66022e3960408ce 1108020 
lintian_2.5.77_all.deb
 6d42d2e123e135c80099cba00cd1ee7bd0726de9659b75b9b0d16ac0fa929e76 16080 
lintian_2.5.77_amd64.buildinfo
Files:
 234516cf41bcd87b7d533d89e6268d37 3505 devel optional lintian_2.5.77.dsc
 0cbbdbb10f9939b0d454fc6fba24efd6 1540100 devel optional lintian_2.5.77.tar.xz
 fc014781f3167ce2e9327ec0c1dae17e 1108020 devel optional lintian_2.5.77_all.deb
 59196bd6c47cb310d56f0968b3708904 16080 devel optional 
lintian_2.5.77_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlqVZTMACgkQHpU+J9Qx
HlgohRAAgdPdwSZp9m+NQHKNKHOoU7gtHvGpzMfDqA22+AVw58Y/6SSOhrzKTDxg
Oh32bpWfCKzwQ28rfTxeTLK55/aty4B5OavN0+gkSTYkKXcj4PAwYS2umfZenBHX
hHaBEJWVkM9JOm9Bizobn4hNjI5MVTHFY2F5RJ3SdAuWV3kzECjsPTPSpkp/nnNO
/bp8qaYddF+E61m/C9zFRiwm1VYSDcDlQh0ON49h39xo83C+grQ9nBlooj+RD+5R
T5nx66wmjqbpRjr3sfsLm3gXl3QRnkalbkcRg9kxsAnDEuTq0LlrcZkD/sAYq5xq
pnGoZvaadgSsEY6lrFv4v3ZmzQepK8tV/eG+qeIDg7G2zWkIWPGrZgTKLTny9U2w
CCi1w/X3jyGNZIHEfbhoTz+YaRutpiOSitTohvugr4ERbcqeNq36WCpXLDwDDi2X
nYR8uWrkb9wYSwdnXOmAtt9V9XS2MosUFeSrn1EKfnRoi9dk+7EWRkseHWN/obnt
qJkkzzZbYtHjD454oJynMmdNkXIpwRZ//iibHiGWYk+pMlPgsgeqGWnlYeYGp6/r
UfZFOLTJk23a16DvfehI9OiKSCg7jh4MguoI7ODBaqbLo0zUMTmdQugqWXkKCCGl
MGY/QlPZW/sriPg9gMNpog94xWIjxra6nWdt7QbF7XyrnE5Fw/Y=
=iASK
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to