From adb9d7b08ef14a098d0a3f82a46555be01e4eed2 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Wed, 14 Oct 2020 22:39:30 -0400 Subject: [PATCH] Update DEB --- debian/client/DEBIAN/control | 4 ++-- debian/client/DEBIAN/postinst | 2 -- debian/client/usr/bin/minecraft-pi | 7 +------ debian/server/DEBIAN/control | 4 ++-- debian/server/DEBIAN/postinst | 2 -- scripts/package.sh | 4 +++- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/debian/client/DEBIAN/control b/debian/client/DEBIAN/control index 1d3f8861..56331a77 100644 --- a/debian/client/DEBIAN/control +++ b/debian/client/DEBIAN/control @@ -3,5 +3,5 @@ Version: 1.0.0 Maintainer: TheBrokenRail Description: Fun with Blocks Homepage: https://www.minecraft.net/en-us/edition/pi -Architecture: amd64 -Depends: docker.io, docker-compose, virgl-server, zenity, policykit-1, adduser, login +Architecture: all +Depends: docker.io, docker-compose, virgl-server, zenity, policykit-1, passwd, login, qemu-user-static, binfmt-support diff --git a/debian/client/DEBIAN/postinst b/debian/client/DEBIAN/postinst index acd43e52..7d4c2c68 100755 --- a/debian/client/DEBIAN/postinst +++ b/debian/client/DEBIAN/postinst @@ -2,6 +2,4 @@ set -e -docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - MCPI_FEATURES='' MCPI_USERNAME='' docker-compose -f /usr/share/minecraft-pi/client/docker-compose.yml pull diff --git a/debian/client/usr/bin/minecraft-pi b/debian/client/usr/bin/minecraft-pi index de5ae071..9f32a26c 100755 --- a/debian/client/usr/bin/minecraft-pi +++ b/debian/client/usr/bin/minecraft-pi @@ -17,12 +17,7 @@ VIRGL_PID="$!" # Ensure Groups Are Correct if [ -z "${MCPI_SUBSHELL}" ]; then if ! id -Gn "$(whoami)" | grep '\bdocker\b' > /dev/null; then - if ! command -v adduser &> /dev/null - then - pkexec usermod -aG "$(whoami)" docker - else - pkexec adduser "$(whoami)" docker - fi + pkexec usermod -aG "$(whoami)" docker fi exec sg docker "env MCPI_SUBSHELL=1 \"$(realpath -e "$0")\"" fi diff --git a/debian/server/DEBIAN/control b/debian/server/DEBIAN/control index 5adfb8a4..358204b1 100644 --- a/debian/server/DEBIAN/control +++ b/debian/server/DEBIAN/control @@ -3,5 +3,5 @@ Version: 1.0.0 Maintainer: TheBrokenRail Description: Fun with Blocks Homepage: https://www.minecraft.net/en-us/edition/pi -Architecture: amd64 -Depends: docker.io, docker-compose +Architecture: all +Depends: docker.io, docker-compose, qemu-user-static, binfmt-support diff --git a/debian/server/DEBIAN/postinst b/debian/server/DEBIAN/postinst index 6015d64f..cc4a826e 100755 --- a/debian/server/DEBIAN/postinst +++ b/debian/server/DEBIAN/postinst @@ -2,6 +2,4 @@ set -e -docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - MCPI_ROOT='' docker-compose -f /usr/share/minecraft-pi/server/docker-compose.yml pull diff --git a/scripts/package.sh b/scripts/package.sh index 198fb2a9..653c6421 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -21,5 +21,7 @@ cp -r mods/include out/lib/include # Copy Shared Library IMG_ID="$(docker create thebrokenrail/minecraft-pi:client)" -docker cp "${IMG_ID}":/app/minecraft-pi/mods/. ./out/lib/. +docker cp "${IMG_ID}":/app/minecraft-pi/mods/. ./out/lib/. || : +RET="$?" docker rm -v "${IMG_ID}" +exit "${RET}"