#921918 [devscripts] mk-origtargz generates a corrupted tarball after repackaging

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
Giovanni Mascellani
Date:
2021-01-19 01:45:05 UTC
Severity:
normal
#921918#5
Date:
2019-02-10 08:50:25 UTC
From:
To:
Hi,

apparently mk-origtargz generates a corrupted tarball after repackaging,
under conditions that are unknown to me (it is the first time it happens).

You can reproduce this way:

$ cd `mktemp -d`
$ wget
https://github.com/johnmartel/javaccPlugin/archive/javacc-gradle-plugin-2.4.0.tar.gz
$ cat > copyright
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: JavaCC plugin for Gradle
Source: https://github.com/johnmartel/javaccPlugin
Files-Excluded: gradlew*
                gradle

$ mk-origtargz    --package gradle-plugin-javacc --version 2.4.0
--compression default --directory . --copyright-file copyright
javacc-gradle-plugin-2.4.0.tar.gz
Successfully repacked javacc-gradle-plugin-2.4.0.tar.gz as
gradle-plugin-javacc_2.4.0.orig.tar.xz, deleting 6 files from it.

However:

$ tar Jft gradle-plugin-javacc_2.4.0.orig.tar.xz

contains many multiple repeated files, which is clearly wrong (I'm
attaching the output on my system). Also, unpacking the generated file
it seems that many files that should have not been deleted are actually
absent. Probably they have not been deleted, but the fact that filenames
have been messed up inhibit proper unarchiving.

Thanks, Giovanni.
Debian Release: buster/sid
  500 xenial          updates.signal.org   500 unstable-debug
debug.mirrors.debian.org   500 unstable        ftp.be.debian.org   500
testing         ftp.be.debian.org   500 stable          repo.skype.com
 500 stable          dl.google.com     1 experimental    ftp.be.debian.org
--- Package information. ---
Depends                     (Version) | Installed
=====================================-+-=============
dpkg-dev                 (>= 1.18.19) | 1.19.4
fakeroot                              | 1.23-1
file                                  | 1:5.35-2
gnupg                                 | 2.2.12-1
 OR gnupg2                            | 2.2.12-1
gpgv                                  | 2.2.12-1
 OR gpgv2                             | libfile-homedir-perl
      | 1.004-1
libfile-which-perl                    | 1.23-1
libipc-run-perl                       | 20180523.0-1
libmoo-perl                           | 2.003004-2
libwww-perl                           | 6.36-1
patchutils                            | 0.3.4-2
sensible-utils                        | 0.0.12
wdiff                                 | 1.2.2-2+b1
perl                                  | 5.28.1-4
python3:any                           | libc6                      (>=
2.3.4) |

Recommends                       (Version) | Installed
==========================================-+-============
apt                                        | 1.8.0~rc2
at                                         | 3.1.23-1
dctrl-tools                                | 2.24-3
dput                                       | 0.9.6.4
 OR dupload                                | libdistro-info-perl
                | 0.20
libdpkg-perl                               | 1.19.4
libencode-locale-perl                      | 1.05-1
libgit-wrapper-perl                        | 0.048-1
libgitlab-api-v4-perl                      | 0.15-1
liblist-compare-perl                       | 0.53-1
libstring-shellquote-perl                  | 1.04-1
libtry-tiny-perl                           | 0.30-1
liburi-perl                                | 1.76-1
licensecheck                               | 3.0.31-3
lintian                                    | 2.6.0
man-db                                     | 2.8.5-1
patch                                      | 2.7.6-3
python3-apt                                | 1.8.3
python3-debian                 (>= 0.1.15) | 0.1.34
python3-magic                              | 2:0.4.15-2
python3-requests                           | 2.20.0-2
python3-unidiff                            | 0.5.4-1
python3-xdg                                | 0.25-4
strace                                     | 4.26-0.2
unzip                                      | 6.0-21
wget                                       | 1.20.1-1
 OR curl                                   | 7.64.0-1
xz-utils                                   | 5.2.4-1
debian-keyring                             | 2018.12.24
equivs                                     | 2.2.0
liblwp-protocol-https-perl                 | 6.07-2
libsoap-lite-perl                          | 1.27-1


Suggests                       (Version) | Installed
========================================-+-===========
adequate                                 | 0.15.1
autopkgtest                              | 5.8
bls-standalone                           | bsd-mailx
            | 8.1.2-0.20180807cvs-1
 OR mailx                                | build-essential
            | 12.5
check-all-the-things                     | cvs-buildpackage
            | debhelper                                | 12
devscripts-el                            | diffoscope
            | 110
disorderfs                               | dose-extra
   (>= 4.0) | 5.0.1-12
duck                                     | faketime
            | 0.9.7-3
gnuplot                                  | 5.2.6+dfsg1-1
how-can-i-help                           | 16
libauthen-sasl-perl                      | 2.1600-1
libdbd-pg-perl                           | libfile-desktopentry-perl
            | 0.22-1
libnet-smtps-perl                        | libterm-size-perl
            | 0.209-1+b1
libtimedate-perl                         | 2.3000-2
libyaml-syck-perl                        | 1.31-1+b1
mozilla-devscripts                       | mutt
            | 1.10.1-2
piuparts                                 | 0.96
postgresql-client                        | 11+199
quilt                                    | 0.65-3
ratt                                     | 0.0~git20180127.c44413c-2+b10
reprotest                                | ssh-client
            | svn-buildpackage                         | 0.8.7
w3m                                      |
--- Output from package bug script ---
--- /etc/devscripts.conf ---
--- ~/.devscripts --- DEBSIGN_KEYID="82D119A840C6EFCA6F5AF9459EDCC991D9AB457E" DEBUILD_PREPEND_PATH="/usr/lib/ccache" -- Giovanni Mascellani <g.mascellani@gmail.com> Postdoc researcher - Université Libre de Bruxelles