qemu/ipxe-stable-buildid.patch
2016-11-16 19:50:57 +00:00

14 lines
575 B
Diff

--- a/roms/ipxe/src/Makefile.housekeeping
+++ b/roms/ipxe/src/Makefile.housekeeping
@@ -1074,7 +1074,9 @@ 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 ) );'
+BUILD_ID_DIR := .build_ids
+VERYCLEANUP += $(BUILD_ID_DIR)
+BUILD_ID_CMD := bash -c 'declare -i i=1 ; mkdir -p $(BUILD_ID_DIR) ; cd $(BUILD_ID_DIR) ; until mkdir "$${i}" 2>/dev/null ; do : $$(( i++ )) ; done ; printf "0x%08x" "$${i}" '
# Build timestamp
#