From a53649ced2eff76fbf301a378156fb82f1abb01c Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Sat, 15 Aug 2026 03:34:27 +0000 Subject: [PATCH 1/2] fix(docker): register /usr/local/lib in ld.so.conf.d so the source-built SQLite loads on arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The #6900 SQLite-from-source upgrade passed the amd64 docker-smoke but FAILED the multi-arch release build on linux/arm64 with 'AssertionError: SQLite 3.46.1 still vulnerable' — Python's sqlite3 kept loading the base image's /usr/lib multiarch libsqlite3 (3.46.1) instead of the freshly-compiled /usr/local/lib copy (3.53.0), because /usr/local/lib is NOT in the default ld.so search path on Debian arm64 (it happened to be picked up on amd64). Register /usr/local/lib via an ld.so.conf.d entry before ldconfig so the new lib wins on every architecture. The PR's own build-time version assertion is what surfaced this (correctly), and it also serves as the verification that the fix works once the arm64 build passes. Follow-up to #6900 (exp-v0.52.227, whose multi-arch image failed to build/push). --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6db3383eaa4..35016719b20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,10 @@ RUN apt-get update -y --fix-missing --no-install-recommends \ # https://sqlite.org/wal.html#walresetbug # # Debian has not backported the fix, so we compile from the amalgamation. -# Installs to /usr/local/lib (takes ldconfig priority over /usr/lib). +# Installs to /usr/local/lib, which is registered in ld.so.conf.d and given +# priority via ldconfig so Python's sqlite3 loads it ahead of the base image's +# /usr/lib multiarch copy (the default ld.so path does NOT include +# /usr/local/lib on Debian arm64, so the explicit conf entry is required). # Build tools are purged after compilation to keep the image lean. # Build args are for forward version bumps only (3.54+, etc.). # When bumping SQLITE_VERSION, recompute the SHA-256 from the official @@ -56,6 +59,7 @@ RUN apt-get update \ --enable-fts5 --enable-fts4 --enable-rtree \ && make -j"$(nproc)" \ && make install \ + && echo "/usr/local/lib" > /etc/ld.so.conf.d/000-usr-local-lib.conf \ && /sbin/ldconfig \ && cd / && rm -rf /tmp/sqlite* \ && apt-get purge -y gcc make libc6-dev \ From e1e2dc9bb9ebb075692206c16f0b68b12de572c6 Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Sat, 15 Aug 2026 03:46:50 +0000 Subject: [PATCH 2/2] test-fix: keep wal.html link within 500 chars of ARG (condense arm64 comment) --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 35016719b20..7d3abc33bc0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,10 +36,7 @@ RUN apt-get update -y --fix-missing --no-install-recommends \ # https://sqlite.org/wal.html#walresetbug # # Debian has not backported the fix, so we compile from the amalgamation. -# Installs to /usr/local/lib, which is registered in ld.so.conf.d and given -# priority via ldconfig so Python's sqlite3 loads it ahead of the base image's -# /usr/lib multiarch copy (the default ld.so path does NOT include -# /usr/local/lib on Debian arm64, so the explicit conf entry is required). +# Installs to /usr/local/lib (registered in ld.so.conf.d for arm64 priority). # Build tools are purged after compilation to keep the image lean. # Build args are for forward version bumps only (3.54+, etc.). # When bumping SQLITE_VERSION, recompute the SHA-256 from the official