7 toolbox rm -f $RELEASE || true
8 podman pull docker.io/$DISTRO:$RELEASE
9 toolbox -y create -c $RELEASE --image docker.io/$DISTRO:$RELEASE
11 # can't do that with toolbox run yet, as we need to install sudo first
13 podman exec -it $RELEASE sh -exc '
15 echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/unsafe-io
17 # otherwise installing systemd fails
18 umount /var/log/journal
21 if [ -e /etc/apt/sources.list.d/debian.sources ]; then
22 sed -i "/^Types:/ s/deb$/deb deb-src/" /etc/apt/sources.list.d/debian.sources
26 apt-get install -y libnss-myhostname sudo eatmydata libcap2-bin
28 # allow sudo with empty password
29 sed -i "s/nullok_secure/nullok/" /etc/pam.d/common-auth
31 # unbreak slow host name resolution
32 sed -i "/^hosts:/ s/files dns myhostname/files myhostname dns/" /etc/nsswitch.conf
35 toolbox run --container $RELEASE sh -exc '
38 echo "${ID}-${VERSION_ID:-sid}" | sudo tee /etc/hostname
39 sudo hostname -F /etc/hostname
41 sudo DEBIAN_FRONTEND=noninteractive eatmydata apt-get -y dist-upgrade
44 sudo eatmydata apt-get install -y --no-install-recommends build-essential git-buildpackage libwww-perl less vim lintian debhelper manpages-dev git dput pristine-tar bash-completion wget gnupg ubuntu-dev-tools python3-debian fakeroot libdistro-info-perl openssh-client flatpak-xdg-utils
47 sudo eatmydata apt-get install -y --no-install-recommends autopkgtest qemu-system-x86 qemu-utils genisoimage uidmap
49 # commands to forward to the host
50 for cmd in podman toolbox; do
51 printf "#!/bin/sh\n/usr/libexec/flatpak-xdg-utils/flatpak-spawn --host $cmd \42\$@\42\n" | sudo tee /usr/local/bin/$cmd >/dev/null
52 sudo chmod a+x /usr/local/bin/$cmd
56 toolbox enter --container $RELEASE