Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old version of QEMU #24

Open
tw00 opened this issue Mar 29, 2024 · 2 comments
Open

Old version of QEMU #24

tw00 opened this issue Mar 29, 2024 · 2 comments

Comments

@tw00
Copy link

tw00 commented Mar 29, 2024

It looks like QUS is pointing to a fork of QEMU which hasn't caught up with the main repo in 3 years:

https://github.com/dbhi/qus/blob/f79aa71b04f5b1bfc98769edbf9a7a10659708fe/register.sh#L117C86-L117C150

@umarcor
Copy link
Member

umarcor commented May 25, 2024

The usage of that script is unrelated to the version of QEMU (the binaries) that are registered. The versions of QEMU that are used can be seen in https://github.com/dbhi/qus/blob/main/cli/config.yml. So, it's currently 7.2. It's also not up-to-date, tho.

Been pretty busy lately and did not have any specific reason to pursue bumping QEMU. Is there any feature in versions newer than 7.2 which you need? Or is it just a matter of keeping software updated?

With regard to the registration script itself, register.sh is just a wrapper around qemu-binfmt-conf.sh. Is there any relevant feature/enhancement in https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh which is missing in https://github.com/umarcor/qemu/blob/series-qemu-binfmt-conf/scripts/qemu-binfmt-conf.sh?

@iii-i
Copy link

iii-i commented Dec 4, 2024

QEMU 9 has a number of important optimizations and bugfixes. One use case that is relevant to me, and that is broken on older QEMUs, is using the GitHub Actions Runner on the s390x architecture:

# docker run --rm --privileged aptman/qus -s -- -p x86_64
cat ./qemu-binfmt-conf.sh | sh -s -- --path=/qus/bin -p x86_64 --suffix -static
Setting /qus/bin/qemu-x86_64-static as binfmt interpreter for x86_64

# DOTNET_EnableWriteXorExecute=0 RUNNER_ALLOW_RUNASROOT=1 ./config.sh --url <redacted> --token <redacted>
qemu: uncaught target signal 6 (Aborted) - core dumped

If I upgrade qus as follows (debian moved the real binaries to qemu-user, so it's a little bit involved):

diff --git a/cli/config.yml b/cli/config.yml
index af37817..03e48e3 100644
--- a/cli/config.yml
+++ b/cli/config.yml
@@ -19,8 +19,8 @@ versions:
 
   default: &ver_def
     debian: &ver_debian_def
-      base: "7.2"
-      rev: "+dfsg-5"
+      base: "9.2.0~rc0"
+      rev: "+ds-1"
     fedora: &ver_fedora_def
       base: "7.2.0"
       rev: "7.fc39"
diff --git a/run.sh b/run.sh
index 3e3e0ba..f93153e 100755
--- a/run.sh
+++ b/run.sh
@@ -159,9 +159,9 @@ build () {
       done
     ;;
     debian)
-      PACKAGE_URI=${PACKAGE_URI:-http://ftp.debian.org/debian/pool/main/q/qemu/qemu-user-static_${VERSION}${SOURCE_VERSION}_${BARCH}.deb}
+      PACKAGE_URI=${PACKAGE_URI:-http://ftp.debian.org/debian/pool/main/q/qemu/qemu-user_${VERSION}${SOURCE_VERSION}_${BARCH}.deb}
       gstart "Extract $PACKAGE_URI"
-      curl -fsSL "$PACKAGE_URI" | dpkg --fsys-tarfile - | tar xvf - --wildcards ./usr/bin/qemu-*-static --strip-components=3
+      curl -fsSL "$PACKAGE_URI" | dpkg --fsys-tarfile - | tar xvf - --wildcards ./usr/bin/qemu-* --strip-components=3
       gend
     ;;
   esac
@@ -175,7 +175,7 @@ build () {
       IMG="${REPO}:${BASE_ARCH}-f${VERSION}"
     ;;
     debian)
-      IMG="${REPO}:${BASE_ARCH}-d${VERSION}"
+      IMG=$(echo "${REPO}:${BASE_ARCH}-d${VERSION}" | tr '~' '-')
     ;;
   esac                                                

the I get:

qus# BASE_ARCH=s390x ./run.sh -b

# docker run --rm --privileged aptman/qus:s390x-d9.2.0-rc0 -- -r
# docker run --rm --privileged aptman/qus:s390x-d9.2.0-rc0 -- -p x86_64

# DOTNET_EnableWriteXorExecute=0 RUNNER_ALLOW_RUNASROOT=1 ./config.sh --url <redacted> --token <redacted>
[...]
√ Settings Saved.

# DOTNET_EnableWriteXorExecute=0 RUNNER_ALLOW_RUNASROOT=1 ./run.sh
2024-12-04 20:20:00Z: Listening for Jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants