From 57818e877502a6fcddf22d394f3768ebe4feaf00 Mon Sep 17 00:00:00 2001 From: tylinux Date: Wed, 20 Apr 2022 11:01:09 +0800 Subject: [PATCH 1/5] qemu 7.0.0 --- Formula/qemu.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Formula/qemu.rb b/Formula/qemu.rb index 99645bcb3628c..52b2bc2f2ab89 100644 --- a/Formula/qemu.rb +++ b/Formula/qemu.rb @@ -1,10 +1,9 @@ class Qemu < Formula desc "Emulator for x86 and PowerPC" homepage "https://www.qemu.org/" - url "https://download.qemu.org/qemu-6.2.0.tar.xz" - sha256 "68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45" + url "https://download.qemu.org/qemu-7.0.0.tar.xz" + sha256 "f6b375c7951f728402798b0baabb2d86478ca53d44cedbefabbe1c46bf46f839" license "GPL-2.0-only" - revision 1 head "https://git.qemu.org/git/qemu.git", branch: "master" bottle do From 53d4611cae865d179f5329e888933000f4a35de0 Mon Sep 17 00:00:00 2001 From: tylinux Date: Wed, 20 Apr 2022 11:43:04 +0800 Subject: [PATCH 2/5] remove unnecessary patches --- Formula/qemu.rb | 74 ------------------------------------------------- 1 file changed, 74 deletions(-) diff --git a/Formula/qemu.rb b/Formula/qemu.rb index 52b2bc2f2ab89..70d85e4748765 100644 --- a/Formula/qemu.rb +++ b/Formula/qemu.rb @@ -49,80 +49,6 @@ class Qemu < Formula sha256 "81237c7b42dc0ffc8b32a2f5734e3480a3f9a470c50c14a9c4576a2561a35807" end - # The following patches add 9p support to darwin. They can - # be deleted when qemu-7 is released. - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/e0bd743bb2dd4985791d4de880446bdbb4e04fed.diff" - sha256 "9168d424f7bcabb74fdca35fd4d3db1279136ce03d656a2e0391aa4344244e49" - end - patch do - url "https://raw.githubusercontent.com/baude/homebrew-qemu/798fdd7c6e2924591f45b282b3f59cb6e9850504/add_9p-util-linux.diff" - sha256 "e2835578eeea09b75309fc3ac4a040b47c0ac8149150d8ddf45f7228ab7b5433" - end - patch do - url "https://raw.githubusercontent.com/baude/homebrew-qemu/798fdd7c6e2924591f45b282b3f59cb6e9850504/remove_9p-util.diff" - sha256 "ccf31a8e60ac7fc54fd287eca7e63fe1c9154e346d2a1367b33630227b88144d" - end - patch do - url "https://raw.githubusercontent.com/ashley-cui/homebrew-podman/e1162ec457bd46ed84aef9a0aa41e80787121088/change.patch" - sha256 "af8343144aea8b51852b8bf7c48f94082353c5e0c57d78fc61e7c3e4be3658b9" - end - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/f41db099c71151291c269bf48ad006de9cbd9ca6.diff" - sha256 "1769d60fc2248fc457846ec8fbbf837be539e08bd0f56daf6ec9201afe6c157e" - end - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/6b3b279bd670c6a2fa23c9049820c814f0e2c846.diff" - sha256 "bde6fa9deffeb31ca092f183a9bffc1041501c2532a625f8875fa119945049b8" - end - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/67a71e3b71a2834d028031a92e76eb9444e423c6.diff" - sha256 "60f38699e2488f854c295afbfea56f30fce1ebc0d2a7dcddf8bedba2d14533b1" - end - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/38d7fd68b0c8775b5253ab84367419621aa032e6.diff" - sha256 "b89ed2a06d1e81cb18b7fab0b47313d8a3acc6be70a4874854c0cc925fc6e57f" - end - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/57b3910bc3513ab515296692daafd1c546f3c115.diff" - sha256 "4bbd1f2d209f099fb2b075630b67a3d08829d67c56edcb21fc5688f66a486296" - end - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/b5989326f558faedd2511f29459112cced2ca8f5.diff" - sha256 "5c53c4cc28229058f9fac3eed521d62edf9b952bf24eb18790a400a074ed6f0b" - end - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/029ed1bd9defa33a80bb40cdcd003699299af8db.diff" - sha256 "a349c6de07fcf8314a1d84cacc05c68573728641cc5054d0fc149d14e1c9bed8" - end - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/d3671fd972cd185a6923433aa4802f54d8b62112.diff" - sha256 "f40dd472ec4dcbf6f352338de85c1aba5a92a3b9f0a691f8ae51e298e2b5a273" - end - patch do - url "https://raw.githubusercontent.com/NixOS/nixpkgs/8fc669a1dd84ae0db237fdb30e84c9f47e0e9436/pkgs/applications/virtualization/qemu/allow-virtfs-on-darwin.patch" - sha256 "61422ab60ed9dfa3d9fe8a267c54fab230f100e9ba92275bc98cf5da9e388cde" - end - - # Backport the following commits from QEMU master (QEMU 7): - # - ad99f64f hvf: arm: Use macros for sysreg shift/masking - # - 7f6c295c hvf: arm: Handle unknown ID registers as RES0 - # - # These patches are required for running the following guests: - # - Linux 5.17 - # - Ubuntu 21.10, kernel 5.13.0-35.40 (March 2022) - # - Ubuntu 20.04, kernel 5.4.0-103.117 (March 2022) - # - # See https://gitlab.com/qemu-project/qemu/-/issues/899 - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/ad99f64f1cfff7c5e7af0e697523d9b7e45423b6.diff" - sha256 "004e1b7b7c422628b3d6a95827bfca8a19ec36c0d2a0e6ee1f1046d0a2a101ad" - end - patch do - url "https://gitlab.com/qemu-project/qemu/-/commit/7f6c295cdfeaa229c360cac9a36e4e595aa902ae.diff" - sha256 "a8d02dcad74da3c3cb18c113a195477dcb76d1128761e48e6827f04d235ed3ce" - end - def install ENV["LIBTOOL"] = "glibtool" From 6067b1806566bce70e53dedcce33a98094e9baa6 Mon Sep 17 00:00:00 2001 From: tylinux Date: Sat, 21 May 2022 15:48:02 +0800 Subject: [PATCH 3/5] disable user space emulator on Linux to avoid build failed on Ubuntu-16.04 --- Formula/qemu.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/qemu.rb b/Formula/qemu.rb index 70d85e4748765..9789f0f9367cd 100644 --- a/Formula/qemu.rb +++ b/Formula/qemu.rb @@ -65,6 +65,7 @@ def install --enable-virtfs --extra-cflags=-DNCURSES_WIDECHAR=1 --disable-sdl + --disable-linux-user ] # Sharing Samba directories in QEMU requires the samba.org smbd which is # incompatible with the macOS-provided version. This will lead to From b90b83bc43c8f633b6cbb275f5de33edcd22bb69 Mon Sep 17 00:00:00 2001 From: tylinux Date: Sat, 21 May 2022 16:53:28 +0800 Subject: [PATCH 4/5] add comment for disable linux user space emulator --- Formula/qemu.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/qemu.rb b/Formula/qemu.rb index 9789f0f9367cd..bbdba74782828 100644 --- a/Formula/qemu.rb +++ b/Formula/qemu.rb @@ -65,6 +65,7 @@ def install --enable-virtfs --extra-cflags=-DNCURSES_WIDECHAR=1 --disable-sdl + # Please remove this line when the CI gets updated to a recent version of Ubuntu(kernel version >= 4.9) --disable-linux-user ] # Sharing Samba directories in QEMU requires the samba.org smbd which is From 03a66f3d3101c1ddd2d778b8268ce35f0441c59b Mon Sep 17 00:00:00 2001 From: tylinux Date: Sat, 21 May 2022 16:59:34 +0800 Subject: [PATCH 5/5] change comment format --- Formula/qemu.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Formula/qemu.rb b/Formula/qemu.rb index bbdba74782828..54e0bd124b4f7 100644 --- a/Formula/qemu.rb +++ b/Formula/qemu.rb @@ -65,9 +65,11 @@ def install --enable-virtfs --extra-cflags=-DNCURSES_WIDECHAR=1 --disable-sdl - # Please remove this line when the CI gets updated to a recent version of Ubuntu(kernel version >= 4.9) - --disable-linux-user ] + + # Please remove this line when the CI gets updated to a recent version of Ubuntu(kernel version >= 4.9) + args << "--disable-linux-user" + # Sharing Samba directories in QEMU requires the samba.org smbd which is # incompatible with the macOS-provided version. This will lead to # silent runtime failures, so we set it to a Homebrew path in order to