Skip to content

Instantly share code, notes, and snippets.

@lamby
Created June 24, 2016 22:18
Show Gist options
  • Save lamby/dfcd18bdf8542a6b72598303817093d0 to your computer and use it in GitHub Desktop.
Save lamby/dfcd18bdf8542a6b72598303817093d0 to your computer and use it in GitHub Desktop.
--- a/debian/patches/0003-Reproducible-build.patch 1970-01-01 02:00:00.000000000 +0200
--- b/debian/patches/0003-Reproducible-build.patch 2016-06-24 20:23:11.977415867 +0200
@@ -0,0 +1,23 @@
+--- ipxe-1.0.0+git-20150424.a25a16d.orig/src/Makefile.housekeeping
++++ ipxe-1.0.0+git-20150424.a25a16d/src/Makefile.housekeeping
+@@ -1075,11 +1075,19 @@ blib : $(BLIB)
+ # Command to generate build ID. Must be unique for each $(BIN)/%.tmp,
+ # even within the same build run.
+ #
+-BUILD_ID_CMD := perl -e 'printf "0x%08x", int ( rand ( 0xffffffff ) );'
++ifdef SOURCE_DATE_EPOCH
++BUILD_ID_CMD := echo $$SOURCE_DATE_EPOCH
++else
++BUILD_ID_CMD := perl -e 'printf "0x%08x", int ( rand ( 0xffffffff ) );'
++endif
+
+ # Build timestamp
+ #
++ifdef SOURCE_DATE_EPOCH
++BUILD_TIMESTAMP := $(SOURCE_DATE_EPOCH)
++else
+ BUILD_TIMESTAMP := $(shell date +%s)
++endif
+
+ # Build version
+ #
--- a/debian/patches/series 2016-06-24 19:42:51.575705401 +0200
--- b/debian/patches/series 2016-06-24 20:23:39.589663543 +0200
@@ -1,2 +1,3 @@
0001-rom-change-banner-timeout.diff.patch
0002-Don-t-use-libiberty.patch
+0003-Reproducible-build.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment