]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0001-Make-mkcompile_h-accept-an-alternate-timestamp-strin.patch
rebase patches on top of Ubuntu-4.13.0-45.50
[pve-kernel.git] / patches / kernel / 0001-Make-mkcompile_h-accept-an-alternate-timestamp-strin.patch
CommitLineData
59d5af67 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
ba2f1a67 2From: Ben Hutchings <ben@decadent.org.uk>
ba2f1a67 3Date: Tue, 12 May 2015 19:29:22 +0100
59d5af67 4Subject: [PATCH] Make mkcompile_h accept an alternate timestamp string
b9e76370
FG
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
ba2f1a67
FG
8
9We want to include the Debian version in the utsname::version string
10instead of a full timestamp string. However, we still need to provide
11a standard timestamp string for gen_initramfs_list.sh to make the
12kernel image reproducible.
13
14Make mkcompile_h use $KBUILD_BUILD_VERSION_TIMESTAMP in preference to
15$KBUILD_BUILD_TIMESTAMP.
16
b9e76370
FG
17Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
18---
19 scripts/mkcompile_h | 10 +++++++---
20 1 file changed, 7 insertions(+), 3 deletions(-)
21
22diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
23index fd8fdb91581d..1e35ac9fc810 100755
ba2f1a67
FG
24--- a/scripts/mkcompile_h
25+++ b/scripts/mkcompile_h
26@@ -37,10 +37,14 @@ else
27 VERSION=$KBUILD_BUILD_VERSION
28 fi
29
30-if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
31- TIMESTAMP=`date`
32+if [ -z "$KBUILD_BUILD_VERSION_TIMESTAMP" ]; then
33+ if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
34+ TIMESTAMP=`date`
35+ else
36+ TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
37+ fi
38 else
39- TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
40+ TIMESTAMP=$KBUILD_BUILD_VERSION_TIMESTAMP
41 fi
42 if test -z "$KBUILD_BUILD_USER"; then
43 LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')