#991928 grub2: reproducible builds: embeds different strings depending on (obscure) locales

Package:
src:grub2
Source:
grub2
Submitter:
Vagrant Cascadian
Date:
2024-10-22 10:09:01 UTC
Severity:
minor
Tags:
#991928#5
Date:
2021-08-05 22:11:02 UTC
From:
To:
Some locales (e.g. potentially obscure locales used by reprotest) may
cause sort order issues in embedded strings in some of the grub-*.bin
binaries.


The attached patch fixes this by exporting LC_ALL=C.UTF-8 from
debian/rules.


There are still several other outstanding issues affecting the
reproducibility of grub2, but this should help reduce the differences to
troubleshoot the remaining issues.


Thanks for maintaining grub2!


live well,
  vagrant

#991928#10
Date:
2024-10-19 14:18:56 UTC
From:
To:
Dear Maintainer, Vagrant,

I'm not 100% confident, but I believe that this bug may have been fixed upstream
as part of a subsequent release.  I don't find any clearly locale-related
differences when comparing the current output of the comparative builds[1] of
grub2 in the Reproducible Builds test infrastructure for Debian.

The upstream commit that I think is the most likely candidate to have fixed
the problem is this one:

http://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=f42266a8a2a4215e4ffe419b8092bdf9ced33e8e

...but I haven't tested / confirmed that.

Regards,
James

[1] - https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/grub2.html

#991928#15
Date:
2024-10-20 02:40:27 UTC
From:
To:
I would be very pleasantly surprised...

The locales tested in the test infrastructure do not trigger the issue.

Current versions of reprotest no longer randomizes locales and defaults
to testing using the et_EE.UTF-8 locale (which also does not trigger the
issue), but I seem to recall one of these *not* UTF-8 locales that was
the trigger:

  ru_RU.CP1251 kk_KZ.RK1048

Current reprotest allows specifying the locale to test:

  reprotest --vary=+locales,locales.locale=kk_KZ.RK1048


With all those caveats, this is definitely a very minor issue (even
moreso than when originally filed due to changes in reprotest), although
easily worked around by always specifying the C.UTF-8 locale from
debian/rules.

That seems only related to the C or C.UTF-8 locales, so seems unlikely
to fix the issue...


live well,
  vagrant

#991928#20
Date:
2024-10-22 10:06:44 UTC
From:
To:
On Sun, Oct 20, 2024, 03:40 Vagrant Cascadian < vagrant@reproducible-builds.org> wrote:

Ok, that likely explains it.  I'll run the reprotest variations you
suggested (ideally both without, and then with, the patch applied) soon to
confirm that.

Thanks!
James