Skip to content

Commit d37c92e

Browse files
committed
update bootstrap_apt conf script to support trixie
1 parent 58b8b10 commit d37c92e

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

conf/bootstrap_apt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# create apt sources
44
# environment variables:
55
# - RELEASE <optional>:
6-
# - OS distro and codename to use (e.g. 'debian/bookworm')
6+
# - OS distro and codename to use (e.g. 'debian/trixie')
77
# - will fallback to host system if not set
88
# - NONFREE <optional>:
99
# - set to enable non-free by default
@@ -24,6 +24,9 @@
2424
# - if not the same as guest, apply relevant transition changes
2525
# - NO_TURNKEY_APT_REPO <optional>:
2626
# - disable TurnKey apt repos - useful during early transition
27+
# - NO_PROXY <optional>:
28+
# - same as APT_PROXY_OVERRIDE=disable (will override APT_PROXY_OVERRIDE
29+
# if both set to different values)
2730

2831
# Note, to install packages from backports:
2932
# - set 'BACKPORTS=y'; and either:
@@ -60,7 +63,7 @@ case $CODENAME in
6063
CONTRIB="contrib"
6164
NON_FREE="non-free"
6265
;;&
63-
bookworm|trixie)
66+
bookworm|trixie|forky)
6467
SEC_MIRROR="${SEC_MIRROR}debian-security"
6568
;;
6669
# Note - only Ubuntu LTS
@@ -93,11 +96,12 @@ mkdir -p $SOURCES_LIST $PREFS_LIST $CONF_DIR
9396
deb_ver=$(sed -nE "s|^([0-9]+).*|\1|p" /etc/debian_version)
9497
[[ -n "$HOST_DEB_VER" ]] || HOST_DEB_VER=$deb_ver
9598
if [[ "$HOST_DEB_VER" != "$deb_ver" ]]; then
96-
echo "# Transition build detected - building v$deb_ver on v$HOST_DEB_VER"
99+
echo "# Transition build detected - building Debian v$deb_ver on Debian" \
100+
" v$HOST_DEB_VER"
97101
if [[ $HOST_DEB_VER -ne $((deb_ver - 1)) ]]; then
98102
fatal "Detected more than one Debian major version difference"
99103
elif [[ $deb_ver -lt 9 ]]; then
100-
fatal "Debian releases older than Stretch no longer supported"
104+
fatal "Debian releases older than Buster no longer supported"
101105
fi
102106
fi
103107

@@ -109,7 +113,7 @@ elif [[ $deb_ver -ge 11 ]] || [[ "$distro" == 'ubuntu' ]]; then
109113
PROXY_PORT=3128
110114
fi
111115

112-
if [[ "${APT_PROXY_OVERRIDE,,}" == "disable" ]]; then
116+
if [[ "${APT_PROXY_OVERRIDE,,}" == "disable" ]] || [[ -n "$NO_PROXY" ]]; then
113117
PROXY_PORT=
114118
elif [[ -n $APT_PROXY_OVERRIDE ]]; then
115119
PROXY_PORT=$APT_PROXY_OVERRIDE
@@ -128,8 +132,10 @@ if [[ -e /usr/local/share/ca-certificates/squid_proxyCA.crt ]]; then
128132
update-ca-certificates
129133
elif [[ $deb_ver -le 10 ]]; then
130134
echo "Buster base (or earlier) detected, skipping importing Squid CA cert."
135+
elif [[ -z "$PROXY_PORT" ]]; then
136+
echo "PROXY_PORT not set - skipping importing Squid CA cert."
131137
else
132-
fatal "Squid CA cert not found."
138+
fatal "Squid CA cert not found. (set NO_PROXY=true to skip)"
133139
fi
134140

135141
# Set default Debian PHP version

0 commit comments

Comments
 (0)