diff --git a/distrobox-generate-entry b/distrobox-generate-entry
index ece8123c..ed204301 100755
--- a/distrobox-generate-entry
+++ b/distrobox-generate-entry
@@ -302,6 +302,7 @@ if [ "${icon}" = "auto" ]; then
DISTRO_ICON_MAP="
alma:https://raw.githubusercontent.com/89luca89/distrobox/main/docs/assets/png/distros/alma-distrobox.png
alpine:https://raw.githubusercontent.com/89luca89/distrobox/main/docs/assets/png/distros/alpine-distrobox.png
+ alt:https://raw.githubusercontent.com/89luca89/distrobox/main/docs/assets/png/distros/alt-distrobox.png
arch:https://raw.githubusercontent.com/89luca89/distrobox/main/docs/assets/png/distros/arch-distrobox.png
centos:https://raw.githubusercontent.com/89luca89/distrobox/main/docs/assets/png/distros/centos-distrobox.png
clear--os:https://raw.githubusercontent.com/89luca89/distrobox/main/docs/assets/png/distros/clear-distrobox.png
diff --git a/distrobox-init b/distrobox-init
index 6d6e0a30..af010139 100755
--- a/distrobox-init
+++ b/distrobox-init
@@ -847,6 +847,128 @@ setup_apt()
fi
}
+# setup_aptrpm will upgrade or setup all packages for apt-get and rpm based systems.
+# Arguments:
+# None
+# Expected global variables:
+# upgrade: if we need to upgrade or not
+# container_additional_packages: additional packages to install during this phase
+# Expected env variables:
+# None
+# Outputs:
+# None
+setup_aptrpm()
+{
+ # If we need to upgrade, do it and exit, no further action required.
+ if [ "${upgrade}" -ne 0 ]; then
+ apt-get update
+ apt-get dist-upgrade -y
+ exit
+ fi
+
+ apt-get update
+ # Check if shell_pkg is available in distro's repo. If not we
+ # fall back to bash, and we set the SHELL variable to bash so
+ # that it is set up correctly for the user.
+ if ! apt-get install -y "${shell_pkg}"; then
+ shell_pkg="bash"
+ fi
+ deps="
+ ${shell_pkg}
+ apt-repo-tools
+ apt-rsync
+ bash-completion
+ bc
+ bzip2
+ curl
+ cracklib
+ dialog
+ diffutils
+ findutils
+ fontconfig
+ gettext
+ glibc
+ glibc-i18ndata
+ gnupg
+ gnupg2
+ iconv
+ iproute2
+ iputils
+ keyutils
+ less
+ libcap
+ libEGL
+ libGL
+ libkrb5
+ libnss-mdns
+ libnss-myhostname
+ vte3
+ libvulkan1
+ lsof
+ man-db
+ mount
+ mtr
+ ncurses
+ openssh-clients
+ pam
+ passwd
+ pigz
+ pinentry-common
+ procps
+ su
+ sudo
+ tcpdump
+ time
+ traceroute
+ tree
+ tzdata
+ unzip
+ util-linux
+ wget
+ xauth
+ xorg-dri-intel
+ xorg-dri-radeon
+ xorg-utils
+ xz
+ zip
+ "
+ # shellcheck disable=SC2086,2046
+ apt-get install -y ${deps}
+
+ # Altlinux hooks. Without them the commands su, sudo, sudoreplay and passwd do not work
+ if command -v control; then
+ control passwd traditional
+ control sudo public
+ control sudoreplay public
+ control su wheel
+ mkdir /etc/tcb/"${container_user_name}"
+ echo "${container_user_name}::::::::" > /etc/tcb/"${container_user_name}"/shadow
+ sed -i 's/*//g' /etc/passwd
+ fi
+
+ # In case the locale is not available, install it
+ # will ensure we don't fallback to C.UTF-8
+ if [ ! -e /usr/share/i18n/charmaps ]; then
+ apt-get --reinstall install -y glibc-i18ndata iconv
+ fi
+ if ! locale -a | grep -qi en_us.utf8 || ! locale -a | grep -qi "${HOST_LOCALE}"; then
+ LANG="${HOST_LOCALE}" localedef -i "${HOST_LOCALE_LANG}" -f "${HOST_LOCALE_ENCODING}" "${HOST_LOCALE}"
+ fi
+
+ # Ensure we have tzdata installed and populated, sometimes container
+ # images blank the zoneinfo directory, so we reinstall the package to
+ # ensure population
+ if [ ! -e /usr/share/zoneinfo/UTC ]; then
+ apt-get --reinstall install -y tzdata
+ fi
+
+ # Install additional packages passed at distrbox-create time
+ if [ -n "${container_additional_packages}" ]; then
+ # shellcheck disable=SC2086
+ apt-get install -y ${container_additional_packages}
+ fi
+}
+
# setup_dnf will upgrade or setup all packages for dnf/yum based systems.
# Arguments:
# manager: yum or dnf
@@ -1650,7 +1772,11 @@ PATH="${PATH}:/bin:/sbin:/usr/bin:/usr/sbin"
# Setup pkg manager exceptions and excludes
if command -v apt-get; then
- setup_deb_exceptions
+ if command -v rpm; then
+ setup_rpm_exceptions
+ else
+ setup_deb_exceptions
+ fi
elif command -v pacman; then
setup_pacman_exceptions
elif command -v xbps-install; then
@@ -1678,7 +1804,11 @@ if [ "${upgrade}" -ne 0 ] ||
if command -v apk; then
setup_apk
elif command -v apt-get; then
- setup_apt
+ if command -v rpm; then
+ setup_aptrpm
+ else
+ setup_apt
+ fi
elif command -v emerge; then
setup_emerge
elif command -v pacman; then
diff --git a/docs/assets/png/distros/alt-distrobox.png b/docs/assets/png/distros/alt-distrobox.png
new file mode 100644
index 00000000..6f4f4f3f
Binary files /dev/null and b/docs/assets/png/distros/alt-distrobox.png differ
diff --git a/docs/compatibility.md b/docs/compatibility.md
index 99c8e156..941aeb74 100644
--- a/docs/compatibility.md
+++ b/docs/compatibility.md
@@ -118,6 +118,7 @@ Distrobox guests tested successfully with the following container images:
| Alpine (Toolbox) | 3.16
3.17
3.18
3.19
3.20
edge | quay.io/toolbx-images/alpine-toolbox:3.16
quay.io/toolbx-images/alpine-toolbox:3.17
quay.io/toolbx-images/alpine-toolbox:3.18
quay.io/toolbx-images/alpine-toolbox:3.19
quay.io/toolbx-images/alpine-toolbox:3.20
quay.io/toolbx-images/alpine-toolbox:edge
quay.io/toolbx-images/alpine-toolbox:latest |
| AmazonLinux (Toolbox) | 2
2022 | quay.io/toolbx-images/amazonlinux-toolbox:2
quay.io/toolbx-images/amazonlinux-toolbox:2023
quay.io/toolbx-images/amazonlinux-toolbox:latest |
| Archlinux (Toolbox) | | quay.io/toolbx/arch-toolbox:latest |
+| Alt Linux | p10
p11
sisyphus | docker.io/library/alt:p10
docker.io/library/alt:p11
docker.io/library/alt:sisyphus |
| Bazzite Arch | | ghcr.io/ublue-os/bazzite-arch:latest
ghcr.io/ublue-os/bazzite-arch-gnome:latest |
| Centos (Toolbox) | stream8
stream9 | quay.io/toolbx-images/centos-toolbox:stream8
quay.io/toolbx-images/centos-toolbox:stream9
quay.io/toolbx-images/centos-toolbox:latest |
| Debian (Toolbox) | 11
12
testing
unstable
| quay.io/toolbx-images/debian-toolbox:11
quay.io/toolbx-images/debian-toolbox:12
quay.io/toolbx-images/debian-toolbox:testing
quay.io/toolbx-images/debian-toolbox:unstable
quay.io/toolbx-images/debian-toolbox:latest |