From 2e9c4a46582a017a9220e89370720aa9ce89b8ddb6c859f2a03b1217dc2edabd Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 16 Nov 2016 19:50:57 +0000 Subject: [PATCH] Accepting request 439866 from home:olh:branches:Virtualization - Use fixed timestamps and stable build_id in ipxe and other ROMs * Patches added: ipxe-stable-buildid.patch OBS-URL: https://build.opensuse.org/request/show/439866 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=319 --- ipxe-stable-buildid.patch | 13 +++++++++++++ qemu-testsuite.changes | 7 +++++++ qemu.changes | 7 +++++++ qemu.spec | 25 +++++++++++++++++++++++++ qemu.spec.in | 25 +++++++++++++++++++++++++ 5 files changed, 77 insertions(+) create mode 100644 ipxe-stable-buildid.patch diff --git a/ipxe-stable-buildid.patch b/ipxe-stable-buildid.patch new file mode 100644 index 00000000..4eb70dba --- /dev/null +++ b/ipxe-stable-buildid.patch @@ -0,0 +1,13 @@ +--- 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 + # diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 81d13c37..d9b5cdd4 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 11 11:11:11 UTC 2016 - ohering@suse.de + +- Use fixed timestamps and stable build_id in ipxe and other ROMs +* Patches added: + ipxe-stable-buildid.patch + ------------------------------------------------------------------- Mon Nov 7 16:14:15 UTC 2016 - afaerber@suse.de diff --git a/qemu.changes b/qemu.changes index 81d13c37..d9b5cdd4 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 11 11:11:11 UTC 2016 - ohering@suse.de + +- Use fixed timestamps and stable build_id in ipxe and other ROMs +* Patches added: + ipxe-stable-buildid.patch + ------------------------------------------------------------------- Mon Nov 7 16:14:15 UTC 2016 - afaerber@suse.de diff --git a/qemu.spec b/qemu.spec index 5968e7d4..64d0a4e7 100644 --- a/qemu.spec +++ b/qemu.spec @@ -130,6 +130,7 @@ Patch0040: 0040-linux-user-remove-all-traces-of-qem.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. +Patch999: ipxe-stable-buildid.patch %if %{build_x86_fw_from_source} # SeaBIOS # PATCH-FIX-OPENSUSE seabios_128kb.patch brogers@suse.com -- make it fit @@ -748,6 +749,7 @@ This package provides a service file for starting and stopping KSM. %patch0039 -p1 %patch0040 -p1 +%patch999 -p1 %if %{build_x86_fw_from_source} pushd roms/seabios %patch1000 -p1 @@ -768,6 +770,22 @@ rm -f pc-bios/slof.bin %endif %build +echo '%{version}' > roms/seabios/.version +mkdir .bin +pushd $_ +tee hostname <<_EOD_ +#!/bin/sh +echo hostname +_EOD_ +tee date <<_EOD_ +#!/bin/sh +exec $(type -p date) --reference="$PWD/date" --utc "\$@" +_EOD_ +touch -r ../VERSION date +chmod 00755 * +ls -l --time-style=full-iso * +export PATH="$PWD:$PATH" +popd ./configure \ --prefix=%_prefix \ --sysconfdir=%_sysconfdir \ @@ -937,6 +955,13 @@ make %{?_smp_mflags} -C roms pxerom %ifarch x86_64 make %{?_smp_mflags} -C roms efirom %endif +# relink ipxe roms, this time with a stable build_id +find roms/ipxe \( -name "*.rom" -o -name "*.tmp" \) -print -delete +make -C roms pxerom +%ifarch x86_64 +make -C roms efirom +%endif +# make -C roms sgabios %endif %if %{build_slof_from_source} diff --git a/qemu.spec.in b/qemu.spec.in index c5381f61..a1ec5c03 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -91,6 +91,7 @@ PATCH_FILES # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. +Patch999: ipxe-stable-buildid.patch %if %{build_x86_fw_from_source} # SeaBIOS # PATCH-FIX-OPENSUSE seabios_128kb.patch brogers@suse.com -- make it fit @@ -670,6 +671,7 @@ This package provides a service file for starting and stopping KSM. %setup -q -n qemu-2.7.0 PATCH_EXEC +%patch999 -p1 %if %{build_x86_fw_from_source} pushd roms/seabios %patch1000 -p1 @@ -691,6 +693,22 @@ rm -f pc-bios/slof.bin %endif %build +echo '%{version}' > roms/seabios/.version +mkdir .bin +pushd $_ +tee hostname <<_EOD_ +#!/bin/sh +echo hostname +_EOD_ +tee date <<_EOD_ +#!/bin/sh +exec $(type -p date) --reference="$PWD/date" --utc "\$@" +_EOD_ +touch -r ../VERSION date +chmod 00755 * +ls -l --time-style=full-iso * +export PATH="$PWD:$PATH" +popd ./configure \ --prefix=%_prefix \ --sysconfdir=%_sysconfdir \ @@ -861,6 +879,13 @@ make %{?_smp_mflags} -C roms pxerom %ifarch x86_64 make %{?_smp_mflags} -C roms efirom %endif +# relink ipxe roms, this time with a stable build_id +find roms/ipxe \( -name "*.rom" -o -name "*.tmp" \) -print -delete +make -C roms pxerom +%ifarch x86_64 +make -C roms efirom +%endif +# make -C roms sgabios %endif %if %{build_slof_from_source}