Update to deb822.
This commit is contained in:
parent
fe51ae96b8
commit
ff89f12574
|
|
@ -1,51 +1,56 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
URL="download.docker.com"
|
||||
VERSION_CODENAME="trixie"
|
||||
|
||||
# Install docker
|
||||
set -x
|
||||
# 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=/usr/share/keyrings
|
||||
KEY=${KEY_DIR}/docker.gpg
|
||||
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 chmod a+r ${KEY}
|
||||
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
|
||||
mkdir -p /etc/apt/sources.list-available
|
||||
#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
|
||||
|
||||
conf_print_docker_sources() {
|
||||
cat <<EOF
|
||||
Types: deb
|
||||
URIs: https://${URL}/linux/debian
|
||||
Suites: "${VERSION_CODENAME}"
|
||||
Components: stable
|
||||
Signed-By: "${KEY}"
|
||||
Enabled: yes
|
||||
Types: ${TYPES[*]}
|
||||
URIs: ${TRANSPORT}/${URI}/linux/debian
|
||||
Suites: ${SUITES}
|
||||
Components: ${COMPONENTS[*]}
|
||||
Architectures: ${ARCHITECTURES[*]}
|
||||
Signed-By: ${KEY}
|
||||
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
|
||||
if [ -f /etc/apt/apt.conf.d/02proxy ]; then
|
||||
if [ ! -z "$(grep "${URL}" /etc/apt/apt.conf.d/02proxy)" ]; then
|
||||
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >>/etc/apt/apt.conf.d/02proxy
|
||||
if [ ! -z "$(grep "${TRANSPORT}/${URI}" /etc/apt/apt.conf.d/02proxy)" ]; then
|
||||
echo "Acquire::http::Proxy { \"${TRANSPORT}/${URI}\" DIRECT; };" | sudo tee /etc/apt/apt.conf.d/02proxy
|
||||
fi
|
||||
fi
|
||||
|
||||
# apt update
|
||||
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)
|
||||
apt install -y \
|
||||
sudo apt install -y --force-yes jq
|
||||
sudo apt remove "$(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)"
|
||||
sudo apt install -y \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
|
|
@ -53,7 +58,7 @@ apt install -y \
|
|||
gnupg2
|
||||
# software-properties-common
|
||||
|
||||
apt install -y \
|
||||
sudo apt install -y \
|
||||
docker-ce \
|
||||
docker-ce-cli \
|
||||
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
|
||||
OPTION="${DOCKER_OPT[$i]}"
|
||||
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
|
||||
|
||||
# General options
|
||||
|
|
|
|||
48
020_eza.sh
48
020_eza.sh
|
|
@ -1,24 +1,52 @@
|
|||
|
||||
# the debian package is missing the zsh completitons
|
||||
# sudo apt install eza
|
||||
|
||||
DEST=${1:-/etc/skel}
|
||||
|
||||
KEY_DIR=/etc/apt/trusted.gpg.d
|
||||
sudo mkdir -p ${KEY_DIR}
|
||||
URL=raw.githubusercontent.com
|
||||
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
|
||||
deb [signed-by=${KEY_DIR}/gierens.gpg] http://deb.gierens.de stable main
|
||||
# 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
|
||||
|
||||
conf_print_httm_sources() {
|
||||
cat <<EOF
|
||||
Enabled: yes
|
||||
Types: ${TYPES[*]}
|
||||
URIs: ${TRANSPORT}/${URI}
|
||||
Suites: ${SUITES}
|
||||
Components: ${COMPONENTS[*]}
|
||||
Architectures: ${ARCHITECTURES[*]}
|
||||
Signed-By: ${KEY}
|
||||
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 install -y eza
|
||||
|
||||
sudo apt install -y "${packages[*]}"
|
||||
|
||||
# conflicts with lsd
|
||||
#ALIAS_FILE="${DEST}/${ALIAS_DIR}/003_eza.sh"
|
||||
|
|
|
|||
|
|
@ -1,24 +1,78 @@
|
|||
RELEASE="bullseye"
|
||||
# RELEASE="bookworm"
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# wget https://set-soft.github.io/debian/kibot.list -O /etc/apt/sources.list.d/kibot.list
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
# This script sets up the KiBot repository using the modern deb822 format.
|
||||
# Optimized for Debian (Bullseye/Bookworm) and modern security standards.
|
||||
|
||||
KEY_DIR=/etc/apt/trusted.gpg.d
|
||||
KEY=${KEY_DIR}/kibot.gpg
|
||||
sudo wget -O ${KEY} https://set-soft.github.io/debian/kibot.gpg
|
||||
set -e
|
||||
|
||||
cat <<-EOF | sudo tee /etc/apt/sources.list-available/kibot.list >/dev/null
|
||||
deb [arch=${ARCH} signed-by=${KEY}] https://set-soft.github.io/debian/ ${RELEASE} main
|
||||
# --- Variables ---
|
||||
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
|
||||
}
|
||||
|
||||
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 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
|
||||
sudo apt-get install -y blender
|
||||
# Install Blender for 3D export
|
||||
# sudo apt install -y blender
|
||||
|
||||
# Verify installation
|
||||
kibot-check
|
||||
|
||||
echo "KiBot repository setup and installation complete."
|
||||
|
|
|
|||
|
|
@ -12,43 +12,57 @@
|
|||
DEST=${1:-/etc/skel}
|
||||
set -x
|
||||
|
||||
URL=raw.githubusercontent.com/
|
||||
URL=raw.githubusercontent.com
|
||||
USER=kimono-koans
|
||||
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=${KEY_HOME}/"${USER}.gpg"
|
||||
packages=(httm two-percent)
|
||||
packages=(httm two-percent fzf)
|
||||
|
||||
# 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
|
||||
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-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
|
||||
Types: deb deb-src
|
||||
URIs: https://${URL}/${USER}/ppa/main/
|
||||
Suites: ./
|
||||
Components:
|
||||
Enabled: yes
|
||||
Types: ${TYPES[*]}
|
||||
URIs: ${TRANSPORT}/${URI}
|
||||
Suites: ${SUITES}
|
||||
Components: ${COMPONENTS[*]}
|
||||
Architectures: ${ARCHITECTURES[*]}
|
||||
Signed-By: ${KEY}
|
||||
EOF
|
||||
}
|
||||
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
|
||||
if [ -d /etc/apt/apt.conf.d/02proxy ]; then
|
||||
if [ "$(grep -q ${URL})" ]; then
|
||||
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >>/etc/apt/apt.conf.d/02proxy
|
||||
fi
|
||||
PROXY_FILE="/etc/apt/apt.conf.d/02proxy"
|
||||
ENTRY="Acquire::http::Proxy { \"${URL}\" DIRECT; };"
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
# 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[@]}"
|
||||
|
||||
# Using cargo
|
||||
# https://crates.io/crates/httm
|
||||
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
|
|
|
|||
Loading…
Reference in New Issue