osi-tools/test/mod-reproducible.sh

26 lines
1.0 KiB
Bash

#!/hint/bash -euE
# Copyright (C) 2023-2024 Umorpha Systems
# SPDX-License-Identifier: AGPL-3.0-or-later
post_install+=(79:reproducible:rm)
reproducible:rm() {
local arg_mountpoint=$1
# Base images are not currently reproducible, because of the files:
# - /etc/machine-id
# source: /var/lib/pacman/local/systemd-*/install -> systemd:/usr/bin/systemd-machine-id-setup
# solution: should probably have a machine-id config option
rm -f -- "$arg_mountpoint"/etc/machine-id
# - /etc/ssl/certs/java/cacerts
# source: ca-certificate-utils:/usr/share/libalpm/hooks/40-update-ca-trust.hook -> ca-certificate-utils:/usr/bin/update-ca-trust -> p11-kit:/usr/bin/trust
# solution: should contribute a patch to p11-kit to make it reproducible
rm -f -- "$arg_mountpoint"/etc/ssl/certs/java/cacerts
# - /var/cache/ldconfig/aux-cache
# source: /var/lib/pacman/local/glibc-*/install -> glibc:/usr/bin/ldconfig
# solution: should contribute a patch to glibc to make it reproducible
rm -f -- "$arg_mountpoint"/var/cache/ldconfig/aux-cache
}