Question about strip-nondeterminism in bsh

jathan jathanblackred at
Mon Oct 16 18:56:53 UTC 2017

On 09/10/17 10:47, Chris Lamb wrote:
> [Adding 877470 at to CC]
> Hi jathan,
>> Also I want to ask you what does it mean you actually use
>> /usr/share/dpkg/ for SOURCE_DATE_EPOCH
> See, for example:
> If you take a look at the /usr/share/dpkg/ file itself,
> it should be fairly clear what it exports to the outside environment.
> In the python-daiquiri example, I'm using DEB_VERSION_UPSTREAM for a
> reproducibility-related reason, but you should be able to see how it
> applies to SOURCE_DATE_EPOCH too :)
>> Thanks a lot and sorry for my delay to reply,
> No worries about the delay. Note that I've added 877470 at to
> the CC; generally when a question pertains to a specific bug, it's a great
> idea to ensure that the conversation is archived there. Keeps everyone sane
> too as it's easy to "load" context after a few days/weeks. :)
> Best wishes,
Hi Lamby!,

Thanks a lot for sharing your pkg-python-daiquiri example. I have
executed "less /usr/share/dpkg/" on my local machine with
Debian Stretch and I have the next content:

# Makefile snippet defining the following variables:
# DEB_SOURCE: the source package name
# DEB_VERSION: the full version of the package (epoch + upstream vers. +
# DEB_VERSION_EPOCH_UPSTREAM: the package's version without the Debian
# DEB_VERSION_UPSTREAM_REVISION: the package's version without the
Debian epoch
# DEB_VERSION_UPSTREAM: the package's upstream version
# DEB_DISTRIBUTION: the distribution(s) listed in the current entry of
# SOURCE_DATE_EPOCH: the source release date as seconds since the epoch, as
#   specified by <>

dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1)
:= $(shell $(2)))$(value DPKG_CACHE_$(1)))

DEB_SOURCE = $(call dpkg_late_eval,DEB_SOURCE,dpkg-parsechangelog -SSource)
DEB_VERSION = $(call dpkg_late_eval,DEB_VERSION,dpkg-parsechangelog
dpkg_late_eval,DEB_VERSION_EPOCH_UPSTREAM,echo '$(DEB_VERSION)' | sed -e
dpkg_late_eval,DEB_VERSION_UPSTREAM_REVISION,echo '$(DEB_VERSION)' | sed
-e 's/^[0-9]*://')
'$(DEB_VERSION_EPOCH_UPSTREAM)' | sed -e 's/^[0-9]*://')
dpkg_late_eval,DEB_DISTRIBUTION,dpkg-parsechangelog -SDistribution)

dpkg_late_eval,SOURCE_DATE_EPOCH,dpkg-parsechangelog -STimestamp)


How can I see the /usr/share/dpkg/ you have used for
pkg-python-daiquiri to make a comparison of contents and understand
deeper how you did it please? Thinking about these two lines of your code:

include /usr/share/dpkg/


And also considering the /usr/share/dpkg/ file suggestion, I
would apply SOURCE_DATE_EPOCH in the next way:

include /usr/share/dpkg/

export SOURCE_DATE_EPOCH = $(call
dpkg_late_eval,SOURCE_DATE_EPOCH,dpkg-parsechangelog -STimestamp)
export SOURCE_DATE_EPOCH = $(shell dpkg-parsechangelog -STimestamp)
(based on

Would it be right for me to use either of these two options or am I
wrong in both? Best regards.


Por favor evita enviarme adjuntos en formato de word o powerpoint, si
quieres saber porque lee esto:
¡Cámbiate a GNU/Linux!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 878 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Reproducible-builds mailing list