Integrate Particle-OS tools into simple-cli
Some checks failed
Build Simple CLI / build (push) Failing after 1s
Some checks failed
Build Simple CLI / build (push) Failing after 1s
- Add apt-ostree, deb-bootupd, and bootc packages to tools/ - Update Containerfile to install Particle-OS tools with dependencies - Add tool verification script and updated welcome message - Update justfile with new build and test recipes - Add comprehensive tool testing and bootable image generation - Successfully integrate 2/3 tools (apt-ostree and bootupd working) - Note: bootc package contains only documentation, not binary Ready for bootable image generation and QEMU testing!
This commit is contained in:
parent
6aa6d32e1e
commit
9e9d4ea8d2
19 changed files with 1603 additions and 130 deletions
15
etc/containers/toolbox.conf
Normal file
15
etc/containers/toolbox.conf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[general]
|
||||
# Debian-specific toolbox configuration for Simple-CLI
|
||||
# Use Debian as the default container image
|
||||
image = "debian:trixie"
|
||||
|
||||
# Enable host filesystem access
|
||||
[containers]
|
||||
mounts = ["/home:/home:rslave", "/var/home:/var/home:rslave"]
|
||||
|
||||
# Debian-specific settings
|
||||
[containers.debian]
|
||||
# Use Debian package manager
|
||||
package_manager = "apt"
|
||||
# Default shell
|
||||
shell = "/bin/bash"
|
||||
28
etc/distrobox/docker.ini
Normal file
28
etc/distrobox/docker.ini
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
[distrobox]
|
||||
# Distrobox configuration for Docker backend
|
||||
# Based on Bazzite's configuration
|
||||
|
||||
# Default container image
|
||||
image = "debian:trixie"
|
||||
|
||||
# Container settings
|
||||
container_name = "distrobox-{name}"
|
||||
container_user = "root"
|
||||
container_home_path = "/home"
|
||||
container_init = "systemd"
|
||||
container_manager = "docker"
|
||||
|
||||
# Host integration
|
||||
host_home_path = "/home"
|
||||
host_etc_path = "/etc"
|
||||
host_var_path = "/var"
|
||||
host_usr_path = "/usr"
|
||||
host_run_path = "/run"
|
||||
host_proc_path = "/proc"
|
||||
host_sys_path = "/sys"
|
||||
host_dev_path = "/dev"
|
||||
host_tmp_path = "/tmp"
|
||||
|
||||
# Additional mounts
|
||||
additional_packages = []
|
||||
additional_flags = []
|
||||
31
etc/distrobox/podman.ini
Normal file
31
etc/distrobox/podman.ini
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
[distrobox]
|
||||
# Distrobox configuration for Podman backend
|
||||
# Based on Bazzite's configuration
|
||||
|
||||
# Default container image
|
||||
image = "debian:trixie"
|
||||
|
||||
# Container settings
|
||||
container_name = "distrobox-{name}"
|
||||
container_user = "root"
|
||||
container_home_path = "/home"
|
||||
container_init = "systemd"
|
||||
container_manager = "podman"
|
||||
|
||||
# Host integration
|
||||
host_home_path = "/home"
|
||||
host_etc_path = "/etc"
|
||||
host_var_path = "/var"
|
||||
host_usr_path = "/usr"
|
||||
host_run_path = "/run"
|
||||
host_proc_path = "/proc"
|
||||
host_sys_path = "/sys"
|
||||
host_dev_path = "/dev"
|
||||
host_tmp_path = "/tmp"
|
||||
|
||||
# Additional mounts
|
||||
additional_packages = []
|
||||
additional_flags = []
|
||||
|
||||
# Podman-specific settings
|
||||
podman_flags = ["--userns=keep-id", "--annotation=run.oci.keep_original_groups=1"]
|
||||
111
etc/profile.d/toolbox.sh
Normal file
111
etc/profile.d/toolbox.sh
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
# shellcheck shell=sh
|
||||
|
||||
# shellcheck disable=SC2153
|
||||
[ "${BASH_VERSION:-}" != "" ] || [ "${ZSH_VERSION:-}" != "" ] || return 0
|
||||
[ "$PS1" != "" ] || return 0
|
||||
|
||||
toolbox_config="$HOME/.config/toolbox"
|
||||
host_welcome_stub="$toolbox_config/host-welcome-shown"
|
||||
toolbox_welcome_stub="$toolbox_config/toolbox-welcome-shown"
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
# shellcheck disable=SC2046
|
||||
eval $(
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
else
|
||||
. /usr/lib/os-release
|
||||
fi
|
||||
|
||||
echo ID="$ID"
|
||||
echo PRETTY_NAME="\"$PRETTY_NAME\""
|
||||
echo VARIANT_ID="$VARIANT_ID"
|
||||
)
|
||||
|
||||
if [ -f /run/ostree-booted ] \
|
||||
&& ! [ -f "$host_welcome_stub" ] \
|
||||
&& [ "${ID}" = "debian" ] \
|
||||
&& { [ "${VARIANT_ID}" = "particle-os" ] || [ "${VARIANT_ID}" = "simple-cli" ]; }; then
|
||||
|
||||
echo ""
|
||||
echo "Welcome to ${PRETTY_NAME:-Particle-OS}."
|
||||
echo ""
|
||||
echo "This terminal is running on the host system. You may want to try"
|
||||
echo "out the Toolbox for a directly mutable environment that allows "
|
||||
echo "package installation with APT."
|
||||
echo ""
|
||||
printf "For more information, see the "
|
||||
# shellcheck disable=SC1003
|
||||
printf '\033]8;;https://containertoolbx.org/\033\\documentation\033]8;;\033\\'
|
||||
|
||||
printf ".\n"
|
||||
echo ""
|
||||
|
||||
mkdir -p "$toolbox_config"
|
||||
touch "$host_welcome_stub"
|
||||
fi
|
||||
|
||||
if [ -f /run/.containerenv ] \
|
||||
&& [ -f /run/.toolboxenv ]; then
|
||||
[ "${BASH_VERSION:-}" != "" ] && PS1=$(printf "\[\033[35m\]⬢\[\033[0m\]%s" "[\u@\h \W]\\$ ")
|
||||
|
||||
[ "${ZSH_VERSION:-}" != "" ] && PS1=$(printf "\033[35m⬢\033[0m%s" "[%n@%m]%~%# ")
|
||||
|
||||
if ! [ -f "$toolbox_welcome_stub" ]; then
|
||||
echo ""
|
||||
echo "Welcome to the Toolbox; a container where you can install and run"
|
||||
echo "all your tools."
|
||||
echo ""
|
||||
|
||||
if [ "${ID}" = "debian" ]; then
|
||||
echo " - Use APT in the usual manner to install command line tools."
|
||||
echo " - To create a new tools container, run 'toolbox create'."
|
||||
echo ""
|
||||
printf "For more information, see the "
|
||||
# shellcheck disable=SC1003
|
||||
printf '\033]8;;https://containertoolbox.org/\033\\documentation\033]8;;\033\\'
|
||||
|
||||
printf ".\n"
|
||||
else
|
||||
echo " - To create a new tools container, run 'toolbox create'."
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
mkdir -p "$toolbox_config"
|
||||
touch "$toolbox_welcome_stub"
|
||||
fi
|
||||
|
||||
if ! [ -f /etc/profile.d/vte.sh ] && [ -z "$PROMPT_COMMAND" ] && [ "${VTE_VERSION:-0}" -ge 3405 ]; then
|
||||
|
||||
case "$TERM" in
|
||||
xterm*|vte*)
|
||||
[ -n "${BASH_VERSION:-}" ] && PROMPT_COMMAND=" "
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ "$TERM" != "" ]; then
|
||||
error_message="Error: terminfo entry not found for $TERM"
|
||||
term_without_first_character="${TERM#?}"
|
||||
term_just_first_character="${TERM%"$term_without_first_character"}"
|
||||
terminfo_sub_directory="$term_just_first_character/$TERM"
|
||||
|
||||
if [ "$TERMINFO" = "" ]; then
|
||||
! [ -e "/usr/share/terminfo/$terminfo_sub_directory" ] \
|
||||
&& ! [ -e "/lib/terminfo/$terminfo_sub_directory" ] \
|
||||
&& ! [ -e "$HOME/.terminfo/$terminfo_sub_directory" ] \
|
||||
&& echo "$error_message" >&2
|
||||
else
|
||||
! [ -e "$TERMINFO/$terminfo_sub_directory" ] \
|
||||
&& echo "$error_message" >&2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
unset ID
|
||||
unset PRETTY_NAME
|
||||
unset VARIANT_ID
|
||||
unset toolbox_config
|
||||
unset host_welcome_stub
|
||||
unset toolbox_welcome_stub
|
||||
Loading…
Add table
Add a link
Reference in a new issue