From f5c832fd44c9d5082c8e6904b8aaac2aa69676ba Mon Sep 17 00:00:00 2001 From: Lars Bogner Date: Mon, 8 Jun 2026 16:09:55 +0200 Subject: [PATCH] fix Geant4 cmake git-dirty check when building from submodule ADD The submodule leaves a .git *file* (not directory) pointing to ../../.git/modules/lib/geant4, which passes G4GitUtilities' guard but causes a FATAL_ERROR when git status fails in the bare /tmp dir. Remove .git before cmake so the guard fires and the check is skipped. Co-Authored-By: Claude Sonnet 4.6 --- docker/Dockerfile | 3 ++- docker/Dockerfile-cpu | 3 ++- docker/Dockerfile-mini | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index d9eace4..3b91acf 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -53,7 +53,8 @@ RUN mkdir dawn-source \ ## main package — build Geant4 from submodule source ADD minicalosim/lib/geant4 /tmp/geant4-src -RUN cmake \ +RUN rm -f /tmp/geant4-src/.git && \ + cmake \ -S /tmp/geant4-src \ -B /tmp/geant4-build \ -DCMAKE_INSTALL_PREFIX=/opt/geant4-v11.1.2 \ diff --git a/docker/Dockerfile-cpu b/docker/Dockerfile-cpu index b6d00ed..2c60cf0 100644 --- a/docker/Dockerfile-cpu +++ b/docker/Dockerfile-cpu @@ -53,7 +53,8 @@ RUN mkdir dawn-source \ ## main package — build Geant4 from submodule source ADD minicalosim/lib/geant4 /tmp/geant4-src -RUN cmake \ +RUN rm -f /tmp/geant4-src/.git && \ + cmake \ -S /tmp/geant4-src \ -B /tmp/geant4-build \ -DCMAKE_INSTALL_PREFIX=/opt/geant4-v11.1.2 \ diff --git a/docker/Dockerfile-mini b/docker/Dockerfile-mini index 941e968..004314b 100644 --- a/docker/Dockerfile-mini +++ b/docker/Dockerfile-mini @@ -19,7 +19,8 @@ RUN python3 -m pip install --upgrade pip && \ # Geant4 — build from submodule source (batch mode only, no visualization, no multithreading) ADD minicalosim/lib/geant4 /tmp/geant4-src -RUN cmake \ +RUN rm -f /tmp/geant4-src/.git && \ + cmake \ -S /tmp/geant4-src \ -B /tmp/geant4-build \ -DCMAKE_INSTALL_PREFIX=/opt/geant4-v11.1.2 \