[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#905050: mpv: why does mpv tell it's built on unknown [PATCH]



Control: tags -1 + patch

[resending as debbugs seems to have ignored my first attempt]

One way of fixing this bug is to set the BUILDDATE variable
based on the timestamp of the most recent debian changelog entry.

That way BUILDDATE contains a sane date instead of "UNKNOWN",
but the build is reproducible (all builds from the same source
package version will have the same date).

Patch attached below. In order for it to take effect, it is
necessary to remove --disable-build-date option in debian/rules,
i.e. revert the patch from https://bugs.debian.org/784267


--- a/version.sh
+++ b/version.sh
@@ -53,7 +53,7 @@

 NEW_REVISION="#define VERSION \"${VERSION}\""
 OLD_REVISION=$(head -n 1 "$version_h" 2> /dev/null)
-BUILDDATE="#define BUILDDATE \"$(date)\""
+BUILDDATE="#define BUILDDATE \"$(date -u --date=@$(dpkg-parsechangelog -S Timestamp))\""
 MPVCOPYRIGHT="#define MPVCOPYRIGHT \"Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects\""

 # Update version.h only on revision changes to avoid spurious rebuilds


Reply to: