]> git.proxmox.com Git - pve-kernel-jessie.git/blob - uname-version-timestamp.patch
fix #1276: include package version in uname information
[pve-kernel-jessie.git] / uname-version-timestamp.patch
1 From: Ben Hutchings <ben@decadent.org.uk>
2 Subject: Make mkcompile_h accept an alternate timestamp string
3 Date: Tue, 12 May 2015 19:29:22 +0100
4 Forwarded: not-needed
5
6 We want to include the Debian version in the utsname::version string
7 instead of a full timestamp string. However, we still need to provide
8 a standard timestamp string for gen_initramfs_list.sh to make the
9 kernel image reproducible.
10
11 Make mkcompile_h use $KBUILD_BUILD_VERSION_TIMESTAMP in preference to
12 $KBUILD_BUILD_TIMESTAMP.
13
14 --- a/scripts/mkcompile_h
15 +++ b/scripts/mkcompile_h
16 @@ -37,10 +37,14 @@ else
17 VERSION=$KBUILD_BUILD_VERSION
18 fi
19
20 -if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
21 - TIMESTAMP=`date`
22 +if [ -z "$KBUILD_BUILD_VERSION_TIMESTAMP" ]; then
23 + if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
24 + TIMESTAMP=`date`
25 + else
26 + TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
27 + fi
28 else
29 - TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
30 + TIMESTAMP=$KBUILD_BUILD_VERSION_TIMESTAMP
31 fi
32 if test -z "$KBUILD_BUILD_USER"; then
33 LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')