From fdd27e5386a00f90266b4535ece6a71367a2f775 Mon Sep 17 00:00:00 2001 From: bobslept <38557801+bobslept@users.noreply.github.com> Date: Sat, 2 Dec 2023 20:16:37 +0100 Subject: [PATCH] feat(bluefin-cli): introduce .brew_pkgs (#703) --- just/custom.just | 10 ++++++ toolboxes/Containerfile.bluefin-cli | 5 +-- toolboxes/brew_script.bluefin-cli | 8 +++++ toolboxes/packages.bluefin-cli | 48 ++++++++++++++++++++++++++++- 4 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 toolboxes/brew_script.bluefin-cli diff --git a/just/custom.just b/just/custom.just index 16b305b7814..15bd21ec61f 100644 --- a/just/custom.just +++ b/just/custom.just @@ -23,6 +23,16 @@ aqua: printf '\n export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH"\n' printf '\n=> see https://aquaproj.github.io/docs/tutorial for more info\n' +[private] +bluefin-cli: + #!/usr/bin/env bash + if [ ! -f "${HOME}/.brew_pkgs" ]; then + echo dysk > "${HOME}/.brew_pkgs" + fi; + distrobox-create --nvidia --image ghcr.io/ublue-os/bluefin-cli:latest -n bluefin-cli -Y -a "--env BREW_PKGS=.brew_pkgs" + echo "Entering bluefin-cli" + distrobox enter bluefin-cli + # Enable Cockpit for web-based system management | https://cockpit-project.org/ cockpit: echo 'Enabling Cockpit' diff --git a/toolboxes/Containerfile.bluefin-cli b/toolboxes/Containerfile.bluefin-cli index 8a5f4b1e689..b8107f7fedd 100644 --- a/toolboxes/Containerfile.bluefin-cli +++ b/toolboxes/Containerfile.bluefin-cli @@ -1,5 +1,5 @@ FROM ghcr.io/homebrew/brew -# From https://github.com/toolbx-images/images/tree/main/ubuntu/22.04 +# From https://github.com/Homebrew/brew/pkgs/container/brew LABEL com.github.containers.toolbox="true" \ usage="This image is meant to be used with the toolbox or distrobox command" \ @@ -7,13 +7,14 @@ LABEL com.github.containers.toolbox="true" \ maintainer="jorge.castro@gmail.com" COPY ./toolboxes/packages.bluefin-cli /toolbox-packages +COPY ./toolboxes/brew_script.bluefin-cli /etc/profiles.d/brew_pkgs.sh USER root RUN apt-get update && \ apt-get upgrade -y && \ DEBIAN_FRONTEND=noninteractive apt-get -y install \ - $(cat toolbox-packages | xargs) && \ + $(cat /toolbox-packages | xargs) && \ rm -rd /var/lib/apt/lists/* RUN rm /toolbox-packages diff --git a/toolboxes/brew_script.bluefin-cli b/toolboxes/brew_script.bluefin-cli new file mode 100644 index 00000000000..f24d6ab1b88 --- /dev/null +++ b/toolboxes/brew_script.bluefin-cli @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +if [ ! -f /home/linuxbrew/.firstrun ]; then + touch /home/linuxbrew/.firstrun + # `brew update-reset` is currently needed + # because somekind of issue with brew + brew update-reset + xargs brew install < "${HOME}"/"${BREW_PKGS}" +fi diff --git a/toolboxes/packages.bluefin-cli b/toolboxes/packages.bluefin-cli index 90ab7f76ec5..c624e387a7f 100644 --- a/toolboxes/packages.bluefin-cli +++ b/toolboxes/packages.bluefin-cli @@ -1 +1,47 @@ -# Do we need anything in here? +bash +apt-utils +bash-completion +bc +bzip2 +curl +dialog +diffutils +findutils +gnupg +gnupg2 +gpgsm +hostname +iproute2 +iputils-ping +less +locales +lsof +man-db +manpages +ncurses-base +nano +openssh-client +passwd +pigz +pinentry-curses +procps +rsync +sudo +tcpdump +time +traceroute +tree +tzdata +unzip +util-linux +wget +xauth +xz-utils +zip +libgl1 +libegl1-mesa +libgl1-mesa-glx +libegl1 +libglx-mesa0 +libvulkan1 +mesa-vulkan-drivers