Closed d1on closed 2 months ago
I am facing the same issue too.
❯ distrobox-upgrade bluefin-cli
Upgrading bluefin-cli...
/sbin/su-exec
distrobox: Installing basic packages...
/usr/local/bin/xdg-open
BusyBox v1.36.1 (2024-03-27 13:51:06 UTC) multi-call binary.
Usage: su [-lmp] [-s SH] [-] [USER [FILE ARGS | -c 'CMD' [ARG0 ARGS]]]
Run shell under USER (by default, root)
-,-l Clear environment, go to home dir, run shell as login shell
-p,-m Do not set new $HOME, $SHELL, $USER, $LOGNAME
-c CMD Command to pass to 'sh -c'
-s SH Shell to use instead of user's default
distrobox: Setting up devpts mounts...
distrobox: Setting up read-only mounts...
distrobox: Setting up read-write mounts...
/usr/bin/entrypoint: line 1465: container_user_name: parameter not set
Error: An error occurred
su-exec: -S: No such file or directory
The cause of the issue seems to be the following: Via pull request https://github.com/ublue-os/toolboxes/pull/34 (and subsequent minor edits), the following lines were introduced to Containerfile.bluefin-cli
# Patch /usr/bin/entrypoint
RUN sed -i '/missing_packages=0/,/# Set SHELL to the install path inside the container/ s/^/#/' /usr/bin/entrypoint && \
sed -i '/# Set SHELL to the install path inside the container/a touch /.containersetupdone' /usr/bin/entrypoint
As a consequence of this, the script entrypoint
loses the ability to perform entrypoint --upgrade
, since the relevant lines are now commented out. Since distrobox-upgrade
calls entrypoint --upgrade
under the hood, this lead to the above problem.
I don't fully understand the scope of pull request https://github.com/ublue-os/toolboxes/pull/34, so I will need some clarification from @castrojo who initiated that pull request.
As far as I can tell, a container fails to start without internet only if you provide --additional-packages
to install. Perhaps we can provide a strong warning if --additional-packages
is provided, rather than comment the whole block out? I'd be happy to make a pull request.
Yeah that might work, or just skip it if there's additional packages.
(Thought this would be ublue-update related but it's not moving back lol)
Yeah, we can remove the additional packages from our quadlets.
Thank you for the quick pull request to resolve this issue! Sadly, @m2Giles https://github.com/ublue-os/toolboxes/pull/74 is breaking the ability to start the container without internet.
I had previously assumed the only thing preventing the container from starting without internet was --additional-packages
. However, I was wrong. The bluefin-cli
image does not have the packages man
and pinentry
. When /usr/bin/entrypoint
executes the following lines
for dep in ${dependencies}; do
! command -v "${dep}" > /dev/null && missing_packages=1 && break
done
missing_packages
causes all the dependencies to be reinstalled, even if we don't provide any --additional-packages
. This prevents the container from starting without internet.
I propose we create a patch in /toolboxes/bluefin-cli/Containerfile.bluefin-cli
like before to prevent checking for missing packages (see https://github.com/ublue-os/toolboxes/pull/75).
An alternative fix would be to include all the dependencies listed by distrobox-init
in the bluefin-cli
image. Most of them are already present, only man
and pinentry
are missing at the moment.
If the packages are available in Wolfi we can add them to the Wolfi toolbox.
If they are not available, the check is just seeing if a command of that name exists so maybe a dummy command will work instead.
The package man
is available as man-db
in Wolfi, so it can be added to the toolbox.
pinentry
is not available in Wolfi. Creating the dummy command sounds like a great idea! I am hesitant to submit a pull request since I can't (easily) generate images from my fork, so I can't test changes directly to the toolbox image.
OK try now!
When running ujust update, the following error occurs: