Compare commits

..

3 Commits

Author SHA1 Message Date
cyteen 28018ff26b Minor fixes. 2026-03-06 00:17:30 +00:00
cyteen 1310e854bb Fixes and updates. 2026-03-06 00:16:59 +00:00
cyteen 8ca363fd75 Add sudo to chmod fix. 2026-03-04 16:12:25 +00:00
3 changed files with 81 additions and 43 deletions

View File

@ -1,17 +1,54 @@
#!/usr/bin/env bash
# avoid duplicates
set -x
set -euo pipefail
rm /etc/apt/sources.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
# FIXME: the mirror is now permenently on deb but:
# http://deb.devuan.org/merged
# is used for main, update, backports and security
# http://deb.devuan.org/devuan
# is used for experimental, proposed-updates
# Check for wget dependency
if ! command -v wget &>/dev/null; then
echo "Error: wget is not installed." >&2
return 1
fi
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"
#MIRROR=deb
@ -54,21 +91,21 @@ PROPOSED_LIST=('excalibur-proposed-updates')
# Active (enabled) loop all merged in your current choice
for RELEASE in "${ACTIVE_LIST[@]}"; do
echo "${RELEASE}"
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<-EOF
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<EOF
Enabled: yes
Types: deb deb-src
URIs: ${MERGED_URI}
Suites: ${RELEASE}
Components: ${SECTION_MERGED}
Architectures: amd64
EOF
EOF
ln -sf "${AVAILABLE}/devuan_${RELEASE}.sources" "${ACTIVE}/devuan_${RELEASE}.sources"
done
# Special / other (experimental, and potentially *-proposed-updates later)
for RELEASE in "${OTHER_LIST[@]}"; do
echo "${RELEASE}"
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<-EOF
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<EOF
Enabled: yes
Types: deb deb-src
URIs: ${DEVUAN_URI}
@ -76,20 +113,20 @@ for RELEASE in "${OTHER_LIST[@]}"; do
Components: ${SECTION_SPECIAL}
Architectures: amd64
# Signed-By: /usr/share/keyrings/devuan-archive-keyring.gpg # optional, if needed
EOF
EOF
ln -sf "${AVAILABLE}/devuan_${RELEASE}.sources" "${ACTIVE}/devuan_${RELEASE}.sources"
done
echo ${#OTHER_LIST[@]}
for RELEASE in "${OTHER_LIST[@]}"; do
echo "${RELEASE}"
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<-EOF
Enabled: yes
Types: deb deb-src
URIs: ${TRANSPORT}://${MIRROR}.devuan.org/devuan
Suites: ${RELEASE}
Components: main
Architectures: amd64
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<EOF
Enabled: yes
Types: deb deb-src
URIs: ${TRANSPORT}://${MIRROR}.devuan.org/devuan
Suites: ${RELEASE}
Components: main
Architectures: amd64
EOF
done
@ -99,15 +136,15 @@ done
echo ${#PROPOSED_LIST[@]}
for RELEASE in "${PROPOSED_LIST[@]}"; do
echo "${RELEASE}"
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<-EOF
Enabled: no
Types: deb deb-src
URIs: ${DEVUAN_URI}
Suites: ${RELEASE}
Components: ${SECTION_SPECIAL}
Architectures: amd64
# Note: proposed-updates for upcoming point releases; not for production
EOF
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}.sources" <<EOF
Enabled: no
Types: deb deb-src
URIs: ${DEVUAN_URI}
Suites: ${RELEASE}
Components: ${SECTION_SPECIAL}
Architectures: amd64
# Note: proposed-updates for upcoming point releases; not for production
EOF
# Optional symlink even if disabled
ln -sf "${AVAILABLE}/devuan_${RELEASE}.sources" "${ACTIVE}/devuan_${RELEASE}.sources"
done
@ -140,15 +177,15 @@ for RELEASE in "${ONION_LIST[@]}"; do
SECTION_USED="${SECTION_MERGED}" # assume you defined SECTION_MERGED earlier as "main contrib non-free non-free-firmware"
fi
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}-onion.sources" <<-EOF
Enabled: no # change to yes if you run tor and want default onion
Types: deb deb-src
URIs: ${TOR_URI}
Suites: ${RELEASE}
Components: ${SECTION_USED}
Architectures: amd64
# Tor / onion routing - requires apt-transport-tor installed and tor running
EOF
bash -c "cat > ${AVAILABLE}/devuan_${RELEASE}-onion.sources" <<EOF
Enabled: no
Types: deb deb-src
URIs: ${TOR_URI}
Suites: ${RELEASE}
Components: ${SECTION_USED}
Architectures: amd64
# Tor / onion routing - requires apt-transport-tor installed and tor running
EOF
ln -sf "${AVAILABLE}/devuan_${RELEASE}-onion.sources" "${ACTIVE}/devuan_${RELEASE}-onion.sources"
done

View File

@ -8,7 +8,7 @@ set -x
# 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=/usr/share/keyrings/
KEY_DIR=/usr/share/keyrings
KEY=${KEY_DIR}/docker.gpg
sudo mkdir -p ${KEY_DIR}
KEY_URL="https://download.docker.com/linux/debian/gpg"
@ -31,9 +31,9 @@ Components: stable
Signed-By: "${KEY}"
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
if [ -f /etc/apt/apt.conf.d/02proxy ]; then
@ -50,18 +50,18 @@ apt install -y \
ca-certificates \
curl \
pass \
gnupg2 \
software-properties-common
gnupg2
# software-properties-common
apt install -y \
docker-ce \
docker-ce-cli \
docker-ce-rootless-extras \
containerd.io \
docker-compose-plugin \
docker-buildx-plugin \
python3-docker \
python3-compose
# docker-ce-rootless-extras \
# docker scout

View File

@ -24,7 +24,7 @@ DPkg::Pre-Invoke {"/usr/local/sbin/snapPrepApt || true";};
EOF
}
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
# Use /etc/kernel/preinst.d/ to snapshot before kernel installation:
@ -36,3 +36,4 @@ zfs snapshot -r ${POOL_NAME}@pre-kernel_${DATE}
EOF
}
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