Make mkcompile_h accept an alternate timestamp string
authorBen Hutchings <ben@decadent.org.uk>
Tue, 12 May 2015 18:29:22 +0000 (19:29 +0100)
committerYves-Alexis Perez <corsac@debian.org>
Wed, 21 Feb 2018 15:29:03 +0000 (15:29 +0000)
We want to include the Debian version in the utsname::version string
instead of a full timestamp string.  However, we still need to provide
a standard timestamp string for gen_initramfs_list.sh to make the
kernel image reproducible.

Make mkcompile_h use $KBUILD_BUILD_VERSION_TIMESTAMP in preference to
$KBUILD_BUILD_TIMESTAMP.

Gbp-Pq: Topic debian
Gbp-Pq: Name uname-version-timestamp.patch

scripts/mkcompile_h

index 6fdc97ef6023da95f708dcbe9b1cc0634a99f0f2..f7321cb6bca09cd0ca09d45aef617b1a7b688fcd 100755 (executable)
@@ -37,10 +37,14 @@ else
        VERSION=$KBUILD_BUILD_VERSION
 fi
 
-if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
-       TIMESTAMP=`date`
+if [ -z "$KBUILD_BUILD_VERSION_TIMESTAMP" ]; then
+       if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
+               TIMESTAMP=`date`
+       else
+               TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
+       fi
 else
-       TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
+       TIMESTAMP=$KBUILD_BUILD_VERSION_TIMESTAMP
 fi
 if test -z "$KBUILD_BUILD_USER"; then
        LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')