89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
9.41k stars 384 forks source link

[Error] initful ubuntu container doesn't source files in /etc/profile.d #1428

Closed acrispino closed 2 weeks ago

acrispino commented 1 month ago

I am using an initful Ubuntu-22.04 container on Fedora 40 Silverblue with podman 5.0.3. After upgrading from 1.7.1.0 to 1.7.2.1, scripts under /etc/profile.d/ are no longer being sourced upon distrobox enter.

# Works in both 1.7.2.1 and 1.7.1.0
$ distrobox create -i quay.io/toolbx/ubuntu-toolbox:22.04 --additional-packages gawk
$ distrobox enter ubuntu-toolbox-22-04
# ...
$ gawkpath_default # from /etc/profile.d/gawk.sh
$ env | grep AWK
AWKPATH=.:/usr/share/awk
# Works in 1.7.1.0, not in 1.7.2.0 or 1.7.2.1
$ distrobox create -i quay.io/toolbx/ubuntu-toolbox:22.04 --additional-packages gawk --init
$ distrobox enter ubuntu-toolbox-22-04
# ...
$ gawkpath_default
gawkpath_default: command not found

The relevant commit seems to be 5ea3d17

89luca89 commented 2 weeks ago

Thanks @acrispino for reporting this indeed was a regression and prompted me to find a nice solution for non-posix shells :)

thanks!