Package: dpkg-dev
Version: 1.18.15

If one runs dpkg-buildpackage with an unfinalised changelog entry, it
sets SOURCE_DATE_EPOCH to the empty string.  Then, dpkg-deb can fail.

Steps to reproduce:

 git clone git://git.chiark.greenend.org.uk/~ianmdlvl/vtwm.git \
    -b for-debian/dpkg-dev-source-date-bug
 cd vtwm
 sudo apt-get build-dep vtwm
 dpkg-builldpackage -uc -b

Actual output:

 ...
 dpkg-gencontrol: warning:     debian/changelog(l7): found end of file where 
expected more change data or trailer
 dh_md5sums
 dh_builddeb
 dpkg-deb: building package 'vtwm-dbgsym' in 
'../vtwm-dbgsym_5.4.7-4~_amd64.deb'.
 dpkg-deb: error: unable to parse timestamp '': Success
 dh_builddeb: dpkg-deb -z1 -Zxz -Sextreme --build 
debian/.debhelper/vtwm/dbgsym-root .. returned exit code 2
 debian/rules:55: recipe for target 'binary-arch' failed
 make: *** [binary-arch] Error 1
 dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

Expected output: successful build (with SOURCE_DATE_EPOCH unset, so
unreproducible).

I determined by use of strace that the first program that gets
   SOURCE_DATE_EPOCH=
in the environment is a dpkg-architecture spawned by
dpkg-buildpackage, which is why I think this is dpkg-buildpackage's
fault. 

I think setting SOURCE_DATE_EPOCH to the empty string is always
wrong, so I think the bug is in dpkg-buildpackage, not dpkg-deb.

Thanks,
Ian.

-- 
Ian Jackson <ijack...@chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply via email to