Bug#1138611: grub2: reproducible builds: debian/platform-subst uses non-deterministic readdir
Vagrant Cascadian
vagrant at reproducible-builds.org
Mon Jun 1 06:30:34 BST 2026
Source: grub2
Severity: normal
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
The debian/platform-subst script used to generate .postinst for grub-xen
uses readdir to determine which platform to embed. The directory
ordering may not be deterministic, and can result in differences between
the resulting .postinst script. (/boot/grub/i386-xen_pvh/core.img
vs. /boot/grub/i386-xen/core.img):
https://reproduce.debian.net/amd64/api/v1/builds/153376/artifacts/383901/diffoscope
The attached patch sorts the list of platforms before picking the first
one, so it can at least pick consistently. Perhaps there is a more
elegant way to pull this off, but I believe this ought to work. :)
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-platform-subst-Use-sorted-list-of-cpu_platfor.patch
Type: text/x-diff
Size: 1778 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20260531/1b03fbd9/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20260531/1b03fbd9/attachment.sig>
More information about the Pkg-grub-devel
mailing list