net-test: upgrade to iptables 1.8.4-3
and various other changes to make things actually build
One of the more interesting aspects of things is that
the root directory must be root:root 0755 or systemd
fails to install.
Tested: built via ./build_all_rootfs.sh
net_test.rootfs.amd64.bullseye.20200417
net_test.rootfs.arm64.bullseye.20200417
net_test.rootfs.armhf.bullseye.20200417
net_test.rootfs.i386.bullseye.20200417
Haven't tested they work, but this is what is needed
to even make them build.
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie9f6f719993a7f4bb220de9218dcb590111b1e12
diff --git a/net/test/build_rootfs.sh b/net/test/build_rootfs.sh
index d31674d..5563d8a 100755
--- a/net/test/build_rootfs.sh
+++ b/net/test/build_rootfs.sh
@@ -96,12 +96,18 @@
packages=`cat $SCRIPT_DIR/rootfs/$suite.list | xargs | tr -s ' ' ','`
# For the debootstrap intermediates
-workdir=`mktemp -d`
-workdir_remove() {
+tmpdir=`mktemp -d`
+tmpdir_remove() {
echo "Removing temporary files.." >&2
- sudo rm -rf $workdir
+ sudo rm -rf "${tmpdir}"
}
-trap workdir_remove EXIT
+trap tmpdir_remove EXIT
+
+workdir="${tmpdir}/_"
+
+mkdir "${workdir}"
+chmod 0755 "${workdir}"
+sudo chown root:root "${workdir}"
# Run the debootstrap first
cd $workdir
@@ -126,7 +132,7 @@
mount=`mktemp -d`
mount_remove() {
rmdir $mount
- workdir_remove
+ tmpdir_remove
}
trap mount_remove EXIT