From ddf891909ae4bf1e275f44ac60ebe946af298b7c Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sun, 21 Jun 2020 19:38:39 +0000 Subject: [PATCH] roms/seabios-hppa: Use consistent date and remove hostname. Two issues break reproducibility; the time and hostname get embedded in the resulting seabios binary. Simply drop the hostname from the embedded version string, as it shouldn't be needed in Debian package builds. Use the SOURCE_DATE_EPOCH environment variable to set the build date rather than the current time: https://reproducible-builds.org/docs/source-date-epoch/ Gbp-Pq: Name seabios-hppa-use-consistent-date-and-remove-hostname.patch Signed-off-by: Cong Liu --- roms/seabios-hppa/scripts/buildversion.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/roms/seabios-hppa/scripts/buildversion.py b/roms/seabios-hppa/scripts/buildversion.py index 8875497cb7..390b1bbbf8 100755 --- a/roms/seabios-hppa/scripts/buildversion.py +++ b/roms/seabios-hppa/scripts/buildversion.py @@ -125,9 +125,8 @@ def main(): if not ver: ver = "?" if not cleanbuild: - btime = time.strftime("%Y%m%d_%H%M%S") - hostname = socket.gethostname() - ver = "%s-%s-%s" % (ver, btime, hostname) + btime = time.strftime("%Y%m%d_%H%M%S", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) + ver = "%s-%s" % (ver, btime) write_version(outfile, ver + options.extra, toolstr) if __name__ == '__main__':