Package: dpkg-dev
Version: 1.15.7.2
Severity: important
File: /usr/bin/dpkg-source

Hi,

the command

    dpkg-source -b foobar-1.0~

fails to create a valid tarball for a native package (did not try
non-native) because the directory name ends with a tilde. If I
uncompress the 45 bytes .tar.gz, I get a file that consists of
10240 '\0' bytes, nothing else.

A small script to generate such a package (using dh_make) is attached,
the faulty file it generates is pkg3_1.0.tar.gz.
It also tests other variations (pkg1: no tilde, pkg2: tilde at end of
the version but not in the directory name, pkg4: tilde inside directory
name) and simple tarball creation (pkg3.tar.gz).


Andreas

-- System Information:
Debian Release: squeeze/sid
  APT prefers stable
  APT policy: (800, 'stable'), (700, 'testing'), (600, 'unstable'), (130, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg-dev depends on:
ii  base-files        5.7                    Debian base system miscellaneous f
ii  binutils          2.20.51.20100617-1     The GNU assembler, linker and bina
ii  bzip2             1.0.5-4                high-quality block-sorting file co
ii  libdpkg-perl      1.15.7.2               Dpkg perl modules
ii  make              3.81-8                 An utility for Directing compilati
ii  patch             2.6-2                  Apply a diff file to an original
ii  xz-utils          4.999.9beta+20100527-1 XZ-format compression utilities

Versions of packages dpkg-dev recommends:
ii  build-essential               11.5       Informational list of build-essent
ii  fakeroot                      1.14.4-1   Gives a fake root environment
ii  gcc [c-compiler]              4:4.4.4-2  The GNU C compiler
ii  gcc-4.2 [c-compiler]          4.2.4-6    The GNU C compiler
ii  gcc-4.3 [c-compiler]          4.3.5-1    The GNU C compiler
ii  gcc-4.4 [c-compiler]          4.4.4-6    The GNU C compiler
ii  gcc-4.5 [c-compiler]          4.5.0-7    The GNU C compiler
ii  gnupg                         1.4.10-4   GNU privacy guard - a free PGP rep
ii  gpgv                          1.4.10-4   GNU privacy guard - signature veri
ii  libalgorithm-merge-perl       0.08-1     Perl module for three-way merge of

Versions of packages dpkg-dev suggests:
ii  debian-keyring                2010.06.08 GnuPG (and obsolete PGP) keys of D

-- no debconf information
#!/bin/sh
set -e -x

cd `mktemp -d bug_dpkg_source.XXXXXXXXXX`

mkdir pkg1-1.0
cd pkg1-1.0
yes | dh_make --native -s -p pkg1_1.0
cd ..
dpkg-source -b pkg1-1.0


mkdir pkg2-1.0
cd pkg2-1.0
yes | dh_make --native -s -p pkg2_1.0~
cd ..
dpkg-source -b pkg2-1.0

mkdir pkg3-1.0~
cd pkg3-1.0~
yes | dh_make --native -s -p pkg3_1.0
cd ..
tar cfz pkg3.tar.gz pkg3-1.0~
dpkg-source -b pkg3-1.0~

mkdir pkg4-1.0~tilde
cd pkg4-1.0~tilde
yes | dh_make --native -s -p pkg4_1.0
cd ..
dpkg-source -b pkg4-1.0~tilde

ls -la

pwd

Reply via email to