Skip to content

Commit 4ae394c

Browse files
committed
Debian oldstable: drop security and backport repository from packages lists
It does not exists for Bullseye nor Buster, which are both anyway deprecated, but we have a user reqests.
1 parent 413a42c commit 4ae394c

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

lib/functions/configuration/main-config.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,22 +370,22 @@ function do_extra_configuration() {
370370
fi
371371

372372
DEBIAN_MIRROR='deb.debian.org/debian'
373-
DEBIAN_SECURTY='security.debian.org/'
373+
DEBIAN_SECURITY='security.debian.org/'
374374
[[ "${ARCH}" == "amd64" ]] &&
375375
UBUNTU_MIRROR='archive.ubuntu.com/ubuntu/' ||
376376
UBUNTU_MIRROR='ports.ubuntu.com/'
377377

378378
if [[ $DOWNLOAD_MIRROR == "china" ]]; then
379379
DEBIAN_MIRROR='mirrors.tuna.tsinghua.edu.cn/debian'
380-
DEBIAN_SECURTY='mirrors.tuna.tsinghua.edu.cn/debian-security'
380+
DEBIAN_SECURITY='mirrors.tuna.tsinghua.edu.cn/debian-security'
381381
[[ "${ARCH}" == "amd64" ]] &&
382382
UBUNTU_MIRROR='mirrors.tuna.tsinghua.edu.cn/ubuntu/' ||
383383
UBUNTU_MIRROR='mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/'
384384
fi
385385

386386
if [[ $DOWNLOAD_MIRROR == "bfsu" ]]; then
387387
DEBIAN_MIRROR='mirrors.bfsu.edu.cn/debian'
388-
DEBIAN_SECURTY='mirrors.bfsu.edu.cn/debian-security'
388+
DEBIAN_SECURITY='mirrors.bfsu.edu.cn/debian-security'
389389
[[ "${ARCH}" == "amd64" ]] &&
390390
UBUNTU_MIRROR='mirrors.bfsu.edu.cn/ubuntu/' ||
391391
UBUNTU_MIRROR='mirrors.bfsu.edu.cn/ubuntu-ports/'

lib/functions/rootfs/create-cache.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ function extract_rootfs_artifact() {
132132
}
133133

134134
# This comment strategically introduced to force a rebuild of all rootfs, as this file's contents are hashed into all rootfs versions.
135-
# Just a number to force rebuild 004
135+
# Just a number to force rebuild 005

lib/functions/rootfs/distro-specific.sh

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,13 @@ function create_sources_list_and_deploy_repo_key() {
8989
distro="debian"
9090

9191
declare -a suites=("${release}" "${release}-updates")
92-
declare -a security_suites=("${release}-security")
9392
declare -a components=(main contrib non-free)
9493

95-
if [[ "$release" == "buster" || "$release" == "bullseye" ]]; then
96-
security_suites=("${release}/updates")
97-
else
98-
suites+=("${release}-backports")
99-
fi
100-
10194
if [[ "$release" != "buster" && "$release" != "bullseye" ]]; then
102-
components+=("non-free-firmware")
95+
# EOS releases doesn't get security updates
96+
declare -a security_suites=("${release}-security")
97+
suites+=("${release}-backports")
98+
components+=("non-free-firmware")
10399
fi
104100

105101
cat <<- EOF > "${basedir}/etc/apt/sources.list.d/${distro}.sources"
@@ -108,13 +104,18 @@ function create_sources_list_and_deploy_repo_key() {
108104
Suites: ${suites[@]}
109105
Components: ${components[@]}
110106
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
111-
112-
Types: deb
113-
URIs: http://${DEBIAN_SECURTY}
114-
Suites: ${security_suites[@]}
115-
Components: ${components[@]}
116-
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
117107
EOF
108+
109+
if [ ${#security_suites[@]} -gt 0 ]; then
110+
echo "" >> "${basedir}/etc/apt/sources.list.d/${distro}.sources" # it breaks if there is no line space in between
111+
cat <<- EOF >> "${basedir}/etc/apt/sources.list.d/${distro}.sources"
112+
Types: deb
113+
URIs: http://${DEBIAN_SECURITY}
114+
Suites: ${security_suites[@]}
115+
Components: ${components[@]}
116+
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
117+
EOF
118+
fi
118119
;;
119120

120121
sid | unstable)

0 commit comments

Comments
 (0)