[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen: use more fixed strings to build the hypervisor



It is expected that repeated builds of identical sources results in
identical binaries on different hosts at different build times. This
fails for xen.gz and xen.efi because unstable strings are included in
the binaries.

In addition to existing variables use XEN_BUILD_DATE, XEN_BUILD_TIME and
XEN_BUILD_HOST to specify fixed strings during build.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Keir Fraser <keir@xxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>
---
 xen/Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 72c1313..47f003c 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -8,6 +8,9 @@ export XEN_FULLVERSION   = 
$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 
 export XEN_WHOAMI      ?= $(USER)
 export XEN_DOMAIN      ?= $(shell ([ -x /bin/dnsdomainname ] && 
/bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo 
[unknown]))
+export XEN_BUILD_DATE  ?= $(shell LC_ALL=C date)
+export XEN_BUILD_TIME  ?= $(shell LC_ALL=C date +%T)
+export XEN_BUILD_HOST  ?= $(shell hostname)
 
 export BASEDIR := $(CURDIR)
 export XEN_ROOT := $(BASEDIR)/..
@@ -126,11 +129,11 @@ delete-unfresh-files:
 
 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
 include/xen/compile.h: include/xen/compile.h.in .banner
-       @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
-           -e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \
+       @sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \
+           -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \
            -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
            -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
-           -e 's/@@hostname@@/$(shell hostname)/g' \
+           -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \
            -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head 
-1)!g' \
            -e 's/@@version@@/$(XEN_VERSION)/g' \
            -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.