[Bug]: Entrypoint crashes on Void Linux if host uses Fish shell (package name mismatch)
Describe the bug
When creating a Void Linux container on a host machine that uses the Fish shell, distrobox-init crashes due to a package name mismatch.
This happens because Distrobox attempts to install the host's shell using the package name fish. In the Void Linux xbps repository, the package is actually named fish-shell. The installation fails, but at the end of the init script, Distrobox still asserts command -v fish. This returns 127, causing a fatal error and preventing the /.containersetupdone file from being written.
Because the setup is never marked as "done", the container gets stuck in a crash loop on subsequent attempts to start and enter it.
To Reproduce
- Host OS uses the
fishshell as the default user shell. - Container OS: Void Linux (
ghcr.io/void-linux/void-glibc-full:latestor musl). - Distrobox version: 1.8.2.5
- Podman version: 5.8.2
- Create the container:
distrobox create -n void_test -i ghcr.io/void-linux/void-glibc-full:latest - Enter the container:
distrobox enter void_test - The first entry attempt runs the init script, which fails to install
fish. - Stop the container.
- Try to start and enter the container again. It will permanently throw an "Error: An error occurred" and lock the user out because the setup script continually fails at the
command -v fishcheck.
Expected behavior
Distrobox should ideally have an xbps package exception that maps the host shell fish to the package fish-shell for Void Linux. Alternatively, if a custom host shell fails to install, the entrypoint should gracefully fallback to /bin/bash instead of crashing entirely on the command -v check.
Logs
Here is the scrubbed trace showing the failure. First, xbps fails to find fish:
+ xbps-install -Syu xbps
[*] Updating repository `[https://repo-default.voidlinux.org/current/x86_64-repodata](https://repo-default.voidlinux.org/current/x86_64-repodata)' ...
Package 'xbps' is up to date.
+ xbps-install -Sy fish
ERROR: Package 'fish' not found in repository pool.
The script successfully falls back to installing bash and other base packages. However, at the very end of the entrypoint, it crashes here:
+ [ ! -e /.containersetupdone ]
+ command -v fish
+ SHELL=
+ [ 127 -ne 0 ]
+ printf 'Error: An error occurred\n'
Error: An error occurred
Desktop
Host OS Opensuse Tumbleweed
podman 5.8.2
Distrobox 1.8.2.5Source: 89luca89/distrobox