Merge branch 'ld_cache' into 'master'

Drop placeholder substitution for ldconfig aux-cache cleanup in Dockerfile template

See merge request archlinux/archlinux-docker!103
This commit is contained in:
hashworks 2026-05-10 15:19:36 +02:00
commit 34b8748516
2 changed files with 6 additions and 5 deletions

View File

@ -37,8 +37,7 @@ LABEL org.opencontainers.image.created="TEMPLATE_CREATED"
COPY --from=verify /rootfs/ /
RUN ldconfig && \
sed -i '/BUILD_ID/a VERSION_ID=TEMPLATE_VERSION_ID' /etc/os-release && \
LDCONFIG_AUX_CACHE
sed -i '/BUILD_ID/a VERSION_ID=TEMPLATE_VERSION_ID' /etc/os-release
ENV LANG=C.UTF-8
CMD ["/usr/bin/bash"]

View File

@ -22,10 +22,8 @@ CI_COMMIT_SHA="${CI_COMMIT_SHA:-$(git rev-parse HEAD)}"
# Honor SOURCE_DATE_EPOCH and delete non-determistic ldconfig auxiliary cache file for the repro GROUP
if [[ "$GROUP" == "repro" ]]; then
CREATED_TIMESTAMP=$(date -u -d "@$SOURCE_DATE_EPOCH" +%Y-%m-%dT%H:%M:%SZ)
LDCONFIG_AUX_CACHE="rm -f /var/cache/ldconfig/aux-cache"
else
CREATED_TIMESTAMP=$(date -Is)
LDCONFIG_AUX_CACHE="true"
fi
sed -e "s|TEMPLATE_ROOTFS_FILE|$ROOTFS_FILE|" \
@ -35,5 +33,9 @@ sed -e "s|TEMPLATE_ROOTFS_FILE|$ROOTFS_FILE|" \
-e "s|TEMPLATE_VERSION_ID|$BUILD_VERSION|" \
-e "s|TEMPLATE_REVISION|$CI_COMMIT_SHA|" \
-e "s|TEMPLATE_CREATED|$CREATED_TIMESTAMP|" \
-e "s|LDCONFIG_AUX_CACHE|$LDCONFIG_AUX_CACHE|" \
Dockerfile.template > "$OUTPUTDIR/Dockerfile.$GROUP"
if [[ "$GROUP" == "repro" ]]; then
sed -i '/VERSION_ID=.*os-release$/ s/$/ \&\& \\\n rm -f \/var\/cache\/ldconfig\/aux-cache/' \
"$OUTPUTDIR/Dockerfile.$GROUP"
fi