Bug#831870: devscripts: [mk-origtargz] Fails to create tar with Files-Excluded

Mattia Rizzolo mattia at debian.org
Sun Dec 10 13:35:18 UTC 2017


On Wed, Jul 20, 2016 at 05:10:01PM +0530, Chirayu Desai wrote:
> I'm working with the Android Tools team. We're seeing a failure with mk-origtargz.
> The package is src:android-platform-frameworks-base [1]. The output can be viewed at [2].
> The output is basically:
> mk-origtargz --repack --compression xz android-6.0.1_r43.tar.gz
> No files matched excluded pattern as the last matching glob: *.zip
> No files matched excluded pattern as the last matching glob: core/tests
> No files matched excluded pattern as the last matching glob: media/tests
> tar: tools/preload/sorttable.js: Not found in archive
> tar: <files matching Files-Excluded>: Not found in archive
> tar: Exiting with failure status due to previous errors

I was called upone debugging the very same error for another package,
the tarball can be found at [1] (and it's a way smaller test case…)

The thing is definitely tar's fault, I could trigger the same error with
    cat gocryptfs_v1.4.2_src-deps.tar | tar --delete gocryptfs_v1.4.2_src-deps/vendor/github.com/jacobsa/crypto/.travis.yml > out.tar
i.e. without involving mk-origtargz at all.

I noticed that I can workaround the issue by firstly retarring the
tarball, i.e. the following sequence worked for me:
    tar xaf gocryptfs_v1.4.2_src-deps.tar.gz
    tar caf gocryptfs_v1.4.2_src-deps.tar.gz gocryptfs_v1.4.2_src-deps
    cd packaging_dir
    mk-origtargz -v 1.4.2 ../gocryptfs_v1.4.2_src-deps.tar.gz

Diffoscoping the original tarball and the retarred one I noticed that:
1) the original tarball has mixed file owners, some files are owned by
   root, others by an actual user
2) the tarball was not created by GNU tar (i.e. `file` reports "POSIX
   tar archive" instead of "POSIX tar archive (GNU)")


Just dumping here some findings.  Probably somebody should file a bug at
GNU tar.


[1] https://github.com/rfjakob/gocryptfs/releases/download/v1.4.2/gocryptfs_v1.4.2_src-deps.tar.gz

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20171210/64503486/attachment.sig>


More information about the devscripts-devel mailing list