[SeaBIOS] [PATCH] build: remove hardcoded timestamp

Gerd Hoffmann kraxel at redhat.com
Mon Feb 9 14:04:13 CET 2015

On Di, 2015-02-03 at 10:58 -0500, Kevin O'Connor wrote:
> On Tue, Feb 03, 2015 at 01:23:53PM +0100, Olaf Hering wrote:
> > The timestamp and hostname carries no value for the default build. If
> > its really required in special environment, or if someone is emotionally
> > attached to such strings, it is is handled by existing logic a few lines
> > above: provide your own .version file
> > 
> > Once this patch is applied it is possible to get reproducible builds of
> > Xens hvmloader.
> I've found the version information to be quite helpful when we get
> trouble reports - it helps indicate what was being run and who built
> the code (eg, distribution or local).

Well, we patch out the very same line.  Then 'echo "%{name}-%{version}-%
release" > .version' in the rpm spec file is used to set the version

That way the version string compiled into the seabios binary matches the
rpm package version, which is alot more useful than the build timestamp
from a distribution point of view.

Using $(hostname) to see who built it isn't that great either.  It may
require insider knowledge to be useful.  For example the prebuilt bios
binaries in the upstram qemu git repo carry nilsson.home.kraxel.org
because that happens to be the machine I'm doing the builds on.  Not
exactly obvious.

> During development cycles, it
> helps verify that test runs are executed with the expected code.

I've found the 'git --describe' used when building from a git tree being
good enough for this, I almost never look at the timestamp.

> What breaks if the version changes?

Build twice from same source tree, diff binaries, figure they are not


More information about the SeaBIOS mailing list