[SeaBIOS] [PATCH] build: add opt-out for timestamp and hostname

Gerd Hoffmann kraxel at redhat.com
Wed Apr 8 11:39:41 CEST 2015

For distro builds it is much more useful to fill .version with the
exact tag for the build in question, i.e. %{name}-%{version}-%{release}
in case of rpm builds, so the output can easily linked to the exact
package build.  Timestamp and buildhost don't carry much useful
information in that case, so allow to opt-out without patching the
source tree.

Keep them enabled by default so (test) builds done by normal users
continue to have them, to simplify trouble shooting on the mailing

Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
 scripts/buildversion.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/buildversion.sh b/scripts/buildversion.sh
index e5ce96c..bdbf65e 100755
--- a/scripts/buildversion.sh
+++ b/scripts/buildversion.sh
@@ -11,7 +11,14 @@ elif [ -f .version ]; then
-VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`-`hostname`"
+# add timestamp
+if test "${NO_TIMESTAMP}" = ""; then
+    VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`"
+if test "${NO_HOSTNAME}" = ""; then
+    VERSION="${VERSION}-`hostname`"
 echo "Version: ${VERSION}"
 # Build header file

More information about the SeaBIOS mailing list