Skip to content

Conversation

@kanavin
Copy link
Contributor

@kanavin kanavin commented Mar 31, 2025

Sort the order of the module lists from configure_mods.sh since otherwise the result isn't the same leading to makefile differences, and breaks build reproducibility.

Reported upstream: #88

Sort the order of the module lists from configure_mods.sh since otherwise
the result isn't the same leading to makefile differences, and breaks
build reproducibility.

Reported upstream: arsv#88
@arsv
Copy link
Owner

arsv commented Apr 14, 2025 via email

@kanavin
Copy link
Contributor Author

kanavin commented May 2, 2025

What's the setup where it's not getting sorted right? The way it is written now, the order depends on shell pattern expansion and bash is explicitly stated to sort that in the docs. For dash, it is not documented but it seems to sort the expanded list as well. I suspect the real fix there is the LANG=C part, but then it just needs to be moved before ./configure in the calling script, that's a good idea anyway. And the rest is just irrelevant.

bash and dash do sort the shell pattern, but they do it differently. E.g. bash:

$ echo ext/*
ext/Amiga-ARexx ext/Amiga-Exec ext/attributes ext/B ext/Devel-Peek ext/DynaLoader ext/Errno ext/ExtUtils-Miniperl ext/Fcntl ext/FileCache ext/File-DosGlob ext/File-Find ext/File-Glob ext/GDBM_File ext/Hash-Util ext/Hash-Util-FieldHash ext/I18N-Langinfo ext/IPC-Open3 ext/mro ext/NDBM_File ext/ODBM_File ext/Opcode ext/PerlIO-encoding ext/PerlIO-mmap ext/PerlIO-scalar ext/PerlIO-via ext/Pod-Functions ext/Pod-Html ext/POSIX ext/re ext/SDBM_File ext/Sys-Hostname ext/Tie-Hash-NamedCapture ext/Tie-Memoize ext/VMS-DCLsym ext/VMS-Filespec ext/VMS-Stdio ext/Win32CORE ext/XS-APItest ext/XS-Typemap

and dash:

$ echo ext/*
ext/Amiga-ARexx ext/Amiga-Exec ext/B ext/Devel-Peek ext/DynaLoader ext/Errno ext/ExtUtils-Miniperl ext/Fcntl ext/File-DosGlob ext/File-Find ext/File-Glob ext/FileCache ext/GDBM_File ext/Hash-Util ext/Hash-Util-FieldHash ext/I18N-Langinfo ext/IPC-Open3 ext/NDBM_File ext/ODBM_File ext/Opcode ext/POSIX ext/PerlIO-encoding ext/PerlIO-mmap ext/PerlIO-scalar ext/PerlIO-via ext/Pod-Functions ext/Pod-Html ext/SDBM_File ext/Sys-Hostname ext/Tie-Hash-NamedCapture ext/Tie-Memoize ext/VMS-DCLsym ext/VMS-Filespec ext/VMS-Stdio ext/Win32CORE ext/XS-APItest ext/XS-Typemap ext/attributes ext/mro ext/re

Somehow we (yocto project) ended up carrying two different fixes for this issue (this PR and #155 ), when one would be sufficient: either pin the shell to bash, or explicitly sort the output with external tools after the fact. But the key issue is in configure_mods.sh extdir():

extdir() {
        for i in $1/*; do
...

Probably should be fixed at this point somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants