Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package distrobox for openSUSE:Factory checked in at 2022-09-30 17:57:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/distrobox (Old) and /work/SRC/openSUSE:Factory/.distrobox.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "distrobox" Fri Sep 30 17:57:28 2022 rev:8 rq:1007027 version:1.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/distrobox/distrobox.changes 2022-09-15 22:59:51.749329246 +0200 +++ /work/SRC/openSUSE:Factory/.distrobox.new.2275/distrobox.changes 2022-09-30 17:57:44.613242083 +0200 @@ -1,0 +2,22 @@ +Thu Sep 29 11:49:23 UTC 2022 - Dario Faggioli <[email protected]> + +- Update to latest version (1.4.1) +- Patches removed: + 0001-distrobox-if-no-command-is-specified-default-to-ente.patch +- Add a bash-completion subpackage +- Changes in 1.4.1: + * completion: add bash completion support! + * create/enter: revert 52a34fb + * create: add --no-entry + * docs: update host and guest lists + * docs: redundant "else" in readme + * init: add mesa and vulkan drivers by default + * init: don't query filesystems mounted by beesd + * install-podman: update to 4.2.1 + * install-podman: install crun, it generally + works better in rootless. + * install-podman: fix default configuration + * ephemeral: do cleanup even in case of errors + * generate-entry: auto-discover curl or wget. + +------------------------------------------------------------------- Old: ---- 0001-distrobox-if-no-command-is-specified-default-to-ente.patch distrobox-1.4.0.tar.gz New: ---- distrobox-1.4.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ distrobox.spec ++++++ --- /var/tmp/diff_new_pack.SOIAVN/_old 2022-09-30 17:57:45.049243015 +0200 +++ /var/tmp/diff_new_pack.SOIAVN/_new 2022-09-30 17:57:45.053243024 +0200 @@ -1,5 +1,5 @@ # -# spec file +# spec file for package distrobox # # Copyright (c) 2022 SUSE LLC # @@ -15,23 +15,27 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + Name: distrobox -Version: 1.4.0 +Version: 1.4.1 Release: 0 Summary: Use any linux distribution inside your terminal -License: GPL-3.0 +License: GPL-3.0-only URL: https://github.com/89luca89/distrobox Source: distrobox-%{version}.tar.gz Source1: distrobox.conf # Default to distrobox-enter when just distrobox is used -Patch1: 0001-distrobox-if-no-command-is-specified-default-to-ente.patch Requires: %{_bindir}/basename Requires: %{_bindir}/find Requires: %{_bindir}/grep Requires: %{_bindir}/sed Requires: (%{_bindir}/podman or %{_bindir}/docker) -BuildRequires: hicolor-icon-theme +# Idea would be: if bash completion is already there, let's have it. If +# not, let's "only" recommend it... +Recommends: %{name}-bash-completion +Requires: (%{name}-bash-completion if bash-completion) BuildRequires: ImageMagick +BuildRequires: hicolor-icon-theme BuildArch: noarch %description @@ -41,6 +45,16 @@ allowing sharing of the HOME directory of the user, external storage, external USB devices and graphical apps (X11/Wayland), and audio. +%package bash-completion +Summary: Bash completion for %{name} +Requires: %{name} = %{version} +Requires: bash-completion +Supplements: (%{name} and bash-completion) +BuildArch: noarch + +%description bash-completion +Bash command line completion support for distrobox. + %prep %autosetup -p1 -n distrobox-%{version} @@ -90,4 +104,8 @@ %dir %{_datadir}/icons/hicolor/*x*/ %dir %{_datadir}/icons/hicolor/*x*/apps/ %{_datadir}/icons/hicolor/*/apps/terminal-distrobox-icon.png + +%files bash-completion +%{_datadir}/bash-completion/completions/%{name}* + %changelog ++++++ distrobox-1.4.0.tar.gz -> distrobox-1.4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/.github/workflows/compatibility.yml new/distrobox-1.4.1/.github/workflows/compatibility.yml --- old/distrobox-1.4.0/.github/workflows/compatibility.yml 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/.github/workflows/compatibility.yml 2022-09-16 11:42:42.000000000 +0200 @@ -38,7 +38,7 @@ # Fetch from compatibility table all the distros supported - id: check_file_changed run: | - if git diff --name-only HEAD^ HEAD | grep -v host-exec | grep -E "^distrobox|compatibility.md"; then + if git diff --name-only HEAD^ HEAD | grep -Ev "host-exec|generate-entry|ephemeral|upgrade" | grep -E "^distrobox|compatibility.md"; then echo "::set-output name=distrobox_changed::True" else echo "::set-output name=distrobox_changed::False" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/.github/workflows/main.yml new/distrobox-1.4.1/.github/workflows/main.yml --- old/distrobox-1.4.0/.github/workflows/main.yml 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/.github/workflows/main.yml 2022-09-16 11:42:42.000000000 +0200 @@ -24,7 +24,7 @@ - name: Run dash -n run: | result=0 - for file in $(find . -type f -not -path "*.git*"); do + for file in $(find . -type f -not -path "*.git*" -a -not -path "*completions*"); do if file "$file" | grep -qi shell; then echo "### Checking file $file..." dash -n $file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/completions/distrobox new/distrobox-1.4.1/completions/distrobox --- old/distrobox-1.4.0/completions/distrobox 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/completions/distrobox 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# shellcheck disable=all + +_generate_from_help() { + command=$1 + + local list cur prev totalopts opts diropts + + COMPREPLY=() + + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD - 1]}" + opts="$($command --help | sed 's|^\t||g' | grep '^--' | cut -d':' -f1 | tr '/' ' ' | tr '\n' ' ')" + totalopts="$(echo $opts | tr ' ' '|')" + diropts="-H|--home|--volume" + + if [[ ${prev} =~ ${diropts} ]]; then + COMPREPLY=($(compgen -d -- ${cur})) + return 0 + fi + + if [[ ${cur} == -* ]]; then + COMPREPLY+=($(compgen -W "${opts}" -- ${cur})) + return 0 + elif [[ ${command} != *"create"* ]] && [[ ${command} != *"ephemeral"* ]] && [[ ${command} != *"list"* ]]; then + while IFS= read -r line; do + list+="$line " + done < <(distrobox-list --no-color | tail -n+2 | awk '{print $3}') + COMPREPLY=($(compgen -W "${list}" "${cur}")) + return 0 + fi +} + +__distrobox() { + if [ "${#COMP_WORDS[@]}" == "2" ]; then + COMPREPLY=($(compgen -W "$(distrobox | tail -n+4 | xargs echo)" "${COMP_WORDS[1]}")) + elif [ "${#COMP_WORDS[@]}" -gt "2" ]; then + _generate_from_help distrobox-"${COMP_WORDS[1]}" + fi +} + +complete -F __distrobox distrobox diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/completions/distrobox-create new/distrobox-1.4.1/completions/distrobox-create --- old/distrobox-1.4.0/completions/distrobox-create 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/completions/distrobox-create 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# shellcheck disable=all + +if [ -e /usr/share/bash-completion/completions/distrobox ]; then + source /usr/share/bash-completion/completions/distrobox +fi +if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then + source "${HOME}/.local/share/bash-completion/completions/distrobox" +fi + +complete -F _generate_from_help distrobox-create diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/completions/distrobox-enter new/distrobox-1.4.1/completions/distrobox-enter --- old/distrobox-1.4.0/completions/distrobox-enter 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/completions/distrobox-enter 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# shellcheck disable=all + +if [ -e /usr/share/bash-completion/completions/distrobox ]; then + source /usr/share/bash-completion/completions/distrobox +fi +if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then + source "${HOME}/.local/share/bash-completion/completions/distrobox" +fi + +complete -F _generate_from_help distrobox-enter diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/completions/distrobox-ephemeral new/distrobox-1.4.1/completions/distrobox-ephemeral --- old/distrobox-1.4.0/completions/distrobox-ephemeral 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/completions/distrobox-ephemeral 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# shellcheck disable=all + +if [ -e /usr/share/bash-completion/completions/distrobox ]; then + source /usr/share/bash-completion/completions/distrobox +fi +if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then + source "${HOME}/.local/share/bash-completion/completions/distrobox" +fi + +complete -F _generate_from_help distrobox-ephemeral diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/completions/distrobox-generate-entry new/distrobox-1.4.1/completions/distrobox-generate-entry --- old/distrobox-1.4.0/completions/distrobox-generate-entry 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/completions/distrobox-generate-entry 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# shellcheck disable=all + +if [ -e /usr/share/bash-completion/completions/distrobox ]; then + source /usr/share/bash-completion/completions/distrobox +fi +if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then + source "${HOME}/.local/share/bash-completion/completions/distrobox" +fi + +complete -F _generate_from_help distrobox-generate-entry diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/completions/distrobox-list new/distrobox-1.4.1/completions/distrobox-list --- old/distrobox-1.4.0/completions/distrobox-list 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/completions/distrobox-list 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# shellcheck disable=all + +if [ -e /usr/share/bash-completion/completions/distrobox ]; then + source /usr/share/bash-completion/completions/distrobox +fi +if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then + source "${HOME}/.local/share/bash-completion/completions/distrobox" +fi + +complete -F _generate_from_help distrobox-list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/completions/distrobox-rm new/distrobox-1.4.1/completions/distrobox-rm --- old/distrobox-1.4.0/completions/distrobox-rm 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/completions/distrobox-rm 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# shellcheck disable=all + +if [ -e /usr/share/bash-completion/completions/distrobox ]; then + source /usr/share/bash-completion/completions/distrobox +fi +if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then + source "${HOME}/.local/share/bash-completion/completions/distrobox" +fi + +complete -F _generate_from_help distrobox-rm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/completions/distrobox-stop new/distrobox-1.4.1/completions/distrobox-stop --- old/distrobox-1.4.0/completions/distrobox-stop 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/completions/distrobox-stop 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# shellcheck disable=all + +if [ -e /usr/share/bash-completion/completions/distrobox ]; then + source /usr/share/bash-completion/completions/distrobox +fi +if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then + source "${HOME}/.local/share/bash-completion/completions/distrobox" +fi + +complete -F _generate_from_help distrobox-stop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/completions/distrobox-upgrade new/distrobox-1.4.1/completions/distrobox-upgrade --- old/distrobox-1.4.0/completions/distrobox-upgrade 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/completions/distrobox-upgrade 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# shellcheck disable=all + +if [ -e /usr/share/bash-completion/completions/distrobox ]; then + source /usr/share/bash-completion/completions/distrobox +fi +if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then + source "${HOME}/.local/share/bash-completion/completions/distrobox" +fi + +complete -F _generate_from_help distrobox-upgrade diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox new/distrobox-1.4.1/distrobox --- old/distrobox-1.4.0/distrobox 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox 2022-09-16 11:42:42.000000000 +0200 @@ -24,7 +24,7 @@ trap '[ "$?" -ne 0 ] && printf "\nAn error occurred\n"' EXIT -version="1.4.0" +version="1.4.1" # Print usage to stdout. # Arguments: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-create new/distrobox-1.4.1/distrobox-create --- old/distrobox-1.4.0/distrobox-create 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-create 2022-09-16 11:42:42.000000000 +0200 @@ -28,6 +28,7 @@ # DBX_CONTAINER_IMAGE # DBX_CONTAINER_MANAGER # DBX_CONTAINER_NAME +# DBX_CONTAINER_ENTRY # DBX_NON_INTERACTIVE # DBX_SUDO_PROGRAM @@ -49,6 +50,7 @@ container_init_hook="" container_manager="autodetect" container_manager_additional_flags="" +container_entry=1 container_name="" container_pre_init_hook="" container_user_custom_home="" @@ -60,9 +62,21 @@ dryrun=0 init=0 non_interactive=0 +# Use cd + dirname + pwd so that we do not have relative paths in mount points +# We're not using "realpath" here so that symlinks are not resolved this way +# "realpath" would break situations like Nix or similar symlink based package +# management. +distrobox_entrypoint_path="$(cd "$(dirname "${0}")" && pwd)/distrobox-init" +distrobox_export_path="$(cd "$(dirname "${0}")" && pwd)/distrobox-export" +distrobox_hostexec_path="$(cd "$(dirname "${0}")" && pwd)/distrobox-host-exec" +# In case init or export are not in the same path as create, let's search +# in PATH for them. +[ ! -e "${distrobox_entrypoint_path}" ] && distrobox_entrypoint_path="$(command -v distrobox-init)" +[ ! -e "${distrobox_export_path}" ] && distrobox_export_path="$(command -v distrobox-export)" +[ ! -e "${distrobox_hostexec_path}" ] && distrobox_hostexec_path="$(command -v distrobox-hostexec)" rootful=0 verbose=0 -version="1.4.0" +version="1.4.1" # Source configuration files, this is done in an hierarchy so local files have # priority over system defaults @@ -89,6 +103,7 @@ [ -n "${DBX_CONTAINER_IMAGE}" ] && container_image="${DBX_CONTAINER_IMAGE}" [ -n "${DBX_CONTAINER_MANAGER}" ] && container_manager="${DBX_CONTAINER_MANAGER}" [ -n "${DBX_CONTAINER_NAME}" ] && container_name="${DBX_CONTAINER_NAME}" +[ -n "${DBX_CONTAINER_ENTRY}" ] && container_entry="${DBX_CONTAINER_ENTRY}" [ -n "${DBX_NON_INTERACTIVE}" ] && non_interactive="${DBX_NON_INTERACTIVE}" [ -n "${DBX_SUDO_PROGRAM}" ] && distrobox_sudo_program="${DBX_SUDO_PROGRAM}" @@ -126,14 +141,15 @@ --clone/-c: name of the distrobox container to use as base for a new container this will be useful to either rename an existing distrobox or have multiple copies of the same environment. - --home/-H select a custom HOME directory for the container. Useful to avoid host's home littering with temp files. - --volume additional volumes to add to the container + --home/-H: select a custom HOME directory for the container. Useful to avoid host's home littering with temp files. + --volume: additional volumes to add to the container --additional-flags/-a: additional flags to pass to the container manager command - --init-hooks additional commands to execute during container initialization - --pre-init-hooks additional commands to execute prior to container initialization - --init/-I use init system (like systemd) inside the container. + --init-hooks: additional commands to execute during container initialization + --pre-init-hooks: additional commands to execute prior to container initialization + --init/-I: use init system (like systemd) inside the container. this will make host's processes not visible from within the container. --help/-h: show this message + --no-entry: do not generate a container entry in the application list --dry-run/-d: only print the container manager command generated --verbose/-v: show more verbosity --version/-V: show version @@ -162,6 +178,10 @@ printf "distrobox: %s\n" "${version}" exit 0 ;; + --no-entry) + shift + container_entry=0 + ;; -d | --dry-run) shift dryrun=1 @@ -418,6 +438,9 @@ --volume /dev:/dev:rslave --volume /sys:/sys:rslave --volume /tmp:/tmp:rslave + --volume \"${distrobox_entrypoint_path}\":/usr/bin/entrypoint:ro + --volume \"${distrobox_export_path}\":/usr/bin/distrobox-export:ro + --volume \"${distrobox_hostexec_path}\":/usr/bin/distrobox-host-exec:ro --volume \"${container_user_home}\":\"${container_user_home}\":rslave" # This fix is needed as on Selinux systems, the host's selinux sysfs directory @@ -553,6 +576,13 @@ printf "%s" "${result_command}" } +# Check that we have a complete distrobox installation or +# entrypoint and export will not work. +if [ -z "${distrobox_entrypoint_path}" ] || [ -z "${distrobox_export_path}" ]; then + printf >&2 "Error: no distrobox-init found in %s\n" "${PATH}" + exit 127 +fi + # dry run mode, just generate the command and print it. No creation. if [ "${dryrun}" -ne 0 ]; then if [ -n "${container_clone}" ]; then @@ -633,7 +663,9 @@ # We've created the box, let's also create the entry if [ "${rootful}" -eq 0 ]; then - "$(dirname "$(realpath "${0}")")/distrobox-generate-entry" "${container_name}" + if [ "${container_entry}" -ne 0 ]; then + "$(dirname "$(realpath "${0}")")/distrobox-generate-entry" "${container_name}" + fi fi exit $? fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-enter new/distrobox-1.4.1/distrobox-enter --- old/distrobox-1.4.0/distrobox-enter 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-enter 2022-09-16 11:42:42.000000000 +0200 @@ -38,15 +38,6 @@ exit 1 fi -# Finx components we need to copy inside the container. -distrobox_entrypoint_path="$(dirname "$(realpath "${0}")")/distrobox-init" -distrobox_export_path="$(dirname "$(realpath "${0}")")/distrobox-export" -distrobox_hostexec_path="$(dirname "$(realpath "${0}")")/distrobox-host-exec" -# In case init or export are not in the same path as create, let's search -# in PATH for them. -[ ! -e "${distrobox_entrypoint_path}" ] && distrobox_entrypoint_path="$(command -v distrobox-init)" -[ ! -e "${distrobox_export_path}" ] && distrobox_export_path="$(command -v distrobox-export)" -[ ! -e "${distrobox_hostexec_path}" ] && distrobox_hostexec_path="$(command -v distrobox-hostexec)" # Defaults container_command="" container_image="" @@ -67,7 +58,7 @@ rootful=0 skip_workdir=0 verbose=0 -version="1.4.0" +version="1.4.1" # Source configuration files, this is done in an hierarchy so local files have # priority over system defaults @@ -300,8 +291,8 @@ # and export them to the container. set +o xtrace # disable logging fot this snippet, or it will be too talkative. - for i in $(printenv | grep '=' | grep -Ev ' |"' | - grep -Ev '^(HOST|HOSTNAME|HOME|PATH|SHELL|XDG_.*_DIRS|^_)|`'); do + for i in $(printenv | grep '=' | grep -Ev ' |"|`|\$' | + grep -Ev '^(HOST|HOSTNAME|HOME|PATH|SHELL|XDG_.*_DIRS|^_)'); do # We filter the environment so that we do not have strange variables, # multiline or containing spaces. # We also NEED to ignore the HOME variable, as this is set at create time @@ -444,15 +435,6 @@ printf >&2 "run this command to follow along:\n\n" printf >&2 " %s logs -f %s\n\n" "${container_manager}" "${container_name}" - # IMPORTANT STEP: - # - # Before starting, ensure we copy the entrypoint, the export and the host-exec utilities. - # This approach should solve the location-dependency, on systems like NixOS, or - # If one wants to change the installation path of distrobox (eg: from /usr/bin to ~/.local/bin). - ${container_manager} cp "${distrobox_entrypoint_path}" "${container_name}":/usr/bin/entrypoint - ${container_manager} cp "${distrobox_export_path}" "${container_name}":/usr/bin/distrobox-export - ${container_manager} cp "${distrobox_hostexec_path}" "${container_name}":/usr/bin/distrobox-host-exec - log_timestamp="$(date +%FT%T.%N%:z)" ${container_manager} start "${container_name}" > /dev/null # Check if the container is going in error status earlier than the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-ephemeral new/distrobox-1.4.1/distrobox-ephemeral --- old/distrobox-1.4.0/distrobox-ephemeral 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-ephemeral 2022-09-16 11:42:42.000000000 +0200 @@ -39,7 +39,7 @@ extra_flags="" rootful=0 verbose=0 -version="1.4.0" +version="1.4.1" # Print usage to stdout. # Arguments: @@ -112,7 +112,6 @@ esac done -set -o errexit set -o nounset # set verbosity if [ "${verbose}" -ne 0 ]; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-export new/distrobox-1.4.1/distrobox-export --- old/distrobox-1.4.0/distrobox-export 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-export 2022-09-16 11:42:42.000000000 +0200 @@ -43,7 +43,7 @@ is_sudo="" rootful="" verbose=0 -version="1.4.0" +version="1.4.1" # We depend on some commands, let's be sure we have them base_dependencies="basename grep sed find" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-generate-entry new/distrobox-1.4.1/distrobox-generate-entry --- old/distrobox-1.4.0/distrobox-generate-entry 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-generate-entry 2022-09-16 11:42:42.000000000 +0200 @@ -28,7 +28,7 @@ icon="auto" icon_default="${HOME}/.local/share/icons/terminal-distrobox-icon.png" verbose=0 -version="1.4.0" +version="1.4.1" # Source configuration files, this is done in an hierarchy so local files have # priority over system defaults @@ -162,6 +162,18 @@ exit fi +if ! command -v curl > /dev/null && ! command -v wget > /dev/null; then + printf >&2 "Icon generation depends on either curl or wget\n" + printf >&2 "Fallbacking to default icon.\n" + download="null" +fi + +if command -v curl > /dev/null 2>&1; then + download="curl -sLo" +elif command -v wget > /dev/null 2>&1; then + download="wget -qO" +fi + # We depend on a container manager let's be sure we have it # First we use podman, else docker case "${container_manager}" in @@ -249,10 +261,10 @@ rm -f /tmp/"${container_name}".os-release icon_url="$(echo "${DISTRO_ICON_MAP}" | grep "${container_distro}:" | cut -d':' -f2-)" - if [ -n "${icon_url}" ]; then + if [ -n "${icon_url}" ] && [ "${download}" != "null" ]; then icon_extension="${icon_url##*.}" - if wget -c -q "${icon_url}" -O "${HOME}/.local/share/icons/distrobox/${container_distro}.${icon_extension}"; then + if ${download} - "${icon_url}" > "${HOME}/.local/share/icons/distrobox/${container_distro}.${icon_extension}"; then icon="${HOME}/.local/share/icons/distrobox/${container_distro}.${icon_extension}" else # Wget failed for some reasons. Default to generic terminal icon as declared at the beginning. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-host-exec new/distrobox-1.4.1/distrobox-host-exec --- old/distrobox-1.4.0/distrobox-host-exec 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-host-exec 2022-09-16 11:42:42.000000000 +0200 @@ -28,7 +28,7 @@ distrobox_host_exec_default_command="${SHELL:-/bin/sh}" host_spawn_version="1.2.1" verbose=0 -version="1.4.0" +version="1.4.1" # Print usage to stdout. # Arguments: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-init new/distrobox-1.4.1/distrobox-init --- old/distrobox-1.4.0/distrobox-init 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-init 2022-09-16 11:42:42.000000000 +0200 @@ -32,7 +32,7 @@ upgrade=0 pre_init_hook="" verbose=0 -version="1.4.0" +version="1.4.1" # Print usage to stdout. # Arguments: # None @@ -234,7 +234,7 @@ if [ "${upgrade}" -ne 0 ] || ! command -v find || ! command -v mount || ! command -v passwd || ! command -v sudo || ! command -v useradd || ! command -v diff || ! command -v pinentry || ! command -v wget || ! command -v curl || - ! command -v less || ! command -v bc || + ! command -v less || ! command -v bc || ! command -v time || ! command -v lsof || ! command -v "${shell_pkg}"; then # Detect the available package manager @@ -261,7 +261,9 @@ curl \ diffutils \ findutils \ + gnupg \ less \ + lsof \ ncurses \ pinentry \ procps \ @@ -270,6 +272,12 @@ util-linux \ wget \ vte3 + # These are graphics drivers for 3d applications + # shellcheck disable=SC2046 + apk add \ + $(apk search -q mesa-dri) \ + $(apk search -q mesa-vulkan) \ + vulkan-loader elif command -v apt-get; then # If we need to upgrade, do it and exit, no further action required. @@ -300,17 +308,32 @@ dialog \ diffutils \ findutils \ + gnupg2 \ less \ libnss-myhostname \ + libvte-2.9[0-9]-common \ libvte-common \ + lsof \ ncurses-base \ passwd \ pinentry-curses \ procps \ sudo \ + time \ wget \ util-linux + # These are graphics drivers for 3d applications + apt-get install -y \ + libegl1-mesa \ + libgl1-mesa-glx + # Older versions of debian/ubuntu don't have vulkan, check for it. + if apt-cache show libvulkan1 > /dev/null; then + apt-get install -y \ + libvulkan1 \ + mesa-vulkan-drivers + fi + elif command -v dnf; then # If we need to upgrade, do it and exit, no further action required. if [ "${upgrade}" -ne 0 ]; then @@ -334,18 +357,30 @@ bc \ curl \ diffutils \ + dnf-plugins-core \ findutils \ + gnupg2 \ less \ + lsof \ ncurses \ passwd \ pinentry \ procps-ng \ shadow-utils \ sudo \ + time \ util-linux \ wget \ vte-profile + # These are graphics drivers for 3d applications + if dnf list mesa-dri-drivers > /dev/null; then + dnf install -y \ + mesa-dri-drivers \ + mesa-vulkan-drivers \ + vulkan + fi + elif command -v emerge; then # 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 @@ -388,16 +423,27 @@ bc \ diffutils \ findutils \ + gnupg \ less \ + lsof \ ncurses \ passwd \ pinentry \ procps \ shadow-utils \ sudo \ + time \ wget \ + vte-profile \ util-linux - # vte-profile + + # These are graphics drivers for 3d applications + # On these very minimal images, graphics can be abstent + # from the repos, so let's ignore the error in this case. + microdnf install -y \ + mesa-dri-drivers \ + mesa-vulkan-drivers \ + vulkan || : elif command -v pacman; then # If we need to upgrade, do it and exit, no further action required. @@ -425,16 +471,26 @@ curl \ diffutils \ findutils \ + gnupg \ less \ + lsof \ ncurses \ pinentry \ procps-ng \ shadow \ sudo \ + time \ util-linux \ wget \ vte-common + # These are graphics drivers for 3d applications + pacman -Sy --noconfirm \ + mesa \ + opengl-driver \ + vulkan-intel \ + vulkan-radeon + elif command -v slackpkg; then # If we need to upgrade, do it and exit, no further action required. if [ "${upgrade}" -ne 0 ]; then @@ -455,16 +511,23 @@ curl \ diffutils \ findutils \ + gnupg2 \ less \ libvte-2 \ + lsof \ ncurses \ pinentry \ procps \ shadow \ sudo \ + time \ wget \ util-linux + # These are graphics drivers for 3d applications + yes | slackpkg install -default_answer=yes -batch=yes \ + mesa + elif command -v swupd; then # If we need to upgrade, do it and exit, no further action required. if [ "${upgrade}" -ne 0 ]; then @@ -482,6 +545,11 @@ sysadmin-basic \ wget + # These are graphics drivers for 3d applications + swupd bundle-add \ + lib-opengl \ + devpkg-Vulkan-Loader + elif command -v xbps-install; then # If we need to upgrade, do it and exit, no further action required. if [ "${upgrade}" -ne 0 ]; then @@ -503,14 +571,20 @@ curl \ diffutils \ findutils \ + gnupg2 \ less \ + lsof \ ncurses-base \ procps-ng \ shadow \ sudo \ + time \ wget \ util-linux + # These are graphics drivers for 3d applications + xbps-install -Sy mesa-dri + elif command -v yum; then # If we need to upgrade, do it and exit, no further action required. if [ "${upgrade}" -ne 0 ]; then @@ -535,17 +609,27 @@ curl \ diffutils \ findutils \ + gnupg2 \ less \ + lsof \ ncurses \ passwd \ pinentry \ procps \ shadow-utils \ sudo \ + time \ util-linux \ wget \ vte-profile + # These are graphics drivers for 3d applications + # yum distros are too old to have vulkan anyway. + if yum list mesa-dri-drivers > /dev/null; then + yum install -y \ + mesa-dri-drivers + fi + elif command -v zypper; then # If we need to upgrade, do it and exit, no further action required. if [ "${upgrade}" -ne 0 ]; then @@ -562,16 +646,27 @@ curl \ diffutils \ findutils \ + gnupg \ less \ libvte-2* \ + lsof \ ncurses \ pinentry \ procps \ shadow \ sudo \ systemd \ + time \ wget \ util-linux + + # These are graphics drivers for 3d applications + zypper install -y \ + Mesa-dri \ + libvulkan1 \ + libvulkan_intel \ + libvulkan_radeon + # In openSUSE official images, zypper is configured to ignore recommended # packages (i.e., weak dependencies). This however, results in a rather # poor out-of-the-box experience (e.g., when trying to run GUI apps). @@ -663,6 +758,7 @@ # the container or accessing docker and libvirt sockets. host_sockets="$(find /run/host/run -name 'user' \ -prune -o -name 'nscd' \ + -prune -o -name 'bees' \ -prune -o -name 'system_bus_socket' \ -prune -o -type s -print \ 2> /dev/null || :)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-list new/distrobox-1.4.1/distrobox-list --- old/distrobox-1.4.0/distrobox-list 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-list 2022-09-16 11:42:42.000000000 +0200 @@ -35,7 +35,7 @@ no_color=0 rootful=0 verbose=0 -version="1.4.0" +version="1.4.1" container_manager="autodetect" distrobox_sudo_program="sudo" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-rm new/distrobox-1.4.1/distrobox-rm --- old/distrobox-1.4.0/distrobox-rm 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-rm 2022-09-16 11:42:42.000000000 +0200 @@ -40,7 +40,7 @@ rootful=0 verbose=0 distrobox_sudo_program="sudo" -version="1.4.0" +version="1.4.1" # Source configuration files, this is done in an hierarchy so local files have # priority over system defaults diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-stop new/distrobox-1.4.1/distrobox-stop --- old/distrobox-1.4.0/distrobox-stop 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-stop 2022-09-16 11:42:42.000000000 +0200 @@ -40,7 +40,7 @@ rootful=0 verbose=0 distrobox_sudo_program="sudo" -version="1.4.0" +version="1.4.1" # Source configuration files, this is done in an hierarchy so local files have # priority over system defaults diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/distrobox-upgrade new/distrobox-1.4.1/distrobox-upgrade --- old/distrobox-1.4.0/distrobox-upgrade 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/distrobox-upgrade 2022-09-16 11:42:42.000000000 +0200 @@ -33,7 +33,7 @@ distrobox_sudo_program="sudo" rootful=0 verbose=0 -version="1.4.0" +version="1.4.1" # Source configuration files, this is done in an hierarchy so local files have # priority over system defaults diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/docs/README.md new/distrobox-1.4.1/docs/README.md --- old/distrobox-1.4.0/docs/README.md 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/docs/README.md 2022-09-16 11:42:42.000000000 +0200 @@ -158,7 +158,7 @@ ## Why - Provide a mutable environment on an immutable OS, like [Endless OS, - Fedora Silverblue, OpenSUSE MicroOS](compatibility.md#host-distros) or [SteamOS3](compatibility.md#install-podman-in-a-static-manner) + Fedora Silverblue, OpenSUSE MicroOS](compatibility.md#host-distros) or [SteamOS3](posts/install_rootless.md) - Provide a locally privileged environment for sudoless setups (eg. company-provided laptops, security reasons, etc...) - To mix and match a stable base system (eg. Debian Stable, Ubuntu LTS, RedHat) @@ -270,6 +270,7 @@ container_image="registry.opensuse.org/opensuse/toolbox:latest" container_manager="docker" container_name="test-name-1" +container_entry=0 non_interactive="1" skip_workdir="0" ``` @@ -281,6 +282,7 @@ - DBX_CONTAINER_IMAGE - DBX_CONTAINER_MANAGER - DBX_CONTAINER_NAME +- DBX_CONTAINER_ENTRY - DBX_NON_INTERACTIVE - DBX_SKIP_WORKDIR @@ -297,13 +299,15 @@ [alcir](https://github.com/alcir), [dfaggioli](https://github.com/dfaggioli), [AtilaSaraiva](https://github.com/AtilaSaraiva), [michel-slm](https://github.com/michel-slm) +You can also [follow the guide to install in a rootless manner](posts/install_rootless.md) + ## Alternative methods Here is a list of alternative ways to install distrobox ### Curl -Else, if you like to live your life dangerously, or you want the latest release, +If you like to live your life dangerously, or you want the latest release, you can trust me and simply run this in your terminal: ```sh @@ -328,6 +332,9 @@ curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --next --prefix ~/.local ``` +> **Warning** +> Remember to add prefix-path-you-choose/bin to your PATH, to make it work. + ### Git Alternatively you can clone the project using `git clone` or using the latest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/docs/compatibility.md new/distrobox-1.4.1/docs/compatibility.md --- old/distrobox-1.4.0/docs/compatibility.md 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/docs/compatibility.md 2022-09-16 11:42:42.000000000 +0200 @@ -52,7 +52,7 @@ | Alpine Linux | 3.14 <br> 3.15 | To setup rootless podman, look [HERE](https://wiki.alpinelinux.org/wiki/Podman) | | Arch Linux | | `distrobox` and `distrobox-git` are available in AUR (thanks [M0Rf30](https://github.com/M0Rf30)!). <br> To setup rootless podman, look [HERE](https://wiki.archlinux.org/title/Podman) | | CentOS | 8 <br> 8 Stream <br> 9 Stream | `distrobox` is available in epel repos. (thanks [alcir](https://github.com/alcir)!) | -| Debian | 11 <br> Testing <br> Unstable | `distrobox` is available in default repos in `unstable` (thanks [michel-slm!](https://github.com/michel-slm!)!) | +| Debian | 11 <br> Testing <br> Unstable | `distrobox` is available in default repos in `testing` and `unstable` (thanks [michel-slm!](https://github.com/michel-slm!)!) | | EndlessOS | 4.0.0 | | | Fedora Silverblue/Kinoite | 35 <br> 36 <br> Rawhide | `distrobox` is available in default repos.(thanks [alcir](https://github.com/alcir)!) | | Fedora | 35 <br> 36 <br> Rawhide | `distrobox` is available in default repos.(thanks [alcir](https://github.com/alcir)!) | @@ -62,15 +62,15 @@ | OpenSUSE | Leap 15.4 <br> Leap 15.3 <br> Leap 15.2 | Packages are available [here](https://software.opensuse.org/download/package?package=distrobox&project=home%3Adfaggioli%3Amicroos-desktop) (thanks [dfaggioli](https://github.com/dfaggioli)!).<br> To install on openSUSE Leap 15, Use the following repository links in the `zypper addrepo` command: [15.4](https://download.opensuse.org/repositories/home:dfaggioli:microos-desktop/15.4/home:dfaggioli:microos-desktop.repo), [15.3](https://download.opensuse.org/repositories/home:dfaggioli:microos-desktop/15.3/home:dfaggioli:microos-desktop.repo), [15.2](https://download.opensuse.org/repositories/home:dfaggioli:microos-desktop/15.2/home:dfaggioli:microos-desktop.repo). Then: <br> `zypper refresh && zypper install distrobox`. <br> `Podman` under SUSE Leap, cannot initialize correctly the containers managed by ``distrobox`` until [this OpenSUSE bug](https://bugzilla.opensuse.org/show_bug.cgi?id=1199871) is fixed, or ``podman`` loggin is co nfigured properly. | | OpenSUSE | Tumbleweed <br> MicroOS | `distrobox` is available in default repos (thanks [dfaggioli](https://github.com/dfaggioli)!) <br> For Tumbleweed, do: `zypper install distrobox`. <br> For MicroOS, do: `pkcon install distrobox` and reboot the system. | | SUSE Linux Enterprise Server | 15 Service Pack 4 <br> 15 Service Pack 3 <br> 15 Service Pack 2 | Same procedure as the one for openSUSE (Leap, respective versions, of course). Use the following repository links in the `zypper addrepo` command: [SLE-15-SP4](https://download.opensuse.org/repositories/home:dfaggioli:microos-desktop/15.4/home:dfaggioli:microos-desktop.repo), [SLE-15-SP3](https://download.opensuse.org/repositories/home:dfaggioli:microos-desktop/15.3/home:dfaggioli:microos-desktop.repo), [SLE-15-SP4](https://download.opensuse.org/repositories/home:dfaggioli:microos-desktop/SLE_15_SP2/home:dfaggioli:microos-desktop.repo). Then: <br> `zypper refresh && zypper install distrobox`. <br> `Podman` under SUSE Leap, cannot initialize correctly the containers managed by ``distrobox`` until [this OpenSUSE bug](https://bugzilla.opensuse.org/show_bug.cgi?id=1199871) is fixed, or ``podman`` loggin is configured properly. | -| SteamOS 3 | | You can use `steamos-readonly disable` and follow `Arch Linux` instructions. This will **NOT** survive updates.<br>Else you can follow the [Install Podman in a static manner](#install-podman-in-a-static-manner) guide, this will install it in your $HOME and it will survive updates.| +| SteamOS 3 | | You can use `steamos-readonly disable` and follow `Arch Linux` instructions. This will **NOT** survive updates.<br>Alternatively you can follow the [Install Podman in a static manner](posts/install_rootless.md) guide, this will install it in your $HOME and it will survive updates.| | RedHat | 8 <br> 9 | `distrobox` is available in epel repos. (thanks [alcir](https://github.com/alcir)!) | -| Ubuntu | 18.04 <br> 20.04 <br> 21.10 | Older versions based on 20.04 or earlier may need external repos to install newer Podman and Docker releases. <br> Derivatives like Pop_OS!, Mint and Elementary OS should work the same. <br> [Now PPA available!](https://launchpad.net/~michel-slm/+archive/ubuntu/distrobox), also `distrobox` is available in default repos in `22.10` (thanks [michel-slm](https://github.com/michel-slm)!) | +| Ubuntu | 18.04 <br> 20.04 <br> 22.04 <br> 22.10 | Older versions based on 20.04 or earlier may need external repos to install newer Podman and Docker releases. <br> Derivatives like Pop_OS!, Mint and Elementary OS should work the same. <br> [Now PPA available!](https://launchpad.net/~michel-slm/+archive/ubuntu/distrobox), also `distrobox` is available in default repos in `22.10` (thanks [michel-slm](https://github.com/michel-slm)!) | | Void Linux | glibc | Systemd service export will not work. | ### Install Podman in a static manner If on your distribution (eg. SteamOS) can be difficult to install something and keep it -between reboots, then you could use this script to install `podman` in your `$HOME`. +between updates, then you could use this script to install `podman` in your `$HOME`. This has some limitations, for starters, it won't work in `rootful` mode for now, but otherwise it's working for normal use. @@ -93,6 +93,9 @@ curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/extras/install-podman | sh -s -- --prefix ~/.local --remove ``` +> **Warning** +> Remember to add ~/.local/podman/bin to your PATH, to make it work. + #### Compatibility notes If your container is not able to connect to your host xserver, make sure to @@ -158,11 +161,11 @@ | Opensuse | Leap | registry.opensuse.org/opensuse/leap:latest | | Opensuse | Tumbleweed | registry.opensuse.org/opensuse/tumbleweed:latest <br> registry.opensuse.org/opensuse/toolbox:latest | | Oracle Linux | 7 <br> 7-slim <br> 8 <br> 8-slim <br> 9 <br> 9-slim |container-registry.oracle.com/os/oraclelinux:7 <br> container-registry.oracle.com/os/oraclelinux:7-slim <br> container-registry.oracle.com/os/oraclelinux:8 <br> container-registry.oracle.com/os/oraclelinux:8-slim <br> container-registry.oracle.com/os/oraclelinux:9 <br> container-registry.oracle.com/os/oraclelinux:9-slim | -| RedHat (UBI) | 7 <br> 8 <br> 9 | registry.access.redhat.com/ubi7/ubi <br> registry.access.redhat.com/ubi7/ubi-init <br> registry.access.redhat.com/ubi7/ubi-minimal <br> registry.access.redhat.com/ubi8/ubi <br> registry.access.redhat.com/ubi8/ubi-init <br> registry.access.redhat.com/ubi8/ubi-minimal <br> registry.access.redhat.com/ubi9/ubi <br> registry.access.redhat.com/ubi9/ubi-init <br> registry.access.redhat.com/ubi9/ubi-minimal | -| Rocky Linux | 8 <br> 8-minimal | quay.io/rockylinux/rockylinux:8 <br> quay.io/rockylinux/rockylinux:8-minimal <br> quay.io/rockylinux/rockylinux:latest | +| RedHat (UBI) | 7 <br> 8 <br> 9 | registry.access.redhat.com/ubi7/ubi <br> registry.access.redhat.com/ubi7/ubi-init <br> registry.access.redhat.com/ubi8/ubi <br> registry.access.redhat.com/ubi8/ubi-init <br> registry.access.redhat.com/ubi8/ubi-minimal <br> registry.access.redhat.com/ubi9/ubi <br> registry.access.redhat.com/ubi9/ubi-init <br> registry.access.redhat.com/ubi9/ubi-minimal | +| Rocky Linux | 8 <br> 8-minimal <br> 9 | quay.io/rockylinux/rockylinux:8 <br> quay.io/rockylinux/rockylinux:8-minimal <br> quay.io/rockylinux/rockylinux:9 <br> quay.io/rockylinux/rockylinux:latest | | Scientific Linux | 7 | docker.io/library/sl:7 | | Slackware | 14.2 | docker.io/vbatts/slackware:14.2 | -| Ubuntu | 14.04 <br> 16.04 <br> 18.04 <br> 20.04 <br> 22.04 | docker.io/library/ubuntu:14.04 <br> docker.io/library/ubuntu:16.04 <br> docker.io/library/ubuntu:18.04 <br> docker.io/library/ubuntu:20.04 <br> docker.io/library/ubuntu:22.04 | +| Ubuntu | 14.04 <br> 16.04 <br> 18.04 <br> 20.04 <br> 22.04 <br> 22.10 | docker.io/library/ubuntu:14.04 <br> docker.io/library/ubuntu:16.04 <br> docker.io/library/ubuntu:18.04 <br> docker.io/library/ubuntu:20.04 <br> docker.io/library/ubuntu:22.04 | | Void Linux | | ghcr.io/void-linux/void-linux:latest-full-x86_64 <br> ghcr.io/void-linux/void-linux:latest-full-x86_64-musl | Note however that if you use a non-toolbox preconfigured image (e.g. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/docs/posts/install_rootless.md new/distrobox-1.4.1/docs/posts/install_rootless.md --- old/distrobox-1.4.0/docs/posts/install_rootless.md 1970-01-01 01:00:00.000000000 +0100 +++ new/distrobox-1.4.1/docs/posts/install_rootless.md 2022-09-16 11:42:42.000000000 +0200 @@ -0,0 +1,28 @@ +# Install on SteamOS 3 + +## Step 1 + +Installing distrobox on SteamOS is quite straightforward: + +1 - Install `distrobox` in your HOME following the `curl` instructions: [INSTALL](../README.md#curl) +2 - Add the Path you've choosen to install to your PATH (by default it's `$HOME/.local/bin`. [See here how to do it](https://www.howtogeek.com/658904/how-to-add-a-directory-to-your-path-in-linux/) + +## Step 2 + +We now need `podman` to be installed in order for `distrobox` to work. +The easiest way is to use the script to install it in HOME, so it will survive future updates: + +1 - Install `podman` in your HOME following the `curl` command: [INSTALL](../compatibility.md#install-podman-in-a-static-manner) +2 - Add the Path you've choosen to install to your PATH (by default it's `$HOME/.local/podman/bin`. [See here how to do it](https://www.howtogeek.com/658904/how-to-add-a-directory-to-your-path-in-linux/) + +## Step 3 + +On some systems, you might have to enable this command in order to have graphical applications working: [SEE THESE NOTES](../compatibility.md#compatibility-notes) + +To resolve add this line to your `~/.bashrc` or `~/.profile` or `~/.xinitrc` + + `xhost +si:localuser:$USER` + +--- + +After this, you can open a new terminal, and have Distrobox working! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/docs/usage/distrobox-create.md new/distrobox-1.4.1/docs/usage/distrobox-create.md --- old/distrobox-1.4.0/docs/usage/distrobox-create.md 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/docs/usage/distrobox-create.md 2022-09-16 11:42:42.000000000 +0200 @@ -33,6 +33,7 @@ --init/-I use init system (like systemd) inside the container. this will make host's processes not visible from within the container. --help/-h: show this message + --no-entry: do not generate a container entry in the application list --dry-run/-d: only print the container manager command generated --verbose/-v: show more verbosity --version/-V: show version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/docs/useful_tips.md new/distrobox-1.4.1/docs/useful_tips.md --- old/distrobox-1.4.0/docs/useful_tips.md 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/docs/useful_tips.md 2022-09-16 11:42:42.000000000 +0200 @@ -394,7 +394,7 @@ Use the pre-initialization hooks for this: ```shell -distrobox create -i docker.io/almalinux/8-init --init --name test --pre-init-hooks "dnf config-manager --enable powertools && dnf -y install epel-release" +distrobox create -i docker.io/almalinux/8-init --init --name test --pre-init-hooks "dnf -y install dnf-plugins-core && dnf config-manager --enable powertools && dnf -y install epel-release" ``` ```shell @@ -402,5 +402,5 @@ ``` ```shell -distrobox create -i quay.io/centos/centos:stream8 c8s --pre-init-hooks "dnf config-manager --enable powertools && dnf -y install epel-next-release" +distrobox create -i quay.io/centos/centos:stream9 c9s --pre-init-hooks "dnf -y install dnf-plugins-core && dnf config-manager --enable crb && dnf -y install epel-next-release" ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/extras/install-podman new/distrobox-1.4.1/extras/install-podman --- old/distrobox-1.4.0/extras/install-podman 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/extras/install-podman 2022-09-16 11:42:42.000000000 +0200 @@ -95,49 +95,81 @@ set -o xtrace fi +export PATH="${PATH}:${dest_path}/bin" + +## Uninstall ################################################################### + if [ "${remove}" -ne 0 ]; then + printf >&2 "\033[1;31m Resetting...\n\033[0m" "${dest_path}/bin/podman" system reset -f > /dev/null printf >&2 "\033[1;31m Removing...\n\033[0m" - rm -r "${dest_path}" "${conf_path}/containers" "${prefix}/bin/podman" + rm -r "${dest_path}" "${conf_path}/containers" printf >&2 "\033[1;31m Done.\n\033[0m" exit $? fi -printf >&2 "\033[1;31m Fetching latest podman version...\n\033[0m" +############################################################################### + +## Get crun ################################################################### + +CRUN_VERSION="1.6" +printf >&2 "\033[1;31m Fetching crun %s...\n\033[0m" "${CRUN_VERSION}" +# Download the binary to /tmp +curl -L \ + "https://github.com/containers/crun/releases/download/${CRUN_VERSION}/crun-${CRUN_VERSION}-linux-amd64" \ + -o "/tmp/crun" +chmod +x /tmp/crun + +############################################################################### + +## Get podman ################################################################### + +PODMAN_VERSION="4.2.1" +printf >&2 "\033[1;31m Fetching podman %s...\n\033[0m" "${PODMAN_VERSION}" # Using static podman bulds semplifies our lifes! Thanks to the wonderful project # https://github.com/mgoltzsche/podman-static # All credits to @mgoltzsche for the builds. -RELEASE=$(curl -s -L https://github.com/mgoltzsche/podman-static/releases/latest | - grep href | - grep podman | - grep download | - grep linux | grep amd64 | sort | tail -n 1 | cut -d'"' -f2) -printf >&2 "\033[1;31m Found %s, downloading...\n\033[0m" "${RELEASE}" - -NAME=$(echo "${RELEASE}" | rev | cut -d'/' -f1 | rev) # Download and unpack the tar in /tmp -curl -L "https://github.com/${RELEASE}" -o "/tmp/${NAME}" -printf >&2 "\033[1;31m Unpacking...\n\033[0m" -tar xf /tmp/"${NAME}" -C /tmp/ - -# Setup the config and local dirs, they are needed to make podman work -# on this particular setup -mkdir -p "${conf_path}" "${dest_path}" "${prefix}/bin" +curl -L \ + "https://github.com/mgoltzsche/podman-static/releases/download/v${PODMAN_VERSION}/podman-linux-amd64.tar.gz" \ + -o /tmp/podman-linux-amd64.tar.gz +printf >&2 "\033[1;31m Unpacking Podman...\n\033[0m" +tar xf /tmp/podman-linux-amd64.tar.gz -C /tmp/ + +############################################################################### printf >&2 "\033[1;31m Copying in %s...\n\033[0m" "${dest_path}" # Copy default config files in there +mkdir -p "${conf_path}" "${dest_path}" cp -r /tmp/podman-linux-amd64/usr/local/bin "${dest_path}" cp -r /tmp/podman-linux-amd64/usr/local/lib "${dest_path}" cp -r /tmp/podman-linux-amd64/etc/containers "${conf_path}" +mv /tmp/crun "${dest_path}/bin/crun" printf >&2 "\033[1;31m Configuring...\n\033[0m" # We need to tell podman to use those costom directories in order to make # it work from custom directories -echo "conmon_path=[ \"${dest_path}/lib/podman/conmon\" ] -static_dir = \"${dest_path}/share/podman/libpod\" -volume_path = \"${dest_path}//share/podman/volume\" -" >> "${conf_path}/containers/containers.conf" +cat << EOF > "${conf_path}/containers/containers.conf" +# See https://github.com/containers/common/blob/master/pkg/config/containers.conf +[engine] +# can be croupfs, systemd +cgroup_manager = "systemd" +# can be file, journald +events_logger="file" +exit_command_delay = 10 +# can be runc, crun +runtime = "crun" +stop_timeout = 5 +cni_plugin_dirs = [ "${dest_path}/lib/cni" ] +conmon_path=[ "${dest_path}/lib/podman/conmon" ] +helper_binaries_dir = [ "${dest_path}/lib/podman" ] +static_dir = "${dest_path}/share/podman/libpod" +volume_path = "${dest_path}/share/podman/volume" +[engine.runtimes] +crun = [ "${dest_path}/bin/crun" ] +runc = [ "${dest_path}/bin/runc" ] +EOF # Same for mouning programs sed -i "s|/var|${dest_path}|g" "${conf_path}/containers/storage.conf" @@ -146,13 +178,11 @@ printf >&2 "\033[1;31m Cleaning up...\n\033[0m" # Cleanup -rm -f /tmp/"${NAME}" -rm -rf /tmp/podman-linux-amd64/ +rm -rf /tmp/podman-linux-amd64/ /tmp/podman-linux-amd64.tar.gz /tmp/crun printf >&2 "\033[1;31m Migrating...\n\033[0m" "${dest_path}/bin/podman" system migrate -ln -sf "${dest_path}/bin/podman" "${prefix}/bin/podman" printf >&2 "Successfully installed to %s.\n" "${dest_path}" -printf >&2 "Be sure that %s is in your \$PATH environment variable for it to work.\n" "${dest_path}" +printf >&2 "Be sure that %s is in your \$PATH environment variable for it to work.\n" "${dest_path}/bin" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/install new/distrobox-1.4.1/install --- old/distrobox-1.4.0/install 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/install 2022-09-16 11:42:42.000000000 +0200 @@ -79,6 +79,7 @@ dest_path="${prefix}/bin" man_dest_path="${prefix}/share/man/man1" icon_dest_path="${prefix}/share/icons" +completion_dest_path="${prefix}/share/bash-completion/completions/" set -o errexit set -o nounset @@ -105,6 +106,11 @@ install -D -m 0644 -t "${man_dest_path}" "${file}" done fi + if [ -e "completions" ]; then + for file in completions/*; do + install -D -m 0644 -t "${completion_dest_path}" "${file}" + done + fi if [ -e terminal-distrobox-icon.png ]; then install -D -m 0644 -t "${icon_dest_path}" terminal-distrobox-icon.png fi @@ -156,6 +162,11 @@ install -D -m 0644 -t "${man_dest_path}" "${file}" done fi + if [ -e "distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')/completions/" ]; then + for file in "distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"/completions/*; do + install -D -m 0644 -t "${completion_dest_path}" "${file}" + done + fi if [ -e "distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"/terminal-distrobox-icon.png ]; then install -D -m 0644 -t "${icon_dest_path}" \ "distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"/terminal-distrobox-icon.png diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/man/man1/distrobox-compatibility.1 new/distrobox-1.4.1/man/man1/distrobox-compatibility.1 --- old/distrobox-1.4.0/man/man1/distrobox-compatibility.1 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/man/man1/distrobox-compatibility.1 2022-09-16 11:42:42.000000000 +0200 @@ -225,7 +225,6 @@ T}@T{ registry.access.redhat.com/ubi7/ubi registry.access.redhat.com/ubi7/ubi-init -registry.access.redhat.com/ubi7/ubi-minimal registry.access.redhat.com/ubi8/ubi registry.access.redhat.com/ubi8/ubi-init registry.access.redhat.com/ubi8/ubi-minimal @@ -236,10 +235,10 @@ T{ Rocky Linux T}@T{ -8 8-minimal +8 8-minimal 9 T}@T{ quay.io/rockylinux/rockylinux:8 quay.io/rockylinux/rockylinux:8-minimal -quay.io/rockylinux/rockylinux:latest +quay.io/rockylinux/rockylinux:9 quay.io/rockylinux/rockylinux:latest T} T{ Scientific Linux @@ -258,7 +257,7 @@ T{ Ubuntu T}@T{ -14.04 16.04 18.04 20.04 22.04 +14.04 16.04 18.04 20.04 22.04 22.10 T}@T{ docker.io/library/ubuntu:14.04 docker.io/library/ubuntu:16.04 docker.io/library/ubuntu:18.04 docker.io/library/ubuntu:20.04 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/man/man1/distrobox-create.1 new/distrobox-1.4.1/man/man1/distrobox-create.1 --- old/distrobox-1.4.0/man/man1/distrobox-create.1 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/man/man1/distrobox-create.1 2022-09-16 11:42:42.000000000 +0200 @@ -55,6 +55,7 @@ --init/-I use init system (like systemd) inside the container. this will make host\[aq]s processes not visible from within the container. --help/-h: show this message +--no-entry: do not generate a container entry in the application list --dry-run/-d: only print the container manager command generated --verbose/-v: show more verbosity --version/-V: show version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/man/man1/distrobox.1 new/distrobox-1.4.1/man/man1/distrobox.1 --- old/distrobox-1.4.0/man/man1/distrobox.1 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/man/man1/distrobox.1 2022-09-16 11:42:42.000000000 +0200 @@ -225,7 +225,6 @@ T}@T{ registry.access.redhat.com/ubi7/ubi registry.access.redhat.com/ubi7/ubi-init -registry.access.redhat.com/ubi7/ubi-minimal registry.access.redhat.com/ubi8/ubi registry.access.redhat.com/ubi8/ubi-init registry.access.redhat.com/ubi8/ubi-minimal @@ -236,10 +235,10 @@ T{ Rocky Linux T}@T{ -8 8-minimal +8 8-minimal 9 T}@T{ quay.io/rockylinux/rockylinux:8 quay.io/rockylinux/rockylinux:8-minimal -quay.io/rockylinux/rockylinux:latest +quay.io/rockylinux/rockylinux:9 quay.io/rockylinux/rockylinux:latest T} T{ Scientific Linux @@ -258,7 +257,7 @@ T{ Ubuntu T}@T{ -14.04 16.04 18.04 20.04 22.04 +14.04 16.04 18.04 20.04 22.04 22.10 T}@T{ docker.io/library/ubuntu:14.04 docker.io/library/ubuntu:16.04 docker.io/library/ubuntu:18.04 docker.io/library/ubuntu:20.04 @@ -365,6 +364,7 @@ --init/-I use init system (like systemd) inside the container. this will make host\[aq]s processes not visible from within the container. --help/-h: show this message +--no-entry: do not generate a container entry in the application list --dry-run/-d: only print the container manager command generated --verbose/-v: show more verbosity --version/-V: show version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distrobox-1.4.0/uninstall new/distrobox-1.4.1/uninstall --- old/distrobox-1.4.0/uninstall 2022-09-07 16:20:11.000000000 +0200 +++ new/distrobox-1.4.1/uninstall 2022-09-16 11:42:42.000000000 +0200 @@ -78,6 +78,7 @@ dest_path="${prefix}/bin" man_dest_path="${prefix}/share/man/man1" icon_dest_path="${prefix}/share/icons" +completion_dest_path="${prefix}/share/bash-completion/completions/" set -o errexit set -o nounset @@ -96,6 +97,9 @@ for file in "${man_dest_path}/distrobox"*; do [ -e "${file}" ] && rm "${file}" done +for file in "${completion_dest_path}/distrobox"*; do + [ -e "${file}" ] && rm "${file}" +done [ -e "${icon_dest_path}"/terminal-distrobox-icon.png ] && rm "${icon_dest_path}"/terminal-distrobox-icon.png [ -e "${icon_dest_path}"/distrobox ] && rm -rf "${icon_dest_path}"/distrobox
