0001-Make-mkcompile_h-accept-an-alternate-timestamp-strin.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Ben Hutchings <[email protected]>
  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. We want to include the Debian version in the utsname::version string
  9. instead of a full timestamp string. However, we still need to provide
  10. a standard timestamp string for gen_initramfs_list.sh to make the
  11. kernel image reproducible.
  12. Make mkcompile_h use $KBUILD_BUILD_VERSION_TIMESTAMP in preference to
  13. $KBUILD_BUILD_TIMESTAMP.
  14. Signed-off-by: Fabian Grünbichler <[email protected]>
  15. ---
  16. scripts/mkcompile_h | 10 +++++++---
  17. 1 file changed, 7 insertions(+), 3 deletions(-)
  18. diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
  19. index 87f1fc9801d7..4ef868f1f244 100755
  20. --- a/scripts/mkcompile_h
  21. +++ b/scripts/mkcompile_h
  22. @@ -33,10 +33,14 @@ else
  23. VERSION=$KBUILD_BUILD_VERSION
  24. fi
  25. -if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
  26. - TIMESTAMP=`date`
  27. +if [ -z "$KBUILD_BUILD_VERSION_TIMESTAMP" ]; then
  28. + if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
  29. + TIMESTAMP=`date`
  30. + else
  31. + TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
  32. + fi
  33. else
  34. - TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
  35. + TIMESTAMP=$KBUILD_BUILD_VERSION_TIMESTAMP
  36. fi
  37. if test -z "$KBUILD_BUILD_USER"; then
  38. LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
  39. --
  40. 2.14.2