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

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. Signed-off-by: Thomas Lamprecht <[email protected]>
  16. ---
  17. scripts/mkcompile_h | 10 +++++++---
  18. 1 file changed, 7 insertions(+), 3 deletions(-)
  19. diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
  20. index ca40a5258c87..6ae930a732f0 100755
  21. --- a/scripts/mkcompile_h
  22. +++ b/scripts/mkcompile_h
  23. @@ -23,10 +23,14 @@ else
  24. VERSION=$KBUILD_BUILD_VERSION
  25. fi
  26. -if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
  27. - TIMESTAMP=`date`
  28. +if [ -z "$KBUILD_BUILD_VERSION_TIMESTAMP" ]; then
  29. + if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
  30. + TIMESTAMP=`date`
  31. + else
  32. + TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
  33. + fi
  34. else
  35. - TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
  36. + TIMESTAMP=$KBUILD_BUILD_VERSION_TIMESTAMP
  37. fi
  38. if test -z "$KBUILD_BUILD_USER"; then
  39. LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')