Skip to contentSkip to conversation

tools: various changes

PATCH In review Olaf Hering 3 participants 10 messages Apr 1, 2015 – Apr 14, 2015

lore
Share & tools
lore
#0 lore raw

v2 cover tools: various changes

A resend of this series, with comments addressed:
http://lists.xenproject.org/archives/html/xen-devel/2015-03/msg02645.html

* The XENSTORED_ARGS= should be fine according to IanJ

* The changes for reproducible builds are really just interesting for distro packages. Passing all the variables via a rpm spec file for example can be automated in such build environment. The current behaviour is preserved.

Please review once more and apply.

Thanks,
Olaf

Olaf Hering (4):
tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file.
INSTALL: mention variables for reproducible builds
hvmloader: add knob for fixed SMBIOS date string
hvmloader: add knob for fixed VGABIOS date string

 INSTALL                                            | 8 ++++++++
 tools/firmware/hvmloader/Makefile                  | 5 ++++-
 tools/firmware/vgabios/Makefile                    | 4 ++--
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 8 ++++++++
 4 files changed, 22 insertions(+), 3 deletions(-)
#1 lore raw

PATCH v2 1/4 tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file.

It is already used in the runlevel script and the service file.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
---
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 8 ++++++++
 1 file changed, 8 insertions(+)
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +8 -0
index c12fc8a..f0fa98d 100644
@@ -21,6 +21,14 @@
 #XENSTORED=@XENSTORED@
 
 ## Type: string
+## Default: ""
+#
+# Additional commandline arguments to start xenstored,
+# like "--trace-file /var/log/xen/xenstored-trace.log"
+# See "@sbindir@/xenstored --help" for possible options.
+XENSTORED_ARGS=
+
+## Type: string
 ## Default: Not defined, tracing off
 #
 # Log xenstored messages
#2 lore raw

PATCH v2 2/4 INSTALL: mention variables for reproducible builds

In reply to Olaf Hering

Mention two variables introduced by commit ac977f5 ("use more fixed strings to build the hypervisor").

Cc Ian Campbell <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Keir Fraser <[email protected]>
Cc Tim Deegan <[email protected]>

---
v2: adjust format for XEN_BUILD_DATE

 INSTALL | 6 ++++++
 1 file changed, 6 insertions(+)
INSTALL +6 -0
index 13d7a17..1ed44bb 100644
@@ -211,6 +211,12 @@ changed with these variables.
 XEN_WHOAMI=
 XEN_DOMAIN=
 
+Some components of xen and tools will include an unpredictable timestamp
+into the binaries. To allow reproducible builds the following variables
+can be used to provide fixed timestamps in the expected format.
+XEN_BUILD_DATE=<output of date(1)>
+XEN_BUILD_TIME=hh:mm:ss
+
 The following variables can be used to tweak some aspects of the
 hypervisor build.
 verbose=y
#4 lore raw

PATCH v2 3/4 hvmloader: add knob for fixed SMBIOS date string

In reply to Olaf Hering

To allow reproducible builds of hvmloader introduce a make variable SMBIOS_REL_DATE=mm/dd/yyyy to provide a fixed date string. Without this change the hvmloader binary changes with every rebuild.

Cc Keir Fraser <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Andrew Cooper <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
---
 INSTALL                           | 1 +
 tools/firmware/hvmloader/Makefile | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
INSTALL +1 -0
index 1ed44bb..bf412ef 100644
@@ -216,6 +216,7 @@ into the binaries. To allow reproducible builds the following variables
 can be used to provide fixed timestamps in the expected format.
 XEN_BUILD_DATE=<output of date(1)>
 XEN_BUILD_TIME=hh:mm:ss
+SMBIOS_REL_DATE=mm/dd/yyyy
 
 The following variables can be used to tweak some aspects of the
 hypervisor build.
tools/firmware/hvmloader/Makefile +4 -1
index cf967fd..34008d2 100644
@@ -26,6 +26,9 @@ SUBDIRS := acpi
 # The HVM loader is started in 32-bit mode at the address below:
 LOADADDR = 0x100000
 
+# SMBIOS spec requires format mm/dd/yyyy
+SMBIOS_REL_DATE ?= $(shell date +%m/%d/%Y)
+
 CFLAGS += $(CFLAGS_xeninclude)
 
 OBJS  = hvmloader.o mp_tables.o util.o smbios.o 
@@ -88,7 +91,7 @@ all: subdirs-all
 	$(MAKE) hvmloader
 
 ovmf.o rombios.o seabios.o hvmloader.o: roms.inc
-smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(shell date +%m/%d/%Y)\""
+smbios.o: CFLAGS += -D__SMBIOS_DATE__="$(SMBIOS_REL_DATE)"
 
 hvmloader: $(OBJS) acpi/acpi.a
 	$(LD) $(LDFLAGS_DIRECT) -N -Ttext $(LOADADDR) -o hvmloader.tmp $^
#5 lore raw

PATCH v2 4/4 hvmloader: add knob for fixed VGABIOS date string

In reply to Olaf Hering

To allow reproducible builds of hvmloader introduce a make variable VGABIOS_REL_DATE="dd Mon yyyy" to provide a fixed date string. Without this change the hvmloader binary changes with every rebuild.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Wei Liu <[email protected]>
---
 INSTALL                         | 1 +
 tools/firmware/vgabios/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
INSTALL +1 -0
index bf412ef..a0f2e7b 100644
@@ -217,6 +217,7 @@ can be used to provide fixed timestamps in the expected format.
 XEN_BUILD_DATE=<output of date(1)>
 XEN_BUILD_TIME=hh:mm:ss
 SMBIOS_REL_DATE=mm/dd/yyyy
+VGABIOS_REL_DATE="dd Mon yyyy"
 
 The following variables can be used to tweak some aspects of the
 hypervisor build.
tools/firmware/vgabios/Makefile +2 -2
index 51d9e6e..3284812 100644
@@ -5,10 +5,10 @@ BCC = bcc
 AS86 = as86
 
 RELEASE = `pwd | sed "s-.*/--"`
-RELDATE = `date '+%d %b %Y'`
+VGABIOS_REL_DATE ?= `date '+%d %b %Y'`
 RELVERS = `pwd | sed "s-.*/--" | sed "s/vgabios//" | sed "s/-//"`
 
-VGABIOS_DATE = "-DVGABIOS_DATE=\"$(RELDATE)\""
+VGABIOS_DATE = "-DVGABIOS_DATE=\"$(VGABIOS_REL_DATE)\""
 
 .PHONY: all
 all: bios cirrus-bios
Acked-by on v2 4/4
#6 lore raw

Re: [PATCH 4/4] hvmloader: add knob for fixed VGABIOS date string

In reply to Olaf Hering
Quoted 7 lines · Olaf Hering

To allow reproducible builds of hvmloader introduce a make variable VGABIOS_REL_DATE="dd Mon yyyy" to provide a fixed date string. Without this change the hvmloader binary changes with every rebuild.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>

It's not clear if vgabios should be maintained by us tools folks or if it should have been taken under the hvmloader umbrella and maintained by the hypervisor folks.

I've CC-d Jan, but I'm not going to block on an ack.

Quoted 35 lines
Cc Wei Liu <[email protected]>
---
 INSTALL                         | 1 +
 tools/firmware/vgabios/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
INSTALL +1 -0
index bf412ef..a0f2e7b 100644
@@ -217,6 +217,7 @@ can be used to provide fixed timestamps in the expected format.
 XEN_BUILD_DATE=<output of date(1)>
 XEN_BUILD_TIME=hh:mm:ss
 SMBIOS_REL_DATE=mm/dd/yyyy
+VGABIOS_REL_DATE="dd Mon yyyy"
 
 The following variables can be used to tweak some aspects of the
 hypervisor build.
tools/firmware/vgabios/Makefile +2 -2
index 51d9e6e..3284812 100644
@@ -5,10 +5,10 @@ BCC = bcc
 AS86 = as86
 
 RELEASE = `pwd | sed "s-.*/--"`
-RELDATE = `date '+%d %b %Y'`
+VGABIOS_REL_DATE ?= `date '+%d %b %Y'`
 RELVERS = `pwd | sed "s-.*/--" | sed "s/vgabios//" | sed "s/-//"`
 
-VGABIOS_DATE = "-DVGABIOS_DATE=\"$(RELDATE)\""
+VGABIOS_DATE = "-DVGABIOS_DATE=\"$(VGABIOS_REL_DATE)\""
 
 .PHONY: all
 all: bios cirrus-bios
#7 lore raw

Re: [PATCH 4/4] hvmloader: add knob for fixed VGABIOS date string

In reply to Ian Campbell
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 02.04.15 at 11:45, <[email protected]> wrote:
Quoted 7 lines · Olaf Hering

To allow reproducible builds of hvmloader introduce a make variable VGABIOS_REL_DATE="dd Mon yyyy" to provide a fixed date string. Without this change the hvmloader binary changes with every rebuild.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Quoted 5 lines

It's not clear if vgabios should be maintained by us tools folks or if it should have been taken under the hvmloader umbrella and maintained by the hypervisor folks.

I'm not sure either - hvmloader is really code we grew and hence maintaining it together with its hypervisor side makes sense. For the various firmware blobs, otoh, I think they match more closely with the qemu/tools pattern.

Jan

#8 lore raw

Re: [PATCH 4/4] hvmloader: add knob for fixed VGABIOS date string

Quoted 12 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 02.04.15 at 11:45, <[email protected]> wrote:
Quoted 7 lines · Olaf Hering

To allow reproducible builds of hvmloader introduce a make variable VGABIOS_REL_DATE="dd Mon yyyy" to provide a fixed date string. Without this change the hvmloader binary changes with every rebuild.

Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Quoted 8 lines
Quoted 3 lines

It's not clear if vgabios should be maintained by us tools folks or if it should have been taken under the hvmloader umbrella and maintained by the hypervisor folks.

I'm not sure either - hvmloader is really code we grew and hence maintaining it together with its hypervisor side makes sense. For the various firmware blobs, otoh, I think they match more closely with the qemu/tools pattern.

OK, I think that makes sense.

We have specific maintainers for OVMF and SeaBIOS, I think the other stuff (rombios and vgabios) is frozen/inactive enough (and specific to qemu-trad) that we can muddle through via the tools/* umbrella maintainership.

I think ipxe is only used with trad too, but I'm not sure if it is quite so inactive or if someone ought to be keeping an eye on e.g. new upstream versions. I think we can just continue as we have been there too.

Ian.