uname-version-timestamp.patch 1014 B

123456789101112131415161718192021222324252627282930313233
  1. From: Ben Hutchings <[email protected]>
  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. We want to include the Debian version in the utsname::version string
  6. instead of a full timestamp string. However, we still need to provide
  7. a standard timestamp string for gen_initramfs_list.sh to make the
  8. kernel image reproducible.
  9. Make mkcompile_h use $KBUILD_BUILD_VERSION_TIMESTAMP in preference to
  10. $KBUILD_BUILD_TIMESTAMP.
  11. --- a/scripts/mkcompile_h
  12. +++ b/scripts/mkcompile_h
  13. @@ -37,10 +37,14 @@ else
  14. VERSION=$KBUILD_BUILD_VERSION
  15. fi
  16. -if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
  17. - TIMESTAMP=`date`
  18. +if [ -z "$KBUILD_BUILD_VERSION_TIMESTAMP" ]; then
  19. + if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
  20. + TIMESTAMP=`date`
  21. + else
  22. + TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
  23. + fi
  24. else
  25. - TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
  26. + TIMESTAMP=$KBUILD_BUILD_VERSION_TIMESTAMP
  27. fi
  28. if test -z "$KBUILD_BUILD_USER"; then
  29. LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')