Package: dpkg-dev Version: 1.18.18 Severity: important Dear Maintainer,
the --tar-ignore parameter values (implcit or explicit) dpkg-source
--build forwards to the tar program apply to the source directory name
as well while certainly should not, with somewhat surprising results.
There is a recommendation (at most) to use a format like
<source-name>-<version-number> for that directory, but this this might
match in case of an usual but still otherwise completey legal version
number.
Find a reproducer attached. Change to an arbitrary directory, unpack the
tarball there, then run "dpkg-source --build example-1.a", then
"tar --xz -tf example_1.a.tar.xz".
Expected result:
example-1.a/
example-1.a/debian/
example-1.a/debian/changelog
example-1.a/debian/control
example-1.a/debian/source/
example-1.a/debian/source/format
Actual result:
(nothing - the tar ball is empty)
Explanation: The pattern "*.a" is one of the many expressions in the
default excludes when using source format 3.0.
How to fix (well, just an idea): Since AFAIK there is no sane way to
exempt the top level directory from the exclude filter ... perhaps
run tar from inside the source directory and use the --transform
option to re-add the name afterwards?
So this does the right thing:
tar -C example-1.a -cf - --exclude '*.a' . --transform 's!^\.!example-1.a!' |
tar -tvf -
Also, while this example is synthetic, this did hit me in real life
with an extra "tar-ignore" in debian/source/options that accidentially
matched the source directory name in an automated test environment.
Regards,
Christoph
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.1 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: unable to detect
Versions of packages dpkg-dev depends on:
ii binutils 2.27.51.20161220-1
ii bzip2 1.0.6-8
ii libdpkg-perl 1.18.18
ii make 4.1-9
ii patch 2.7.5-1
pn perl:any <none>
ii tar 1.29b-1.1
ii xz-utils 5.2.2-1.2
Versions of packages dpkg-dev recommends:
ii build-essential 12.2
ii clang-3.8 [c-compiler] 1:3.8.1-16
ii fakeroot 1.21-3
ii gcc [c-compiler] 4:6.2.1-1
ii gcc-6 [c-compiler] 6.2.1-5
ii gnupg 2.1.17-2
ii gpgv 2.1.17-2
pn libalgorithm-merge-perl <none>
Versions of packages dpkg-dev suggests:
ii debian-keyring 2016.12.24
-- no debconf information
example.tar.xz
Description: application/xz
signature.asc
Description: Digital signature

