Bug#971732: lintian: font-in-non-font-package triggers on non-font files

2020-10-06 Thread Ross Vandegrift
Hi Felix,

On Tue, Oct 06, 2020 at 01:29:27AM -0700, Felix Lechner wrote:
> On Mon, Oct 5, 2020 at 10:45 PM Ross Vandegrift  
> wrote:
> >
> > Lintian misidentifies the output of eolioan_gen as font files.
> 
> I will look for other distinguishing factors---perhaps based on file
> magic---but it may be easier to use a different extension, such as
> *.eo. EOT files are Embedded OpenType. [1]

I see - I assumed that lintian was already using some file magic.  I think it's
better for me to add overrides for now.  eolian isn't really used outside of
efl, so I think I'm the only one that would benefit from a fix.

Ross



Bug#971732: lintian: font-in-non-font-package triggers on non-font files

2020-10-05 Thread Ross Vandegrift
Package: lintian
Version: 2.97.0
Severity: minor

Hello,

Lintian misidentifies the output of eolioan_gen as font files.  This causes
font-in-non-font-package false positives.  Example case from libefl-all-dev is
attached.

Thanks,
Ross


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'testing'), (40, 'unstable'), (30, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.8.0-2-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lintian depends on:
ii  binutils2.35.1-1
ii  bzip2   1.0.8-4
ii  diffstat1.63-1
ii  dpkg1.20.5
ii  dpkg-dev1.20.5
ii  file1:5.38-5
ii  gettext 0.19.8.1-10
ii  gpg 2.2.20-1
ii  intltool-debian 0.35.0+20060710.5
ii  libapt-pkg-perl 0.1.36+b3
ii  libarchive-zip-perl 1.68-1
ii  libcapture-tiny-perl0.48-1
ii  libclass-xsaccessor-perl1.19-3+b5
ii  libclone-perl   0.45-1
ii  libconfig-tiny-perl 2.24-1
ii  libcpanel-json-xs-perl  4.23-1
ii  libdata-dpath-perl  0.58-1
ii  libdata-validate-domain-perl0.10-1
ii  libdevel-size-perl  0.83-1+b1
ii  libdpkg-perl1.20.5
ii  libemail-address-xs-perl1.04-1+b2
ii  libfile-basedir-perl0.08-1
ii  libfile-find-rule-perl  0.34-1
ii  libfont-ttf-perl1.06-1
ii  libhtml-html5-entities-perl 0.004-1
ii  libipc-run3-perl0.048-2
ii  libjson-maybexs-perl1.004002-1
ii  liblist-compare-perl0.55-1
ii  liblist-moreutils-perl  0.416-1+b5
ii  liblist-utilsby-perl0.11-1
ii  libmoo-perl 2.004000-1
ii  libmoox-aliases-perl0.001006-1
ii  libnamespace-clean-perl 0.27-1
ii  libpath-tiny-perl   0.114-1
ii  libperlio-gzip-perl 0.19-1+b6
ii  libproc-processtable-perl   0.59-2
ii  libsereal-decoder-perl  4.018+ds-1
ii  libsereal-encoder-perl  4.018+ds-1
ii  libtext-glob-perl   0.11-1
ii  libtext-levenshteinxs-perl  0.03-4+b7
ii  libtext-markdown-discount-perl  0.12-1
ii  libtext-xslate-perl 3.5.8-1
ii  libtime-duration-perl   1.21-1
ii  libtime-moment-perl 0.44-1+b2
ii  libtimedate-perl2.3300-1
ii  libtry-tiny-perl0.30-1
ii  libtype-tiny-perl   1.010006-1
ii  libunicode-utf8-perl0.62-1+b1
ii  liburi-perl 1.76-2
ii  libxml-libxml-perl  2.0134+dfsg-2
ii  libyaml-libyaml-perl0.82+repack-1
ii  lzip1.21-8
ii  lzop1.04-1
ii  man-db  2.9.3-2
ii  patchutils  0.4.2-1
ii  perl [libdigest-sha-perl]   5.30.3-4
ii  t1utils 1.41-4
ii  unzip   6.0-25
ii  xz-utils5.2.4-1+b1

lintian recommends no packages.

Versions of packages lintian suggests:
ii  binutils-multiarch 2.35.1-1
ii  libtext-template-perl  1.59-1

-- no debconf information

struct @extern Efl.Time
{
   [[This type is a alias for struct tm.
 It is intended to be a standard way to reference
 it in .eo files.

 @since 1.22
   ]]

   tm_sec: int;   [[Seconds.[0-60] (1 leap second)]]
   tm_min: int;   [[Minutes.[0-59] ]]
   tm_hour: int;  [[Hours.  [0-23] ]]
   tm_mday: int;  [[Day.[1-31] ]]
   tm_mon: int;   [[Month.  [0-11] ]]
   tm_year: int;  [[Year- 1900.]]
   tm_wday: int;  [[Day of week.[0-6] ]]
   tm_yday: int;  [[Days in year.[0-365] ]]
   tm_isdst: int; [[DST. [-1/0/1] ]]
}

struct Efl.Version
{
   [[This type describes the version of EFL with an optional variant.

 This may be used to query the current running version of EFL. Or it can
 be passed by applications at startup time to inform EFL of the version
 a certain application was built for.

 @since 1.22
   ]]

   major: int; [[Major component of the version (>= 1).]]
   minor: int; [[Minor component of the version (>= 0).]]
   micro: int; [[Micro component of the version (>= 0).]]
   revision: int; [[Revision component of the version (>= 0).]]
   flavor: string; [[Special version string for this build of EFL, $null for
 vanilla (upstream) EFL. Contains $EFL_VERSION_FLAVOR.]]
   build_id: string; 

Bug#968262: lintian: spare-manual-page misses .so targets

2020-08-14 Thread Ross Vandegrift
On Wed, Aug 12, 2020 at 07:45:22PM -0700, Felix Lechner wrote:
> On Wed, Aug 12, 2020 at 7:17 PM Ross Vandegrift  
> wrote:
> >
> > Is that unusual or incorrect?'.
> 
> I cannot answer that. From Lintian's perspective, there is no
> executable for the manual page, and that is how the tag works.

I see.  It might be nice if the tag said "lintian cannot confirm this page is
useful, since there's no binary with the same name.  If no links point to it,
it should probably be removed." But if I'm the only one to run into this this,
it's not worth the change.  I'll ignore or override.

> As a side note, I am not sure how helpful terminology-helpers.1 is.
> Why don't you just link to the main manual page terminology.1 and add
> a section about the helpers there?

I agree it's thin.  I'd rather not combine it with terminology.1 - as a user, I
often find combined manpages difficult to navigate.  But I agree more details
would be good.

> Hope this was helpful.

Very, and thanks for the feedback!

Ross



Bug#968262: lintian: spare-manual-page misses .so targets

2020-08-12 Thread Ross Vandegrift
Hi Felix,

On Tue, Aug 11, 2020 at 10:55:49PM -0700, Felix Lechner wrote:
> On Tue, Aug 11, 2020 at 10:39 PM Ross Vandegrift  
> wrote:
> >
> > I: terminology-data: spare-manual-page 
> > usr/share/man/man1/terminology-helpers.1.gz
> 
> The links are fine, but I could not find an executable named
> terminology-helpers in your installation packages. Do you ship one?

Nope, it's just the placeholder name that the binaries' manpages link to.  Is
that unusual or incorrect?  I checked policy 12.1, but I didn't see anything
relevant to this case.

Ross



Bug#968262: lintian: spare-manual-page misses .so targets

2020-08-11 Thread Ross Vandegrift
Package: lintian
Version: 2.89.0
Severity: normal

terminology-data installs terminology-helpers.1 for a number of small binaries
from terminology.  Each helper binary has a corresponding man file consisting
just of a .so line.  But lintian reports:

I: terminology-data: spare-manual-page 
usr/share/man/man1/terminology-helpers.1.gz
N:
N:Each manual page in /usr/share/man should have a reason to be there.
N:This manual page does not appear to have a valid reason to be shipped.
N:
N:For manual pages in sections 1 and 8, an executable (or a link to one)
N:should exist. This check currently considers all installation packages
N:created by the same sources, as long as they are present.
N:
N:Refer to Debian Policy Manual section 12.1 (Manual pages) and
N:https://bugs.debian.org/583125 for details.
N:
N:Severity: info
N:
N:Check: documentation/manual

Thanks,
Ross


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'testing'), (40, 'unstable'), (30, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.7.0-2-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lintian depends on:
ii  binutils  2.35-1
ii  bzip2 1.0.8-4
ii  diffstat  1.63-1
ii  dpkg  1.20.5
ii  dpkg-dev  1.20.5
ii  file  1:5.38-5
ii  gettext   0.19.8.1-10
ii  gpg   2.2.20-1
ii  intltool-debian   0.35.0+20060710.5
ii  libapt-pkg-perl   0.1.36+b3
ii  libarchive-zip-perl   1.68-1
ii  libcapture-tiny-perl  0.48-1
ii  libclass-xsaccessor-perl  1.19-3+b5
ii  libclone-perl 0.45-1
ii  libconfig-tiny-perl   2.24-1
ii  libcpanel-json-xs-perl4.19-1
ii  libdata-dpath-perl0.58-1
ii  libdata-validate-domain-perl  0.10-1
ii  libdevel-size-perl0.83-1+b1
ii  libdpkg-perl  1.20.5
ii  libemail-address-xs-perl  1.04-1+b2
ii  libfile-basedir-perl  0.08-1
ii  libfile-find-rule-perl0.34-1
ii  libfont-ttf-perl  1.06-1
ii  libhtml-parser-perl   3.72-5
ii  libio-async-loop-epoll-perl   0.21-1
ii  libio-async-perl  0.77-3
ii  libipc-run3-perl  0.048-2
ii  libjson-maybexs-perl  1.004002-1
ii  liblist-compare-perl  0.53-1
ii  liblist-moreutils-perl0.416-1+b5
ii  liblist-utilsby-perl  0.11-1
ii  libmoo-perl   2.004000-1
ii  libmoox-aliases-perl  0.001006-1
ii  libnamespace-clean-perl   0.27-1
ii  libpath-tiny-perl 0.114-1
ii  libperlio-gzip-perl   0.19-1+b6
ii  libsereal-decoder-perl4.018+ds-1
ii  libsereal-encoder-perl4.018+ds-1
ii  libtext-levenshteinxs-perl0.03-4+b7
ii  libtext-xslate-perl   3.5.8-1
ii  libtime-duration-perl 1.21-1
ii  libtime-moment-perl   0.44-1+b2
ii  libtimedate-perl  2.3300-1
ii  libtry-tiny-perl  0.30-1
ii  libtype-tiny-perl 1.010002-1
ii  libunicode-utf8-perl  0.62-1+b1
ii  liburi-perl   1.76-2
ii  libxml-libxml-perl2.0134+dfsg-2
ii  libxml-writer-perl0.625-1
ii  libyaml-libyaml-perl  0.82+repack-1
ii  lzip  1.21-7
ii  lzop  1.04-1
ii  man-db2.9.3-2
ii  patchutils0.4.2-1
ii  perl [libdigest-sha-perl] 5.30.3-4
ii  t1utils   1.41-4
ii  unzip 6.0-25
ii  xz-utils  5.2.4-1+b1

lintian recommends no packages.

Versions of packages lintian suggests:
ii  binutils-multiarch 2.35-1
ii  libtext-template-perl  1.59-1

-- no debconf information



Bug#941774: lintian: False positive for symbols-file-contains-current-version-with-debian-revision

2019-12-21 Thread Ross Vandegrift
Hi Felix,

I forgot all about this, thanks for following up.

On Sat, Dec 14, 2019 at 02:15:41PM -0800, Felix Lechner wrote:
> $ fgrep -- -5 dir2/symbols
>  
> _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag@Base
> 1.21.1-5+b1
> 
> The symbol shows a Debian revision. Lintian is right.

Aha - I was searching the symbols file from the source package.  Now I see that
the binary package's symbols file is not necessarily the same.  Sorry for the
mistake.

> As a side note, I was surprised to find 188 additional Debian revisions:

These are intentional (and have overrides).  See "Note on eolian-generated
symbols" in README.source if you're curious.

> Finally, I am not sure why some symbols were decoded properly using
> the appropriate pattern [1], while the offender is raw 'c++'. Did you
> mix C and C++ symbols in the same shared library?

Yes, by accident - libephysics uses a c++ library, and was leaking this c++
symbol.  Looks like gcc8 -O2 inlined this function, while gcc9 doesn't until
-O3.

Ross



Bug#941774: lintian: False positive for symbols-file-contains-current-version-with-debian-revision

2019-10-12 Thread Ross Vandegrift
On Sat, Oct 05, 2019 at 02:30:30AM -0400, Scott Kitterman wrote:
>  (optional=templinst|arch=!amd64 !arm64 
> !x32)_ZN8nitrokey5proto17ResponseDissectorILNS0_9CommandIDE0ERKNS0_14DeviceResponseILS2_0ENS0_7stick109GetStatus15ResponsePayload24status_translate_commandB5cxx11Ei@Base
>  3.5
> 
>  No dash anywhere.  In fact, in only dashes in the entire symbols file
>  are in the first three lines of the file:

I'm seeing a similar false positive:

E: libephysics1: symbols-file-contains-current-version-with-debian-revision on 
symbol 
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag@Base

Though in my case, there's no such symbol in the symbols file.  This is from a
local run of lintian 2.25.0, this version of libephysics1 hasn't been uploaded
yet.

Ross



Bug#899134: lintian: desktop file checks have outdated links

2018-05-19 Thread Ross Vandegrift
Package: lintian
Version: 2.5.86
Severity: normal
Tags: patch

The desktop file checks contain links to the spec.  Some of these need to be
updated for the latest version of the spec.  The attached patch fixes the
issues I found this morning.

Ross
>From d0c2fc81c847bb3015768c33820c3d21f9418aa9 Mon Sep 17 00:00:00 2001
From: Ross Vandegrift <r...@kallisti.us>
Date: Sat, 19 May 2018 10:01:04 -0700
Subject: [PATCH] Update freedesktop.org desktop spec links

Section page links have changed in the latest version of the desktop spec.
Also, s/standards/specifications/ to match the rest of lintian.
---
 checks/menu-format.desc | 16 
 checks/menu-format.pm   |  2 +-
 data/menu-format/known-desktop-keys |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/checks/menu-format.desc b/checks/menu-format.desc
index b9027bf..9ae97ce 100644
--- a/checks/menu-format.desc
+++ b/checks/menu-format.desc
@@ -252,7 +252,7 @@ Info: The desktop entry file has lines ending in CRLF 
instead of just LF.
  CR character in the file:
  .
  sed -i 's/\r//g' path/to/file
-Ref: https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s02.html
+Ref: 
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s03.html
 
 Tag: duplicated-key-in-desktop-entry
 Severity: normal
@@ -270,7 +270,7 @@ Info: Desktop entries must contain, at a minimum, the keys 
Type and Name.
  .
  The desktop-file-validate tool in the desktop-file-utils package is
  useful for checking the syntax of desktop entries.
-Ref: https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
+Ref: 
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
 
 Tag: desktop-entry-contains-unknown-key
 Severity: minor
@@ -282,7 +282,7 @@ Info: The key on this line of the desktop entry is not one 
of the standard
  .
  The desktop-file-validate tool in the desktop-file-utils package is
  useful for checking the syntax of desktop entries.
-Ref: https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
+Ref: 
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
 
 Tag: desktop-entry-contains-deprecated-key
 Severity: normal
@@ -292,7 +292,7 @@ Info: The key on this line of the desktop entry has been 
deprecated in the
  .
  The desktop-file-validate tool in the desktop-file-utils package is
  useful for checking the syntax of desktop entries.
-Ref: https://standards.freedesktop.org/desktop-entry-spec/latest/apc.html
+Ref: https://specifications.freedesktop.org/desktop-entry-spec/latest/apc.html
 
 Tag: desktop-entry-contains-encoding-key
 Severity: wishlist
@@ -304,7 +304,7 @@ Info: The Encoding key is now deprecated by the FreeDesktop 
standard and
  .
  The desktop-file-validate tool in the desktop-file-utils package is
  useful for checking the syntax of desktop entries.
-Ref: https://standards.freedesktop.org/desktop-entry-spec/latest/apc.html
+Ref: https://specifications.freedesktop.org/desktop-entry-spec/latest/apc.html
 
 Tag: desktop-entry-lacks-main-category
 Severity: normal
@@ -329,7 +329,7 @@ Info: This .desktop file does not contain an "Icon" entry.
  .
  The desktop-file-validate tool in the desktop-file-utils package is
  useful for checking the syntax of desktop entries.
-Ref: 
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html,
+Ref: 
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html,
  
https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html,
  #854132
 
@@ -346,7 +346,7 @@ Info: This .desktop file does either not contain a 
"Keywords" entry or it does
  .
  The desktop-file-validate tool in the desktop-file-utils package is
  useful for checking the syntax of desktop entries.
-Ref: 
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html,
+Ref: 
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html,
  #693918, https://wiki.gnome.org/Initiatives/GnomeGoals/DesktopFileKeywords
 
 Tag: desktop-entry-uses-reserved-category
@@ -393,7 +393,7 @@ Info: The key on this line of the desktop entry has been 
deprecated in the
  .
  The desktop-file-validate tool in the desktop-file-utils package is
  useful for checking the syntax of desktop entries.
-Ref: https://standards.freedesktop.org/desktop-entry-spec/latest/apc.html
+Ref: https://specifications.freedesktop.org/desktop-entry-spec/latest/apc.html
 
 Tag: desktop-mime-but-no-exec-code
 Severity: normal
diff --git a/checks/menu-format.pm b/checks/menu-format.pm
index 295079f..0edf43e 100644
--- a/checks/menu-format.pm
+++ b/checks/menu-format.pm
@@ -96,7 +96,7 @@ my $DEPRECATED_DESKTOP_KEYS
 my $KDE_DESKTOP_KEYS = Lintian::Data->new('menu-format/kde-desktop-keys');
 
 # Known types of desktop entries.
-# https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
+# https://specifications.freedeskt

Bug#895762: lintian should check if Vcs-Git branch matches d/gbp.conf branch

2018-04-15 Thread Ross Vandegrift
On Sun, Apr 15, 2018 at 09:30:14PM +0200, Mattia Rizzolo wrote:
> On Sun, Apr 15, 2018 at 11:48:13AM -0700, Ross Vandegrift wrote:
> > If a package uses gbp and a deban-branch is specified in d/gbp.conf, then
> > vcswatch should probably be checking that branch.  In #886334, it's pointed 
> > out
> > that vcswatch cannot use gbp.conf since that requires unpacked source.  So
> > here's a lintian check to warn on the mismatch.
> 
> Note that this is going to most likely cause tons of false positives.
> Think of packages which origin's HEAD is correctly set (so the -b option
> in Vcs-Git is pointless) but still set debian-branch in d/gbp.conf.

Hmm, I see.  If that's common, this probably can't be checked for.

Ross


signature.asc
Description: PGP signature


Bug#895762: lintian should check if Vcs-Git branch matches d/gbp.conf branch

2018-04-15 Thread Ross Vandegrift
Package: lintian
Version: 2.5.77~bpo9+1
Severity: wishlist
Tags: patch

If a package uses gbp and a deban-branch is specified in d/gbp.conf, then
vcswatch should probably be checking that branch.  In #886334, it's pointed out
that vcswatch cannot use gbp.conf since that requires unpacked source.  So
here's a lintian check to warn on the mismatch.

Thanks,
Ross
>From 56cec96dbd4ddfcc9c1c25637d0c07ba16c22048 Mon Sep 17 00:00:00 2001
From: Ross Vandegrift <r...@kallisti.us>
Date: Sun, 15 Apr 2018 11:39:30 -0700
Subject: [PATCH] Warn about mismatches between git branches in gbp.conf &
 Vcs-Git

If d/gbp.conf exists and the buildpackage section specifies a
debian-branch, then Vcs-Git should match that branch.  This helps with the
issue described in #886334.
---
 checks/git-buildpackage.desc   | 15 +
 checks/git-buildpackage.pm | 66 ++
 debian/control |  1 +
 .../debian/debian/control.in   | 20 +++
 .../debian/debian/gbp.conf |  2 +
 t/tests/gbp-vcs-git-branch-mismatch/desc   |  6 ++
 t/tests/gbp-vcs-git-branch-mismatch/tags   |  1 +
 .../gbp-vcs-git-no-branch/debian/debian/control.in | 20 +++
 .../gbp-vcs-git-no-branch/debian/debian/gbp.conf   |  2 +
 t/tests/gbp-vcs-git-no-branch/desc |  6 ++
 t/tests/gbp-vcs-git-no-branch/tags |  1 +
 11 files changed, 140 insertions(+)
 create mode 100644 checks/git-buildpackage.desc
 create mode 100644 checks/git-buildpackage.pm
 create mode 100644 t/tests/gbp-vcs-git-branch-mismatch/debian/debian/control.in
 create mode 100644 t/tests/gbp-vcs-git-branch-mismatch/debian/debian/gbp.conf
 create mode 100644 t/tests/gbp-vcs-git-branch-mismatch/desc
 create mode 100644 t/tests/gbp-vcs-git-branch-mismatch/tags
 create mode 100644 t/tests/gbp-vcs-git-no-branch/debian/debian/control.in
 create mode 100644 t/tests/gbp-vcs-git-no-branch/debian/debian/gbp.conf
 create mode 100644 t/tests/gbp-vcs-git-no-branch/desc
 create mode 100644 t/tests/gbp-vcs-git-no-branch/tags

diff --git a/checks/git-buildpackage.desc b/checks/git-buildpackage.desc
new file mode 100644
index 0..3d0d06973
--- /dev/null
+++ b/checks/git-buildpackage.desc
@@ -0,0 +1,15 @@
+Check-Script: git-buildpackage
+Author: Ross Vandegrift <r...@kallisti.us>
+Abbrev: gbp
+Type: source
+Needs-Info: unpacked
+Info: This script checks for issues in gbp.conf.
+
+Tag: mismatch-between-vcs-git-and-gbp-debian-branch
+Severity: normal
+Certainty: possible
+Info: This package includes a debian/gbp.conf file, and the
+ buildpackage section specifies a branch name.  However, Vcs-Git in
+ debian/control points to a different branch.  If this package is
+ built with git-buildpackage, this will confuse vcswatch.
+Ref: policy 5.6.26
diff --git a/checks/git-buildpackage.pm b/checks/git-buildpackage.pm
new file mode 100644
index 0..64d63e76a
--- /dev/null
+++ b/checks/git-buildpackage.pm
@@ -0,0 +1,66 @@
+# git-buildpackage -- lintian check script -*- perl -*-
+
+# Copyright (C) 2018 Ross Vandegrift
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, you can find it on the World Wide
+# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+package Lintian::git_buildpackage;
+use strict;
+use warnings;
+use autodie;
+
+use Lintian::Tags qw(tag);
+
+use Config::IniFiles;
+
+sub run {
+my ($pkg_name, $pkg_type, $info, $pkg, $group) = @_;
+
+# check for a gbp.conf with debian-branch set in the buildpackage section
+my $gbp_conf = $info->index_resolved_path('debian/gbp.conf');
+return if not $gbp_conf;
+
+my $cfg = Config::IniFiles->new(-file => $gbp_conf->fs_path);
+my $gbp_branch = $cfg->val('buildpackage', 'debian-branch');
+return if not $gbp_branch;
+
+# check for a branch in Vcs-Git
+my $dcontrol = $info->index_resolved_path('debian/control');
+return if not $dcontrol;
+
+my $fd = $dcontrol->open;
+while (my $line = <$fd>) {
+if ($line =~ /^Vcs-Git: /) {
+my (undef, $url, $dash_b, $dcontrol_branch) = split(/\s+/, $line);
+if ($dash_b ne '-b' || $dcontrol_branch ne $gbp_branch) {
+tag 'mismatch-between-vcs-git-and-gbp-de