From c352d0c1807533f3bb24ce62774e21009b04b710 Mon Sep 17 00:00:00 2001 From: Sven Geuer Date: Wed, 11 Mar 2026 22:47:56 +0700 Subject: [PATCH] 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,\