Source: bochs Version: 2.8+dfsg-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that bochs could not be built reproducibly: │ │ │ ├── /usr/share/bochs/BIOS-bochs-latest │ │ │ │ @@ -7548,16 +7548,16 @@ [] │ │ │ │ 0001d810: 5333 2072 6573 756d 6520 6361 6c6c 6564 S3 resume called │ │ │ │ -0001d820: 2025 7820 3078 256c 780a 0030 332f 3137 %x 0x%lx..03/17 │ │ │ │ -0001d830: 2f32 3400 4249 4f53 2042 5549 4c44 2044 /24.BIOS BUILD D │ │ │ │ +0001d820: 2025 7820 3078 256c 780a 0030 342f 3139 %x 0x%lx..04/19 │ │ │ │ +0001d830: 2f32 3500 4249 4f53 2042 5549 4c44 2044 /25.BIOS BUILD D │ │ │ │ 0001d840: 4154 453a 2025 730a 0049 4e54 3138 3a20 ATE: %s..INT18: A patch is attached that seeds this date from SOURCE_DATE_EPOCH if available. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.patch 2024-03-18 12:53:29.510214179 +0000 @@ -0,0 +1,20 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2024-03-18 + +--- bochs-2.8+dfsg.orig/bios/Makefile.in ++++ bochs-2.8+dfsg/bios/Makefile.in +@@ -47,7 +47,12 @@ LOCAL_CXXFLAGS = + + # UPSTREAM_RELEASE_DATE = $(shell grep "Updated:" ../README | sed 's/Updated://') + # BUILDDATE = `date -u -d '$(UPSTREAM_RELEASE_DATE)' '+%m/%d/%y'` +-BUILDDATE = `date -u '+%m/%d/%y'` ++DATE_FMT = +%m/%d/%y ++ifdef SOURCE_DATE_EPOCH ++BUILDDATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)") ++else ++BUILDDATE ?= $(shell date "$(DATE_FMT)") ++endif + BIOS_BUILD_DATE = "-DBIOS_BUILD_DATE=\"$(BUILDDATE)\"" + # + # -------- end configurable options -------------------------- --- a/debian/patches/series 2024-03-18 12:08:12.631304482 +0000 --- b/debian/patches/series 2024-03-18 12:53:28.550214427 +0000 @@ -7,3 +7,4 @@ cross-build-1.patch narrowing-conversions.patch instrument-stub-class.patch +reproducible-build.patch