Notes for grub2 - reproducible builds result

Version annotated: 2.02~beta2-23
Identified issues:
Identifier: captures_build_path
Description Captures build path, e.g., /build/1st/foo-42.0 v. /build/foo-42.0/2nd
.
Until early 2024 we varied the build path when testing packages from unstable
and experimental, which we have stopped doing now as the build path is recorded
as part of the environment and thus can be used when rebuilding.
.
This issue is kept here for the time being.
.
This issue is only for miscellaneous issues which need individual fixes,
please create new issues for specific issues, e.g. gcc_captures_build_path.
.
Here follows some general tips for packages using the standard GNU toolchain:
.
If using autoconf, make sure you call ./configure via a relative and not absolute path.
.
If your issue is related to using the `__FILE__` macro, or the recording of
--debug-prefix-map flags in non-GCC non-debugging output, this is what is
fixed by our patch mentioned above; you should not need to fix it
specifically in your package.
.
For more background information see:
.
• https://alioth-lists.debian.net/pipermail/reproducible-builds/Week-of-Mon-20160822/006788.html
• https://alioth-lists.debian.net/pipermail/reproducible-builds/Week-of-Mon-20160905/006984.html
• https://alioth-lists.debian.net/pipermail/reproducible-builds/Week-of-Mon-20160912/007076.html
Identifier: captures_shell_variable_in_autofoo_script
Description Something looking like autotools is capturing SHELL for use at
runtime, which should probably be fixed to /bin/sh anyway.
.
Autotools also capturing the build path.
Identifier: user_hostname_manually_added_requiring_further_investigation
Description Packages which intentionally capture the username or hostname into a custom format,
but aren't obviously using any tool or system which has this as a core issue.
Interesting because they could be fixed by fixing these things at build time.
Bugs noted: 787795+: "grub2: please build rescue ISO and floppy reproducibly"
991926+: "grub2: reproducible builds: timestamps in info pages"
991927+: "grub2: reproducible builds: embeds /bin/sh or /bin/bash depending on /bin/sh symlink"
991928+: "grub2: reproducible builds: embeds different strings depending on (obscure) locales"
Comments: Username embedded in grub-i386-xen.bin and qemu/grub.bin.
Timestamps embedded in .iso, .img and .info files.
 

Our notes about issues affecting packages are stored in notes.git and are targeted at packages in Debian in 'unstable/amd64' (unless they say otherwise).