[1/8] make bootstrap output reproducible

Message ID 20260820083014.3377283-2-felix.moessbauer@siemens.com
State New
Headers show
Series Make all sstate artifacts reproducible | expand

Commit Message

Felix Moessbauer Aug. 20, 2026, 8:30 a.m. UTC
As a preparation to benefit from the hashequiv server, we need to ensure
the sstate artifacts themselves are reproducible (i.e. if no input
parameter changes, the output does not change).

For that, we follow the mmdebstrap recommendation from the manpage and
pin the hostname and resolv.conf.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
index 994da174..ee6eda3c 100644
--- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
+++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
@@ -255,6 +255,8 @@  do_bootstrap() {
                    --customize-hook='sed -i "/en_US.UTF-8 UTF-8/s/^#//g" "$1/etc/locale.gen"' \
                    --customize-hook='chroot "$1" /usr/sbin/locale-gen' \
                    --customize-hook='chroot "$1" /usr/bin/apt-get -y clean' \
+                   --customize-hook='echo nameserver 127.0.0.1 > "$1"/etc/resolv.conf' \
+                   --customize-hook='echo isar > "$1"/etc/hostname' \
                    ${@'--skip=output/dev' if d.getVar('ISAR_CHROOT_MODE') == 'unshare' else ''} \
                    --skip=cleanup/apt \
                    --skip=download/empty \