Created attachment 266490 [details] [PATCH] Mk: reproducible_builds: set SOURCE_DATE_EPOCH for TIMESTAMPed ports Requesting exp-run of the patch from https://reviews.freebsd.org/D50911 (attached in this bug as well).
Created attachment 266922 [details] [PATCH v2] Mk: reproducible_builds: set SOURCE_DATE_EPOCH for TIMESTAMPed ports Attached the current revision from https://reviews.freebsd.org/D50911 that fixes more bugs.
Now that the dependent bugs have been resolved, can we get an exp-run for this change?
Ping on this, can we get an exp-run for this?
Ping once again to get an exp-run on this to ensure thorough testing. I'd like to push the patch through, since I don't think there are currently any (known) failures.
Hi, I'm an independent rebuilder dabbling in FreeBSD ports reproducibility for the past 6 months. I am currently rebuilding the ports and comparing them with upstream binary packages. I'd very much like this get scrutinized and adopted soon because it'll solve all the low hanging fruit so then the focus can move to ports that have more serious reproducibility issues other that timestamps. I considered adopting this patch and do double runs but I'm somewhat constrained with local infrastructure, having upstream reference builds is helpful. I did notice one potential issue with some of the GO ports that define this type of fallback: ...=${SOURCE_DATE_EPOCH:U${SOURCE_DATE_EPOCH_CMD:sh}}" SOURCE_DATE_EPOCH_CMD= date -ur $$(${GREP} -m1 TIMESTAMP ${DISTINFO_FILE} | ${SED} -e 's/[^0-9]//g') '+%Y-%m-%dT%H:%M:%SZ' _CMD default generates a human readable date while a defined SDE var is a Unix timestamp. This is presumably baked into the final binary. Whether the result is simply cosmetic or could cause issues I am not sure. However, I believe the original usage is already wrong because by spec SDE is supposed to be a timestamp not a human readable date, so the easiest fix is to just hunt down all the occurences and format SDE the same way as _CMD fallback does.
(In reply to cen from comment #5) Thanks for your hard work on this! Sorry for the delay, I did receive your initial email and hadn't gotten the chance to reply. I'll also look into the issue you mentioned, but at the very least, I think the attached patch should be ready to submit. It would really help to get this in the Ports tree, as there should be no blockers (failures).
Thanks for the effort, if any related issues come out of this I might be able to land a hand. Best regards
Created attachment 270389 [details] the patch
Some new failures logs: https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/kicad-10.0.1_2,2.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/kicad-devel-r20260428191158_4.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/py311-lap-0.5.13.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-a13-olinuxino-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-a64-olinuxino-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-bananapi-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-bananapi-r2-pro-2025.10_1.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-bananapim2-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-beaglebone-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-bhyve-arm64-2024.07.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-bhyve-riscv-2024.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-chip-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-clearfog-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-cubieboard-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-cubieboard2-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-cubox-hummingboard-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-firefly-rk3399-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-nanopi-neo2-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-nanopi-r2s-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-nanopi-r4s-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-nanopi-r5s-2025.10_1.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-nanopi-r6s-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-nanopi_a64-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-nanopi_m1plus-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-nanopi_neo-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-nanopi_neo_air-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-olimex-a20-som-evb-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-olinuxino-lime-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-olinuxino-lime2-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-olinuxino-lime2-emmc-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-orangepi-one-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-orangepi-pc-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-orangepi-pc-plus-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-orangepi-pc2-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-orangepi-plus-2e-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-orangepi-zero-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-orangepi-zero-plus-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-orangepi_r1-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-pcduino3-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-pine-h64-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-pine64-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-pine64-lts-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-pinebook-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-pinebookpro-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-qemu-arm-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-qemu-arm64-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-qemu-riscv64-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-quartz64-a-2025.10_1.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-quartz64-b-2025.10_1.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-radxa-zero3-2025.10_1.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-riotboard-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rock-pi-4-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rock64-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rockpro64-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rpi-0-w-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rpi-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rpi-arm64-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rpi2-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rpi3-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rpi3-32-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-rpi4-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-sifive-fu540-2025.10_1.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-sifive-fu740-2025.10_1.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-sinovoip-bpi-m3-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-sopine-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-sopine-spi-2025.10.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-starfive-visionfive2-2025.10_1.log https://pkg-status.freebsd.org/gohan06/data/150amd64-default-foo/2026-05-07_08h15m24s/logs/errors/u-boot-wandboard-2025.10.log
Analysis: 1. py-lap appears to already be fixed after commit b0b4d9e1eae890d0de1591e20fb37358439a2ff6 which bumped deps to NumPy 2.0 2. Kicad fails because it uses GNU Tar flags when SOURCE_DATE_EPOCH is set. Probable solution: add gtar:archivers/gtar to BUILD_DEPENDS 3. u-boot fails for a similar reason, tries to use GNU date flags when SOURCE_DATE_EPOCH is set. Probable solution: add gdate to BUILD_DEPENDS I am currently testing all 3 patches and can submit once done.
My attempts: https://reviews.freebsd.org/D57069 https://reviews.freebsd.org/D57077
Both patches LGTM, I think you might need to copy over the cad/kicad patch for cad/kicad-devel, but other than that, things seem fine.
Added and tested https://reviews.freebsd.org/D57248
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4f5fa1ab0b725426b54a5ce894cec6bc6368511e commit 4f5fa1ab0b725426b54a5ce894cec6bc6368511e Author: Christoph Moench-Tegeder <cmt@FreeBSD.org> AuthorDate: 2026-06-20 18:43:51 +0000 Commit: Christoph Moench-Tegeder <cmt@FreeBSD.org> CommitDate: 2026-06-20 18:49:14 +0000 cad/kicad: use GNU tar for building resources/images.tar.gz This is a prerequisite for having reproducible package builds: the archive would have to be the same across builds, and we get that by setting all file timestamps inside the archive to a fixed value (the epoch, typically) or removing the timestamps alltogether, if possible (atime and ctime). Doing this requires GNU tar, as the neccessary extensions are not available in FreeBSD's base system tar. The only affected file in this package is share/kicad/resources/images.tar.gz. PR: 291905 Differential Revision: https://reviews.freebsd.org/D57069 Reported by: cen cad/kicad/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=17e4a5c5106cb36fcb9a84b19334cb1494be8595 commit 17e4a5c5106cb36fcb9a84b19334cb1494be8595 Author: cen <cen.is.imba@gmail.com> AuthorDate: 2026-07-31 15:25:30 +0000 Commit: Siva Mahadevan <siva@FreeBSD.org> CommitDate: 2026-07-31 15:44:30 +0000 sysutils/u-boot-master: fix build with SOURCE_DATE_EPOCH set PR: 291905 Reviewed by: siva Approved by: manu (maintainer timeout) Differential Revision: https://reviews.freebsd.org/D57077 sysutils/u-boot-master/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
I think this is the last fix that's needed to clean up all the failures from the previous exp-run. For good measure, I locally re-ran 'poudriere bulk' with the failing ports from the previous exp-run and all reported failures in the review, they now all come back clean. @portmgr can we get a new exp-run to verify that everything is fixed?