#1010370 git-buildpackage: export-orig explodes if pristine-tar branch is signed

#1010370#5
Date:
2022-04-29 16:42:08 UTC
From:
To:
Dear Maintainer,

I'd renamed a pristine-tar tarball (from .gz to .xz, unrelated),
which signed the topmost commit; this caused export-orig (as part of
buildpackage) to explode with
  gbp:error: revision 'gpg: Signature made Fri 29 Apr 2022 17:52:59
  CEST^0' not found

A strace revealed that
  [pid 11174] execve("/bin/git", ["git", "show-ref", "--verify",
              "refs/heads/pristine-tar"], 0x7fff7efef9b0 /* 39 vars */)
			  = 0
  [pid 11175] execve("/bin/git", ["git", "log", "--pretty=format:%H",
              "--no-merges", "--grep=pristine-tar .* neomutt_2"...,
			  "pristine-tar", "--"], 0x7fff7efef9b0 /* 39 vars */) = 0

Which, trivially, yields
  gpg: Signature made Fri 29 Apr 2022 17:52:59 CEST
  gpg:                using RSA key 7D69474E84028C5CC0C44163BCFD0B018D2658F1
  gpg: Good signature from "наб <nabijaczleweli@nabijaczleweli.xyz>" [ultimate]
  gpg:                 aka "наб <nabijaczleweli@gmail.com>" [ultimate]
  gpg:                 aka "nabijaczleweli <nabijaczleweli@gmail.com>" [ultimate]
  dc0c16c6849cd4a3c9a69c58c1c06e8aadd06aed
  ded2b6420ca3739d536e8ebcba789bc259525ef2
  176e4ca911c78e6ed9cfd052a4b7b1058450ae26
  [...]

Attached is a patch for grep_log(), which adds --no-show-signature,
fixing this.

This may also facilitate #886157?

Best,
наб

#1010370#10
Date:
2022-05-16 09:29:53 UTC
From:
To:
tag 1010370 pending
thanks

Date:   Mon May 16 11:23:19 2022 +0200
Author: Guido Günther <agx@sigxcpu.org>
Commit ID: 7717b39249c9a439afae918a9e53f304282ecee5
Commit URL: https://git.sigxcpu.org/cgit/git-buildpackage//commit/?id=7717b39249c9a439afae918a9e53f304282ecee5
Patch URL: https://git.sigxcpu.org/cgit/git-buildpackage//patch/?id=7717b39249c9a439afae918a9e53f304282ecee5

    git/repository: Disable signatures when grepping for commits

    Otherwise get the signature back as well.

    Thanks: наб for the patch

    Closes: #1010370

#1010370#15
Date:
2022-05-16 09:30:11 UTC
From:
To:
Hi,

Wiggled this on top of the current tree. Thanks!
 -- Guido

#1010370#22
Date:
2022-05-31 11:05:53 UTC
From:
To:
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 1010370@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)
Format: 1.8
Date: Tue, 31 May 2022 10:07:23 +0200
Source: git-buildpackage
Architecture: source
Version: 0.9.27
Distribution: unstable
Urgency: medium
Maintainer: Guido Günther <agx@sigxcpu.org>
Changed-By: Guido Günther <agx@sigxcpu.org>
Closes: 879495 934200 966627 983085 984516 1004354 1010370 1011344
Changes:
 git-buildpackage (0.9.27) unstable; urgency=medium
 .
   [ Guido Günther ]
   * [7717b39] git/repository: Disable signatures when grepping for commits.
     Otherwise get the signature back as well.
     Thanks to наб for the patch (Closes: #1010370)
   * [86b4fd8] config: Use ConfigParser instead of deprecated SafeConfigParser
     (Closes: #1011344)
   * [83e7791] tests: Test import-orig from upstream branch
   * [14ea481] deb: Decode changelog content when fetched from git.
     When importing not form the upstream branch the changelog is fetched
     via `git show`. Decode the bytes in that case. (Closes: #1004354)
   * [4d173ac] docs: Fix --upstream-signature flag description.
     Thanks to Tino Mettler
   * [42a1406] clone: Allow to skip alias expansion.
     Add an option that allow to skip exansion of aliases like salsa:
     by gbp so that git can do that. (Closes: #983085)
   * [9ab4a0e] pkgpolicy: Add type annotations.
     Just enough to  make mypy happy.
   * [39ae57e] Ignore imports without type annotations for now.
     Ignore rpm and libnotify for the moment
   * [92c3fd2] dch: Add minimal type information.
     Just enough to make mypy happy
   * [441bd27] Makefile: add type-check
   * [05ea122] tests: Add "gbp import-orig --uscan" test
   * [36737d2] uscan: Drop pre 2.11 devscripts compat code.
     It's not even in oldoldoldstable anymore
   * [613fcb8] docs: Make --component more prominent
     (Closes: #934200)
   * [7a674e0] docs: Ship gbp-setup-gitattributs man page
   * [14170d6] dch: Don't crash when we fail to get an upstream version
     (Closes: #879495)
   * [25327d1] smoke-rpm: Avoid deprecated distutils
   * [59bf3a6] repository: list_tree: Handle '-'
   * [3e30ce3] repository.get_submodules: Only strip repo path from the
     beginning.  We shouldn't just replace any occurence since we otherwise
     might also substitute in the submodule.
     Based on a patch by "ushen <yshxxsjt715@gmail.com>".
     See https://github.com/agx/git-buildpackage/pull/82
   * [03348fd] repository: Add helper to prefix branch with 'refs/heads/'
     No attempt is being made to ensure this is a local branch.
   * [a5e6dea] pull: Prefix local branch with 'refs/heads/'
     This can resolve ambiguity when generating the rev list.
     (Closes: #966627)
   * [d2200e4] Add breaks on older dgit.
     See #1005873, #1010061
 .
   [ Nicolas Boulenguez ]
   * [ff524f1] debhelper: make package prefix explicit in configuration files.
     This slightly improves readability.
   * [6d1c325] debian/rules: simplify installation of zsh and pk4.
     There seems to be no reason to change their names and permissions
     between the source tree and the eventual installation path.
   * [8742d3f] rules: simplify thanks to debhelper compat 13.
     When dh-sequence-foo is listed in build-depends, debhelper
     automatically inserts dh_foo in the commands.
     override_dh_auto_test is not invoked anymore if DEB_BUILD_OPTIONS
     contains nocheck.
     execute_after_dh_* is available and more readable than override_dh_*.
     Move chmod to execute_after_dh_fixperms for clarity.
     Examples are not compressed anymore.
   * [4c9032e] debian/rules: remove obsolete and unused Make variables
   * [bd529f0] debian/copyrigt: switch to machine-readable format 1.0
   * [36499a8] Move some cleaning from debian/rules to debian/clean
   * [9bdb516] debian/clean: add forgotten files
   * [7740d59] debian/rules: really export GBP_NETWORK_TESTS to tests
     $(MAKE) GBP_NETWORK_TESTS=1
     was setting a Make variable in the sub-Make, but not exporting it for
     test/*.py subprocesses.
   * [71a1556] debian/rules: clean __pycache__ directories generated during the
     build
   * [ee38574] clone: add second allowed form for vcs-git protocol to manual
     page
 .
   [ Arnaud Rebillout ]
   * [abce93c] import-dsc: Fix error message when missing debian branch.
     The error message mistakenly talks about the upstream branch when it
     should be talking about the debian branch.
     (Closes: #984516)
Checksums-Sha1:
 a6009770f7950db454b0a264501d3163ae5d4043 2340 git-buildpackage_0.9.27.dsc
 e1a0ad01cab3ec755eed1a75976cadc21b7c1e16 3460860 git-buildpackage_0.9.27.tar.xz
 5de045cd6f7943ecff8a1296f8da0e92ae07c59e 12950 git-buildpackage_0.9.27_amd64.buildinfo
Checksums-Sha256:
 b091ede066c1e77d45c24b270b65e67372832bf2840f11f5e27c9dae2da5e1c1 2340 git-buildpackage_0.9.27.dsc
 1ba1998037eec4c725cc3a17bcf9b7479e90cd8a1639a16c9d38925db962d702 3460860 git-buildpackage_0.9.27.tar.xz
 2f8df55e9369da3db48645ba1e11dae771e15180476cd6223b4fdc687acd946b 12950 git-buildpackage_0.9.27_amd64.buildinfo
Files:
 71f5687ecdd09a2e37f34669afd2de14 2340 vcs optional git-buildpackage_0.9.27.dsc
 3cd10c93d85be76638756666b79db266 3460860 vcs optional git-buildpackage_0.9.27.tar.xz
 5ea9f56b18dcbf0a719fd78bc2f08a6b 12950 vcs optional git-buildpackage_0.9.27_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEY/bM35YinQkoayrDJb+GUkr8weMFAmKV8sYACgkQJb+GUkr8
weOvMRAAhr7lqUuRYO7v7MhIf6886JC9//kCOLXcR3dFJj0gUNxbDJMO0f1fxgta
k2vtv84HL0PNHG4v1Efmm5/ZN613VgW7fDMuvw1I7lkmucW64GootkONXhByyxDW
Xs+SpKEEChSpDiko/L+UGmlDf9SgjQIO1u1Z4Dv+ZifKKr6ahxp7Knci3RcWn/b1
y//i4SX787vIOSM54o463p6CjB97TLj19FP8ifBwLcHVlicXaDk6iyyQdhyQDFz8
rS+QLn/08HI3M/1+R4eZ/XqRtPyRAWyslSRka1lo6TXZl6gr0cPnlHlb6B1yP07L
YAzBD0sZLt9DGz4fZDBcbM3lCDQCv3szeB4y+r+hGF1Ybv1B+N6vvIgjAjC1XosD
GFZ/j70heZGO89buODYZ2iPj/2hvbPGzmQpaAs051E0PRSAAjOqS41Se7KMUgZ9z
Wkpl+TcQ1XvwYs7ak2/FVmZeMGu5Es1piywSbV3qVknzOuf8Q8kCBoBinA1jwk7A
aDlhG1d63l/kTQWWfyPv8cEXM3dL4yjPCYpLokVXpGHf+IA5qNtVCOmAfY17mWl3
aGQ3WAGxcz8S9DdabCFwFyFc2Lvv2YF2DMAEkBuwiIMurlYMwJIh76BMbrujY3Tq
lbvfqecWkBWI/4HBMB7JkNQf4CNl6x9A4jx0eBWAgBcZg5CGCrY=
=g4bn
-----END PGP SIGNATURE-----