Added bubblewrap / apparmor fixes and diagnostic tools for troubleshooting it on related distros.

This commit is contained in:
2026-09-03 22:16:43 +02:00
parent ecdea827ac
commit 5be4ace6c2
9 changed files with 1039 additions and 9 deletions

View File

@@ -79,6 +79,12 @@ ptlinux_resolve_dependency_packages()
debian:openssl)
candidates=(openssl)
;;
debian:bubblewrap)
candidates=(bubblewrap)
;;
debian:apparmor)
candidates=(apparmor)
;;
fedora:python)
candidates=(python3)
;;
@@ -100,6 +106,9 @@ ptlinux_resolve_dependency_packages()
fedora:openssl)
candidates=(openssl)
;;
fedora:bubblewrap)
candidates=(bubblewrap)
;;
arch:python)
candidates=(python)
;;
@@ -121,6 +130,9 @@ ptlinux_resolve_dependency_packages()
arch:openssl)
candidates=(openssl)
;;
arch:bubblewrap)
candidates=(bubblewrap)
;;
arch:umu)
candidates=(umu-launcher)
;;
@@ -145,6 +157,9 @@ ptlinux_resolve_dependency_packages()
suse:openssl)
candidates=(openssl)
;;
suse:bubblewrap)
candidates=(bubblewrap)
;;
*)
printf 'No package mapping for %s on %s systems.\n' "$dependency" "$family" >&2
return 1
@@ -239,6 +254,18 @@ ptlinux_detect_missing_dependencies()
then
PTLINUX_MISSING_DEPENDENCIES+=(openssl)
fi
if [[ ! -x /usr/bin/bwrap ]]
then
PTLINUX_MISSING_DEPENDENCIES+=(bubblewrap)
fi
if [[ "$family" == "debian" \
&& ( "${PTLINUX_DISTRIBUTION_ID,,}" == "ubuntu" \
|| " ${PTLINUX_DISTRIBUTION_LIKE,,} " == *" ubuntu "* ) \
&& -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns \
&& ! -x /usr/sbin/apparmor_parser ]]
then
PTLINUX_MISSING_DEPENDENCIES+=(apparmor)
fi
if [[ "$family" == "arch" ]] && ! command -v umu-run >/dev/null 2>&1
then
PTLINUX_MISSING_DEPENDENCIES+=(umu)