Debian Bug report logs - #635920
git-import-orig --uscan uses the wrong tarball when a repacking script is used

version graph

Package: git-buildpackage; Maintainer for git-buildpackage is Guido Günther <agx@sigxcpu.org>; Source for git-buildpackage is src:git-buildpackage.

Reported by: Chris Butler <chrisb@debian.org>

Date: Fri, 29 Jul 2011 15:45:02 UTC

Severity: normal

Found in version git-buildpackage/0.5.26

Fixed in version git-buildpackage/0.6.9

Done: Guido Günther <agx@sigxcpu.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Fri, 29 Jul 2011 15:45:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chris Butler <chrisb@debian.org>:
New Bug report received and forwarded. Copy sent to Guido Günther <agx@sigxcpu.org>. (Fri, 29 Jul 2011 15:45:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Chris Butler <chrisb@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Fri, 29 Jul 2011 17:36:22 +0200
Package: git-buildpackage
Version: 0.5.26
Severity: normal

When running "git-import-orig --uscan", with a watch file that specifies a
repacking script, then git-import-orig will import the wrong file (it
imports the original and not the repacked archive).

An example is the libpostscript-file-perl package[1], which includes the
following watch file:

version=3
opts="dversionmangle=s/\+dfsg//" \
        http://search.cpan.org/dist/PostScript-File/ \
        .*/PostScript-File-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) \
        debian sh debian/repack.stub


The "repack.stub" script repacks the tarball to remove some non-DFSG-free
files, and renames the tarball to libpostscript-file-perl_2.10+dfsg.orig.tar.gz.

Unfortunately, looking at the code I can't see an easy way of getting the
filename of the repacked tarball, unless we define a standard way for
repacking scripts to output the new filename. Or perhaps we should look at
adding "native" repacking support to uscan?


1. git://git.debian.org/pkg-perl/packages/libpostscript-file-perl.git

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages git-buildpackage depends on:
ii  devscripts                   2.11.0      scripts to make the life of a Debi
ii  git [git-core]               1:1.7.5.4-1 fast, scalable, distributed revisi
ii  git-core                     1:1.7.5.4-1 fast, scalable, distributed revisi
ii  python                       2.6.6-14    interactive high-level object-orie
ii  python-dateutil              1.4.1-3     powerful extensions to the standar
ii  python-support               1.0.14      automated rebuilding support for P

Versions of packages git-buildpackage recommends:
ii  cowbuilder                    0.63       pbuilder running on cowdancer
ii  pristine-tar                  1.13       regenerate pristine tarballs

Versions of packages git-buildpackage suggests:
pn  git-load-dirs                 <none>     (no description available)
ii  python-notify                 0.1.1-2+b3 Python bindings for libnotify

-- Configuration Files:
/etc/git-buildpackage/gbp.conf changed [not included]

-- no debconf information

-- 
Chris Butler <chrisb@debian.org>
  GnuPG Key ID: 4096R/49E3ACD3




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#635920; Package git-buildpackage. (Fri, 29 Jul 2011 16:48:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. (Fri, 29 Jul 2011 16:48:05 GMT) Full text and rfc822 format available.

Message #10 received at 635920@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Chris Butler <chrisb@debian.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Fri, 29 Jul 2011 18:45:17 +0200
On Fri, Jul 29, 2011 at 05:36:22PM +0200, Chris Butler wrote:
> Package: git-buildpackage
> Version: 0.5.26
> Severity: normal
> 
> When running "git-import-orig --uscan", with a watch file that specifies a
> repacking script, then git-import-orig will import the wrong file (it
> imports the original and not the repacked archive).
> 
> An example is the libpostscript-file-perl package[1], which includes the
> following watch file:
> 
> version=3
> opts="dversionmangle=s/\+dfsg//" \
>         http://search.cpan.org/dist/PostScript-File/ \
>         .*/PostScript-File-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) \
>         debian sh debian/repack.stub
> 
> 
> The "repack.stub" script repacks the tarball to remove some non-DFSG-free
> files, and renames the tarball to libpostscript-file-perl_2.10+dfsg.orig.tar.gz.
> 
> Unfortunately, looking at the code I can't see an easy way of getting the
> filename of the repacked tarball, unless we define a standard way for
> repacking scripts to output the new filename. Or perhaps we should look at
> adding "native" repacking support to uscan?

I don't have a nice idea to fetch the filename either. An alternative
would be to use git-import-orig's repacking via the --filter-option
which is available since 0.5.27. I wonder if this is rather a uscan
issue not allowing us to fetch the right tarball?
Cheers,
 -- Guido

> 
> 1. git://git.debian.org/pkg-perl/packages/libpostscript-file-perl.git
> 
> -- System Information:
> Debian Release: wheezy/sid
>   APT prefers testing
>   APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
> Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages git-buildpackage depends on:
> ii  devscripts                   2.11.0      scripts to make the life of a Debi
> ii  git [git-core]               1:1.7.5.4-1 fast, scalable, distributed revisi
> ii  git-core                     1:1.7.5.4-1 fast, scalable, distributed revisi
> ii  python                       2.6.6-14    interactive high-level object-orie
> ii  python-dateutil              1.4.1-3     powerful extensions to the standar
> ii  python-support               1.0.14      automated rebuilding support for P
> 
> Versions of packages git-buildpackage recommends:
> ii  cowbuilder                    0.63       pbuilder running on cowdancer
> ii  pristine-tar                  1.13       regenerate pristine tarballs
> 
> Versions of packages git-buildpackage suggests:
> pn  git-load-dirs                 <none>     (no description available)
> ii  python-notify                 0.1.1-2+b3 Python bindings for libnotify
> 
> -- Configuration Files:
> /etc/git-buildpackage/gbp.conf changed [not included]
> 
> -- no debconf information
> 
> -- 
> Chris Butler <chrisb@debian.org>
>   GnuPG Key ID: 4096R/49E3ACD3
> 
> 




Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 03 Aug 2011 16:09:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 03 Aug 2011 16:09:05 GMT) Full text and rfc822 format available.

Message #15 received at 635920@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: 635920@bugs.debian.org
Subject: Re: Bug#635920: git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 3 Aug 2011 18:07:22 +0200
[Message part 1 (text/plain, inline)]
On Fri, 29 Jul 2011 18:45:17 +0200, Guido Günther wrote:

> > Unfortunately, looking at the code I can't see an easy way of getting the
> > filename of the repacked tarball, unless we define a standard way for
> > repacking scripts to output the new filename. Or perhaps we should look at
> > adding "native" repacking support to uscan?
> I don't have a nice idea to fetch the filename either. An alternative
> would be to use git-import-orig's repacking via the --filter-option
> which is available since 0.5.27. I wonder if this is rather a uscan
> issue not allowing us to fetch the right tarball?

svn-upgrade doesn't use the --dehs option and parses the plain
output. Luckily our repack.sh script ends with
*** /$dir/$package_$version+dfsg.orig.tar.gz ready
which is caught by svn-upgrade's regexp. - More luch than design, and
probably not really helpful for git-import-orig, I guess ...

Cheers,
gregor
-- 
 .''`.   Homepage: http://info.comodo.priv.at/ - PGP/GPG key ID: 0x8649AA06
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: U2: A Room At The Heartbreak Hotel
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 12 Dec 2012 00:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 12 Dec 2012 00:15:03 GMT) Full text and rfc822 format available.

Message #20 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: 635920@bugs.debian.org
Cc: gregoa@debian.org
Subject: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 12 Dec 2012 01:05:31 +0100
Hi,

I think I have a patch. :)

it is against git-buildpackage 0.6.0~git20120601

------------------------------------------------
--- /usr/lib/python2.6/dist-packages/gbp/deb/__init__.py-backup 2012-12-12 00:39:50.722558020 +0100
+++ /usr/lib/python2.6/dist-packages/gbp/deb/__init__.py        2012-12-12 00:48:29.630557999 +0100
@@ -290,6 +290,12 @@
                 print source
                 if not os.path.exists(source):
                     source = None
+        # perl repack support #635920
+        for row in out.split("\n"):
+            m = re.match(r"\*\*\* ([^\s]+) ready", row)
+            if m:
+                source = "%s" % m.group(1)
+                break
         return (True, source)
------------------------------------------------

I can be wrong as it starts to become late here, but this seems to be a
possible way to solve the issue.
What do you think?

Regards,
  cstamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#635920; Package git-buildpackage. (Wed, 12 Dec 2012 15:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. (Wed, 12 Dec 2012 15:21:03 GMT) Full text and rfc822 format available.

Message #25 received at 635920@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Csillag Tamas <cstamas@digitus.itk.ppke.hu>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 12 Dec 2012 16:17:15 +0100
Hi cstamas,
On Wed, Dec 12, 2012 at 01:05:31AM +0100, Csillag Tamas wrote:
> Hi,
> 
> I think I have a patch. :)
> 
> it is against git-buildpackage 0.6.0~git20120601
> 
> ------------------------------------------------
> --- /usr/lib/python2.6/dist-packages/gbp/deb/__init__.py-backup 2012-12-12 00:39:50.722558020 +0100
> +++ /usr/lib/python2.6/dist-packages/gbp/deb/__init__.py        2012-12-12 00:48:29.630557999 +0100
> @@ -290,6 +290,12 @@
>                  print source
>                  if not os.path.exists(source):
>                      source = None
> +        # perl repack support #635920
> +        for row in out.split("\n"):
> +            m = re.match(r"\*\*\* ([^\s]+) ready", row)
> +            if m:
> +                source = "%s" % m.group(1)
> +                break
>          return (True, source)
> ------------------------------------------------
> 
> I can be wrong as it starts to become late here, but this seems to be a
> possible way to solve the issue.
> What do you think?

Thanks for your patch. Is this still an issue with current git? We're
parsing the upstream tarballs name hopefully correctly now. Could you
check and if not pass along a testcase?
Cheers,
 -- Guido

> 
> Regards,
>   cstamas
> -- 
> CSILLAG Tamas (cstamas) - http://cstamas.hu/
> 



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 12 Dec 2012 16:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 12 Dec 2012 16:15:03 GMT) Full text and rfc822 format available.

Message #30 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: Guido Günther <agx@sigxcpu.org>
Cc: 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 12 Dec 2012 17:10:30 +0100
Hi Guido,

On Wed, Dec 12, 2012 at 04:17:15PM +0100, Guido Günther wrote:
> Hi cstamas,
> On Wed, Dec 12, 2012 at 01:05:31AM +0100, Csillag Tamas wrote:
> > Hi,
> > 
> > I think I have a patch. :)
> > 
> > it is against git-buildpackage 0.6.0~git20120601
> > 
> > ------------------------------------------------
> > --- /usr/lib/python2.6/dist-packages/gbp/deb/__init__.py-backup 2012-12-12 00:39:50.722558020 +0100
> > +++ /usr/lib/python2.6/dist-packages/gbp/deb/__init__.py        2012-12-12 00:48:29.630557999 +0100
> > @@ -290,6 +290,12 @@
> >                  print source
> >                  if not os.path.exists(source):
> >                      source = None
> > +        # perl repack support #635920
> > +        for row in out.split("\n"):
> > +            m = re.match(r"\*\*\* ([^\s]+) ready", row)
> > +            if m:
> > +                source = "%s" % m.group(1)
> > +                break
> >          return (True, source)
> > ------------------------------------------------
> > 
> > I can be wrong as it starts to become late here, but this seems to be a
> > possible way to solve the issue.
> > What do you think?
> 
> Thanks for your patch. Is this still an issue with current git? We're
> parsing the upstream tarballs name hopefully correctly now. Could you
> check and if not pass along a testcase?

The issue is that when a repack script
(http://pkg-perl.alioth.debian.org/howto/repacking.html#5__package_upgrades)
that the Debian Perl team uses is being run it actually creates a new tarball.

uscan itself is unaware of the fact and the end result is that gbp uses
(commits with pristine-tar) the original non dfsg free upstream package.

My change above handles this issue as parsing the output of the script (which
is in one of the message blocks).

I can confirm that 0.6.0~git20121124 still has this bug.

To reproduce:
gbp-clone --all --pristine-tar git://anonscm.debian.org/pkg-perl/packages/libmojolicious-perl.git
cd libmojolicious-perl
git-import-orig --uscan

Regards,
  cstamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/




Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 12 Dec 2012 16:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 12 Dec 2012 16:33:04 GMT) Full text and rfc822 format available.

Message #35 received at 635920@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Cc: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 12 Dec 2012 17:30:27 +0100
[Message part 1 (text/plain, inline)]
On Wed, 12 Dec 2012 16:17:15 +0100, Guido Günther wrote:

> > I think I have a patch. :)
> > it is against git-buildpackage 0.6.0~git20120601

> Thanks for your patch. Is this still an issue with current git? We're
> parsing the upstream tarballs name hopefully correctly now. Could you
> check and if not pass along a testcase?

Let's try:

I'm taking the first +dfsg package which has new upstream release:

This is libdata-ical-perl:

% grep Vcs debian/control
Vcs-Git: git://git.debian.org/pkg-perl/packages/libdata-ical-perl.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libdata-ical-perl.git

% cat debian/watch
# format version number, currently 3; this line is compulsory!
version=3
# URL to the package page followed by a regex to search
opts="dversionmangle=s/\+dfsg//" \
http://search.cpan.org/dist/Data-ICal/ \
.*/Data-ICal-(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ \
debian sh debian/repack.stub

% uscan --verbose --report
-- Scanning for watchfiles in .
-- Found watchfile in ./debian
-- In debian/watch, processing watchfile line:
   opts="dversionmangle=s/\+dfsg//" http://search.cpan.org/dist/Data-ICal/ .*/Data-ICal-(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian sh debian/repack.stub
-- Found the following matching hrefs:
     /CPAN/authors/id/T/TS/TSIBLEY/Data-ICal-0.19.tar.gz
Newest version on remote site is 0.19, local version is 0.18+dfsg
 (mangled local version number 0.18)
 => Newer version available from
    http://search.cpan.org/CPAN/authors/id/T/TS/TSIBLEY/Data-ICal-0.19.tar.gz
-- Scan finished

% git-import-orig --uscan
gbp:info: Launching uscan...
gbp:info: using ../libdata-ical-perl_0.19.orig.tar.gz
What is the upstream version? [0.19] 
gbp:info: Importing '../libdata-ical-perl_0.19.orig.tar.gz' to branch 'upstream'...
gbp:info: Source package is libdata-ical-perl
gbp:info: Upstream version is 0.19
pristine-tar: committed libdata-ical-perl_0.19.orig.tar.gz.delta to branch pristine-tar
gbp:info: Merging to 'master'
Merge made by the 'recursive' strategy.
gbp:info: Successfully imported version 0.19 of ../libdata-ical-perl_0.19.orig.tar.gz

% cat debian/repack.local
MANIFEST=1
rm doc/rfc*

% ls doc
rfc2445.txt

% ls -la ../*.tar.gz
-rw-rw-r-- 1 gregoa gregoa 117278 Dec 12 17:19 ../Data-ICal-0.19.tar.gz
-rw-rw-r-- 1 gregoa gregoa  52273 Dec 12 17:19 ../libdata-ical-perl_0.19+dfsg.orig.tar.gz
lrwxrwxrwx 1 gregoa gregoa     21 Dec 12 17:19 ../libdata-ical-perl_0.19.orig.tar.gz -> Data-ICal-0.19.tar.gz

% rm ../*.tar.gz

% uscan --verbose --force
-- Scanning for watchfiles in .
-- Found watchfile in ./debian
-- In debian/watch, processing watchfile line:
   opts="dversionmangle=s/\+dfsg//" http://search.cpan.org/dist/Data-ICal/ .*/Data-ICal-(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian sh debian/repack.stub
-- Found the following matching hrefs:
     /CPAN/authors/id/T/TS/TSIBLEY/Data-ICal-0.19.tar.gz
Newest version on remote site is 0.19, local version is 0.19
 => Package is up to date
Newest version on remote site is 0.19, local version is 0.19
 => Forcing download as requested
-- Downloading updated package Data-ICal-0.19.tar.gz
-- Successfully downloaded updated package Data-ICal-0.19.tar.gz
    and symlinked libdata-ical-perl_0.19.orig.tar.gz to it
-- Executing user specified script
     sh debian/repack.stub --upstream-version 0.19 ../libdata-ical-perl_0.19.orig.tar.gz

Repackaging ../libdata-ical-perl_0.19.orig.tar.gz

removed ‘doc/rfc2445.txt’
*** ../libdata-ical-perl_0.19+dfsg.orig.tar.gz ready
-- Scan finished


So it seems that g-i-o still happily imports the original tarball and
not the repackaged one.


The problem is still that the name of the new tarball is only
reported as a message by uscan which is not parsed by
/usr/share/pyshared/gbp/deb/uscan.py if I'm reading ot correctly.

% uscan --dehs
<dehs>
<package>libdata-ical-perl</package>
<debian-uversion>0.18+dfsg</debian-uversion>
<debian-mangled-uversion>0.18</debian-mangled-uversion>
<upstream-version>0.19</upstream-version>
<upstream-url>http://search.cpan.org/CPAN/authors/id/T/TS/TSIBLEY/Data-ICal-0.19.tar.gz</upstream-url>
<status>Newer version available</status>
<target>libdata-ical-perl_0.19.orig.tar.gz</target>
<messages>Successfully downloaded updated package Data-ICal-0.19.tar.gz and symlinked libdata-ical-perl_0.19.orig.tar.gz to it</messages>
<messages>Executing user specified script: sh debian/repack.stub --upstream-version 0.19 ../libdata-ical-perl_0.19.orig.tar.gz; output:

Repackaging ../libdata-ical-perl_0.19.orig.tar.gz

removed ‘doc/rfc2445.txt’
*** ../libdata-ical-perl_0.19+dfsg.orig.tar.gz ready</messages>
</dehs>



Cheers,
gregor
 
-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Jelly Roll Morton: Dead Man Blues
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 13 Dec 2012 08:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 13 Dec 2012 08:06:03 GMT) Full text and rfc822 format available.

Message #40 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: gregor herrmann <gregoa@debian.org>
Cc: Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 13 Dec 2012 09:03:07 +0100
[Message part 1 (text/plain, inline)]
hi,

On Wed, Dec 12, 2012 at 05:30:27PM +0100, gregor herrmann wrote:
> On Wed, 12 Dec 2012 16:17:15 +0100, Guido Günther wrote:
... 
> The problem is still that the name of the new tarball is only
> reported as a message by uscan which is not parsed by
> /usr/share/pyshared/gbp/deb/uscan.py if I'm reading ot correctly.

My previous patch works happily with the version in wheezy (and you are right
that I should have worked on the newest available version in the first place.)

I will try to do the same against the version in git.

Regads,
  cstamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/

Boy, backups sure are a lot faster since I linked /dev/st0 to /dev/null...

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 13 Dec 2012 08:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 13 Dec 2012 08:27:03 GMT) Full text and rfc822 format available.

Message #45 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: gregor herrmann <gregoa@debian.org>
Cc: Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 13 Dec 2012 09:24:20 +0100
[Message part 1 (text/plain, inline)]
hi,

On Wed, Dec 12, 2012 at 05:30:27PM +0100, gregor herrmann wrote:
... 
> So it seems that g-i-o still happily imports the original tarball and
> not the repackaged one.
> 
> 
> The problem is still that the name of the new tarball is only
> reported as a message by uscan which is not parsed by
> /usr/share/pyshared/gbp/deb/uscan.py if I'm reading ot correctly.

Yes that's right.

I changed the patch... (it was quite straight forward, it is the same code
somewhere else doing the same.)

------------------------
--- /usr/share/pyshared/gbp/deb/uscan.py-orig   2012-12-13 09:09:13.250558008 +0100
+++ /usr/share/pyshared/gbp/deb/uscan.py        2012-12-13 09:09:23.306558006 +0100
@@ -101,6 +101,12 @@
             except KeyError as e:
                 raise UscanError("Couldn't find '%s' in uscan output" %
                                  e.args[0])
+        # perl repack support #635920
+        for row in out.split("\n"):
+            m = re.match(r"\*\*\* ([^\s]+) ready", row)
+            if m:
+                source = "%s" % m.group(1)
+                break
         self._tarball = source
 
     def _parse_uptodate(self, out):
------------------------

A quick test (the same one as before) indicates that it works fine:

% gbp-clone --all --pristine-tar git://git.debian.org/pkg-perl/packages/libdata-ical-perl.git                                                                
Branch pristine-tar set up to track remote branch pristine-tar from origin.
Branch upstream set up to track remote branch upstream from origin.        
% cd libdata-ical-perl         
% git-import-orig --uscan
gbp:info: Launching uscan...
gbp:info: using ../libdata-ical-perl_0.19+dfsg.orig.tar.gz
What is the upstream version? [0.19+dfsg]
gbp:info: Importing '../libdata-ical-perl_0.19+dfsg.orig.tar.gz' to branch 'upstream'...
gbp:info: Source package is libdata-ical-perl
gbp:info: Upstream version is 0.19+dfsg
gbp:info: Merging to 'master'
Merge made by the 'recursive' strategy.
gbp:info: Successfully imported version 0.19+dfsg of ../libdata-ical-perl_0.19+dfsg.orig.tar.gz
% ls doc
ls: cannot access doc: No such file or directory

Regards,
  cstamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/

Life is complex - It has real and imaginary parts.
   -- Andrea Leistra

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 13 Dec 2012 08:27:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 13 Dec 2012 08:27:05 GMT) Full text and rfc822 format available.

Message #50 received at 635920@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Cc: Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 13 Dec 2012 09:26:02 +0100
On Thu, 13 Dec 2012 09:03:07 +0100, Csillag Tamas wrote:

> On Wed, Dec 12, 2012 at 05:30:27PM +0100, gregor herrmann wrote:
> > On Wed, 12 Dec 2012 16:17:15 +0100, Guido Günther wrote:
> ... 
> > The problem is still that the name of the new tarball is only
> > reported as a message by uscan which is not parsed by
> > /usr/share/pyshared/gbp/deb/uscan.py if I'm reading ot correctly.
> My previous patch works happily with the version in wheezy (and you are right
> that I should have worked on the newest available version in the first place.)

Oh, just to clarify: My test was without your patch, just with the
current gbp installed, as an answer to Guido's "shouldn't this work
already?"
 
Cheers,
gregor
 
-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   BOFH excuse #248:  Too much radiation coming from the soil. 



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 13 Dec 2012 08:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 13 Dec 2012 08:33:03 GMT) Full text and rfc822 format available.

Message #55 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: gregor herrmann <gregoa@debian.org>
Cc: Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 13 Dec 2012 09:31:41 +0100
On Thu, Dec 13, 2012 at 09:26:02AM +0100, gregor herrmann wrote:
> On Thu, 13 Dec 2012 09:03:07 +0100, Csillag Tamas wrote:
> > On Wed, Dec 12, 2012 at 05:30:27PM +0100, gregor herrmann wrote:
> > > On Wed, 12 Dec 2012 16:17:15 +0100, Guido Günther wrote:
> > ... 
> > > The problem is still that the name of the new tarball is only
> > > reported as a message by uscan which is not parsed by
> > > /usr/share/pyshared/gbp/deb/uscan.py if I'm reading ot correctly.
> > My previous patch works happily with the version in wheezy (and you are right
> > that I should have worked on the newest available version in the first place.)
> 
> Oh, just to clarify: My test was without your patch, just with the
> current gbp installed, as an answer to Guido's "shouldn't this work
> already?"

Okay just the patched version results in a much easier workflow and it solves
the problem for me so I will try to gently push it forward ;-)

Regards,
  cstamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#635920; Package git-buildpackage. (Thu, 13 Dec 2012 09:57:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. (Thu, 13 Dec 2012 09:57:06 GMT) Full text and rfc822 format available.

Message #60 received at 635920@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Csillag Tamas <cstamas@digitus.itk.ppke.hu>, 635920@bugs.debian.org
Cc: gregor herrmann <gregoa@debian.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 13 Dec 2012 10:45:05 +0100
On Thu, Dec 13, 2012 at 09:31:41AM +0100, Csillag Tamas wrote:
> On Thu, Dec 13, 2012 at 09:26:02AM +0100, gregor herrmann wrote:
> > On Thu, 13 Dec 2012 09:03:07 +0100, Csillag Tamas wrote:
> > > On Wed, Dec 12, 2012 at 05:30:27PM +0100, gregor herrmann wrote:
> > > > On Wed, 12 Dec 2012 16:17:15 +0100, Guido Günther wrote:
> > > ... 
> > > > The problem is still that the name of the new tarball is only
> > > > reported as a message by uscan which is not parsed by
> > > > /usr/share/pyshared/gbp/deb/uscan.py if I'm reading ot correctly.
> > > My previous patch works happily with the version in wheezy (and you are right
> > > that I should have worked on the newest available version in the first place.)
> > 
> > Oh, just to clarify: My test was without your patch, just with the
> > current gbp installed, as an answer to Guido's "shouldn't this work
> > already?"
> 
> Okay just the patched version results in a much easier workflow and it solves
> the problem for me so I will try to gently push it forward ;-)

That's fine. I just wonder if it wouldn't be even better to enhance
uscan to put out the name of the repacked tarball in a different xml
element and slurp this in git-buildpackage then? This would be much more
robust. Would you feel comfortable in enhancing uscan that way?
Cheers,
 -- Guido

> 
> Regards,
>   cstamas
> -- 
> CSILLAG Tamas (cstamas) - http://cstamas.hu/
> 



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 13 Dec 2012 10:42:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 13 Dec 2012 10:42:03 GMT) Full text and rfc822 format available.

Message #65 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: Guido Günther <agx@sigxcpu.org>
Cc: 635920@bugs.debian.org, gregor herrmann <gregoa@debian.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 13 Dec 2012 11:38:21 +0100
On Thu, Dec 13, 2012 at 10:45:05AM +0100, Guido Günther wrote:
> On Thu, Dec 13, 2012 at 09:31:41AM +0100, Csillag Tamas wrote:
> > On Thu, Dec 13, 2012 at 09:26:02AM +0100, gregor herrmann wrote:
> > > On Thu, 13 Dec 2012 09:03:07 +0100, Csillag Tamas wrote:
> > > > On Wed, Dec 12, 2012 at 05:30:27PM +0100, gregor herrmann wrote:
> > > > > On Wed, 12 Dec 2012 16:17:15 +0100, Guido Günther wrote:
> > > > ... 
> > > > > The problem is still that the name of the new tarball is only
> > > > > reported as a message by uscan which is not parsed by
> > > > > /usr/share/pyshared/gbp/deb/uscan.py if I'm reading ot correctly.
> > > > My previous patch works happily with the version in wheezy (and you are right
> > > > that I should have worked on the newest available version in the first place.)
> > > 
> > > Oh, just to clarify: My test was without your patch, just with the
> > > current gbp installed, as an answer to Guido's "shouldn't this work
> > > already?"
> > 
> > Okay just the patched version results in a much easier workflow and it solves
> > the problem for me so I will try to gently push it forward ;-)
> 
> That's fine. I just wonder if it wouldn't be even better to enhance
> uscan to put out the name of the repacked tarball in a different xml
> element and slurp this in git-buildpackage then? This would be much more
> robust. Would you feel comfortable in enhancing uscan that way?

I was thinking about this. I am not sure if it makes sense to expose this
information there.

If this kind of information can be useful elsewhere (not just for
git-buildpackage) then IMHO uscan should be enhanced too.
But not so sure if only git-buildpackage uses this info (or not).

I looked into uscan (it is a perl script ;-) and if we want to improve it to
know about repack then repack should be made a special command in the watch file.
As currently repack uses a common command execution uscan cannot handle it any
special as it cannot know for sure if it is a repack script or anything else.

If you agree that it should be done this way (as you can read in the paragraph
above) I am happy to work on uscan then the patch for git-buildpackage can be
better.

Regards,
  cstamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/

Sysadmins don't go to hell; we're already doing our time in purgatory.




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#635920; Package git-buildpackage. (Thu, 13 Dec 2012 16:42:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. (Thu, 13 Dec 2012 16:42:03 GMT) Full text and rfc822 format available.

Message #70 received at 635920@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Cc: 635920@bugs.debian.org, gregor herrmann <gregoa@debian.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 13 Dec 2012 17:41:40 +0100
On Thu, Dec 13, 2012 at 11:38:21AM +0100, Csillag Tamas wrote:
> On Thu, Dec 13, 2012 at 10:45:05AM +0100, Guido Günther wrote:
> > On Thu, Dec 13, 2012 at 09:31:41AM +0100, Csillag Tamas wrote:
> > > On Thu, Dec 13, 2012 at 09:26:02AM +0100, gregor herrmann wrote:
> > > > On Thu, 13 Dec 2012 09:03:07 +0100, Csillag Tamas wrote:
> > > > > On Wed, Dec 12, 2012 at 05:30:27PM +0100, gregor herrmann wrote:
> > > > > > On Wed, 12 Dec 2012 16:17:15 +0100, Guido Günther wrote:
> > > > > ... 
> > > > > > The problem is still that the name of the new tarball is only
> > > > > > reported as a message by uscan which is not parsed by
> > > > > > /usr/share/pyshared/gbp/deb/uscan.py if I'm reading ot correctly.
> > > > > My previous patch works happily with the version in wheezy (and you are right
> > > > > that I should have worked on the newest available version in the first place.)
> > > > 
> > > > Oh, just to clarify: My test was without your patch, just with the
> > > > current gbp installed, as an answer to Guido's "shouldn't this work
> > > > already?"
> > > 
> > > Okay just the patched version results in a much easier workflow and it solves
> > > the problem for me so I will try to gently push it forward ;-)
> > 
> > That's fine. I just wonder if it wouldn't be even better to enhance
> > uscan to put out the name of the repacked tarball in a different xml
> > element and slurp this in git-buildpackage then? This would be much more
> > robust. Would you feel comfortable in enhancing uscan that way?
> 
> I was thinking about this. I am not sure if it makes sense to expose this
> information there.
> 
> If this kind of information can be useful elsewhere (not just for
> git-buildpackage) then IMHO uscan should be enhanced too.
> But not so sure if only git-buildpackage uses this info (or not).
> 
> I looked into uscan (it is a perl script ;-) and if we want to improve it to
> know about repack then repack should be made a special command in the watch file.
> As currently repack uses a common command execution uscan cannot handle it any
> special as it cannot know for sure if it is a repack script or anything else.
Doesn't that imply that we can't detect the output filename reliably?

> 
> If you agree that it should be done this way (as you can read in the paragraph
> above) I am happy to work on uscan then the patch for git-buildpackage can be
> better.
I think extending uscan is the only sensible way to go. Scraping command
output is way to fragile. So if you can handle the uscan side I'd be
happy to handle the gbp side ;)
Cheers,
 -- Guido



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 13 Dec 2012 21:51:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 13 Dec 2012 21:51:06 GMT) Full text and rfc822 format available.

Message #75 received at 635920@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Guido Günther <agx@sigxcpu.org>
Cc: Csillag Tamas <cstamas@digitus.itk.ppke.hu>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 13 Dec 2012 22:48:57 +0100
[Message part 1 (text/plain, inline)]
On Thu, 13 Dec 2012 17:41:40 +0100, Guido Günther wrote:

> On Thu, Dec 13, 2012 at 11:38:21AM +0100, Csillag Tamas wrote:
> > If you agree that it should be done this way (as you can read in the paragraph
> > above) I am happy to work on uscan then the patch for git-buildpackage can be
> > better.
> I think extending uscan is the only sensible way to go. Scraping command
> output is way to fragile. 

I completely agree.

Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Schmetterlinge: Ballade vom Glück und Ende des Kapitals
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Tue, 18 Dec 2012 17:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Tue, 18 Dec 2012 17:51:03 GMT) Full text and rfc822 format available.

Message #80 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: gregor herrmann <gregoa@debian.org>
Cc: Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Tue, 18 Dec 2012 18:46:57 +0100
[Message part 1 (text/plain, inline)]
Hi Guido,

On Thu, Dec 13, 2012 at 10:48:57PM +0100, gregor herrmann wrote:
> On Thu, 13 Dec 2012 17:41:40 +0100, Guido Günther wrote:
> 
> > On Thu, Dec 13, 2012 at 11:38:21AM +0100, Csillag Tamas wrote:
> > > If you agree that it should be done this way (as you can read in the paragraph
> > > above) I am happy to work on uscan then the patch for git-buildpackage can be
> > > better.
> > I think extending uscan is the only sensible way to go. Scraping command
> > output is way to fragile. 
> 
> I completely agree.

I talked with Gregor and created a blogpost which is (i think) good summary.
http://cstamas.hu/blog/posts/Standard_mechanism_for_repacking_upstream_tarballs_in_debian/

TL;DR: Here is proposal for modifying uscan http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685787
(by others, I also sent a bugfix a few minutes ago)

Regards,
  cstamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/

"Who's General Failure and why's he reading my disk?"
                 -- Anon.

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#635920; Package git-buildpackage. (Wed, 19 Dec 2012 07:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. (Wed, 19 Dec 2012 07:36:03 GMT) Full text and rfc822 format available.

Message #85 received at 635920@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Cc: gregor herrmann <gregoa@debian.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 19 Dec 2012 08:33:44 +0100
Hi cstamas,
On Tue, Dec 18, 2012 at 06:46:57PM +0100, Csillag Tamas wrote:
> Hi Guido,
> 
> On Thu, Dec 13, 2012 at 10:48:57PM +0100, gregor herrmann wrote:
> > On Thu, 13 Dec 2012 17:41:40 +0100, Guido Günther wrote:
> > 
> > > On Thu, Dec 13, 2012 at 11:38:21AM +0100, Csillag Tamas wrote:
> > > > If you agree that it should be done this way (as you can read in the paragraph
> > > > above) I am happy to work on uscan then the patch for git-buildpackage can be
> > > > better.
> > > I think extending uscan is the only sensible way to go. Scraping command
> > > output is way to fragile. 
> > 
> > I completely agree.
> 
> I talked with Gregor and created a blogpost which is (i think) good summary.
> http://cstamas.hu/blog/posts/Standard_mechanism_for_repacking_upstream_tarballs_in_debian/
> 
> TL;DR: Here is proposal for modifying uscan http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685787
> (by others, I also sent a bugfix a few minutes ago)

Sound great! I'm not entirely convineced that we should keep the exclude
list in the copyright file but that's an implementation detail on the
uscan end. I'll leave the bug open until we have a fixed devscripts in
unstable. Thanks a lot for this!
Cheers,
 -- Guido

> 
> Regards,
>   cstamas
> -- 
> CSILLAG Tamas (cstamas) - http://cstamas.hu/
> 
> "Who's General Failure and why's he reading my disk?"
>                  -- Anon.
> 





Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Tue, 24 Dec 2013 02:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Tue, 24 Dec 2013 02:24:05 GMT) Full text and rfc822 format available.

Message #90 received at 635920@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Cc: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Tue, 24 Dec 2013 03:21:38 +0100
[Message part 1 (text/plain, inline)]
On Wed, 19 Dec 2012 08:33:44 +0100, Guido Günther wrote:

> > I talked with Gregor and created a blogpost which is (i think) good summary.
> > http://cstamas.hu/blog/posts/Standard_mechanism_for_repacking_upstream_tarballs_in_debian/
> > 
> > TL;DR: Here is proposal for modifying uscan http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685787
> > (by others, I also sent a bugfix a few minutes ago)
> 
> Sound great! I'm not entirely convineced that we should keep the exclude
> list in the copyright file but that's an implementation detail on the
> uscan end. I'll leave the bug open until we have a fixed devscripts in
> unstable. Thanks a lot for this!

This uscan feature is now in devscripts since 2.13.5 (or .6, .7, .8,
if we look at the fixes ...); I guess this bug can be closed.


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Flying Pickets: Purple Rain
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#635920; Package git-buildpackage. (Tue, 24 Dec 2013 13:30:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. (Tue, 24 Dec 2013 13:30:09 GMT) Full text and rfc822 format available.

Message #95 received at 635920@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: 635920@bugs.debian.org
Cc: ,control@bugs.debian.org
Subject: [git-buildpackage/master] Depend on newer devscripts
Date: Tue, 24 Dec 2013 14:26:10 +0100 (CET)
tag 635920 pending
thanks

Date:   Tue Dec 24 14:19:33 2013 +0100
Author: Guido Günther <agx@sigxcpu.org>
Commit ID: 78f36734be1b2ff1979ca14bd18cbd065093175b
Commit URL: https://honk.sigxcpu.org/gitweb/?p=git-buildpackage.git;a=commitdiff;h=78f36734be1b2ff1979ca14bd18cbd065093175b
Patch URL: https://honk.sigxcpu.org/gitweb/?p=git-buildpackage.git;a=commitdiff_plain;h=78f36734be1b2ff1979ca14bd18cbd065093175b

    Depend on newer devscripts

    These contain a uscan that handles repackaging at the right level and
    won't let us pick up the wrong tarball name.

    Closes: #635920
    Thanks: gregor herrmann and all others involved
      



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#635920; Package git-buildpackage. (Tue, 24 Dec 2013 13:30:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. (Tue, 24 Dec 2013 13:30:13 GMT) Full text and rfc822 format available.

Message #100 received at 635920@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: gregor herrmann <gregoa@debian.org>, 635920@bugs.debian.org
Cc: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Tue, 24 Dec 2013 14:28:13 +0100
On Tue, Dec 24, 2013 at 03:21:38AM +0100, gregor herrmann wrote:
> On Wed, 19 Dec 2012 08:33:44 +0100, Guido Günther wrote:
> 
> > > I talked with Gregor and created a blogpost which is (i think) good summary.
> > > http://cstamas.hu/blog/posts/Standard_mechanism_for_repacking_upstream_tarballs_in_debian/
> > > 
> > > TL;DR: Here is proposal for modifying uscan http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685787
> > > (by others, I also sent a bugfix a few minutes ago)
> > 
> > Sound great! I'm not entirely convineced that we should keep the exclude
> > list in the copyright file but that's an implementation detail on the
> > uscan end. I'll leave the bug open until we have a fixed devscripts in
> > unstable. Thanks a lot for this!
> 
> This uscan feature is now in devscripts since 2.13.5 (or .6, .7, .8,
> if we look at the fixes ...); I guess this bug can be closed.

Thanks for letting me know. I've bumped the dependency to newer
devscripts to make sure nobody trips on this again. Is this a feature
of uscan that should be announced more widely - e.g. in developer news?
Cheers,
 -- Guido



Added tag(s) pending. Request was from Guido Günther <agx@sigxcpu.org> to control@bugs.debian.org. (Tue, 24 Dec 2013 13:30:23 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Tue, 24 Dec 2013 21:27:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Tue, 24 Dec 2013 21:27:05 GMT) Full text and rfc822 format available.

Message #107 received at 635920@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Guido Günther <agx@sigxcpu.org>
Cc: 635920@bugs.debian.org, Csillag Tamas <cstamas@digitus.itk.ppke.hu>, Andreas Tille <tille@debian.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Tue, 24 Dec 2013 22:23:57 +0100
[Message part 1 (text/plain, inline)]
On Tue, 24 Dec 2013 14:28:13 +0100, Guido Günther wrote:

> > > Sound great! I'm not entirely convineced that we should keep the exclude
> > > list in the copyright file but that's an implementation detail on the
> > > uscan end. I'll leave the bug open until we have a fixed devscripts in
> > > unstable. Thanks a lot for this!
> > 
> > This uscan feature is now in devscripts since 2.13.5 (or .6, .7, .8,
> > if we look at the fixes ...); I guess this bug can be closed.
> 
> Thanks for letting me know. I've bumped the dependency to newer
> devscripts to make sure nobody trips on this again.

Thanks.

> Is this a feature
> of uscan that should be announced more widely - e.g. in developer news?

I guess.
Sounds like a task for Andreas :)
(cc'd)

Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Various Artists: Caledonia
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Tue, 24 Dec 2013 22:39:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Tue, 24 Dec 2013 22:39:04 GMT) Full text and rfc822 format available.

Message #112 received at 635920@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: gregor herrmann <gregoa@debian.org>
Cc: Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org, Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Tue, 24 Dec 2013 23:34:00 +0100
Hi,

On Tue, Dec 24, 2013 at 10:23:57PM +0100, gregor herrmann wrote:
> On Tue, 24 Dec 2013 14:28:13 +0100, Guido Günther wrote:
> 
> > > This uscan feature is now in devscripts since 2.13.5 (or .6, .7, .8,
> > > if we look at the fixes ...); I guess this bug can be closed.
> > 
> > Thanks for letting me know. I've bumped the dependency to newer
> > devscripts to make sure nobody trips on this again.
> 
> Thanks.
> 
> > Is this a feature
> > of uscan that should be announced more widely - e.g. in developer news?
> 
> I guess.
> Sounds like a task for Andreas :)

That's correct.  However, I just detected a bug which happens in case
there are some files to remove that contain blanks (as it happens in
plastimatch where the file
   doc/Analytic Regularization-2010-06-24.pdf
is not deleted.

I need to track down this first (any patch is welcome for sure) and
think we should add an example to the test cases.  I might not be able
to do this in the next couple of days.

Kind regards

       Andreas.

-- 
http://fam-tille.de



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 25 Dec 2013 01:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 25 Dec 2013 01:15:04 GMT) Full text and rfc822 format available.

Message #117 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: Andreas Tille <tille@debian.org>
Cc: gregor herrmann <gregoa@debian.org>, Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 25 Dec 2013 02:06:53 +0100
On Tue, Dec 24, 2013 at 11:34:00PM +0100, Andreas Tille wrote:
... 
> That's correct.  However, I just detected a bug which happens in case
> there are some files to remove that contain blanks (as it happens in
> plastimatch where the file
>    doc/Analytic Regularization-2010-06-24.pdf
> is not deleted.
> 
> I need to track down this first (any patch is welcome for sure) and
> think we should add an example to the test cases. I might not be able
> to do this in the next couple of days.

Andreas,
which version do you use?
I started looking into this and found:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732006
'uscan: broken handling of filenames with whitespace (CVE-2013-7085)'

Fixed in version devscripts/2.13.9

Regards,
 Tamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/

In Windows you can do everything Microsoft wants you to do.
In Unix you can do anything your computer is able to do.




Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 25 Dec 2013 02:18:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 25 Dec 2013 02:18:05 GMT) Full text and rfc822 format available.

Message #122 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: Andreas Tille <tille@debian.org>
Cc: gregor herrmann <gregoa@debian.org>, Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 25 Dec 2013 03:13:56 +0100
On Wed, Dec 25, 2013 at 02:06:53AM +0100, Csillag Tamas wrote:
> On Tue, Dec 24, 2013 at 11:34:00PM +0100, Andreas Tille wrote:
> ... 
> > That's correct.  However, I just detected a bug which happens in case
> > there are some files to remove that contain blanks (as it happens in
> > plastimatch where the file
> >    doc/Analytic Regularization-2010-06-24.pdf
> > is not deleted.
> > 
> > I need to track down this first (any patch is welcome for sure) and
> > think we should add an example to the test cases. I might not be able
> > to do this in the next couple of days.
> 
> Andreas,
> which version do you use?
> I started looking into this and found:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732006
> 'uscan: broken handling of filenames with whitespace (CVE-2013-7085)'
> 
> Fixed in version devscripts/2.13.9
 
Above is unrelated.

However:

foreach (grep { $_ } split /\s+/, $data->{"files-excluded"}) {

at http://anonscm.debian.org/gitweb/?p=collab-maint/devscripts.git;a=blob;f=scripts/uscan.pl;h=433f5e2fd02ee6c910f2b475f27bc182b1fa3850;hb=3025603d7532a5712e7e0278c93fa71dd6d8301f#l1546

according to http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#files-field
the space should be escapeable.

Is someone here better with regexes than me? ;-)
We need to replace /\s+/ with one that does not split if the space is escaped
with a backslash.

Regards,
 Tamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/




Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 25 Dec 2013 02:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 25 Dec 2013 02:33:04 GMT) Full text and rfc822 format available.

Message #127 received at 635920@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Cc: 635920@bugs.debian.org, Andreas Tille <tille@debian.org>, gregor herrmann <gregoa@debian.org>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Tue, 24 Dec 2013 18:30:32 -0800
Csillag Tamas <cstamas@digitus.itk.ppke.hu> writes:
> On Wed, Dec 25, 2013 at 02:06:53AM +0100, Csillag Tamas wrote:

>> which version do you use?
>> I started looking into this and found:
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732006
>> 'uscan: broken handling of filenames with whitespace (CVE-2013-7085)'
>> 
>> Fixed in version devscripts/2.13.9
>  
> Above is unrelated.

> However:

> foreach (grep { $_ } split /\s+/, $data->{"files-excluded"}) {

> at http://anonscm.debian.org/gitweb/?p=collab-maint/devscripts.git;a=blob;f=scripts/uscan.pl;h=433f5e2fd02ee6c910f2b475f27bc182b1fa3850;hb=3025603d7532a5712e7e0278c93fa71dd6d8301f#l1546

> according to
> http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#files-field
> the space should be escapeable.

> Is someone here better with regexes than me? ;-)
> We need to replace /\s+/ with one that does not split if the space is escaped
> with a backslash.

    my @excluded
      = ($data->{"files-excluded"} =~ /(?:\A|\G[ ]+)((?:\\.|[^\\ ])+)/g);
    @excluded = map { s/\\(.)/$1/g; $_ } @excluded;
    foreach (@excluded) {

will work, I believe.  I don't think there's an easy way to do that with
split.  You'd have to do some complex thing with look-behind assertions.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 25 Dec 2013 02:42:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 25 Dec 2013 02:42:05 GMT) Full text and rfc822 format available.

Message #132 received at 635920@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Cc: Andreas Tille <tille@debian.org>, Guido Günther <agx@sigxcpu.org>, 635920@bugs.debian.org
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 25 Dec 2013 03:38:12 +0100
[Message part 1 (text/plain, inline)]
On Wed, 25 Dec 2013 03:13:56 +0100, Csillag Tamas wrote:

> > > That's correct.  However, I just detected a bug which happens in case
> > > there are some files to remove that contain blanks (as it happens in
> > > plastimatch where the file
> > >    doc/Analytic Regularization-2010-06-24.pdf
> > > is not deleted.

> However:
> 
> foreach (grep { $_ } split /\s+/, $data->{"files-excluded"}) {
> 
> at http://anonscm.debian.org/gitweb/?p=collab-maint/devscripts.git;a=blob;f=scripts/uscan.pl;h=433f5e2fd02ee6c910f2b475f27bc182b1fa3850;hb=3025603d7532a5712e7e0278c93fa71dd6d8301f#l1546
> 
> according to http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#files-field
> the space should be escapeable.
> 
> Is someone here better with regexes than me? ;-)
> We need to replace /\s+/ with one that does not split if the space is escaped
> with a backslash.

Sounds as if we need something like a "zero-width negative
look-behind assertion" (I had to copy this from perlre :)).

First try:

#v+
#!/usr/bin/perl

use strict;
use warnings;
use 5.010;

use Dpkg::Control::Hash;

my $data = Dpkg::Control::Hash->new();
$data->load('debian/copyright');

# d/copyright contains:
#Files-Excluded: a b
# c\ d

           
foreach (grep { $_ } split /(?<!\\)\s+/, $data->{"files-excluded"}) {
  s?\\??g; # to keep the style of what's in uscan ...
  say $_;                                                            
}
#v-

outputs:

a
b
c d


Usual disclaimers apply (no perl expert, no security expert, etc.).


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: The Who: I'm A Boy
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 25 Dec 2013 02:48:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 25 Dec 2013 02:48:05 GMT) Full text and rfc822 format available.

Message #137 received at 635920@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: gregor herrmann <gregoa@debian.org>
Cc: 635920@bugs.debian.org, Csillag Tamas <cstamas@digitus.itk.ppke.hu>, Andreas Tille <tille@debian.org>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Tue, 24 Dec 2013 18:44:51 -0800
gregor herrmann <gregoa@debian.org> writes:

> Sounds as if we need something like a "zero-width negative
> look-behind assertion" (I had to copy this from perlre :)).

> foreach (grep { $_ } split /(?<!\\)\s+/, $data->{"files-excluded"}) {
>   s?\\??g; # to keep the style of what's in uscan ...
>   say $_;                                                            
> }

The trouble with this approach is that it mis-splits:

    foo\\ bar

which should become "foo\" and "bar".  You need a negative look-behind
assertion that accepts an odd number of backslashes, at which point you
run into the problem that negative look-behind assertions have to be
fixed-length.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 25 Dec 2013 02:54:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 25 Dec 2013 02:54:05 GMT) Full text and rfc822 format available.

Message #142 received at 635920@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Russ Allbery <rra@debian.org>
Cc: Csillag Tamas <cstamas@digitus.itk.ppke.hu>, 635920@bugs.debian.org, Andreas Tille <tille@debian.org>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 25 Dec 2013 03:51:37 +0100
[Message part 1 (text/plain, inline)]
On Tue, 24 Dec 2013 18:30:32 -0800, Russ Allbery wrote:


> > However:
> > foreach (grep { $_ } split /\s+/, $data->{"files-excluded"}) {

> > Is someone here better with regexes than me? ;-)
> > We need to replace /\s+/ with one that does not split if the space is escaped
> > with a backslash.
> 
>     my @excluded
>       = ($data->{"files-excluded"} =~ /(?:\A|\G[ ]+)((?:\\.|[^\\ ])+)/g);
>     @excluded = map { s/\\(.)/$1/g; $_ } @excluded;
>     foreach (@excluded) {
> 
> will work, I believe.  I don't think there's an easy way to do that with
> split.  You'd have to do some complex thing with look-behind assertions.

Wow, that's fancy!

And you have reason to believe that it works, at least for my
testcase :)

#v+
#!/usr/bin/perl

use strict;
use warnings;
use 5.010;

use Dpkg::Control::Hash;

my $data = Dpkg::Control::Hash->new();
$data->load('debian/copyright');

# d/copyright contains:
#Files-Excluded: a b
# c\ d
# e\ f\ g

my @excluded
  = ($data->{"files-excluded"} =~ /(?:\A|\G[ ]+)((?:\\.|[^\\ ])+)/g);
@excluded = map { s/\\(.)/$1/g; $_ } @excluded;

say foreach (@excluded);
                  
foreach (grep { $_ } split /(?<!\\)\s+/, $data->{"files-excluded"}) {
  s?\\??g;
  say $_;
}
#v-

Both loops output

a
b
c d
e f g


Cheers,
gregor 

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 25 Dec 2013 02:57:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 25 Dec 2013 02:57:05 GMT) Full text and rfc822 format available.

Message #147 received at 635920@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Russ Allbery <rra@debian.org>
Cc: 635920@bugs.debian.org, Csillag Tamas <cstamas@digitus.itk.ppke.hu>, Andreas Tille <tille@debian.org>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 25 Dec 2013 03:53:58 +0100
[Message part 1 (text/plain, inline)]
On Tue, 24 Dec 2013 18:44:51 -0800, Russ Allbery wrote:

> > foreach (grep { $_ } split /(?<!\\)\s+/, $data->{"files-excluded"}) {
> >   s?\\??g; # to keep the style of what's in uscan ...
> >   say $_;                                                            
> > }
> 
> The trouble with this approach is that it mis-splits:
> 
>     foo\\ bar
> 
> which should become "foo\" and "bar".

Ah, good point.

> You need a negative look-behind
> assertion that accepts an odd number of backslashes, at which point you
> run into the problem that negative look-behind assertions have to be
> fixed-length.

Ack.

Andreas: please take Russ' solution :)


Cheers,
gregor 

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Alanis Morissette: King Of Pain
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 25 Dec 2013 07:39:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 25 Dec 2013 07:39:04 GMT) Full text and rfc822 format available.

Message #152 received at 635920@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: gregor herrmann <gregoa@debian.org>
Cc: Russ Allbery <rra@debian.org>, 635920@bugs.debian.org, Csillag Tamas <cstamas@digitus.itk.ppke.hu>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 25 Dec 2013 08:37:08 +0100
Hi,

On Wed, Dec 25, 2013 at 03:53:58AM +0100, gregor herrmann wrote:
> On Tue, 24 Dec 2013 18:44:51 -0800, Russ Allbery wrote:
> 
> > > foreach (grep { $_ } split /(?<!\\)\s+/, $data->{"files-excluded"}) {
> > >   s?\\??g; # to keep the style of what's in uscan ...
> > >   say $_;                                                            
> > > }
> > 
> > The trouble with this approach is that it mis-splits:
> > 
> >     foo\\ bar
> > 
> > which should become "foo\" and "bar".
> 
> Ah, good point.
> 
> > You need a negative look-behind
> > assertion that accepts an odd number of backslashes, at which point you
> > run into the problem that negative look-behind assertions have to be
> > fixed-length.
> 
> Ack.
> 
> Andreas: please take Russ' solution :)

I'm deeply impressed by the stuff you guys are dealing with at Christmas
Eve. ;-)  While my family is not as tolerant to let me put those topics
on the table I'd be really happy if some of you could send a bug report
with the patch to BTS.  I admit I would need to do some reading about
Perl first to understand your discussion fully and we would definitely
save time if you do not wait on me. :-)

Kind regards - and it is really fun to have "another technical family"
so I wish you a merry Christmas as well

      Andreas.

-- 
http://fam-tille.de



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Wed, 25 Dec 2013 17:54:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Wed, 25 Dec 2013 17:54:04 GMT) Full text and rfc822 format available.

Message #157 received at 635920@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: Andreas Tille <tille@debian.org>
Cc: 635920@bugs.debian.org, gregor herrmann <gregoa@debian.org>, Csillag Tamas <cstamas@digitus.itk.ppke.hu>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Wed, 25 Dec 2013 09:50:39 -0800
Andreas Tille <tille@debian.org> writes:

> I'm deeply impressed by the stuff you guys are dealing with at Christmas
> Eve. ;-) While my family is not as tolerant to let me put those topics
> on the table I'd be really happy if some of you could send a bug report
> with the patch to BTS.

Done.  (Well, sort of; I was lazy and didn't turn it into a full patch.)

> Kind regards - and it is really fun to have "another technical family"
> so I wish you a merry Christmas as well

*grin*.  Yes.  Merry Christmas!

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 26 Dec 2013 06:24:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 26 Dec 2013 06:24:05 GMT) Full text and rfc822 format available.

Message #162 received at 635920@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: Russ Allbery <rra@debian.org>
Cc: 635920@bugs.debian.org, gregor herrmann <gregoa@debian.org>, Csillag Tamas <cstamas@digitus.itk.ppke.hu>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 26 Dec 2013 07:20:23 +0100
Hi Russ,

On Wed, Dec 25, 2013 at 09:50:39AM -0800, Russ Allbery wrote:
> Andreas Tille <tille@debian.org> writes:
> 
> > I'm deeply impressed by the stuff you guys are dealing with at Christmas
> > Eve. ;-) While my family is not as tolerant to let me put those topics
> > on the table I'd be really happy if some of you could send a bug report
> > with the patch to BTS.
> 
> Done.  (Well, sort of; I was lazy and didn't turn it into a full patch.)

Sorry, I don't get it?  Any new bug number or am I missing an old problem?

Kind regards

       Andreas.

-- 
http://fam-tille.de



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 26 Dec 2013 08:39:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csillag Tamas <cstamas@digitus.itk.ppke.hu>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 26 Dec 2013 08:39:09 GMT) Full text and rfc822 format available.

Message #167 received at 635920@bugs.debian.org (full text, mbox):

From: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
To: Andreas Tille <tille@debian.org>
Cc: Russ Allbery <rra@debian.org>, 635920@bugs.debian.org, gregor herrmann <gregoa@debian.org>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 26 Dec 2013 09:36:35 +0100
On Thu, Dec 26, 2013 at 07:20:23AM +0100, Andreas Tille wrote:
> Hi Russ,
> 
> On Wed, Dec 25, 2013 at 09:50:39AM -0800, Russ Allbery wrote:
> > Andreas Tille <tille@debian.org> writes:
> > 
> > > I'm deeply impressed by the stuff you guys are dealing with at Christmas
> > > Eve. ;-) While my family is not as tolerant to let me put those topics
> > > on the table I'd be really happy if some of you could send a bug report
> > > with the patch to BTS.
> > 
> > Done.  (Well, sort of; I was lazy and didn't turn it into a full patch.)
> 
> Sorry, I don't get it?  Any new bug number or am I missing an old problem?

Hi Andreas,

It is bugnumber #733111

I started working on a patch last night, but did not finished it yet.
(I will be AFK today and back in the afternoon.)

A question however: 'field Files-Excluded containing a space separated list of
globs' this is from your original spec in #685787.
It should be space AND newline separated, right?
(or is a newer spec available?)

Regards,
 Tamas
-- 
CSILLAG Tamas (cstamas) - http://cstamas.hu/

Anyway, I'm interested in what works, not in philosophical bullshit.
                 -- Daniel J. Bernstein




Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 26 Dec 2013 17:39:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 26 Dec 2013 17:39:09 GMT) Full text and rfc822 format available.

Message #172 received at 635920@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Cc: Russ Allbery <rra@debian.org>, 635920@bugs.debian.org, gregor herrmann <gregoa@debian.org>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 26 Dec 2013 18:35:32 +0100
Hi Csillag,

On Thu, Dec 26, 2013 at 09:36:35AM +0100, Csillag Tamas wrote:
> > Sorry, I don't get it?  Any new bug number or am I missing an old problem?
> 
> Hi Andreas,
> 
> It is bugnumber #733111
> 
> I started working on a patch last night, but did not finished it yet.
> (I will be AFK today and back in the afternoon.)
> 
> A question however: 'field Files-Excluded containing a space separated list of
> globs' this is from your original spec in #685787.
> It should be space AND newline separated, right?
> (or is a newer spec available?)

I can only confirm that all PDFs (including the one with a ' ' inside
the name) of package plastimatch were removed by my original patch.
Since the security fix this did not worked any more.

I'm sorry that I can not spent serious chuncks of time until Saturday.

I'd consider a test case containing the following

    docs/doc_without_space.pdf
    docs/doc with space.pdf

and in d/copyright

    Files-Excluded: docs/*.pdf

(the real life example is the package plastimatch).

Kind regards

         Andreas.

-- 
http://fam-tille.de



Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#635920; Package git-buildpackage. (Thu, 26 Dec 2013 17:51:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Russ Allbery <rra@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 26 Dec 2013 17:51:05 GMT) Full text and rfc822 format available.

Message #177 received at 635920@bugs.debian.org (full text, mbox):

From: Russ Allbery <rra@debian.org>
To: Csillag Tamas <cstamas@digitus.itk.ppke.hu>
Cc: Andreas Tille <tille@debian.org>, 635920@bugs.debian.org, gregor herrmann <gregoa@debian.org>, Guido Günther <agx@sigxcpu.org>
Subject: Re: Bug#635920: patch / git-import-orig --uscan uses the wrong tarball when a repacking script is used
Date: Thu, 26 Dec 2013 09:47:50 -0800
Csillag Tamas <cstamas@digitus.itk.ppke.hu> writes:

> I started working on a patch last night, but did not finished it yet.
> (I will be AFK today and back in the afternoon.)

> A question however: 'field Files-Excluded containing a space separated
> list of globs' this is from your original spec in #685787.  It should be
> space AND newline separated, right?  (or is a newer spec available?)

Yes, I think that's how you should interpret it.  Actually, what I'd do is
unfold the contents first, and then parse it.  That's more consistent with
the way that fields in Debian control files are specified.  (In other
words, I think this field is a whitespace-separated list per the
definition in copyright-format 1.0, but it's sort of akin to a folded
field in Debian Policy.  Unfortunately, not exactly, since whitespace *is*
significant if it's escaped.)

That means that my suggestion is slightly wrong, and the places where it
has [ ] for a space should actually be \s for any whitespace.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply sent to Guido Günther <agx@sigxcpu.org>:
You have taken responsibility. (Sat, 15 Feb 2014 13:06:05 GMT) Full text and rfc822 format available.

Notification sent to Chris Butler <chrisb@debian.org>:
Bug acknowledged by developer. (Sat, 15 Feb 2014 13:06:05 GMT) Full text and rfc822 format available.

Message #182 received at 635920-close@bugs.debian.org (full text, mbox):

From: Guido Günther <agx@sigxcpu.org>
To: 635920-close@bugs.debian.org
Subject: Bug#635920: fixed in git-buildpackage 0.6.9
Date: Sat, 15 Feb 2014 13:03:49 +0000
Source: git-buildpackage
Source-Version: 0.6.9

We believe that the bug you reported is fixed in the latest version of
git-buildpackage, 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 635920@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guido Günther <agx@sigxcpu.org> (supplier of updated git-buildpackage 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 ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 15 Feb 2014 11:45:00 +0100
Source: git-buildpackage
Binary: git-buildpackage
Architecture: source all
Version: 0.6.9
Distribution: unstable
Urgency: medium
Maintainer: Guido Günther <agx@sigxcpu.org>
Changed-By: Guido Günther <agx@sigxcpu.org>
Description: 
 git-buildpackage - Suite to help with Debian packages in Git repositories
Closes: 635920 670624 733759
Changes: 
 git-buildpackage (0.6.9) unstable; urgency=medium
 .
   [ Guido Günther ]
   * [78f3673] Depend on newer devscripts.
     These contain a uscan that handles repackaging at the right level and
     won't let us pick up the wrong tarball name.
     Thanks to gregor herrmann and all others involved (Closes: #635920)
   * [7c64575] Avoid backtrace on config file parse errors
     "gbp buildpackage" did this already but others didn't (Closes: #733759)
   * [7b1eadd] Make parsing config file sections symmetric.
     Always read the legacy command's config file section prior to the
     subcommand's config file section.
     Until now 'gbp <subcommand>' would read '[subcommand]' as well as
     '[gbp-<subcommand>]' sections while 'gbp-<subcommand>' would only read
     '[gbp-<subcommand>]' sections. (Closes: #733759)
   * [49f0e44] Change the default of cleaner to /bin/true.
     Running a clean command within version control by default nowadays
     causes more trouble than it helps. It's unnecessary with
     pbuilder/cowbuilder/sbuild and with export-dir. So change the default
     from 'debuild clean' to a noop ('/bin/true'). (Closes: #670624)
   * [d93c89f] import_orig: test error paths of find_source
   * [daf249f] docs: improve docs on using upstream's git repo.
     The documentation on using upstream's git directly instead of tarballs
     was very terse. Add a step by step guide on how to get started and
     how to update to new upstream versions.
 .
   [ Markus Lehtonen ]
   * [e876beb] tests: adapt dch tests for older devscripts.
     Determine the default urgency level by determining the version number of
     the dch tool from command line.
Checksums-Sha1: 
 f394db66d00ac30e137b345de5308eb219783f61 1266 git-buildpackage_0.6.9.dsc
 9d2781c67d156f71e354aa067b136a63a5633049 170052 git-buildpackage_0.6.9.tar.xz
 f271c263a6399dbaf358fe5974266b32bce6051d 274554 git-buildpackage_0.6.9_all.deb
Checksums-Sha256: 
 b53feac4a81368d0e6af8a815226ed7c80ec96e7b81707a506b3c9e394cd1954 1266 git-buildpackage_0.6.9.dsc
 e046221c4e074179f81d0496e1332a004255aa3acc6c3c7792a4494a8ff8a906 170052 git-buildpackage_0.6.9.tar.xz
 f5ccef18767b1cb2b2181c83530b3f6f31842327cc848c1ddb1c6c48fea6da89 274554 git-buildpackage_0.6.9_all.deb
Files: 
 e69fa97de4bfb6ec6cec7e44a0fb42f6 1266 vcs optional git-buildpackage_0.6.9.dsc
 e2f1023d347658607f2a5779e3f2a9a1 170052 vcs optional git-buildpackage_0.6.9.tar.xz
 70ff575a7410299a9c996ce4d64f37d2 274554 vcs optional git-buildpackage_0.6.9_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iD8DBQFS/2L/n88szT8+ZCYRAk3hAJ9/X9Qvflh1STKdULdoC1gl5u7A6QCfTDkj
F8CIOiX3k31T4ySd8r6dS74=
=sOvH
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 21 Mar 2014 07:26:09 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 13:18:10 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.