Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chroot/bwrap fail to build automake-1.6.3 in WSL2 due to bash-2.05b globbing failure #379

Open
Googulator opened this issue Dec 28, 2023 · 3 comments

Comments

@Googulator
Copy link
Collaborator

Googulator commented Dec 28, 2023

Both chroot and bwrap builds fail in WSL2, because rm -- configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4 automake.info* fails to expand properly.

A simple testcase that shows this problem is as follows:

$ mkdir -p a/b
$ touch a/b/c
$ cd a
$ ./path/to/bad/bash -c 'echo */c'
*/c
$ bash -c 'echo */c' # system bash
b/c

bash-2.05b consistently behaves like this outside a chroot environment (even if it's run under "env -i"), but inside chroot/bwrap, it works fine - except on WSL2. IMO a proper fix would be one that makes it work outside a chroot environment as well.

@Googulator
Copy link
Collaborator Author

Googulator commented Jan 8, 2024

This might be the fix: https://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/bash205b-003

(not sure if our modern patch can read this format, but if not, it shouldn't be hard to convert to the modern format)

We might also want to add this patch: https://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/bash205b-008 (AKA shellshock)

@mid-kid
Copy link
Contributor

mid-kid commented Feb 14, 2024

I have the same issue.
Here's the relevant log: http://0x0.st/HdnG.txt

@Googulator
Copy link
Collaborator Author

As a workaround, upgrading the WSL2 kernel to linux-msft-wsl-6.6.y seems to avoid this issue.

This is not a fix, however - Bash 2.05b built using Autoconf works fine on the older kernel, the issue only occurs in Bash built via a custom makefile.

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

No branches or pull requests

2 participants