From faba426b3b666c0e93e4349ba88deb79517534c6 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 28 Jan 2026 11:12:40 +0100 Subject: [PATCH] lint: Flatten lint image entry points --- ci/lint.py | 1 + ci/lint/01_install.sh | 1 + ci/lint/06_script.sh | 6 ++++++ ci/lint/container-entrypoint.sh | 15 --------------- ci/lint_imagefile | 8 -------- 5 files changed, 8 insertions(+), 23 deletions(-) delete mode 100755 ci/lint/container-entrypoint.sh diff --git a/ci/lint.py b/ci/lint.py index e7720fc15ac..6c7e0e8ad41 100755 --- a/ci/lint.py +++ b/ci/lint.py @@ -73,6 +73,7 @@ def main(): *get_worktree_mounts(repo_root), *([] if is_ci else ["-it"]), container, + "./ci/lint/06_script.sh", *sys.argv[1:], ] ) diff --git a/ci/lint/01_install.sh b/ci/lint/01_install.sh index 64400fd85a3..44563d424e2 100755 --- a/ci/lint/01_install.sh +++ b/ci/lint/01_install.sh @@ -8,6 +8,7 @@ export LC_ALL=C set -o errexit -o pipefail -o xtrace +export DEBIAN_FRONTEND=noninteractive export CI_RETRY_EXE="/ci_retry" pushd "/" diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh index ffbf68ea086..1b36fada9fc 100755 --- a/ci/lint/06_script.sh +++ b/ci/lint/06_script.sh @@ -8,6 +8,12 @@ export LC_ALL=C set -o errexit -o pipefail -o xtrace +# Fixes permission issues when there is a container UID/GID mismatch with the owner +# of the mounted bitcoin src dir. +git config --global --add safe.directory /bitcoin + +export PATH="/python_build/bin:${PATH}" + if [ -n "${LINT_CI_IS_PR}" ]; then export COMMIT_RANGE="HEAD~..HEAD" if [ "$(git rev-list -1 HEAD)" != "$(git rev-list -1 --merges HEAD)" ]; then diff --git a/ci/lint/container-entrypoint.sh b/ci/lint/container-entrypoint.sh deleted file mode 100755 index 6edb74a2b1d..00000000000 --- a/ci/lint/container-entrypoint.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/license/mit/. - -export LC_ALL=C - -# Fixes permission issues when there is a container UID/GID mismatch with the owner -# of the mounted bitcoin src dir. -git config --global --add safe.directory /bitcoin - -export PATH="/python_build/bin:${PATH}" - -./ci/lint/06_script.sh "$@" diff --git a/ci/lint_imagefile b/ci/lint_imagefile index b32380769de..77e9688c650 100644 --- a/ci/lint_imagefile +++ b/ci/lint_imagefile @@ -6,19 +6,11 @@ FROM mirror.gcr.io/ubuntu:24.04 -ENV DEBIAN_FRONTEND=noninteractive -ENV LC_ALL=C.UTF-8 - COPY ./ci/retry/retry /ci_retry COPY ./.python-version /.python-version -COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh COPY ./ci/lint/01_install.sh /install.sh RUN /install.sh && \ - echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \ - chmod 755 /entrypoint.sh && \ rm -rf /var/lib/apt/lists/* - WORKDIR /bitcoin -ENTRYPOINT ["/entrypoint.sh"]