From 9be18726a31b4324a3b5092d3176e7d36e01749e Mon Sep 17 00:00:00 2001
From: Son <github@snry.me>
Date: Mon, 26 Feb 2024 20:54:35 -0500
Subject: [PATCH] use /usr/bin/qemu-i386-static instead of box86

---
 bookworm/Dockerfile | 8 +++++---
 bullseye/Dockerfile | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/bookworm/Dockerfile b/bookworm/Dockerfile
index 5f322d4..844b156 100644
--- a/bookworm/Dockerfile
+++ b/bookworm/Dockerfile
@@ -13,7 +13,7 @@ ENV STEAMCMDDIR "${HOMEDIR}/steamcmd"
 
 ENV DEBIAN_FRONTEND noninteractive
 
-ENV DEBUGGER "/usr/local/bin/box86"
+ENV DEBUGGER "/usr/bin/qemu-i386-static"
 
 # Set SHELL option explicitly
 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -22,8 +22,10 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN set -x \
 	# Install, update & upgrade packages
 	&& dpkg --add-architecture armhf \
+	&& dpkg --add-architecture i386 \
 	&& apt-get update \
  	&& apt-get install -y --no-install-recommends --no-install-suggests \
+		libc6:i386=2.36-9+deb12u4 \
 		libc6:armhf=2.36-9+deb12u4 \
 		libstdc++6:armhf=12.2.0-14 \
 		ca-certificates=20230311 \
@@ -36,8 +38,8 @@ RUN set -x \
 	&& apt-mark hold qemu-user-static \
 	&& for file in /usr/bin/qemu-*-static /usr/lib/binfmt.d/qemu-* /usr/libexec/qemu-binfmt/* /usr/sbin/qemu-* /usr/share/binfmts/qemu-* /usr/share/doc/qemu-user-static/* /usr/share/lintian/overrides/qemu-user-static /usr/share/man/man1/qemu-*; do \
         case "$file" in \
-            "/usr/bin/qemu-arm-static" | \
-            "/usr/share/man/man1/qemu-arm-static.1.gz") \
+            "/usr/bin/qemu-i386-static" | \
+            "/usr/share/man/man1/qemu-i386-static.1.gz") \
                 continue;; \
             *) \
                 rm -f "$file";; \
diff --git a/bullseye/Dockerfile b/bullseye/Dockerfile
index 6c4d8ae..cf554c8 100644
--- a/bullseye/Dockerfile
+++ b/bullseye/Dockerfile
@@ -13,7 +13,7 @@ ENV STEAMCMDDIR "${HOMEDIR}/steamcmd"
 
 ENV DEBIAN_FRONTEND noninteractive
 
-ENV DEBUGGER "/usr/local/bin/box86"
+ENV DEBUGGER "/usr/bin/qemu-i386-static"
 
 # Set SHELL option explicitly
 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -22,8 +22,10 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN set -x \
 	# Install, update & upgrade packages
 	&& dpkg --add-architecture armhf \
+	&& dpkg --add-architecture i386 \
 	&& apt-get update \
  	&& apt-get install -y --no-install-recommends --no-install-suggests \
+		libc6:i386=2.31-13+deb11u8 \
 		libc6:armhf=2.31-13+deb11u8 \
 		libstdc++6:armhf=10.2.1-6 \
 		ca-certificates=20210119 \
@@ -36,8 +38,8 @@ RUN set -x \
 	&& apt-mark hold qemu-user-static \
 	&& for file in /usr/bin/qemu-*-static /usr/lib/binfmt.d/qemu-* /usr/libexec/qemu-binfmt/* /usr/sbin/qemu-* /usr/share/binfmts/qemu-* /usr/share/doc/qemu-user-static/* /usr/share/lintian/overrides/qemu-user-static /usr/share/man/man1/qemu-*; do \
         case "$file" in \
-            "/usr/bin/qemu-arm-static" | \
-            "/usr/share/man/man1/qemu-arm-static.1.gz") \
+            "/usr/bin/qemu-i386-static" | \
+            "/usr/share/man/man1/qemu-i386-static.1.gz") \
                 continue;; \
             *) \
                 rm -f "$file";; \