From c352d0c1807533f3bb24ce62774e21009b04b710 Mon Sep 17 00:00:00 2001 From: Sven Geuer Date: Wed, 11 Mar 2026 22:47:56 +0700 Subject: [PATCH 1/5] lxc-debian: Select dhcp-client according to release isc-dhcp-client is being phased out in Debian, and it was recently removed from forky/testing due to https://bugs.debian.org/1106121. For releases with codename trixie and before select isc-dhcp-client, otherwise select dhcpcd-base. This way the dhcp-client installed in the container matches the one that comes with the respective release by default. This change was discussed at https://bugs.debian.org/1125011. Signed-off-by: Arnaud Rebillout --- templates/lxc-debian.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index 42ec4c4..c2371ea 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -77,6 +77,8 @@ release_info() { local release_file=$(wget "${1}/dists/${release}/Release" -O - --quiet 2> /dev/null) distro_suite=${release_file#*Suite: } distro_suite=${distro_suite%%$'\n'*} + distro_codename=${release_file#*Codename: } + distro_codename=${distro_codename%%$'\n'*} return 0 fi return 1 @@ -374,13 +376,22 @@ download_debian() iproute=iproute2 ;; esac + # Check by codename as stable and testing are moving targets + case "$distro_codename" in + wheezy|jessie|stretch|buster|bullseye|bookworm|trixie) + dhcpclient=isc-dhcp-client + ;; + *) + dhcpclient=dhcpcd-base + ;; + esac packages=\ $init,\ ifupdown,\ locales,\ ca-certificates,\ dialog,\ -isc-dhcp-client,\ +$dhcpclient,\ netbase,\ net-tools,\ $iproute,\ From 0d0ae9f09e9ff71e044a24fc32b4e3579db0c138 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Mon, 9 Mar 2026 21:45:53 +0700 Subject: [PATCH 2/5] lxc-debian: Use distro_codename in write_sourceslist The variable `distro_codename` (introduced in previous commit) is a better fit than `release` for places where we want to match a codename. Signed-off-by: Arnaud Rebillout --- templates/lxc-debian.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index c2371ea..8e3b241 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -240,7 +240,7 @@ write_sourceslist() if [ "$mainonly" = 1 ]; then non_main='' else - case "$release" in + case "$distro_codename" in wheezy|jessie|stretch|buster|bullseye) non_main=' contrib non-free' ;; From e21dc0318b5d6f7983bae980a1f208b29dc2354a Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Mon, 9 Mar 2026 21:47:23 +0700 Subject: [PATCH 3/5] lxc-debian: Add oldstable and oldoldstable to permanent releases Signed-off-by: Arnaud Rebillout --- templates/lxc-debian.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index 8e3b241..5b2847a 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -888,7 +888,7 @@ if [ -n "$authkey" ]; then fi release=${release:-stable} -permanent_releases=('stable' 'testing' 'sid' 'unstable') +permanent_releases=('oldoldstable' 'oldstable' 'stable' 'testing' 'sid' 'unstable') if [[ ! "${permanent_releases[*]}" =~ (^|[^[:alpha:]])$release([^[:alpha:]]|$) ]]; then if ! release_info "${MIRROR}"; then echo "Invalid release ${release} (not found in mirror)" From 48b89d884c7176b46321b7ecca023df4dd34dad3 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Mon, 9 Mar 2026 21:47:47 +0700 Subject: [PATCH 4/5] lxc-debian: Fix a misleading error message The wget command above uses the variable `MIRROR` and not `DEBIAN_MIRROR`... Signed-off-by: Arnaud Rebillout --- templates/lxc-debian.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index 5b2847a..9a6c39e 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -817,7 +817,7 @@ if ! wget -q -O /dev/null "${release_file}"; then fi packages="debian-ports-archive-keyring,${packages}" else - echo "Error: ${arch}/${release} not available on mirror ${DEBIAN_MIRROR}" + echo "Error: ${arch}/${release} not available on mirror ${MIRROR}" exit 1 fi fi From 8a81dd3fd63bdb07cf39a8663f56ec0baf218934 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Mon, 9 Mar 2026 21:48:33 +0700 Subject: [PATCH 5/5] lxc-kali: Select dhcpcd-base in place of isc-dchp-client Being based on Debian testing, Kali now uses dhcpcd-base instead of isc-dhcp-client. Signed-off-by: Arnaud Rebillout --- templates/lxc-kali.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/lxc-kali.in b/templates/lxc-kali.in index 1a3cb7b..9305506 100644 --- a/templates/lxc-kali.in +++ b/templates/lxc-kali.in @@ -334,13 +334,14 @@ download_kali() { init=init iproute=iproute2 + dhcpclient=dhcpcd-base packages=\ $init,\ ifupdown,\ locales,\ ca-certificates,\ dialog,\ -isc-dhcp-client,\ +$dhcpclient,\ netbase,\ net-tools,\ $iproute,\