diff options
author | Ben Hutchings <benh@debian.org> | 2015-05-12 18:52:20 +0000 |
---|---|---|
committer | Ben Hutchings <benh@debian.org> | 2015-05-12 18:52:20 +0000 |
commit | 73842f1f17e8f0c052632781335eaeb8b35c1130 (patch) | |
tree | e510ce71acf03b3dea5c8669dc4929e54e95580c /debian/patches/debian | |
parent | 56c70a5fd262cb4a2f54f9ac3b645fd4d9a2c596 (diff) |
linux-image: Fix timestamps in the built-in initramfs for reproducible build
$KBUILD_BUILD_TIMESTAMP is used in two places:
1. By mkcompile_h, to generate both the utsname::version string
2. By gen_initramfs_list.sh, to set the timestamps for the built-in initramfs
As we want utsname::version to contain the package version and not an
RFC822 timestamp, the current value doesn't work for (2).
Change mkcompile_h to prefer $KBUILD_BUILD_VERSION_TIMESTAMP over
$KBUILD_BUILD_TIMESTAMP, and set both variables in debian/rules.real.
svn path=/dists/trunk/linux/; revision=22647
Diffstat (limited to 'debian/patches/debian')
-rw-r--r-- | debian/patches/debian/uname-version-timestamp.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/debian/uname-version-timestamp.patch b/debian/patches/debian/uname-version-timestamp.patch new file mode 100644 index 000000000..5cd565c1e --- /dev/null +++ b/debian/patches/debian/uname-version-timestamp.patch @@ -0,0 +1,33 @@ +From: Ben Hutchings <ben@decadent.org.uk> +Subject: Make mkcompile_h accept an alternate timestamp string +Date: Tue, 12 May 2015 19:29:22 +0100 +Forwarded: not-needed + +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. + +--- a/scripts/mkcompile_h ++++ b/scripts/mkcompile_h +@@ -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/\\/\\\\/') |