diff --git a/usr/bin/archboot-aarch64-create-container.sh b/usr/bin/archboot-aarch64-create-container.sh index afa131ae5..60607dbf0 100755 --- a/usr/bin/archboot-aarch64-create-container.sh +++ b/usr/bin/archboot-aarch64-create-container.sh @@ -35,7 +35,7 @@ if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then _clean_container "${1}" 2>/dev/null fi _change_pacman_conf "${1}" || exit 1 -_add_groups +_fix_groups _reproducibility "${1}" _set_hostname "${1}" || exit 1 echo "Finished container setup in ${1} ." diff --git a/usr/bin/archboot-x86_64-create-container.sh b/usr/bin/archboot-x86_64-create-container.sh index cb19362a5..4360d3aab 100755 --- a/usr/bin/archboot-x86_64-create-container.sh +++ b/usr/bin/archboot-x86_64-create-container.sh @@ -31,7 +31,7 @@ if grep -q "^\[testing" /etc/pacman.conf; then sed -i -e '/^#\[community-testing\]/ { n ; s/^#// }' "${1}/etc/pacman.conf" sed -i -e 's:^#\[testing\]:\[testing\]:g' -e 's:^#\[community-testing\]:\[community-testing\]:g' "${1}/etc/pacman.conf" fi -_add_groups +_fix_groups _reproducibility "${1}" _set_hostname "${1}" || exit 1 echo "Finished container setup in ${1} ." diff --git a/usr/lib/archboot/container.sh b/usr/lib/archboot/container.sh index 5c7bc5166..7002c9c87 100644 --- a/usr/lib/archboot/container.sh +++ b/usr/lib/archboot/container.sh @@ -188,8 +188,8 @@ _set_hostname() { echo 'archboot' > "${1}/etc/hostname" } -_add_groups() { - grep -qw network /etc/group || groupadd network - grep -qw tss /etc/group || groupadd tss - grep -qw netdev /etc/group || groupadd netdev +_fix_groups() { + echo "Recreate system groups ..." + rm "${1}"/etc/{group,gshadow} + systemd-nspawn -q -D "${1}" /bin/bash -c "pacman -Sy filesystem --config ${_PACMAN_CONF} --ignore systemd-resolvconf --noconfirm" >/dev/null 2>&1 }