Bug#963968: git-buildpackage: import-orig fails to find component tarball signatures

2020-07-01 Thread Guido Günther
Hi,
On Wed, Jul 01, 2020 at 09:46:41PM +1000, Hugh McMaster wrote:
> Hi Guido,
> 
> On Tue, 30 Jun 2020 at 18:22, Guido Günther wrote:
> > There's two issues:
> >
> > - gbp did not properly check for the existence of component signatures,
> >   that is fixed on master:
> 
> Yes, I pulled your commits and it worked for me too. :)

Thanks for testing!
 -- Guido

> 
> > - Even then the signatures weren't named in a way gbp would find them. When 
> > naming
> >   them like
> >
> >   $ ls -1 *.asc
> >   freetype_2.10.2.orig-ft2demos.tar.xz.asc
> >   freetype_2.10.2.orig-ft2docs.tar.xz.asc
> >   freetype_2.10.2.orig.tar.xz.asc
> >
> >   (they were originally named freetype-2.10.2-doc.tar.xz.sig and
> >   freetype-2.10.2-ft2demos.tar.xz.sig so gbp has a hard time
> >   finding those since not only the extension is different but also
> >   the tarball name - i think that's a bug in your watch file.)
> >
> > After renaming the import works for me.
> 
> Good to know. The latest devscripts package contains a fix to make
> sure component tarballs and their signatures are symlinked to the
> correct files.
> 
> Thank you for your help with this bug.
> 
> Hugh
> 



Bug#963968: git-buildpackage: import-orig fails to find component tarball signatures

2020-06-30 Thread Guido Günther
Hi,
On Mon, Jun 29, 2020 at 11:17:51PM +1000, Hugh McMaster wrote:
> On Mon, 29 Jun 2020 at 22:47, Guido Günther wrote:
> > ahh...i see you're using component tarballs - that's likely the problem.
> > Could you add
> >
> >   
> > https://github.com/agx/git-buildpackage/commit/3dc0bf3a8acfccdafa82b91bcc89ca2c82b46a1f
> >
> > so we get an idea what signature file gbp is looking for?
> 
> That commit causes a fatal error: AttributeError:
> 'DebianUpstreamSource' object has no attribute 'signature'.
> 
> Did you mean "source.signaturefile"? If so, then it didn't help,
> sadly. The output is None.

It's always `None` since there's a check right above which i missed in a
hurry yesterday, sorry for the confusion.

> 
> Thank you for your help so far.

There's two issues:

- gbp did not properly check for the existence of component signatures,
  that is fixed on master:

- Even then the signatures weren't named in a way gbp would find them. When 
naming
  them like

  $ ls -1 *.asc
  freetype_2.10.2.orig-ft2demos.tar.xz.asc
  freetype_2.10.2.orig-ft2docs.tar.xz.asc
  freetype_2.10.2.orig.tar.xz.asc

  (they were originally named freetype-2.10.2-doc.tar.xz.sig and
  freetype-2.10.2-ft2demos.tar.xz.sig so gbp has a hard time
  finding those since not only the extension is different but also
  the tarball name - i think that's a bug in your watch file.)

After renaming the import works for me.
Cheers,
 -- Guido

> hugh@debian:~/freetype2/freetype2$ gbp import-orig --pristine-tar 
> --upstream-signatures=on --component=ft2docs --component=ft2demos --verbose 
> ../freetype_2.10.2.orig.tar.xz
> gbp:debug: ['git', 'rev-parse', '--show-cdup']
> gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
> gbp:debug: ['git', 'rev-parse', '--git-dir']
> gbp:debug: ['git', 'for-each-ref', '--format=%(refname:short)', 'refs/heads/']
> gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/upstream']
> gbp:debug: ['git', 'status', '--porcelain']
> gbp:debug: Signature ../freetype_2.10.2.orig.tar.xz found for 
> ../freetype_2.10.2.orig.tar.xz.asc
> What is the upstream version? [2.10.2] 
> gbp:debug: ['git', 'tag', '-l', 'upstream/2.10.2']
> gbp:debug: tar ['-C', '../tmpdialu_cj', '-a', '-xf', 
> '../freetype_2.10.2.orig.tar.xz'] []
> gbp:debug: Unpacked '../freetype_2.10.2.orig.tar.xz' to 
> '../tmpdialu_cj/freetype-2.10.2'
> gbp:debug: tar ['-C', '/home/hugh/freetype2/tmpdialu_cj/tmphb0tm39o', '-a', 
> '-xf', '../freetype_2.10.2.orig-ft2docs.tar.xz'] []
> gbp:debug: rm ['-rf', '/home/hugh/freetype2/tmpdialu_cj/tmphb0tm39o'] []
> gbp:debug: tar ['-C', '/home/hugh/freetype2/tmpdialu_cj/tmppdl4wj42', '-a', 
> '-xf', '../freetype_2.10.2.orig-ft2demos.tar.xz'] []
> gbp:debug: rm ['-rf', '/home/hugh/freetype2/tmpdialu_cj/tmppdl4wj42'] []
> gbp:info: Importing '../freetype_2.10.2.orig.tar.xz' to branch 'upstream'...
> gbp:info: Source package is freetype
> gbp:info: Upstream version is 2.10.2
> gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/upstream']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
> gbp:debug: ['git', 'add', '-f', '.']
> gbp:debug: ['git', 'write-tree']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
> gbp:debug: ['git', 'commit-tree', '069f35939ae25e85311a2c5546ca30c9a02d6a5b', 
> '-p', 'cf4194e0a9d0a0e96c158b2764dcfbcc26c3a098']
> gbp:debug: ['git', 'update-ref', '-m', 'gbp: New upstream version 2.10.2', 
> 'refs/heads/upstream', '2e1a71235f8928f5ed90bb76b3fc4e270fe232cd', 
> 'cf4194e0a9d0a0e96c158b2764dcfbcc26c3a098']
> gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'pristine-tar']
> gbp:error: ../freetype_2.10.2.orig-ft2docs.tar.xz does not have a signature 
> file None
> gbp:error: Error detected, Will roll back changes.
> gbp:info: Rolling back branch upstream by resetting it to 
> cf4194e0a9d0a0e96c158b2764dcfbcc26c3a098
> gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of 
> upstream', 'refs/heads/upstream', 'cf4194e0a9d0a0e96c158b2764dcfbcc26c3a098']
> gbp:info: Rolling back branch pristine-tar by resetting it to 
> b6f09b8023d1ba38f881befb5daf94a6572e9831
> gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of 
> pristine-tar', 'refs/heads/pristine-tar', 
> 'b6f09b8023d1ba38f881befb5daf94a6572e9831']
> gbp:error: Rolled back changes after import error.
> gbp:debug: rm ['-rf', '../tmpdialu_cj'] []
> 



Bug#963968: git-buildpackage: import-orig fails to find component tarball signatures

2020-06-29 Thread Guido Günther
Hi,
On Mon, Jun 29, 2020 at 10:14:04PM +1000, Hugh McMaster wrote:
> Hi Guido,
> 
> On Mon, 29 Jun 2020 at 22:00, Guido Günther wrote:
> > this looks as if `import-orig` looks on your pristine-tar branch and
> > does not find a signature there (but already finds a pristine-tar
> > commit)
> 
> Well spotted. This time I removed all commits from master, upstream
> and pristine-tar branches, effectively rolling back to FreeType
> 2.10.2-1.
> 
> I then ran `uscan` and the `gbp import-orig` commands. Things progress
> far further, as you identified, but still fail on signatures.

ahh...i see you're using component tarballs - that's likely the problem.
Could you add

  
https://github.com/agx/git-buildpackage/commit/3dc0bf3a8acfccdafa82b91bcc89ca2c82b46a1f

so we get an idea what signature file gbp is looking for?
Cheers,
 -- Guido


> 
> Hugh

> hugh@debian:~/freetype2/freetype2$ gbp import-orig --pristine-tar 
> --upstream-signatures=on --component=ft2docs --component=ft2demos --verbose 
> ../freetype_2.10.2.orig.tar.xz
> gbp:debug: ['git', 'rev-parse', '--show-cdup']
> gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
> gbp:debug: ['git', 'rev-parse', '--git-dir']
> gbp:debug: ['git', 'for-each-ref', '--format=%(refname:short)', 'refs/heads/']
> gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/upstream']
> gbp:debug: ['git', 'status', '--porcelain']
> gbp:debug: Signature ../freetype_2.10.2.orig.tar.xz found for 
> ../freetype_2.10.2.orig.tar.xz.asc
> What is the upstream version? [2.10.2] 
> gbp:debug: ['git', 'tag', '-l', 'upstream/2.10.2']
> gbp:debug: tar ['-C', '../tmp6y3v7bnu', '-a', '-xf', 
> '../freetype_2.10.2.orig.tar.xz'] []
> gbp:debug: Unpacked '../freetype_2.10.2.orig.tar.xz' to 
> '../tmp6y3v7bnu/freetype-2.10.2'
> gbp:debug: tar ['-C', '/home/hugh/freetype2/tmp6y3v7bnu/tmp8ga_9fmp', '-a', 
> '-xf', '../freetype_2.10.2.orig-ft2docs.tar.xz'] []
> gbp:debug: rm ['-rf', '/home/hugh/freetype2/tmp6y3v7bnu/tmp8ga_9fmp'] []
> gbp:debug: tar ['-C', '/home/hugh/freetype2/tmp6y3v7bnu/tmp3edhdans', '-a', 
> '-xf', '../freetype_2.10.2.orig-ft2demos.tar.xz'] []
> gbp:debug: rm ['-rf', '/home/hugh/freetype2/tmp6y3v7bnu/tmp3edhdans'] []
> gbp:info: Importing '../freetype_2.10.2.orig.tar.xz' to branch 'upstream'...
> gbp:info: Source package is freetype
> gbp:info: Upstream version is 2.10.2
> gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/upstream']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
> gbp:debug: ['git', 'add', '-f', '.']
> gbp:debug: ['git', 'write-tree']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
> gbp:debug: ['git', 'commit-tree', '069f35939ae25e85311a2c5546ca30c9a02d6a5b', 
> '-p', '2ed263c35c0bfd0f04b13ab506a30797d42890bd']
> gbp:debug: ['git', 'update-ref', '-m', 'gbp: New upstream version 2.10.2', 
> 'refs/heads/upstream', '3c75500ae1cf03fc9d87d186e944f4ac9d969c10', 
> '2ed263c35c0bfd0f04b13ab506a30797d42890bd']
> gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'pristine-tar']
> gbp:error: ../freetype_2.10.2.orig-ft2docs.tar.xz does not have a signature 
> file
> gbp:error: Error detected, Will roll back changes.
> gbp:info: Rolling back branch upstream by resetting it to 
> 2ed263c35c0bfd0f04b13ab506a30797d42890bd
> gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of 
> upstream', 'refs/heads/upstream', '2ed263c35c0bfd0f04b13ab506a30797d42890bd']
> gbp:info: Rolling back branch pristine-tar by resetting it to 
> b6f09b8023d1ba38f881befb5daf94a6572e9831
> gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of 
> pristine-tar', 'refs/heads/pristine-tar', 
> 'b6f09b8023d1ba38f881befb5daf94a6572e9831']
> gbp:error: Rolled back changes after import error.
> gbp:debug: rm ['-rf', '../tmp6y3v7bnu'] []
> 



Bug#963968: git-buildpackage: import-orig fails to find component tarball signatures

2020-06-29 Thread Guido Günther
Hi,
On Mon, Jun 29, 2020 at 09:53:54PM +1000, Hugh McMaster wrote:
[..snip..]
 
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'pristine-tar']
> gbp:error: ../freetype_2.10.2.orig-ft2docs.tar.xz does not have a signature 
> file

this looks as if `import-orig` looks on your pristine-tar branch and
does not find a signature there (but already finds a pristine-tar
commit)
 -- Guido

> gbp:error: Error detected, Will roll back changes.
> gbp:info: Rolling back branch upstream by resetting it to 
> d350f9e8d4f2232fe209e537a2e8f952ea6a8ebb
> gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of 
> upstream', 'refs/heads/upstream', 'd350f9e8d4f2232fe209e537a2e8f952ea6a8ebb']
> gbp:info: Rolling back branch pristine-tar by resetting it to 
> db8a0234ffba21c25365481fd81f37e8a1921e68
> gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of 
> pristine-tar', 'refs/heads/pristine-tar', 
> 'db8a0234ffba21c25365481fd81f37e8a1921e68']
> gbp:error: Rolled back changes after import error.
> gbp:debug: rm ['-rf', '../tmp9fq7ixs4'] []
>