From 63b308b54dae145713ec5f7f58c79bc319c19a0f Mon Sep 17 00:00:00 2001 From: Josh Whitley Date: Thu, 18 Jun 2026 22:50:33 -0600 Subject: [PATCH] Add Ubuntu 26.04 (resolute) Debian package build support Map the UBUNTU_VERSION codename "resolute" to version number 26.04 so `make pkg-deb UBUNTU_VERSION=resolute` produces a 26.04-tagged package, alongside the existing jammy (22.04) and noble (24.04) targets. The Ubuntu 26.04 base image ships a default non-root user occupying UID 1000, which collides with the host UID the build entrypoint tries to recreate. Detect and remove any pre-existing user holding the requested UID before creating the build user. This is a no-op on 22.04/24.04 images, which have no such default user. Co-Authored-By: Claude Opus 4.8 (1M context) --- Makefile | 4 ++++ tools/deb/base-image/entrypoint.sh | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Makefile b/Makefile index db56bca..87417df 100644 --- a/Makefile +++ b/Makefile @@ -40,11 +40,15 @@ export ${BUILD_VER_ENV} # 22.04 - jammy # 24.04 - noble +# 26.04 - resolute UBUNTU_VERSION ?= jammy UBUNTU_VERSION_NUMBER = 22.04 ifeq (${UBUNTU_VERSION}, noble) UBUNTU_VERSION_NUMBER = 24.04 endif +ifeq (${UBUNTU_VERSION}, resolute) +UBUNTU_VERSION_NUMBER = 26.04 +endif DEBIAN_VERSION := "1.3.0" diff --git a/tools/deb/base-image/entrypoint.sh b/tools/deb/base-image/entrypoint.sh index 21a1889..a64569b 100644 --- a/tools/deb/base-image/entrypoint.sh +++ b/tools/deb/base-image/entrypoint.sh @@ -22,6 +22,12 @@ sysctl -w vm.max_map_count=262144 if [[ -n "${USER_NAME:-}" && -n "${USER_UID:-}" && -n "${USER_GID:-}" ]]; then echo "Creating user ${USER_NAME} with UID=${USER_UID}, GID=${USER_GID}..." + existing_user="$(getent passwd "$USER_UID" | cut -d: -f1)" + if [[ -n "$existing_user" && "$existing_user" != "$USER_NAME" ]]; then + echo "Removing existing user $existing_user with UID=$USER_UID..." + userdel -r "$existing_user" || userdel "$existing_user" + fi + if ! getent group "$USER_GID" >/dev/null; then groupadd -g "$USER_GID" "$USER_NAME" fi