Update to deb822.
This commit is contained in:
parent
fe51ae96b8
commit
ff89f12574
|
|
@ -1,51 +1,56 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
URL="download.docker.com"
|
|
||||||
VERSION_CODENAME="trixie"
|
|
||||||
|
|
||||||
# Install docker
|
# Install docker
|
||||||
set -x
|
set -x
|
||||||
# echo "deb http://apt.dockerproject.org/repo debian-stretch main" >> /etc/apt/sources.list.d/docker.list
|
# echo "deb http://apt.dockerproject.org/repo debian-stretch main" >> /etc/apt/sources.list.d/docker.list
|
||||||
|
|
||||||
|
ARCH=$(dpkg --print-architecture)
|
||||||
|
|
||||||
|
TYPES=(deb)
|
||||||
|
TRANSPORT="https:/"
|
||||||
|
URI=download.docker.com
|
||||||
|
SUITES=trixie
|
||||||
|
COMPONENTS=stable
|
||||||
|
ARCHITECTURES=(amd64)
|
||||||
#KEY_DIR=/etc/apt/trusted.gpg.d
|
#KEY_DIR=/etc/apt/trusted.gpg.d
|
||||||
KEY_DIR=/usr/share/keyrings
|
KEY_DIR=/usr/share/keyrings
|
||||||
KEY=${KEY_DIR}/docker.gpg
|
KEY=${KEY_DIR}/docker.gpg
|
||||||
sudo mkdir -p ${KEY_DIR}
|
sudo mkdir -p ${KEY_DIR}
|
||||||
KEY_URL="https://download.docker.com/linux/debian/gpg"
|
KEY_URL="${TRANSPORT}/${URI}/linux/debian/gpg"
|
||||||
sudo curl -fsSL ${KEY_URL} | sudo gpg --dearmor -o ${KEY}
|
sudo curl -fsSL ${KEY_URL} | sudo gpg --dearmor -o ${KEY}
|
||||||
sudo chmod a+r ${KEY}
|
sudo chmod a+r ${KEY}
|
||||||
|
|
||||||
ARCH=$(dpkg --print-architecture)
|
|
||||||
|
|
||||||
mkdir -p /etc/apt/sources.list-available
|
mkdir -p /etc/apt/sources.list-available
|
||||||
#cat <<-EOF | sudo tee /etc/apt/sources.list-available/docker.list
|
#cat <<-EOF | sudo tee /etc/apt/sources.list-available/docker.list
|
||||||
# deb [arch=${ARCH} signed-by=${KEY}] https://${URL}/linux/debian ${VERSION_CODENAME} stable
|
# deb [arch=${ARCH} signed-by=${KEY}] ${TRANSPORT}/${URI}/linux/debian ${VERSION_CODENAME} stable
|
||||||
#EOF
|
#EOF
|
||||||
|
|
||||||
conf_print_docker_sources() {
|
conf_print_docker_sources() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Types: deb
|
Enabled: yes
|
||||||
URIs: https://${URL}/linux/debian
|
Types: ${TYPES[*]}
|
||||||
Suites: "${VERSION_CODENAME}"
|
URIs: ${TRANSPORT}/${URI}/linux/debian
|
||||||
Components: stable
|
Suites: ${SUITES}
|
||||||
Signed-By: "${KEY}"
|
Components: ${COMPONENTS[*]}
|
||||||
|
Architectures: ${ARCHITECTURES[*]}
|
||||||
|
Signed-By: ${KEY}
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
conf_print_docker_sources | tee /etc/apt/sources.list-available/docker.sources
|
conf_print_docker_sources | sudo tee /etc/apt/sources.list-available/docker.sources
|
||||||
|
|
||||||
ln -sf /etc/apt/sources.list-available/docker.sources /etc/apt/sources.list.d/docker.sources
|
sudo ln -sf /etc/apt/sources.list-available/docker.sources /etc/apt/sources.list.d/docker.sources
|
||||||
|
|
||||||
# Bypass apt-proxy for docker packages
|
# Bypass apt-proxy for docker packages
|
||||||
if [ -f /etc/apt/apt.conf.d/02proxy ]; then
|
if [ -f /etc/apt/apt.conf.d/02proxy ]; then
|
||||||
if [ ! -z "$(grep "${URL}" /etc/apt/apt.conf.d/02proxy)" ]; then
|
if [ ! -z "$(grep "${TRANSPORT}/${URI}" /etc/apt/apt.conf.d/02proxy)" ]; then
|
||||||
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >>/etc/apt/apt.conf.d/02proxy
|
echo "Acquire::http::Proxy { \"${TRANSPORT}/${URI}\" DIRECT; };" | sudo tee /etc/apt/apt.conf.d/02proxy
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# apt update
|
# apt update
|
||||||
apt install -y --force-yes jq
|
sudo apt install -y --force-yes jq
|
||||||
apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)
|
sudo apt remove "$(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)"
|
||||||
apt install -y \
|
sudo apt install -y \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
|
|
@ -53,7 +58,7 @@ apt install -y \
|
||||||
gnupg2
|
gnupg2
|
||||||
# software-properties-common
|
# software-properties-common
|
||||||
|
|
||||||
apt install -y \
|
sudo apt install -y \
|
||||||
docker-ce \
|
docker-ce \
|
||||||
docker-ce-cli \
|
docker-ce-cli \
|
||||||
containerd.io \
|
containerd.io \
|
||||||
|
|
@ -139,7 +144,7 @@ sed -i '/^#rc_cgroup_mode=.*/ s/.*/&\nrc_cgroup_mode=\"unified\"/' /etc/rc.conf
|
||||||
for ((i = 0; i < ${#DOCKER_OPT[@]}; ++i)); do
|
for ((i = 0; i < ${#DOCKER_OPT[@]}; ++i)); do
|
||||||
OPTION="${DOCKER_OPT[$i]}"
|
OPTION="${DOCKER_OPT[$i]}"
|
||||||
jq "${OPTION}" /etc/docker/daemon.json >/tmp/daemon.json.new &&
|
jq "${OPTION}" /etc/docker/daemon.json >/tmp/daemon.json.new &&
|
||||||
mv -b /tmp/daemon.json.new /etc/docker/daemon.json
|
sudo mv -b /tmp/daemon.json.new /etc/docker/daemon.json
|
||||||
done
|
done
|
||||||
|
|
||||||
# General options
|
# General options
|
||||||
|
|
|
||||||
48
020_eza.sh
48
020_eza.sh
|
|
@ -1,24 +1,52 @@
|
||||||
|
|
||||||
# the debian package is missing the zsh completitons
|
# the debian package is missing the zsh completitons
|
||||||
# sudo apt install eza
|
# sudo apt install eza
|
||||||
|
|
||||||
DEST=${1:-/etc/skel}
|
DEST=${1:-/etc/skel}
|
||||||
|
|
||||||
KEY_DIR=/etc/apt/trusted.gpg.d
|
URL=raw.githubusercontent.com
|
||||||
sudo mkdir -p ${KEY_DIR}
|
USER=eza-community
|
||||||
|
APP="eza"
|
||||||
|
#TYPES=(deb deb-src)
|
||||||
|
TYPES=(deb)
|
||||||
|
TRANSPORT="https:/"
|
||||||
|
URI="deb.gierens.de"
|
||||||
|
SUITES="stable"
|
||||||
|
COMPONENTS=(main)
|
||||||
|
ARCHITECTURES=(amd64)
|
||||||
|
KEY_HOME=/usr/share/keyrings
|
||||||
|
KEY=${KEY_HOME}/"${USER}.gpg"
|
||||||
|
packages=(eza)
|
||||||
|
|
||||||
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o ${KEY_DIR}/gierens.gpg
|
sudo mkdir -p ${KEY_HOME}
|
||||||
|
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc \
|
||||||
|
| sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg
|
||||||
|
wget -qO- ${TRANSPORT}/${URL}/${USER}/${APP}/main/deb.asc \
|
||||||
|
| sudo gpg --dearmor -o ${KEY}
|
||||||
|
|
||||||
cat <<-EOF | sudo tee /etc/apt/sources.list-available/gierens.list
|
# echo "deb [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee /etc/apt/sources.list-available/${APP}-ppa.list
|
||||||
deb [signed-by=${KEY_DIR}/gierens.gpg] http://deb.gierens.de stable main
|
# echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee -a /etc/apt/sources.list-available/${APP}-ppa.list
|
||||||
|
|
||||||
|
conf_print_httm_sources() {
|
||||||
|
cat <<EOF
|
||||||
|
Enabled: yes
|
||||||
|
Types: ${TYPES[*]}
|
||||||
|
URIs: ${TRANSPORT}/${URI}
|
||||||
|
Suites: ${SUITES}
|
||||||
|
Components: ${COMPONENTS[*]}
|
||||||
|
Architectures: ${ARCHITECTURES[*]}
|
||||||
|
Signed-By: ${KEY}
|
||||||
EOF
|
EOF
|
||||||
|
}
|
||||||
|
conf_print_httm_sources | sudo tee /etc/apt/sources.list-available/${APP}.sources >/dev/null
|
||||||
|
sudo ln -sf /etc/apt/sources.list-available/${APP}.sources /etc/apt/sources.list.d/${APP}.sources
|
||||||
|
|
||||||
sudo ln -sf /etc/apt/sources.list-available/gierens.list /etc/apt/sources.list.d/gierens.list
|
# cat <<-EOF | sudo tee /etc/apt/sources.list-available/gierens.list
|
||||||
|
# deb [signed-by=${KEY_HOME}/gierens.gpg] http://deb.gierens.de stable main
|
||||||
|
# EOF
|
||||||
|
|
||||||
sudo chmod 644 ${KEY_DIR}/gierens.gpg /etc/apt/sources.list.d/gierens.list
|
sudo chmod 644 ${KEY}
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y eza
|
sudo apt install -y "${packages[*]}"
|
||||||
|
|
||||||
|
|
||||||
# conflicts with lsd
|
# conflicts with lsd
|
||||||
#ALIAS_FILE="${DEST}/${ALIAS_DIR}/003_eza.sh"
|
#ALIAS_FILE="${DEST}/${ALIAS_DIR}/003_eza.sh"
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,78 @@
|
||||||
RELEASE="bullseye"
|
#!/usr/bin/env bash
|
||||||
# RELEASE="bookworm"
|
|
||||||
|
|
||||||
# wget https://set-soft.github.io/debian/kibot.list -O /etc/apt/sources.list.d/kibot.list
|
# This script sets up the KiBot repository using the modern deb822 format.
|
||||||
ARCH=$(dpkg --print-architecture)
|
# Optimized for Debian (Bullseye/Bookworm) and modern security standards.
|
||||||
|
|
||||||
KEY_DIR=/etc/apt/trusted.gpg.d
|
set -e
|
||||||
KEY=${KEY_DIR}/kibot.gpg
|
|
||||||
sudo wget -O ${KEY} https://set-soft.github.io/debian/kibot.gpg
|
|
||||||
|
|
||||||
cat <<-EOF | sudo tee /etc/apt/sources.list-available/kibot.list >/dev/null
|
# --- Variables ---
|
||||||
deb [arch=${ARCH} signed-by=${KEY}] https://set-soft.github.io/debian/ ${RELEASE} main
|
APP="kibot"
|
||||||
|
RELEASE="bullseye" # Toggle to "bookworm" if needed
|
||||||
|
AVAILABLE="/etc/apt/sources.list-available"
|
||||||
|
ACTIVE="/etc/apt/sources.list.d"
|
||||||
|
KEY_HOME="/usr/share/keyrings"
|
||||||
|
KEYRING="${KEY_HOME}/kibot-archive-keyring.gpg"
|
||||||
|
GPG_KEY_URL="https://set-soft.github.io/debian/kibot.gpg"
|
||||||
|
|
||||||
|
# Repository Specifics
|
||||||
|
ENABLED="yes"
|
||||||
|
TYPES="deb"
|
||||||
|
URIS="https://set-soft.github.io/debian/"
|
||||||
|
SUITES="${RELEASE}"
|
||||||
|
COMPONENTS=(main)
|
||||||
|
# ARCHITECTURES=$(dpkg --print-architecture)
|
||||||
|
ARCHITECTURES=(amd64)
|
||||||
|
|
||||||
|
# --- Prep Work ---
|
||||||
|
echo "Installing prerequisites..."
|
||||||
|
sudo apt update && sudo apt install -y wget gpg
|
||||||
|
|
||||||
|
# --- Key Management ---
|
||||||
|
echo "Importing KiBot GPG key to ${KEYRING}..."
|
||||||
|
# Using gpg --dearmor to ensure binary format for the Signed-By field
|
||||||
|
wget -qO- "$GPG_KEY_URL" | gpg --dearmor | sudo tee "$KEYRING" >/dev/null
|
||||||
|
|
||||||
|
# --- Deb822 Configuration ---
|
||||||
|
conf_print_kibot_sources() {
|
||||||
|
cat <<EOF
|
||||||
|
Enabled: ${ENABLED}
|
||||||
|
Types: ${TYPES}
|
||||||
|
URIs: ${URIS}
|
||||||
|
Suites: ${SUITES}
|
||||||
|
Architectures: ${ARCHITECTURES[*]}
|
||||||
|
Components: ${COMPONENTS[*]}
|
||||||
|
Signed-By: ${KEYRING}
|
||||||
EOF
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
sudo ln -sf /etc/apt/sources.list-available/kibot.list /etc/apt/sources.list.d/kibot.list
|
echo "Generating deb822 source file..."
|
||||||
|
sudo mkdir -p "$AVAILABLE"
|
||||||
|
conf_print_kibot_sources | sudo tee "${AVAILABLE}/${APP}.sources" >/dev/null
|
||||||
|
|
||||||
|
# Create symbolic link to activate the repo
|
||||||
|
# Note: Using .sources extension for DEB822 compatibility
|
||||||
|
sudo ln -sf "${AVAILABLE}/${APP}.sources" "${ACTIVE}/${APP}.sources"
|
||||||
|
|
||||||
|
# --- Installation ---
|
||||||
|
echo "Updating package lists and installing KiBot and dependencies..."
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
|
||||||
sudo apt install -y kibot kicost kibom.inti-cmnb interactivehtmlbom.inti-cmnb librsvg2-bin python3-mistune kikit xcvt kidiff
|
# Install KiBot suite and utilities
|
||||||
|
sudo apt install -y \
|
||||||
|
kibot \
|
||||||
|
kicost \
|
||||||
|
kibom.inti-cmnb \
|
||||||
|
interactivehtmlbom.inti-cmnb \
|
||||||
|
librsvg2-bin \
|
||||||
|
python3-mistune \
|
||||||
|
kikit \
|
||||||
|
xcvt \
|
||||||
|
kidiff
|
||||||
|
|
||||||
# for blender export
|
# Install Blender for 3D export
|
||||||
sudo apt-get install -y blender
|
# sudo apt install -y blender
|
||||||
|
|
||||||
|
# Verify installation
|
||||||
kibot-check
|
kibot-check
|
||||||
|
|
||||||
|
echo "KiBot repository setup and installation complete."
|
||||||
|
|
|
||||||
|
|
@ -12,43 +12,57 @@
|
||||||
DEST=${1:-/etc/skel}
|
DEST=${1:-/etc/skel}
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
URL=raw.githubusercontent.com/
|
URL=raw.githubusercontent.com
|
||||||
USER=kimono-koans
|
USER=kimono-koans
|
||||||
APP="httm"
|
APP="httm"
|
||||||
|
#TYPES=(deb deb-src)
|
||||||
|
TYPES=(deb)
|
||||||
|
TRANSPORT="https:/"
|
||||||
|
URI="${URL}/${USER}/ppa/main"
|
||||||
|
SUITES="./"
|
||||||
|
COMPONENTS=()
|
||||||
|
ARCHITECTURES=(amd64)
|
||||||
KEY_HOME=/usr/share/keyrings
|
KEY_HOME=/usr/share/keyrings
|
||||||
KEY=${KEY_HOME}/"${USER}.gpg"
|
KEY=${KEY_HOME}/"${USER}.gpg"
|
||||||
packages=(httm two-percent)
|
packages=(httm two-percent fzf)
|
||||||
|
|
||||||
|
sudo mkdir -p ${KEY_HOME}
|
||||||
|
wget -qO- ${TRANSPORT}/${URI}/${USER}/${APP}/main/deb.asc | sudo gpg --dearmor -o ${KEY}
|
||||||
|
|
||||||
# echo "deb [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee /etc/apt/sources.list-available/${APP}-ppa.list
|
# echo "deb [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee /etc/apt/sources.list-available/${APP}-ppa.list
|
||||||
# echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee -a /etc/apt/sources.list-available/${APP}-ppa.list
|
# echo "deb-src [signed-by=/etc/apt/trusted.gpg.d/${KEY}] https://${URL}/${USER}/ppa/main ./" | sudo tee -a /etc/apt/sources.list-available/${APP}-ppa.list
|
||||||
|
|
||||||
conf_print_httm_sources() {
|
conf_print_httm_sources() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Types: deb deb-src
|
Enabled: yes
|
||||||
URIs: https://${URL}/${USER}/ppa/main/
|
Types: ${TYPES[*]}
|
||||||
Suites: ./
|
URIs: ${TRANSPORT}/${URI}
|
||||||
Components:
|
Suites: ${SUITES}
|
||||||
|
Components: ${COMPONENTS[*]}
|
||||||
|
Architectures: ${ARCHITECTURES[*]}
|
||||||
Signed-By: ${KEY}
|
Signed-By: ${KEY}
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
conf_print_httm_sources | sudo tee /etc/apt/sources.list-available/httm-ppa.sources >/dev/null
|
conf_print_httm_sources | sudo tee /etc/apt/sources.list-available/httm-ppa.sources >/dev/null
|
||||||
sudo ln -sf /etc/apt/sources.list-available/${APP}-ppa.list /etc/apt/sources.list.d/${APP}-ppa.list
|
sudo ln -sf /etc/apt/sources.list-available/${APP}-ppa.sources /etc/apt/sources.list.d/${APP}-ppa.sources
|
||||||
|
|
||||||
# Bypass apt-proxy for ${APP} packages
|
# Bypass apt-proxy for ${APP} packages
|
||||||
if [ -d /etc/apt/apt.conf.d/02proxy ]; then
|
PROXY_FILE="/etc/apt/apt.conf.d/02proxy"
|
||||||
if [ "$(grep -q ${URL})" ]; then
|
ENTRY="Acquire::http::Proxy { \"${URL}\" DIRECT; };"
|
||||||
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >>/etc/apt/apt.conf.d/02proxy
|
|
||||||
fi
|
echo "# Bypass apt-proxy for ${APP} packages"
|
||||||
|
|
||||||
|
# Check if the entry already exists in the file (if the file exists)
|
||||||
|
if [ -f "$PROXY_FILE" ] && grep -qF "${URL}" "$PROXY_FILE"; then
|
||||||
|
echo "Proxy bypass for ${URL} is already present."
|
||||||
else
|
else
|
||||||
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >>/etc/apt/apt.conf.d/02proxy
|
# Append the entry, or create the file if it doesn't exist
|
||||||
|
echo "$ENTRY" | sudo tee -a "$PROXY_FILE" >/dev/null
|
||||||
|
echo "Added proxy bypass for ${URL}."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# broken "moved permanently"
|
|
||||||
# curl -s --compressed https://${URL}/${USER}/ppa/main/KEY.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/${KEY} >/dev/null
|
|
||||||
curl -Ls --compressed https://${URL}/${USER}/ppa/refs/heads/main/KEY.gpg | gpg --dearmor | sudo tee ${KEY} >/dev/null
|
|
||||||
sudo apt update
|
|
||||||
|
|
||||||
sudo apt install -y --no-install-recommends "${packages[@]}"
|
sudo apt install -y --no-install-recommends "${packages[@]}"
|
||||||
|
|
||||||
# Using cargo
|
# Using cargo
|
||||||
# https://crates.io/crates/httm
|
# https://crates.io/crates/httm
|
||||||
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue