]> git.proxmox.com Git - pve-kernel.git/blob - 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
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Ben Hutchings <ben@decadent.org.uk>
3 Date: Tue, 12 May 2015 19:29:22 +0100
4 Subject: [PATCH] Make mkcompile_h accept an alternate timestamp string
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 We want to include the Debian version in the utsname::version string
10 instead of a full timestamp string. However, we still need to provide
11 a standard timestamp string for gen_initramfs_list.sh to make the
12 kernel image reproducible.
13
14 Make mkcompile_h use $KBUILD_BUILD_VERSION_TIMESTAMP in preference to
15 $KBUILD_BUILD_TIMESTAMP.
16
17 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
18 ---
19 scripts/mkcompile_h | 10 +++++++---
20 1 file changed, 7 insertions(+), 3 deletions(-)
21
22 diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
23 index fd8fdb91581d..1e35ac9fc810 100755
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/\\/\\\\/')