[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
list.

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
 else
     VERSION="?"
 fi
-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"`"
+fi
+if test "${NO_HOSTNAME}" = ""; then
+    VERSION="${VERSION}-`hostname`"
+fi
 echo "Version: ${VERSION}"
 
 # Build header file
-- 
1.8.3.1




More information about the SeaBIOS mailing list