From 0042fea601b4f77483f125fae29bcb0e48ae2237 Mon Sep 17 00:00:00 2001 From: Sergei Kuvakin Date: Wed, 21 Jul 2021 21:24:45 +0300 Subject: [PATCH] feat: qemu 6.0.0-1 --- .github/workflows/actions.yml | 4 +-- containers/latest/Dockerfile | 2 +- run.sh | 54 +++++++++++++++++++---------------- 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index e6e6ce7..c870c75 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -18,8 +18,8 @@ jobs: qemu-user-static: runs-on: ubuntu-latest env: - VERSION: 5.2.0-11 - ORIGIN_VERSION: 5.2+dfsg-11 + VERSION: 6.0.0-1 + ORIGIN_VERSION: 6.0+dfsg-1~exp0 steps: - uses: actions/checkout@v2 - name: Set variables diff --git a/containers/latest/Dockerfile b/containers/latest/Dockerfile index 6fa177a..1edc8e8 100644 --- a/containers/latest/Dockerfile +++ b/containers/latest/Dockerfile @@ -1,7 +1,7 @@ FROM busybox ENV QEMU_BIN_DIR=/usr/bin ADD ./register.sh /register -ADD https://raw.githubusercontent.com/qemu/qemu/7c81570d932268a9626457a662f1c5046ebc455e/scripts/qemu-binfmt-conf.sh /qemu-binfmt-conf.sh +ADD https://raw.githubusercontent.com/qemu/qemu/e75941331e4cdc05878119e08635ace437aae721/scripts/qemu-binfmt-conf.sh /qemu-binfmt-conf.sh RUN chmod +x /qemu-binfmt-conf.sh COPY qemu-*-static /usr/bin/ ENTRYPOINT ["/register"] diff --git a/run.sh b/run.sh index aecc387..f355ad9 100755 --- a/run.sh +++ b/run.sh @@ -19,23 +19,23 @@ shift $((OPTIND-1)) [ "$1" = "--" ] && shift -base_path=$(pwd) -cd releases/usr/bin/ -for file in *; do - tar -czf $file.tar.gz $file; - mv $file.tar.gz x86_64_$file.tar.gz -done -cd ${base_path} - -from_arch="x86_64" -to_archs="aarch64 aarch64_be alpha arm armeb cris hppa i386 m68k microblaze microblazeel mips mips64 mips64el mipsel mipsn32 mipsn32el nios2 or1k ppc ppc64 ppc64le riscv32 riscv64 s390x sh4 sh4eb sparc sparc32plus sparc64 x86_64 xtensa xtensaeb" - # Build container images creating the directory. # containers/ # latest/ - An image including /usr/bin/qemu-$arch-status and /register script. # ${from_arch}_qemu-${to_arch}/ - Images including /usr/bin/qemu-$arch-status # register/ - An image including /register script. + +from_arch="x86_64" +root_dir=$(pwd) out_dir="containers" +releases_dir="releases/usr/bin/" + +cd ${releases_dir} +for file in *; do + tar -czf $file.tar.gz $file; + mv $file.tar.gz x86_64_$file.tar.gz +done +cd ${root_dir} # Generate register files. cp -p "${out_dir}/latest/register.sh" "${out_dir}/register/" @@ -43,23 +43,27 @@ cp -p "${out_dir}/latest/Dockerfile" "${out_dir}/register/" # Comment out the line to copy qemu-*-static not to provide those. sed -i '/^COPY qemu/ s/^/#/' "${out_dir}/register/Dockerfile" -for to_arch in $to_archs; do - if [ "$from_arch" != "$to_arch" ]; then - work_dir="${out_dir}/${from_arch}_qemu-${to_arch}" - mkdir -p "${work_dir}" - cp -p "releases/usr/bin/qemu-${to_arch}-static" ${work_dir} - cp -p "${work_dir}/qemu-${to_arch}-static" "${out_dir}/latest/" - cat > ${work_dir}/Dockerfile -< ${work_dir}/Dockerfile -<