SHA256
1
0
forked from pool/qemu

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
This commit is contained in:
Olaf Hering 2016-11-16 19:50:57 +00:00 committed by Git OBS Bridge
parent c297246f46
commit 2e9c4a4658
5 changed files with 77 additions and 0 deletions

13
ipxe-stable-buildid.patch Normal file
View File

@ -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
#

View File

@ -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 Mon Nov 7 16:14:15 UTC 2016 - afaerber@suse.de

View File

@ -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 Mon Nov 7 16:14:15 UTC 2016 - afaerber@suse.de

View File

@ -130,6 +130,7 @@ Patch0040: 0040-linux-user-remove-all-traces-of-qem.patch
# Please do not add QEMU patches manually here. # Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue. # Run update_git.sh to regenerate this queue.
Patch999: ipxe-stable-buildid.patch
%if %{build_x86_fw_from_source} %if %{build_x86_fw_from_source}
# SeaBIOS # SeaBIOS
# PATCH-FIX-OPENSUSE seabios_128kb.patch brogers@suse.com -- make it fit # 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 %patch0039 -p1
%patch0040 -p1 %patch0040 -p1
%patch999 -p1
%if %{build_x86_fw_from_source} %if %{build_x86_fw_from_source}
pushd roms/seabios pushd roms/seabios
%patch1000 -p1 %patch1000 -p1
@ -768,6 +770,22 @@ rm -f pc-bios/slof.bin
%endif %endif
%build %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 \ ./configure \
--prefix=%_prefix \ --prefix=%_prefix \
--sysconfdir=%_sysconfdir \ --sysconfdir=%_sysconfdir \
@ -937,6 +955,13 @@ make %{?_smp_mflags} -C roms pxerom
%ifarch x86_64 %ifarch x86_64
make %{?_smp_mflags} -C roms efirom make %{?_smp_mflags} -C roms efirom
%endif %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 make -C roms sgabios
%endif %endif
%if %{build_slof_from_source} %if %{build_slof_from_source}

View File

@ -91,6 +91,7 @@ PATCH_FILES
# Please do not add QEMU patches manually here. # Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue. # Run update_git.sh to regenerate this queue.
Patch999: ipxe-stable-buildid.patch
%if %{build_x86_fw_from_source} %if %{build_x86_fw_from_source}
# SeaBIOS # SeaBIOS
# PATCH-FIX-OPENSUSE seabios_128kb.patch brogers@suse.com -- make it fit # 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 %setup -q -n qemu-2.7.0
PATCH_EXEC PATCH_EXEC
%patch999 -p1
%if %{build_x86_fw_from_source} %if %{build_x86_fw_from_source}
pushd roms/seabios pushd roms/seabios
%patch1000 -p1 %patch1000 -p1
@ -691,6 +693,22 @@ rm -f pc-bios/slof.bin
%endif %endif
%build %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 \ ./configure \
--prefix=%_prefix \ --prefix=%_prefix \
--sysconfdir=%_sysconfdir \ --sysconfdir=%_sysconfdir \
@ -861,6 +879,13 @@ make %{?_smp_mflags} -C roms pxerom
%ifarch x86_64 %ifarch x86_64
make %{?_smp_mflags} -C roms efirom make %{?_smp_mflags} -C roms efirom
%endif %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 make -C roms sgabios
%endif %endif
%if %{build_slof_from_source} %if %{build_slof_from_source}