two-images: construction reproductible de rocky10 et debian13 par Packer, test de démarrage syonad/two#53
Some checks failed
Tests / check (push) Failing after 39s

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-24 13:53:56 +02:00
commit fe401b9a12
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
18 changed files with 937 additions and 0 deletions

20
packer/scripts/clean.sh Normal file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
empty_dir () {
[ -d "${1}" ] && find "${1}" -mindepth 1 -delete
return 0
}
for d in /mnt/var/cache/dnf /mnt/var/cache/yum /mnt/root/.ssh /mnt/tmp /mnt/var/tmp /mnt/var/lib/dhcp /mnt/var/lib/cloud; do
empty_dir "${d}"
done
rm -f /mnt/root/.bash_history
find /mnt/var/log ! -type d -delete
find /mnt/etc/ssh -maxdepth 1 -name 'ssh_host_*' -delete
if [ -f /mnt/etc/machine-id ]; then
: > /mnt/etc/machine-id
fi
if [ -f /mnt/var/lib/dbus/machine-id ] && [ ! -L /mnt/var/lib/dbus/machine-id ]; then
rm -f /mnt/var/lib/dbus/machine-id
fi