qemu/roms-Makefile-pass-a-packaging-timestamp.patch
Bruce Rogers 0f796dd004 Accepting request 730437 from Virtualization:Staging
Update to v4.1.0. Also includes other major packaging changes as follows:
There is a new package maintenance workflow - see README.PACKAGING for details.
The sibling packages qemu-linux-user and qemu-testsuite are now created with the Build Service's MultiBuild feature. This also necessitates combining the qemu-linux-user changelog content back into qemu's. Luckily the delta there is quite small. Note that the qemu spec file is now that much busier, but added section markers should help reduce the confusion. Also qemu is being enabled for RISCV host compatibility, so some changes are related to that as well.

OBS-URL: https://build.opensuse.org/request/show/730437
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=487
2019-09-12 15:54:03 +00:00

73 lines
2.5 KiB
Diff

From: Bruce Rogers <brogers@suse.com>
Date: Sat, 19 Nov 2016 08:06:30 -0700
Subject: roms/Makefile: pass a packaging timestamp to subpackages with date
info
References: bsc#1011213
Certain rom subpackages build from qemu git-submodules call the date
program to include date information in the packaged binaries. This
causes repeated builds of the package to be different, wkere the only
real difference is due to the fact that time build timestamp has
changed. To promote reproducible builds and avoid customers being
prompted to update packages needlessly, we'll use the timestamp of the
VERSION file as the packaging timestamp for all packages that build in a
timestamp for whatever reason.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
roms/Makefile | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/roms/Makefile b/roms/Makefile
index 775c963f9dd55bfa17772afb73f4..6efeb1ef7c38fb71556b762d6bf1 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -51,6 +51,12 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
#
EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
+# NB: Certain SUSE qemu subpackages use date information, but we want
+# reproducible builds, so we use a pre-determined timestamp, rather
+# than the current timestamp to acheive consistent results build to
+# build.
+PACKAGING_TIMESTAMP = $(shell date -r ../VERSION +%s)
+
default:
@echo "nothing is build by default"
@echo "available build targets:"
@@ -99,7 +105,7 @@ build-seabios-config-%: config.%
.PHONY: sgabios skiboot
sgabios:
- $(MAKE) -C sgabios
+ $(MAKE) -C sgabios PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP)
cp sgabios/sgabios.bin ../pc-bios
@@ -119,11 +125,13 @@ efi-rom-%: build-pxe-roms build-efi-roms edk2-basetools
build-pxe-roms:
$(MAKE) -C ipxe/src CONFIG=qemu \
+ PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP) \
CROSS_COMPILE=$(x86_64_cross_prefix) \
$(patsubst %,bin/%.rom,$(pxerom_targets))
build-efi-roms: build-pxe-roms
$(MAKE) -C ipxe/src CONFIG=qemu \
+ PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP) \
CROSS_COMPILE=$(x86_64_cross_prefix) \
$(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \
$(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets))
@@ -145,7 +153,9 @@ edk2-basetools:
EXTRA_LDFLAGS='$(EDK2_BASETOOLS_LDFLAGS)'
slof:
- $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu
+ $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) \
+ PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP) \
+ qemu
cp SLOF/boot_rom.bin ../pc-bios/slof.bin
u-boot.e500: