From 0a948caeacb2b8c8dd3f9c380f6d4f984a0d5a8a Mon Sep 17 00:00:00 2001 From: Vitor Bandeira Date: Wed, 4 Nov 2026 15:07:20 -0300 Subject: [PATCH 1/5] build: finish the Ubuntu 26.04 image defaults Signed-off-by: Vitor Bandeira --- .readthedocs.yaml | 2 +- Dockerfile | 18 +++++++++--------- docker/Dockerfile.builder | 2 +- docker/Dockerfile.claude | 2 +- docs/user/BuildWithDocker.md | 11 +++++++++-- docs/user/BuildWithPrebuilt.md | 8 ++++---- docs/user/ClaudeCode.md | 2 +- 7 files changed, 26 insertions(+), 19 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index efc352ca79..c86005adf1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,7 +6,7 @@ version: 2 # Set the OS, Python version and other tools you might need build: - os: ubuntu-24.04 + os: ubuntu-26.04 tools: python: "3.12" diff --git a/Dockerfile b/Dockerfile index d533dac4d9..2853b1f43e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,19 @@ # Target with dependencies and the binaries to run the complete flow -FROM openroad/flow-dev +FROM openroad/flow-ubuntu26.04-dev:latest WORKDIR /OpenROAD-flow-scripts -# synthesis tools binaries and plugins -COPY --from=openroad/yosys /install ./tools/install/yosys +# Flow tools built for the same Ubuntu release as the runtime image. +COPY --from=openroad/flow-ubuntu26.04-tools:latest \ + /OpenROAD-flow-scripts/tools/install ./tools/install -# openroad binary -COPY --from=openroad/ubuntu22.04-builder-gcc \ - /OpenROAD/install/bin/openroad \ - ./tools/install/OpenROAD/bin/openroad +# OpenROAD binary and its installed libraries. +COPY --from=openroad/ubuntu26.04:latest \ + /OpenROAD/install ./tools/install/OpenROAD # flow files COPY ./env.sh . COPY ./flow ./flow -# avoid issues with permissions -RUN chmod o+rw -R /OpenROAD-flow-scripts +# Allow users of the image to write flow results. +RUN chmod -R a+rwX /OpenROAD-flow-scripts/flow diff --git a/docker/Dockerfile.builder b/docker/Dockerfile.builder index 3673cfb649..3b72530b9b 100644 --- a/docker/Dockerfile.builder +++ b/docker/Dockerfile.builder @@ -5,7 +5,7 @@ # NOTE: don't use this file directly unless you know what you are doing, # instead use etc/DockerHelper.sh -ARG fromImage=openroad/flow-ubuntu22.04-dev:latest +ARG fromImage=openroad/flow-ubuntu26.04-dev:latest # Image holding the prebuilt tools/install of every tool except OpenROAD # (a build of the orfs-tools target). By default they are built here. ARG toolsImage=orfs-tools diff --git a/docker/Dockerfile.claude b/docker/Dockerfile.claude index 3238c252df..b6c62bb207 100644 --- a/docker/Dockerfile.claude +++ b/docker/Dockerfile.claude @@ -3,7 +3,7 @@ # # Usage: see claude.sh at the repo root. -ARG fromImage=openroad/flow-ubuntu22.04-dev:latest +ARG fromImage=openroad/flow-ubuntu26.04-dev:latest FROM ${fromImage} diff --git a/docs/user/BuildWithDocker.md b/docs/user/BuildWithDocker.md index 0b79b8c45f..87a2240df0 100644 --- a/docs/user/BuildWithDocker.md +++ b/docs/user/BuildWithDocker.md @@ -42,13 +42,20 @@ You can start the container in an interactive mode using the command below. ```shell -docker run -it ubuntu:22.04 +docker run -it ubuntu:26.04 ``` Now you are ready to install the prebuilt binaries. Please refer to the instructions for installing prebuilt binaries [here](./BuildWithPrebuilt.md). +The root `Dockerfile` assembles a runtime image from the published Ubuntu 26.04 development image, flow tools, and OpenROAD installation. +Build it without compiling the tools: + +```shell +docker build -t openroad/orfs-local . +``` + ### Build Using Docker from sources Alternatively, if you would like the latest commits from the OpenROAD repositories, @@ -85,7 +92,7 @@ Then, inside docker: ``` shell source ./env.sh yosys -help -yosys -m slang -p "slang_version" +yosys -p "slang_version" openroad -help cd flow make diff --git a/docs/user/BuildWithPrebuilt.md b/docs/user/BuildWithPrebuilt.md index 254ee927ce..655fc86682 100644 --- a/docs/user/BuildWithPrebuilt.md +++ b/docs/user/BuildWithPrebuilt.md @@ -14,7 +14,7 @@ from [OpenROAD VaultLink](https://vaultlink.precisioninno.com/). Thanks to [Precision Innovations](https://precisioninno.com/) for hosting and maintaining these binaries. Pre-built binaries are available for these platforms: -- Ubuntu 22.04 +- Ubuntu 26.04 - Ubuntu 24.04 Use the following steps to download: @@ -24,10 +24,10 @@ Step 1: Open [OpenROAD VaultLink](https://vaultlink.precisioninno.com/). Step 2: Download the `.deb` package for your Ubuntu version. Step 3: Install the package with `apt`. - For example, on Ubuntu 22.04: + For example, on Ubuntu 26.04: ```shell -sudo apt install ./openroad__amd64-ubuntu-22.04.deb +sudo apt install ./openroad__amd64-ubuntu-26.04.deb ``` ## Verify Installation @@ -48,7 +48,7 @@ export YOSYS_EXE=$(command -v yosys) export LD_LIBRARY_PATH="/bin:$PATH" yosys -help -yosys -m slang -p "slang_version" +yosys -p "slang_version" openroad -help cd flow make diff --git a/docs/user/ClaudeCode.md b/docs/user/ClaudeCode.md index c4128cb78f..78bc841943 100644 --- a/docs/user/ClaudeCode.md +++ b/docs/user/ClaudeCode.md @@ -116,7 +116,7 @@ The setup consists of three files: ### `docker/Dockerfile.claude` -Extends the `openroad/flow-ubuntu22.04-dev` base image (which has all +Extends the `openroad/flow-ubuntu26.04-dev` base image (which has all OpenROAD build dependencies) with: - Java 21 and Bazelisk (for Bazel 8.x builds) From ec4fff4c6560ac8968c6670a279cea0f84d0ace5 Mon Sep 17 00:00:00 2001 From: Vitor Bandeira Date: Thu, 5 Nov 2026 11:35:42 -0300 Subject: [PATCH 2/5] fix(docker): keep mapped user settings in the mounted home Signed-off-by: Vitor Bandeira --- docker/claude-entrypoint.sh | 3 +- docker/test-claude-entrypoint.sh | 49 ++++++++++++++++++++++++++++++++ docs/user/ClaudeCode.md | 21 ++++++++++++-- 3 files changed, 68 insertions(+), 5 deletions(-) create mode 100644 docker/test-claude-entrypoint.sh diff --git a/docker/claude-entrypoint.sh b/docker/claude-entrypoint.sh index 18b77b98c9..b55529e506 100755 --- a/docker/claude-entrypoint.sh +++ b/docker/claude-entrypoint.sh @@ -16,7 +16,6 @@ if [ -n "${HOST_UID}" ] && [ -n "${HOST_GID}" ]; then # Create user (reuse existing if UID is taken) if ! getent passwd "${HOST_UID}" > /dev/null 2>&1; then - mkdir -p "${USER_HOME}" useradd \ --uid "${HOST_UID}" \ --gid "${HOST_GID}" \ @@ -27,13 +26,13 @@ if [ -n "${HOST_UID}" ] && [ -n "${HOST_GID}" ]; then "${USER_NAME}" else USER_NAME=$(getent passwd "${HOST_UID}" | cut -d: -f1) - USER_HOME=$(getent passwd "${HOST_UID}" | cut -d: -f6) fi # Passwordless sudo echo "${USER_NAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/claude-user chmod 0440 /etc/sudoers.d/claude-user + mkdir -p "${USER_HOME}" export HOME="${USER_HOME}" chown "${HOST_UID}:${HOST_GID}" "${USER_HOME}" touch "${USER_HOME}/.hushlogin" diff --git a/docker/test-claude-entrypoint.sh b/docker/test-claude-entrypoint.sh new file mode 100644 index 0000000000..74f3ecb02b --- /dev/null +++ b/docker/test-claude-entrypoint.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [[ "${1:-}" == --assert ]]; then + if [[ "${HOME}" != /home/claude-user ]]; then + echo "HOME=${HOME}, expected /home/claude-user" >&2 + exit 1 + fi + test "$(id -u)" = "$2" + test "$(cat "${HOME}/.claude/settings.json")" = fixture + echo updated > "${HOME}/.claude/settings.json" + echo "UID $2 reads and writes settings through HOME" + exit 0 +fi + +if [[ "${1:-}" == --inside ]]; then + uid=$2 + gid=$3 + if [[ "$4" == existing ]]; then + getent passwd "${uid}" > /dev/null + mkdir -p "$(getent passwd "${uid}" | cut -d: -f6)" + else + if getent passwd "${uid}" > /dev/null; then + echo "Fixture UID ${uid} must be unused" >&2 + exit 1 + fi + fi + mkdir -p /home/claude-user/.claude /etc/sudoers.d + echo fixture > /home/claude-user/.claude/settings.json + chown -R "${uid}:${gid}" /home/claude-user/.claude + export HOST_UID=${uid} HOST_GID=${gid} + exec bash /test/claude-entrypoint.sh bash /test/test-claude-entrypoint.sh --assert "${uid}" +fi + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CONTAINER_ENGINE="${CONTAINER_ENGINE:-docker}" +TEST_IMAGE="${TEST_IMAGE:-openroad/flow-ubuntu26.04-dev:latest}" + +for fixture in '1000 1000 existing' '2000 2000 new'; do + read -r uid gid state <<< "${fixture}" + "${CONTAINER_ENGINE}" run --rm --platform linux/amd64 \ + --network none --user 0:0 \ + --cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \ + --security-opt no-new-privileges \ + --cpus 2 --memory 4g --pids-limit 256 \ + --volume "${SCRIPT_DIR}:/test:ro" \ + --entrypoint bash "${TEST_IMAGE}" \ + /test/test-claude-entrypoint.sh --inside "${uid}" "${gid}" "${state}" +done diff --git a/docs/user/ClaudeCode.md b/docs/user/ClaudeCode.md index 78bc841943..8c650572f8 100644 --- a/docs/user/ClaudeCode.md +++ b/docs/user/ClaudeCode.md @@ -131,12 +131,27 @@ volume mount. Handles UID/GID mapping so files created inside the container have the correct ownership on the host. The entrypoint: -1. Creates a user matching the host UID/GID +1. Creates a user matching the host UID/GID, or reuses an existing account 2. Sources `env.sh` to set up tool paths 3. Drops privileges via `setpriv` before running the command -This follows the same pattern as `tools/OpenROAD/etc/docker-entrypoint.sh` -and the `--user` mode in `flow/util/docker_shell`. +The mapped user always uses `/home/claude-user` as `HOME`. +This keeps the settings and cache mounts visible when the base image already has an account with the host UID. + +Run the entrypoint regression check in disposable containers: + +```shell +bash docker/test-claude-entrypoint.sh +``` + +With Podman: + +```shell +CONTAINER_ENGINE=podman bash docker/test-claude-entrypoint.sh +``` + +The check covers an existing UID and a new UID. +It verifies that the launched command can read and write fixture settings through `HOME`. ### `claude.sh` From 499133407731fdbfe067bb625f3580a8c57094a9 Mon Sep 17 00:00:00 2001 From: Vitor Bandeira Date: Thu, 5 Nov 2026 11:36:19 -0300 Subject: [PATCH 3/5] docs: use built-in Slang in the local installation check Signed-off-by: Vitor Bandeira --- docs/user/BuildLocally.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/BuildLocally.md b/docs/user/BuildLocally.md index 9747b62260..a24cf01ee9 100644 --- a/docs/user/BuildLocally.md +++ b/docs/user/BuildLocally.md @@ -32,7 +32,7 @@ up the environment. The `make` command runs from RTL-GDSII generation for defaul ``` shell source ./env.sh yosys -help -yosys -m slang -p "slang_version" +yosys -p "slang_version" openroad -help cd flow make From 5a17c12145a07b076b4b6cb64dac60ba47cd780a Mon Sep 17 00:00:00 2001 From: Vitor Bandeira Date: Thu, 5 Nov 2026 11:51:41 -0300 Subject: [PATCH 4/5] fix(docker): align the reused account home with mounted settings Signed-off-by: Vitor Bandeira --- docker/claude-entrypoint.sh | 1 + docker/test-claude-entrypoint.sh | 5 +++++ docs/user/ClaudeCode.md | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/claude-entrypoint.sh b/docker/claude-entrypoint.sh index b55529e506..ab47ebc88c 100755 --- a/docker/claude-entrypoint.sh +++ b/docker/claude-entrypoint.sh @@ -26,6 +26,7 @@ if [ -n "${HOST_UID}" ] && [ -n "${HOST_GID}" ]; then "${USER_NAME}" else USER_NAME=$(getent passwd "${HOST_UID}" | cut -d: -f1) + usermod --home "${USER_HOME}" "${USER_NAME}" fi # Passwordless sudo diff --git a/docker/test-claude-entrypoint.sh b/docker/test-claude-entrypoint.sh index 74f3ecb02b..1bf387858f 100644 --- a/docker/test-claude-entrypoint.sh +++ b/docker/test-claude-entrypoint.sh @@ -7,6 +7,11 @@ if [[ "${1:-}" == --assert ]]; then exit 1 fi test "$(id -u)" = "$2" + account_home=$(getent passwd "$2" | cut -d: -f6) + if [[ "${account_home}" != "${HOME}" ]]; then + echo "Account home=${account_home}, HOME=${HOME}" >&2 + exit 1 + fi test "$(cat "${HOME}/.claude/settings.json")" = fixture echo updated > "${HOME}/.claude/settings.json" echo "UID $2 reads and writes settings through HOME" diff --git a/docs/user/ClaudeCode.md b/docs/user/ClaudeCode.md index 8c650572f8..d2c08b8c2c 100644 --- a/docs/user/ClaudeCode.md +++ b/docs/user/ClaudeCode.md @@ -135,7 +135,7 @@ correct ownership on the host. The entrypoint: 2. Sources `env.sh` to set up tool paths 3. Drops privileges via `setpriv` before running the command -The mapped user always uses `/home/claude-user` as `HOME`. +The mapped user's account record and `HOME` both use `/home/claude-user`. This keeps the settings and cache mounts visible when the base image already has an account with the host UID. Run the entrypoint regression check in disposable containers: @@ -152,6 +152,7 @@ CONTAINER_ENGINE=podman bash docker/test-claude-entrypoint.sh The check covers an existing UID and a new UID. It verifies that the launched command can read and write fixture settings through `HOME`. +It also checks that the account's recorded home matches `HOME`. ### `claude.sh` From 0df3323d82bf6e365f92f2bb2c9da4d698f168b9 Mon Sep 17 00:00:00 2001 From: Vitor Bandeira Date: Sun, 15 Nov 2026 22:30:04 -0300 Subject: [PATCH 5/5] fix(docker): let the mapped user own ~/.cache The container engine creates ~/.cache as root when it mounts ~/.cache/bazel. Bazelisk then cannot create ~/.cache/bazelisk, and bazel fails with "permission denied". The home directory now matches the mounted cache for every UID, so this also affects UID 1000. The entrypoint now gives the user ownership of ~/.cache. The change is not recursive, so the mounted cache stays as it is. The regression check now reproduces the root-owned ~/.cache. Signed-off-by: Vitor Bandeira --- docker/claude-entrypoint.sh | 6 ++++-- docker/test-claude-entrypoint.sh | 6 ++++++ docs/user/ClaudeCode.md | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docker/claude-entrypoint.sh b/docker/claude-entrypoint.sh index ab47ebc88c..55b4fa047d 100755 --- a/docker/claude-entrypoint.sh +++ b/docker/claude-entrypoint.sh @@ -33,9 +33,11 @@ if [ -n "${HOST_UID}" ] && [ -n "${HOST_GID}" ]; then echo "${USER_NAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/claude-user chmod 0440 /etc/sudoers.d/claude-user - mkdir -p "${USER_HOME}" + # The engine creates .cache as root when it mounts .cache/bazel. + # Bazelisk writes to .cache/bazelisk, so the user owns .cache too. + mkdir -p "${USER_HOME}/.cache" export HOME="${USER_HOME}" - chown "${HOST_UID}:${HOST_GID}" "${USER_HOME}" + chown "${HOST_UID}:${HOST_GID}" "${USER_HOME}" "${USER_HOME}/.cache" touch "${USER_HOME}/.hushlogin" # Set up ORFS environment (PATH to tools, FLOW_HOME, etc.) diff --git a/docker/test-claude-entrypoint.sh b/docker/test-claude-entrypoint.sh index 1bf387858f..900a1d6923 100644 --- a/docker/test-claude-entrypoint.sh +++ b/docker/test-claude-entrypoint.sh @@ -14,7 +14,10 @@ if [[ "${1:-}" == --assert ]]; then fi test "$(cat "${HOME}/.claude/settings.json")" = fixture echo updated > "${HOME}/.claude/settings.json" + # Bazelisk downloads Bazel into ~/.cache/bazelisk. + mkdir "${HOME}/.cache/bazelisk" echo "UID $2 reads and writes settings through HOME" + echo "UID $2 creates ~/.cache/bazelisk next to the mounted Bazel cache" exit 0 fi @@ -33,6 +36,9 @@ if [[ "${1:-}" == --inside ]]; then mkdir -p /home/claude-user/.claude /etc/sudoers.d echo fixture > /home/claude-user/.claude/settings.json chown -R "${uid}:${gid}" /home/claude-user/.claude + # claude.sh mounts the Bazel cache here; the engine leaves .cache owned by root. + mkdir -p /home/claude-user/.cache/bazel + chown "${uid}:${gid}" /home/claude-user/.cache/bazel export HOST_UID=${uid} HOST_GID=${gid} exec bash /test/claude-entrypoint.sh bash /test/test-claude-entrypoint.sh --assert "${uid}" fi diff --git a/docs/user/ClaudeCode.md b/docs/user/ClaudeCode.md index d2c08b8c2c..9b3ad5a918 100644 --- a/docs/user/ClaudeCode.md +++ b/docs/user/ClaudeCode.md @@ -153,6 +153,7 @@ CONTAINER_ENGINE=podman bash docker/test-claude-entrypoint.sh The check covers an existing UID and a new UID. It verifies that the launched command can read and write fixture settings through `HOME`. It also checks that the account's recorded home matches `HOME`. +It also checks that the user can create `~/.cache/bazelisk` beside the mounted Bazel cache. ### `claude.sh`