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#895758: marked as done (Ignore files ending in ".patch_back" in patch-file-present-but-not-mentioned-in-series)

2018-04-15 Thread Debian Bug Tracking System
Your message dated Sun, 15 Apr 2018 22:04:35 +0100
with message-id 
<1523826275.3317874.1338840856.7b4ea...@webmail.messagingengine.com>
and subject line Re: Bug#895758: lintian -- when is a patch a patch (HG)
has caused the Debian Bug report #895758,
regarding Ignore files ending in ".patch_back" in 
patch-file-present-but-not-mentioned-in-series
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.)


-- 
895758: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895758
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---

Package: lintian
Version: 2.5.80
Severity: wishlist

My outreachy mentee renamed an old patch to:
  02_set_version_explicitly.patch_back

lintian complained about that with:
 W: libosmo-sccp source: patch-file-present-but-not-mentioned-in-series 
02_set_version_explicitly.patch_back

I would like to suggest that such a name will be ignored as valid filename 
for a patch (maybe a list of "valid" names can appear on lintian.d.o).


 Thorsten
--- End Message ---
--- Begin Message ---
Hi Thorsten,

> if I understand you right, this lintian warning will be triggered by any 
> file that is in patches/ but has no corresponding entry in series.

Indeed!

> This is fine and I also don't need an exception for "my" *.patch_back.

Getcha. Closing accordingly :-)


Best wishes,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   ` End Message ---


Bug#895758: lintian -- when is a patch a patch (HG)

2018-04-15 Thread Thorsten Alteholz

Hi Chris,

On Sun, 15 Apr 2018, Chris Lamb wrote:

I could have sworn that already not all files in the patch/ directory
trigger such a message. But as I understand you right now, this is not the
case yet. So I am fine with it ...


Sorry, I don't understand what you mean here. :)  Can you rephrase?


if I understand you right, this lintian warning will be triggered by any 
file that is in patches/ but has no corresponding entry in series.

This is fine and I also don't need an exception for "my" *.patch_back.

I filed this wishlist bug because I wrongly thought that there is some 
kind of whitelist for such not needed files.


Does that make more sense?

   Thorsten



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

2018-04-15 Thread Chris Lamb
tags 895762 - patch
tags 895762 + moreinfo
thanks

Hi all,

> > If a package uses gbp and a deban-branch is specified in d/gbp.conf, then
> > vcswatch should probably be checking that branch.
[…]
> 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.

Indeed. :(  Updating tags to match, at least for now...


Best wishes,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



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

2018-04-15 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags 895762 - patch
Bug #895762 [lintian] lintian should check if Vcs-Git branch matches d/gbp.conf 
branch
Removed tag(s) patch.
> tags 895762 + moreinfo
Bug #895762 [lintian] lintian should check if Vcs-Git branch matches d/gbp.conf 
branch
Added tag(s) moreinfo.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
895762: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895762
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



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

2018-04-15 Thread Mattia Rizzolo
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.

-- 
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#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 
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 
+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-debian-branch';
+}
+last;
+

Bug#895758: lintian -- when is a patch a patch (HG)

2018-04-15 Thread Chris Lamb
Hi Thorsten,

> I could have sworn that already not all files in the patch/ directory 
> trigger such a message. But as I understand you right now, this is not the 
> case yet. So I am fine with it ...

Sorry, I don't understand what you mean here. :)  Can you rephrase?


Best wishes,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#895758: lintian -- when is a patch a patch (HG)

2018-04-15 Thread Thorsten Alteholz

Hi Chris,

On Sun, 15 Apr 2018, Chris Lamb wrote:

This might be a language thing but I would not know what "patch
back" would mean out of context. Indeed, even when I am pretty
sure what you are trying to achieve (temporarily ignore a patch?)


yes, thats what I wanted.

I could have sworn that already not all files in the patch/ directory 
trigger such a message. But as I understand you right now, this is not the 
case yet. So I am fine with it ...


  Thorsten



Processed: Re: Bug#895758: lintian -- when is a patch a patch (HG)

2018-04-15 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> retitle 895758 Ignore files ending in ".patch_back" in 
> patch-file-present-but-not-mentioned-in-series
Bug #895758 [lintian] lintian -- when is a patch a patch (HG)
Changed Bug title to 'Ignore files ending in ".patch_back" in 
patch-file-present-but-not-mentioned-in-series' from 'lintian -- when is a 
patch a patch (HG)'.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
895758: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895758
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#895758: lintian -- when is a patch a patch (HG)

2018-04-15 Thread Chris Lamb
retitle 895758 Ignore files ending in ".patch_back" in 
patch-file-present-but-not-mentioned-in-series
thanks

Hi Thorsten,

>   W: libosmo-sccp source: patch-file-present-but-not-mentioned-in-series 
>  02_set_version_explicitly.patch_back

This might be a language thing but I would not know what "patch
back" would mean out of context. Indeed, even when I am pretty
sure what you are trying to achieve (temporarily ignore a patch?)
it doesn't seem to parse for me. Sorry.

I'm not totally against have some kind of "ignore" pattern
(although, of course, IMHO this is somewhat unnecessary if you are
using a revision control system..) but I would be against "patch
back" being included on it.


Best wishes,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#895758: lintian -- when is a patch a patch (HG)

2018-04-15 Thread Thorsten Alteholz

Package: lintian
Version: 2.5.80
Severity: wishlist

My outreachy mentee renamed an old patch to:
  02_set_version_explicitly.patch_back

lintian complained about that with:
 W: libosmo-sccp source: patch-file-present-but-not-mentioned-in-series 
02_set_version_explicitly.patch_back

I would like to suggest that such a name will be ignored as valid filename 
for a patch (maybe a list of "valid" names can appear on lintian.d.o).


 Thorsten



Processing of lintian_2.5.82~bpo9+1_sourceupload.changes

2018-04-15 Thread Debian FTP Masters
lintian_2.5.82~bpo9+1_sourceupload.changes uploaded successfully to localhost
along with the files:
  lintian_2.5.82~bpo9+1.dsc
  lintian_2.5.82~bpo9+1.tar.xz
  lintian_2.5.82~bpo9+1_amd64.buildinfo

Greetings,

Your Debian queue daemon (running on host usper.debian.org)



Processed: Re: Bug#895674: lintian: maybe-not-arch-all-binnmuable emitted for (= ${source:Version})

2018-04-15 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags 895674 + pending
Bug #895674 [src:lintian] lintian: maybe-not-arch-all-binnmuable emitted for (= 
${source:Version})
Added tag(s) pending.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
895674: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895674
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#895674: lintian: maybe-not-arch-all-binnmuable emitted for (= ${source:Version})

2018-04-15 Thread Chris Lamb
tags 895674 + pending
thanks

> I guess I'd want to know if the source format were not 3.0 (quilt) but
> that's a rare enough issue that it's probably not worth the noise

Indeed. Whilst we have things like:

  unknown-source-format
  unsupported-source-format
  missing-debian-source-format

... I think you are really after a check for "Format: 1.0"
packages here. There is a proof-of-concept of this in #884498.

Anyway, I've fixed this tag as it stands to avoid any confusion:

  
https://salsa.debian.org/lintian/lintian/commit/37f460a1d2d9886e611f17142cbbfa055a8e93b0

  checks/version-substvars.desc   | 9 +++--
  debian/changelog| 4 
  t/tests/version-substvars-general/desc  | 2 +-
  t/tests/version-substvars-general/tags  | 2 +-
  t/tests/version-substvars-obsolete/desc | 2 +-
  t/tests/version-substvars-obsolete/tags | 2 +-
  6 files changed, 15 insertions(+), 6 deletions(-)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#886036: Improve changelog version parsing

2018-04-15 Thread Chris Lamb
Chris Lamb wrote:

> Can you update us on the status of this issue? Did we resolve it already
> or do you have more patches ready to roll soon? :)

Gentle ping on this? I do remember you had some patches queued up,
I just hope we/I haven't neglected them somewhere...


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-