Package: git-buildpackage Version: 0.9.29 Severity: important I'm trying to use gbp to update the source for the golang-gocloud package from 0.20.0 to the latest 0.27.0. The salsa url for it is https://salsa.debian.org/go-team/packages/golang-gocloud while upstream is https://github.com/google/go-cloud
"gbp import-orig --uscan --pristine-tar" superfically appears to run fine, but when I try to build the package, dpkg-buildpackage complains about changed files, e.g. dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building golang-gocloud using existing ./golang-gocloud_0.27.0.orig.tar.gz dpkg-source: error: cannot represent change to internal/docs/img/user-facing-type-no-driver.png: binary file contents changed dpkg-source: error: add internal/docs/img/user-facing-type-no-driver.png in debian/source/include-binaries if you want to store the modified binary in the debian tarball ... (many other source png files are likewise "changed") Inspecting the sample image file in question, ls -l reports -rw-r--r-- 1 dparsons dparsons 9567 Nov 9 11:32 internal/docs/img/user-facing-type-no-driver.png i.e. it has been extracted with 9567 bytes. But if I untar the source tarball manually with "tar xzf golang-gocloud_0.27.0.orig.tar.gz" then that extraction reports -rw-r--r-- 1 dparsons dparsons 9568 Sep 30 19:36 internal/docs/img/user-facing-type-no-driver.png So the binary image file is supposed to be created with 9568 bytes, but gbp extracts it with 9567 bytes. Unsurprisingly the difference matters. The true 9568 byte file is reported by "file internal/docs/img/user-facing-type-no-driver.png" as internal/docs/img/user-facing-type-no-driver.png: PNG image data, 800 x 200, 8-bit/color RGBA, non-interlaced and the image can be viewed with an image viewer such as eog. The file extracted by gbp is reported by the file utility simply as "data", not as "PNG image data". Although I initially used uscan, it's not the problem since I can reproduce the same gbp pathology directly from the downloaded tarball in a fresh empty git repo extracting using "gbp import-orig ../golang-gocloud_0.27.0.orig.tar.gz" instead of gbp import-orig --uscan Here is the command-line verbose output for extraction to a fresh empty git repo with debian dir copied from the normal golang-gocloud source: ~/projects/golang/build/test/go-cloud$ gbp import-orig ../../golang-gocloud_0.27.0.orig.tar.gz --verbose 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'] What is the upstream version? [0.27.0] gbp:debug: ['git', 'tag', '-l', 'upstream/0.27.0'] gbp:debug: tar ['-C', '../tmpbp6ie0k4', '-a', '-xf', '../../golang-gocloud_0.27.0.orig.tar.gz'] [] gbp:debug: Unpacked '../../golang-gocloud_0.27.0.orig.tar.gz' to '../tmpbp6ie0k4/go-cloud-0.27.0' gbp:info: <DebianUpstreamSource path='../../golang-gocloud_0.27.0.orig.tar.gz' signaturefile=None> gbp:info: Importing '../../golang-gocloud_0.27.0.orig.tar.gz' to branch 'upstream'... gbp:info: Source package is golang-gocloud gbp:info: Upstream version is 0.27.0 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', '43a0c4aa9795d263fe4d3bc063f40cb50b42bc4d', '-p', 'c777d4de30d12bce305e3e8bdd06e2731b9787f2'] gbp:debug: ['git', 'update-ref', '-m', 'gbp: New upstream version 0.27.0', 'refs/heads/upstream', 'fcabf7c70ba592734f400a2d0563bf7c27f77021', 'c777d4de30d12bce305e3e8bdd06e2731b9787f2'] gbp:debug: ['git', 'tag', '-m', 'Upstream version 0.27.0', 'upstream/0.27.0', 'fcabf7c70ba592734f400a2d0563bf7c27f77021'] gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/master'] gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'master'] gbp:debug: ['git', 'show', '--pretty=medium', 'master:debian/source/format'] gbp:debug: 3.0 (quilt) package, replacing debian/ dir gbp:info: Replacing upstream source on 'master' gbp:debug: ['git', 'ls-tree', '-z', 'upstream/0.27.0^{tree}', '--'] gbp:debug: ['git', 'ls-tree', '-z', 'master^{tree}', '--'] gbp:debug: Using 4b1891a78e16f72a63d47fba025340ba4a43cf4c as debian/ tree gbp:debug: ['git', 'mktree', '-z'] gbp:debug: ['git', 'commit-tree', '4443c63c228a40bf96a88798d052f464c641d4c3', '-p', 'master^{commit}', '-p', 'upstream/0.27.0^{commit}'] gbp:debug: ['git', 'update-ref', '-m', 'gbp: Updating master after import of upstream/0.27.0', 'refs/heads/master', '4322286093bd0070e106c393276067aab6aba4b3'] gbp:debug: ['git', 'symbolic-ref', 'HEAD'] gbp:debug: ['git', 'show-ref', 'refs/heads/master'] gbp:debug: ['git', 'reset', '--quiet', '--hard', '4322286093bd0070e106c393276067aab6aba4b3', '--'] gbp:debug: ['git', 'symbolic-ref', 'HEAD'] gbp:debug: ['git', 'show-ref', 'refs/heads/master'] gbp:debug: rm ['-rf', '../tmpbp6ie0k4'] [] gbp:info: Successfully imported version 0.27.0 of ../../golang-gocloud_0.27.0.orig.tar.gz -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') merged-usr: no Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.0.0-2-amd64 (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages git-buildpackage depends on: ii devscripts 2.22.2 ii git 1:2.38.1-1 ii man-db 2.11.0-1+b1 ii python3 3.10.6-1 ii python3-dateutil 2.8.2-1 ii python3-pkg-resources 65.5.0-1 ii python3-yaml 6.0-3 ii sensible-utils 0.0.17 Versions of packages git-buildpackage recommends: ii cowbuilder 0.89 ii pbuilder 0.231 ii pristine-tar 1.50 ii python3-requests 2.27.1+dfsg-1 Versions of packages git-buildpackage suggests: pn python3-notify2 <none> ii sudo 1.9.11p3-2 ii unzip 6.0-27 -- no debconf information