Compare commits
3 Commits
fa4da85b9b
...
28018ff26b
| Author | SHA1 | Date |
|---|---|---|
|
|
28018ff26b | |
|
|
1310e854bb | |
|
|
8ca363fd75 |
|
|
@ -1,17 +1,54 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# avoid duplicates
|
# avoid duplicates
|
||||||
set -x
|
set -x
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
rm /etc/apt/sources.list
|
rm /etc/apt/sources.list
|
||||||
rm /etc/apt/sources.list.d/devuan.list
|
rm /etc/apt/sources.list.d/devuan.list
|
||||||
|
|
||||||
sudo apt install -y apt-transport-tor apt-transport-https
|
# If you leave the update too long the keyring expires and your apt breaks.
|
||||||
|
install_devuan_keyring() {
|
||||||
|
local BASE_URL="https://pkgmaster.devuan.org/devuan/pool/main/d/devuan-keyring/"
|
||||||
|
local DEB_DIR="/tmp"
|
||||||
|
|
||||||
# https://www.devuan.org/os/packages
|
# Check for wget dependency
|
||||||
# FIXME: the mirror is now permenently on deb but:
|
if ! command -v wget &>/dev/null; then
|
||||||
# http://deb.devuan.org/merged
|
echo "Error: wget is not installed." >&2
|
||||||
# is used for main, update, backports and security
|
return 1
|
||||||
# http://deb.devuan.org/devuan
|
fi
|
||||||
# is used for experimental, proposed-updates
|
|
||||||
|
echo "Searching for the latest devuan-keyring..."
|
||||||
|
|
||||||
|
# Fetch directory listing, extract .deb links, filter, sort by version, take latest
|
||||||
|
local LATEST_DEB
|
||||||
|
LATEST_DEB=$(wget -q -O - "$BASE_URL" |
|
||||||
|
grep -oP 'devuan-keyring_\d{4}\.\d{2}\.\d{2}_all\.deb' |
|
||||||
|
sort -rV |
|
||||||
|
head -n 1)
|
||||||
|
|
||||||
|
if [ -z "$LATEST_DEB" ]; then
|
||||||
|
echo "Error: Could not find any devuan-keyring_*.deb in listing" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Latest found: $LATEST_DEB"
|
||||||
|
local FULL_URL="${BASE_URL}${LATEST_DEB}"
|
||||||
|
local DEB_PATH="${DEB_DIR}/${LATEST_DEB}"
|
||||||
|
|
||||||
|
echo "Downloading to $DEB_PATH..."
|
||||||
|
wget -q --show-progress -O "$DEB_PATH" "$FULL_URL"
|
||||||
|
|
||||||
|
echo "Installing package..."
|
||||||
|
sudo dpkg -i "$DEB_PATH"
|
||||||
|
|
||||||
|
# Clean up the downloaded file
|
||||||
|
rm "$DEB_PATH"
|
||||||
|
echo "Installation complete and cleanup finished."
|
||||||
|
}
|
||||||
|
install_devuan_keyring
|
||||||
|
|
||||||
|
sudo apt install -y usrmerge
|
||||||
|
sudo apt install -y apt-transport-tor apt-transport-https
|
||||||
|
|
||||||
TRANSPORT="https"
|
TRANSPORT="https"
|
||||||
#MIRROR=deb
|
#MIRROR=deb
|
||||||
|
|
@ -54,7 +91,7 @@ PROPOSED_LIST=('excalibur-proposed-updates')
|
||||||
# Active (enabled) loop – all merged in your current choice
|
# Active (enabled) loop – all merged in your current choice
|
||||||
for RELEASE in "${ACTIVE_LIST[@]}"; do
|
for RELEASE in "${ACTIVE_LIST[@]}"; do
|
||||||
echo "${RELEASE}"
|
echo "${RELEASE}"
|
||||||
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<-EOF
|
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<EOF
|
||||||
Enabled: yes
|
Enabled: yes
|
||||||
Types: deb deb-src
|
Types: deb deb-src
|
||||||
URIs: ${MERGED_URI}
|
URIs: ${MERGED_URI}
|
||||||
|
|
@ -68,7 +105,7 @@ done
|
||||||
# Special / other (experimental, and potentially *-proposed-updates later)
|
# Special / other (experimental, and potentially *-proposed-updates later)
|
||||||
for RELEASE in "${OTHER_LIST[@]}"; do
|
for RELEASE in "${OTHER_LIST[@]}"; do
|
||||||
echo "${RELEASE}"
|
echo "${RELEASE}"
|
||||||
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<-EOF
|
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<EOF
|
||||||
Enabled: yes
|
Enabled: yes
|
||||||
Types: deb deb-src
|
Types: deb deb-src
|
||||||
URIs: ${DEVUAN_URI}
|
URIs: ${DEVUAN_URI}
|
||||||
|
|
@ -83,7 +120,7 @@ done
|
||||||
echo ${#OTHER_LIST[@]}
|
echo ${#OTHER_LIST[@]}
|
||||||
for RELEASE in "${OTHER_LIST[@]}"; do
|
for RELEASE in "${OTHER_LIST[@]}"; do
|
||||||
echo "${RELEASE}"
|
echo "${RELEASE}"
|
||||||
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<-EOF
|
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<EOF
|
||||||
Enabled: yes
|
Enabled: yes
|
||||||
Types: deb deb-src
|
Types: deb deb-src
|
||||||
URIs: ${TRANSPORT}://${MIRROR}.devuan.org/devuan
|
URIs: ${TRANSPORT}://${MIRROR}.devuan.org/devuan
|
||||||
|
|
@ -99,7 +136,7 @@ done
|
||||||
echo ${#PROPOSED_LIST[@]}
|
echo ${#PROPOSED_LIST[@]}
|
||||||
for RELEASE in "${PROPOSED_LIST[@]}"; do
|
for RELEASE in "${PROPOSED_LIST[@]}"; do
|
||||||
echo "${RELEASE}"
|
echo "${RELEASE}"
|
||||||
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<-EOF
|
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<EOF
|
||||||
Enabled: no
|
Enabled: no
|
||||||
Types: deb deb-src
|
Types: deb deb-src
|
||||||
URIs: ${DEVUAN_URI}
|
URIs: ${DEVUAN_URI}
|
||||||
|
|
@ -140,8 +177,8 @@ for RELEASE in "${ONION_LIST[@]}"; do
|
||||||
SECTION_USED="${SECTION_MERGED}" # assume you defined SECTION_MERGED earlier as "main contrib non-free non-free-firmware"
|
SECTION_USED="${SECTION_MERGED}" # assume you defined SECTION_MERGED earlier as "main contrib non-free non-free-firmware"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}-onion.sources" <<-EOF
|
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}-onion.sources" <<EOF
|
||||||
Enabled: no # change to yes if you run tor and want default onion
|
Enabled: no
|
||||||
Types: deb deb-src
|
Types: deb deb-src
|
||||||
URIs: ${TOR_URI}
|
URIs: ${TOR_URI}
|
||||||
Suites: ${RELEASE}
|
Suites: ${RELEASE}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ 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
|
||||||
|
|
||||||
#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="https://download.docker.com/linux/debian/gpg"
|
||||||
|
|
@ -31,9 +31,9 @@ Components: stable
|
||||||
Signed-By: "${KEY}"
|
Signed-By: "${KEY}"
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
conf_print_docker_sources | tee /etc/apt/sources.list-available/docker.list
|
conf_print_docker_sources | tee /etc/apt/sources.list-available/docker.sources
|
||||||
|
|
||||||
ln -sf /etc/apt/sources.list-available/docker.list /etc/apt/sources.list.d/docker.list
|
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
|
||||||
|
|
@ -50,18 +50,18 @@ apt install -y \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
pass \
|
pass \
|
||||||
gnupg2 \
|
gnupg2
|
||||||
software-properties-common
|
# software-properties-common
|
||||||
|
|
||||||
apt install -y \
|
apt install -y \
|
||||||
docker-ce \
|
docker-ce \
|
||||||
docker-ce-cli \
|
docker-ce-cli \
|
||||||
docker-ce-rootless-extras \
|
|
||||||
containerd.io \
|
containerd.io \
|
||||||
docker-compose-plugin \
|
docker-compose-plugin \
|
||||||
docker-buildx-plugin \
|
docker-buildx-plugin \
|
||||||
python3-docker \
|
python3-docker \
|
||||||
python3-compose
|
python3-compose
|
||||||
|
# docker-ce-rootless-extras \
|
||||||
|
|
||||||
# docker scout
|
# docker scout
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ DPkg::Pre-Invoke {"/usr/local/sbin/snapPrepApt || true";};
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
conf_print_apt_conf_d | sudo tee /etc/apt/apt.conf.d/90zfs-pre-apt-snapshot
|
conf_print_apt_conf_d | sudo tee /etc/apt/apt.conf.d/90zfs-pre-apt-snapshot
|
||||||
chmod +x /etc/apt/apt.conf.d/90zfs-pre-apt-snapshot
|
sudo chmod +x /etc/apt/apt.conf.d/90zfs-pre-apt-snapshot
|
||||||
|
|
||||||
# 3. Kernel Updates
|
# 3. Kernel Updates
|
||||||
# Use /etc/kernel/preinst.d/ to snapshot before kernel installation:
|
# Use /etc/kernel/preinst.d/ to snapshot before kernel installation:
|
||||||
|
|
@ -36,3 +36,4 @@ zfs snapshot -r ${POOL_NAME}@pre-kernel_${DATE}
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
conf_print_kernel_preinst_d | sudo tee /etc/kernel/preinst.d/90zfs-pre-kernel-snapshot
|
conf_print_kernel_preinst_d | sudo tee /etc/kernel/preinst.d/90zfs-pre-kernel-snapshot
|
||||||
|
sudo chmod +x /etc/kernel/preinst.d/90zfs-pre-kernel-snapshot
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue