#934200 gbp import-orig is broken with multiple source tarballs

#934200#5
Date:
2019-08-08 05:48:43 UTC
From:
To:
You can try it with node-ajv (from 6.10.0-5 tag). It imported the
component instead of the main tar ball.

node-ajv$ gbp import-orig --pristine-tar --uscan
gbp:info: Launching uscan...
gbp:info: Using uscan downloaded tarball
../node-ajv_6.10.2.orig-fast-json-stable-stringify.tar.gz
What is the upstream version? [6.10.2]
gbp:info: ../node-ajv_6.10.2.orig.tar.gz already exists, moving to
../node-ajv_6.10.2.orig.tar.gz.1565242303
gbp:info: Importing
'../node-ajv_6.10.2.orig-fast-json-stable-stringify.tar.gz' to branch
'upstream'...
gbp:info: Source package is node-ajv
gbp:info: Upstream version is 6.10.2
gbp:info: Replacing upstream source on 'master'
gbp:info: Successfully imported version 6.10.2 of
../node-ajv_6.10.2.orig-fast-json-stable-stringify.tar.gz

#934200#10
Date:
2019-08-08 05:53:18 UTC
From:
To:
gbp import-orig --pristine-tar ../node-ajv_6.10.2.orig.tar.gz also
imported the component, so I think the problem is with git-buildpackage
and not uscan.

#934200#19
Date:
2019-08-08 06:03:06 UTC
From:
To:
I had to use uupdate to update base tarball, extract component manually,
dpkg-source -b . to create dsc and them gbp import-dsc to import the new
version.

#934200#24
Date:
2019-08-11 14:13:59 UTC
From:
To:
Hello,

Bug #934200 in pkg-js-tools reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/js-team/pkg-js-tools/commit/4312a0629955303e50e9ee77482b28a26bb77ca2
------------------------------------------------------------------------
add-node-component: add import feature

Closes: #934200
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/934200

#934200#31
Date:
2019-10-03 10:10:15 UTC
From:
To:
To reproduce:

cd `mktemp -d`
git clone https://salsa.debian.org/js-team/node-yarnpkg
cd node-yarnpkg
git fetch origin pristine-tar
git checkout pristine-tar
git fetch origin upstream
git checkout upstream
git checkout master
gbp import-orig --uscan --pristine-tar

at the end of the process, the master branch is screwed:
grep name package.json
  "name": "v8-compile-cache",

the key part of the gbp import-orig is:
gbp:info: Launching uscan...
gbp:info: Using uscan downloaded tarball ../node-yarnpkg_1.19.0.orig-v8-compile-cache.tar.gz
What is the upstream version? [1.19.0] tar:
gbp:info: ../node-yarnpkg_1.19.0.orig.tar.gz already exists, moving to ../node-yarnpkg_1.19.0.orig.tar.gz.1570089312
gbp:info: Importing '../node-yarnpkg_1.19.0.orig-v8-compile-cache.tar.gz' to branch 'upstream'...
gbp:info: Source package is node-yarnpkg
gbp:info: Upstream version is 1.19.0
gbp:info: Replacing upstream source on 'master'
gbp:info: Successfully imported version 1.19.0 of ../node-yarnpkg_1.19.0.orig-v8-compile-cache.tar.gz

it works if I replace the last command with:

uscan
gbp import-orig --pristine-tar ../node-yarnpkg_1.19.0.orig.tar.gz

the master branch is now OK:
grep name package.json
  "name": "yarn",

as the salsa repo will move on, to make sure you can reproduce this later I have saved here:
magnet:?xt=urn:btih:4d105a0034654971cb79748a917fd474080df330&dn=node-yarnpkg.tar (173 MB)

a snapshot with the status after the two commands above; just download the tar file and extract:
tar xf node-yarnpkg.tar

P.

#934200#36
Date:
2020-02-15 23:58:54 UTC
From:
To:
control: tags -1 - pending

this is still happening: i'm trying to upgrade dblatex to the latest
upstream release and the source package has 2 upstream tarballs.

`gbp import-orig --uscan` imports only the "main" tarball but not the
additional component (`examples`,
https://salsa.debian.org/debian/dblatex/tree/pristine-tar) and `gbp
import-orig ../../dblatex*orig*` complains multiple files are
specified on the command-line, and i did not find a combination of
commands to import 2 tarballs one after the other.

I'm not sure how frequent is the case of multiple tarballs, but it
would still be extra-useful if this bug could be addressed soon.

Regards,
Sandro

#934200#43
Date:
2020-02-18 02:25:51 UTC
From:
To:
nevermind (i guess?), upon further reading i found out i need to use
the `--component` cli option; maybe an example in the doc/manpage
would be useful? thanks for maintaining gbp!

#934200#48
Date:
2022-02-17 11:39:42 UTC
From:
To:
Hi,

there are 2 bugs here:
  * --uscan option fails with components but uscan + 'gbp import-orig'
    works, except...
  * when there are many source files (node-babel7 for example),
    gbp-import-orig seems to succeed but drops some imports, then files
    are missing. The attached script works fine instead. But then CI job
    fails because `gbp buildpackage` is unable to restore all files
    (probably the same bug, it looks like a limit around 30 source files)

#934200#53
Date:
2022-05-28 09:33:48 UTC
From:
To:
tag 934200 pending
thanks

Date:   Sat May 28 11:25:36 2022 +0200
Author: Guido Günther <agx@sigxcpu.org>
Commit ID: 613fcb893cfe4f64a6c7060a5ab489d529510139
Commit URL: https://git.sigxcpu.org/cgit/git-buildpackage//commit/?id=613fcb893cfe4f64a6c7060a5ab489d529510139
Patch URL: https://git.sigxcpu.org/cgit/git-buildpackage//patch/?id=613fcb893cfe4f64a6c7060a5ab489d529510139

    docs: Make --component more prominent

    Closes: #934200

#934200#60
Date:
2022-05-28 09:38:49 UTC
From:
To:
Hi,

I've added more mentions to the manpage. If there's a reproducer where
importing with uscan fails when the components are given it would be
great to have a reproducer (preferably in a new issue as this one mixes
several things already).

We can certainly make component tarballs more automatic (#830490).
Cheers,
 -- Guido

#934200#65
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 934200@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-----