From nobody Tue Nov 16 20:04:22 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 67C3A189BF79; Tue, 16 Nov 2021 20:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Htxpt2L9Fz3J33; Tue, 16 Nov 2021 20:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 302C813C23; Tue, 16 Nov 2021 20:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AGK4MDb012672; Tue, 16 Nov 2021 20:04:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AGK4M7p012671; Tue, 16 Nov 2021 20:04:22 GMT (envelope-from git) Date: Tue, 16 Nov 2021 20:04:22 GMT Message-Id: <202111162004.1AGK4M7p012671@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 05ef481d145c - main - emulators/qemu52: Moved to emulators/qemu5 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05ef481d145c4be469d358851134768deb8c75a7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=05ef481d145c4be469d358851134768deb8c75a7 commit 05ef481d145c4be469d358851134768deb8c75a7 Author: Muhammad Moinur Rahman AuthorDate: 2021-11-16 20:03:37 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2021-11-16 20:03:37 +0000 emulators/qemu52: Moved to emulators/qemu5 - Has been updated to 5.2.0. - This is the last version of 5.X.X branch of qemu and part of updating emulators/qemu to latest 6.X.X branch. - Added a stripped down version of qemu5-nox11 with FLAVORS - Removed some reference to oszoo.org which no longer hosts qemu images and is totally an irrelevent site --- MOVED | 1 + UPDATING | 19 ++ emulators/Makefile | 2 +- emulators/{qemu50 => qemu5}/Makefile | 164 +++++++------- emulators/qemu5/distinfo | 3 + emulators/{qemu50 => qemu5}/files/patch-Makefile | 0 emulators/qemu5/files/patch-configure | 45 ++++ .../patch-disas_libvixl_vixl_a64_disasm-a64.cc | 0 .../{qemu50 => qemu5}/files/patch-net_tap-bsd.c | 0 .../{qemu50 => qemu5}/files/qemu-ifdown.sample | 0 emulators/{qemu50 => qemu5}/files/qemu-ifup.sample | 0 emulators/{qemu50 => qemu5}/pkg-descr | 0 emulators/{qemu50 => qemu5}/pkg-message | 0 emulators/{qemu50 => qemu5}/pkg-plist | 0 emulators/qemu50/distinfo | 7 - emulators/qemu50/files/patch-configure | 166 -------------- emulators/qemu50/files/patch-include_net_net.h | 13 -- emulators/qemu50/files/patch-include_qemu_atomic.h | 41 ---- emulators/qemu50/files/pcap-patch-net_clients.h | 13 -- emulators/qemu50/files/pcap-patch-net_net.c | 250 --------------------- emulators/qemu50/files/pcap-patch-qapi_net.json | 56 ----- 21 files changed, 146 insertions(+), 634 deletions(-) diff --git a/MOVED b/MOVED index 1870e1151dc7..d3ab2c5e2fac 100644 --- a/MOVED +++ b/MOVED @@ -16598,3 +16598,4 @@ astro/boinc-astropulse||2021-11-04|boinc-setiathome removed, no longer needed multimedia/celluloid-devel|multimedia/celluloid|2021-11-05|Out of date: use multimedia/celluloid for now devel/zmusic|audio/zmusic|2021-11-10|Category change emulators/i386-wine-devel||2021-11-16|Removed: obsolete, emulators/wine-devel provides i386 support +emulators/qemu52|emulators/qemu5|2021-11-16|Has expired diff --git a/UPDATING b/UPDATING index 1c8a64201820..fc64800ab0ae 100644 --- a/UPDATING +++ b/UPDATING @@ -5,6 +5,25 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20201116: + AFFECTS: users of emulators/qemu50 + AUTHOR: bofh@FreeBSD.org + + emulators/qemu50 has been moved to emulators/qemu5 and updated to 5.2.0 + which is the last version from 5.X.X branch. This is done in preparation + of updating emulators/qemu into latest 6.X bgranch. If someone wants to + stick with 5.X.X branch please use one of the following command: + + # pkg install qemu5 + or + # portmaster -o emulators/qemu50 emulators/qemu5 + + This version also introduces a stripped nox11 version which can be + installed with: + # pkg install qemu5-nox11 + or + # portmaster emulators/qemu5@nox11 + 20211115: AFFECTS: AFFECTS: users of *-emacs2x-* packages AUTHOR: jrm@FreeBSD.org diff --git a/emulators/Makefile b/emulators/Makefile index d52db5a1ad8a..57589162e84b 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -110,7 +110,7 @@ SUBDIR += qemu-utils SUBDIR += qemu41 SUBDIR += qemu42 - SUBDIR += qemu50 + SUBDIR += qemu5 SUBDIR += qmc2 SUBDIR += quasi88 SUBDIR += riscv-isa-sim diff --git a/emulators/qemu50/Makefile b/emulators/qemu5/Makefile similarity index 60% rename from emulators/qemu50/Makefile rename to emulators/qemu5/Makefile index ef3f07f28f71..b8153fe58729 100644 --- a/emulators/qemu50/Makefile +++ b/emulators/qemu5/Makefile @@ -1,114 +1,119 @@ -# Created by: Juergen Lock - PORTNAME= qemu -PORTVERSION= 5.0.0 -PORTREVISION= 1 +DISTVERSION= 5.2.0 CATEGORIES= emulators +PKGNAMESUFFIX= 5 MASTER_SITES= https://download.qemu.org/ -PKGNAMESUFFIX= 50 DIST_SUBDIR= qemu/${PORTVERSION} -PATCH_SITES= https://github.com/${PORTNAME}/${PORTNAME}/commit/ - MAINTAINER= bofh@FreeBSD.org -COMMENT= QEMU CPU Emulator - 5.0.X branch +COMMENT= QEMU CPU Emulator - 5.X.X branch LICENSE= GPLv2 -ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64 powerpc64le +ONLY_FOR_ARCHS= i386 amd64 powerpc powerpc64 powerpc64 powerpc64le +BUILD_DEPENDS= sphinx-build:textproc/py-sphinx \ + bash:shells/bash LIB_DEPENDS= libnettle.so:security/nettle \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libepoxy.so:graphics/libepoxy \ - libpcre2-8.so:devel/pcre2 + libpcre2-8.so:devel/pcre2 \ + libzstd.so:archivers/zstd + +FLAVORS= default nox11 +default_CONFLICTS_INSTALL= qemu* +nox11_PKGNAMESUFFIX= 5-nox11 +nox11_CONFLICTS_INSTALL= qemu* +nox11_COMMENT= (without X11) -USES= bison compiler:c11 cpe gmake gnome iconv:wchar_t perl5 \ +USES= bison compiler:c11 cpe gmake gnome iconv:wchar_t ninja perl5 \ pkgconfig python:build tar:xz xorg USE_GNOME= cairo glib20 libxml2 USE_PERL5= build +USE_PYTHON= distutils noflavors USE_XORG= pixman -PATCHFILES+= 55765822804f.patch:-p1 -PATCHFILES+= aa4d30f6618d.patch:-p1 - -#BROKEN_powerpc64= fails to compile: In function aio_bh_poll: internal compiler error: Segmentation fault - -#.if !defined(PKGNAMESUFFIX) || (${PKGNAMESUFFIX} != "-utils" && ${PKGNAMESUFFIX} != "-guest-agent") -#.endif - HAS_CONFIGURE= yes -MAKE_ENV+= BSD_MAKE="${MAKE}" V=1 -OPTIONS_DEFINE= SAMBA X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CURL \ - VDE CDROM_DMA PCAP USBREDIR X86_TARGETS \ - STATIC_LINK DOCS NCURSES -SAMBA_DESC= samba dependency (for -smb) +PORTSCOUT= limit:^5\. + +OPTIONS_SINGLE= NCURSES +OPTIONS_SINGLE_NCURSES= NCURSES_DEFAULT NCURSES_BASE NCURSES_PORT +OPTIONS_DEFINE= SAMBA X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CURL VDE \ + CDROM_DMA USBREDIR X86_TARGETS STATIC_LINK DOCS CAPSTONE +OPTIONS_DEFAULT=X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA CURL NCURSES_DEFAULT VDE \ + CAPSTONE +.if ${FLAVOR:U} == nox11 +OPTIONS_EXCLUDE:= GTK3 X11 +.endif +OPTIONS_SUB= yes +CAPSTONE_DESC= Disassembly framework support +CDROM_DMA_DESC= IDE CDROM DMA GNUTLS_DESC= gnutls dependency (vnc encryption) -SASL_DESC= cyrus-sasl dependency (vnc encryption) JPEG_DESC= jpeg dependency (vnc lossy compression) +NCURSES_DEFAULT_DESC= Depend on ncurses (ports if installed, otherwise base) +NCURSES_BASE_DESC= Depend on ncurses in base +NCURSES_PORT_DESC= Depend on devel/ncurses in ports PNG_DESC= png dependency (vnc compression) -CDROM_DMA_DESC= IDE CDROM DMA -PCAP_DESC= pcap dependency (networking with bpf) -USBREDIR_DESC= usb device network redirection (experimental!) -X86_TARGETS_DESC= Build only x86 system targets +SAMBA_DESC= samba dependency (for -smb) +SASL_DESC= cyrus-sasl dependency (vnc encryption) STATIC_LINK_DESC= Statically link the executables +USBREDIR_DESC= usb device network redirection (experimental!) VDE_DESC= vde dependency (for vde networking) -OPTIONS_DEFAULT=X11 GTK3 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA CURL PCAP NCURSES VDE -OPTIONS_SUB= yes -X11_USE= SDL=sdl2 XORG=x11,xext GNOME=gdkpixbuf2 -X11_USES= sdl -X11_CONFIGURE_ENABLE= sdl +X86_TARGETS_DESC= Build only x86 system targets +CAPSTONE_CONFIGURE_ON= --enable-capstone=system --extra-cflags=-I${LOCALBASE}/include/capstone +CAPSTONE_CONFIGURE_OFF= --disable-capstone +CAPSTONE_LIB_DEPENDS= libcapstone.so:devel/capstone4 +CURL_CONFIGURE_OFF= --disable-curl +CURL_LIB_DEPENDS= libcurl.so:ftp/curl +DOCS_CONFIGURE_ENABLE= docs +DOCS_USES= makeinfo +GNUTLS_CONFIGURE_OFF= --disable-gnutls +GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls +GTK3_CONFIGURE_OFF= --disable-gtk --disable-vte GTK3_LIB_DEPENDS= libxkbcommon.so:x11/libxkbcommon GTK3_USE= GNOME=gdkpixbuf2,gtk30,vte3 XORG=x11,xext GTK3_USES= gettext gl -GTK3_CONFIGURE_OFF= --disable-gtk --disable-vte -GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls -GNUTLS_CONFIGURE_OFF= --disable-gnutls -SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 -SASL_CONFIGURE_OFF= --disable-vnc-sasl -JPEG_USES= jpeg JPEG_CONFIGURE_OFF= --disable-vnc-jpeg -PNG_LIB_DEPENDS= libpng.so:graphics/png -PNG_CONFIGURE_OFF= --disable-vnc-png -CURL_LIB_DEPENDS= libcurl.so:ftp/curl -CURL_CONFIGURE_OFF= --disable-curl +JPEG_USES= jpeg +NCURSES_DEFAULT_USES= ncurses +NCURSES_BASE_USES= ncurses:base +NCURSES_PORT_USES= ncurses:port +OPENGL_CONFIGURE_OFF= --disable-opengl OPENGL_USE= GL=gl OPENGL_USES= gl -OPENGL_CONFIGURE_OFF= --disable-opengl -USBREDIR_BUILD_DEPENDS= usbredir>=0.6:net/usbredir -USBREDIR_RUN_DEPENDS= usbredir>=0.6:net/usbredir -USBREDIR_CONFIGURE_OFF= --disable-usb-redir -PCAP_CONFIGURE_ON= --enable-pcap -#PCAP_EXTRA_PATCHES= ${FILESDIR}/pcap-patch-qapi_net.json ${FILESDIR}/pcap-patch-net_net.c \ -# ${FILESDIR}/pcap-patch-net_clients.h -VDE_LIB_DEPENDS= libvdeplug.so:net/vde2 -VDE_CONFIGURE_OFF= --disable-vde +PNG_CONFIGURE_OFF= --disable-vnc-png +PNG_LIB_DEPENDS= libpng.so:graphics/png +SAMBA_CONFIGURE_ON= --smbd=${LOCALBASE}/sbin/smbd +SASL_CONFIGURE_OFF= --disable-vnc-sasl +SAMBA_USES= samba:run # smbd +SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 STATIC_LINK_CONFIGURE_ON= --static STATIC_LINK_PREVENTS= GTK3 X11 STATIC_LINK_PREVENTS_MSG= X11 ui cannot be built static -NCURSES_USES= ncurses:base -SAMBA_USES= samba:run # smbd -SAMBA_CONFIGURE_ON= --smbd=${LOCALBASE}/sbin/smbd -DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html \ - sphinx-build:textproc/py-sphinx -DOCS_USES= makeinfo -DOCS_MAKE_ARGS_OFF= NOPORTDOCS=1 +USBREDIR_BUILD_DEPENDS= usbredir>=0.6:net/usbredir +USBREDIR_CONFIGURE_OFF= --disable-usb-redir +USBREDIR_RUN_DEPENDS= usbredir>=0.6:net/usbredir +VDE_CONFIGURE_OFF= --disable-vde +VDE_LIB_DEPENDS= libvdeplug.so:net/vde2 +X11_CONFIGURE_ENABLE= sdl +X11_USE= SDL=sdl2 XORG=x11,xext GNOME=gdkpixbuf2 +X11_USES= sdl -PORTDOCS= docs index.html interop/.buildinfo interop/* qemu-ga-ref.html qemu-ga-ref.txt \ - qemu-qmp-ref.html qemu-qmp-ref.txt specs/.buildinfo specs/* system/.buildinfo \ - system/* tools/.buildinfo tools/* user/.buildinfo user/* +PORTDOCS= docs index.html interop/.buildinfo interop/* \ + specs/.buildinfo specs/* system/.buildinfo system/* \ + tools/.buildinfo tools/* user/.buildinfo user/* WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//} -CFLAGS_amd64= -fPIC -CFLAGS_powerpc= -D_CALL_SYSV -CONFIGURE_ARGS= --localstatedir=/var \ +CONFIGURE_ARGS= --localstatedir=/var --extra-ldflags=-L\"/usr/lib\" \ --extra-ldflags=-L\"${LOCALBASE}/lib\" --enable-debug \ - --prefix=${PREFIX} --cc=${CC} --enable-netmap --enable-docs --disable-kvm \ + --prefix=${PREFIX} --cc=${CC} --enable-netmap --disable-kvm \ --disable-linux-user --disable-linux-aio --disable-xen \ --enable-debug-info --python=${PYTHON_CMD} \ --extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\" +INSTALLS_ICONS= yes .include @@ -122,7 +127,6 @@ MAKE_ARGS+= ARCH=x86_64 .if ${ARCH} == "powerpc" MAKE_ARGS+= ARCH=ppc -USE_GCC= yes .endif .if ${ARCH} == "powerpc64" @@ -135,28 +139,15 @@ CONFIGURE_ARGS+= --sparc_cpu=v9 PLIST_SUB+= LINUXBOOT_DMA="" -# -lprocstat actually only _needs_ -lelf after r249666 or r250870 (MFC) -# but it shouldn't matter much -post-patch: -# @${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \ -# -e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \ -# ${WRKSRC}/configure -# @${REINPLACE_CMD} -E \ -# -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing -I.|" \ -# -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \ -# ${WRKSRC}/Makefile - post-patch-CDROM_DMA-off: @${REINPLACE_CMD} -e '/USE_DMA_CDROM/d' ${WRKSRC}/include/hw/ide/internal.h -# XXX need to disable usb host code on head while it's not ported to the -# new usb stack yet -post-configure: - @${REINPLACE_CMD} -E \ - -e "s|^(HOST_USB=)bsd|\1stub|" \ - ${WRKSRC}/config-host.mak +do-build: + cd ${WRKSRC} && ${GMAKE} + +do-install: + cd ${WRKSRC} && ${SETENV} DESTDIR=${STAGEDIR} ${GMAKE} install -.if !target(post-install) post-install: ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample ${STAGEDIR}${PREFIX}/etc ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample ${STAGEDIR}${PREFIX}/etc @@ -164,6 +155,5 @@ post-install: post-install-DOCS-on: @(cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${DOCSDIR}/) -.endif .include diff --git a/emulators/qemu5/distinfo b/emulators/qemu5/distinfo new file mode 100644 index 000000000000..21a1c14bdd2e --- /dev/null +++ b/emulators/qemu5/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1621458334 +SHA256 (qemu/5.2.0/qemu-5.2.0.tar.xz) = cb18d889b628fbe637672b0326789d9b0e3b8027e0445b936537c78549df17bc +SIZE (qemu/5.2.0/qemu-5.2.0.tar.xz) = 106902800 diff --git a/emulators/qemu50/files/patch-Makefile b/emulators/qemu5/files/patch-Makefile similarity index 100% rename from emulators/qemu50/files/patch-Makefile rename to emulators/qemu5/files/patch-Makefile diff --git a/emulators/qemu5/files/patch-configure b/emulators/qemu5/files/patch-configure new file mode 100644 index 000000000000..73578713a9ab --- /dev/null +++ b/emulators/qemu5/files/patch-configure @@ -0,0 +1,45 @@ +--- configure.orig 2020-12-08 16:59:44 UTC ++++ configure +@@ -1545,7 +1545,7 @@ if test "$mingw32" = "yes" ; then + sysconfdir="$prefix" + local_statedir="$prefix" + else +- mandir="${mandir:-$prefix/share/man}" ++ mandir="${mandir:-$prefix/man}" + datadir="${datadir:-$prefix/share}" + docdir="${docdir:-$prefix/share/doc}" + bindir="${bindir:-$prefix/bin}" +@@ -3114,6 +3114,14 @@ if check_include "sys/signal.h" ; then + fi + + ########################################## ++# getifaddrs (for tests/test-io-channel-socket ) ++ ++have_ifaddrs_h=yes ++if ! check_include "ifaddrs.h" ; then ++ have_ifaddrs_h=no ++fi ++ ++########################################## + # VTE probe + + if test "$vte" != "no"; then +@@ -4538,7 +4546,7 @@ fi + + # check for libusb + if test "$libusb" != "no" ; then +- if $pkg_config --atleast-version=1.0.13 libusb-1.0; then ++ if $pkg_config libusb-1.0; then + libusb="yes" + libusb_cflags=$($pkg_config --cflags libusb-1.0) + libusb_libs=$($pkg_config --libs libusb-1.0) +@@ -6225,6 +6233,9 @@ fi + # if this macro is set. + if test "$have_fsxattr" = "yes" ; then + echo "HAVE_FSXATTR=y" >> $config_host_mak ++fi ++if test "$have_ifaddrs_h" = "yes" ; then ++ echo "HAVE_IFADDRS_H=y" >> $config_host_mak + fi + if test "$have_copy_file_range" = "yes" ; then + echo "HAVE_COPY_FILE_RANGE=y" >> $config_host_mak diff --git a/emulators/qemu50/files/patch-disas_libvixl_vixl_a64_disasm-a64.cc b/emulators/qemu5/files/patch-disas_libvixl_vixl_a64_disasm-a64.cc similarity index 100% rename from emulators/qemu50/files/patch-disas_libvixl_vixl_a64_disasm-a64.cc rename to emulators/qemu5/files/patch-disas_libvixl_vixl_a64_disasm-a64.cc diff --git a/emulators/qemu50/files/patch-net_tap-bsd.c b/emulators/qemu5/files/patch-net_tap-bsd.c similarity index 100% rename from emulators/qemu50/files/patch-net_tap-bsd.c rename to emulators/qemu5/files/patch-net_tap-bsd.c diff --git a/emulators/qemu50/files/qemu-ifdown.sample b/emulators/qemu5/files/qemu-ifdown.sample similarity index 100% rename from emulators/qemu50/files/qemu-ifdown.sample rename to emulators/qemu5/files/qemu-ifdown.sample diff --git a/emulators/qemu50/files/qemu-ifup.sample b/emulators/qemu5/files/qemu-ifup.sample similarity index 100% rename from emulators/qemu50/files/qemu-ifup.sample rename to emulators/qemu5/files/qemu-ifup.sample diff --git a/emulators/qemu50/pkg-descr b/emulators/qemu5/pkg-descr similarity index 100% rename from emulators/qemu50/pkg-descr rename to emulators/qemu5/pkg-descr diff --git a/emulators/qemu50/pkg-message b/emulators/qemu5/pkg-message similarity index 100% rename from emulators/qemu50/pkg-message rename to emulators/qemu5/pkg-message diff --git a/emulators/qemu50/pkg-plist b/emulators/qemu5/pkg-plist similarity index 100% rename from emulators/qemu50/pkg-plist rename to emulators/qemu5/pkg-plist diff --git a/emulators/qemu50/distinfo b/emulators/qemu50/distinfo deleted file mode 100644 index 6cf79392fdc1..000000000000 --- a/emulators/qemu50/distinfo +++ /dev/null @@ -1,7 +0,0 @@ -TIMESTAMP = 1595103965 -SHA256 (qemu/5.0.0/qemu-5.0.0.tar.xz) = 2f13a92a0fa5c8b69ff0796b59b86b080bbb92ebad5d301a7724dd06b5e78cb6 -SIZE (qemu/5.0.0/qemu-5.0.0.tar.xz) = 62426192 -SHA256 (qemu/5.0.0/55765822804f.patch) = 10c2cc93ad01b02d854e26a9e445ba22bb5434dda1ef25baeb979be6292fa8ef -SIZE (qemu/5.0.0/55765822804f.patch) = 2271 -SHA256 (qemu/5.0.0/aa4d30f6618d.patch) = eeddc5f5e08a460d2c133b4193d115fa1f00f206e0833f33ec66379981473efe -SIZE (qemu/5.0.0/aa4d30f6618d.patch) = 2211 diff --git a/emulators/qemu50/files/patch-configure b/emulators/qemu50/files/patch-configure deleted file mode 100644 index 9e6b9cf678c6..000000000000 --- a/emulators/qemu50/files/patch-configure +++ /dev/null @@ -1,166 +0,0 @@ ---- configure.orig 2020-04-28 16:49:25 UTC -+++ configure -@@ -408,7 +408,7 @@ LDFLAGS_SHARED="-shared" - modules="no" - module_upgrades="no" - prefix="/usr/local" --mandir="\${prefix}/share/man" -+mandir="\${prefix}/man" - datadir="\${prefix}/share" - firmwarepath="\${prefix}/share/qemu-firmware" - qemu_docdir="\${prefix}/share/doc/qemu" -@@ -493,6 +493,9 @@ numa="" - tcmalloc="no" - jemalloc="no" - replication="yes" -+pcap="no" -+pcap_create="no" -+bpf="no" - vxhs="" - bochs="yes" - cloop="yes" -@@ -1168,6 +1171,10 @@ for opt do - ;; - --enable-vnc-png) vnc_png="yes" - ;; -+ --enable-pcap) pcap="yes" -+ ;; -+ --disable-pcap) pcap="no" -+ ;; - --disable-slirp) slirp="no" - ;; - --enable-slirp=git) slirp="git" -@@ -3137,6 +3144,14 @@ if ! check_include "ifaddrs.h" ; then - fi - - ########################################## -+# getifaddrs (for tests/test-io-channel-socket ) -+ -+have_ifaddrs_h=yes -+if ! check_include "ifaddrs.h" ; then -+ have_ifaddrs_h=no -+fi -+ -+########################################## - # VTE probe - - if test "$vte" != "no"; then -@@ -3806,7 +3821,7 @@ for i in $glib_modules; do - glib_libs=$($pkg_config --libs $i) - QEMU_CFLAGS="$glib_cflags $QEMU_CFLAGS" - LIBS="$glib_libs $LIBS" -- libs_qga="$glib_libs $libs_qga" -+ libs_qga="$glib_libs -lintl $libs_qga" - else - error_exit "glib-$glib_req_ver $i is required to compile QEMU" - fi -@@ -4957,14 +4972,6 @@ if test "$docs" != "no" ; then - fi - if has makeinfo && has pod2man && test "$sphinx_ok" = "yes"; then - docs=yes -- else -- if test "$docs" = "yes" ; then -- if has $sphinx_build && test "$sphinx_ok" != "yes"; then -- echo "Warning: $sphinx_build exists but it is either too old or uses too old a Python version" >&2 -- fi -- feature_not_found "docs" "Install texinfo, Perl/perl-podlators and a Python 3 version of python-sphinx" -- fi -- docs=no - fi - fi - -@@ -5098,7 +5105,7 @@ fi - - # check for libusb - if test "$libusb" != "no" ; then -- if $pkg_config --atleast-version=1.0.13 libusb-1.0; then -+ if $pkg_config libusb-1.0; then - libusb="yes" - libusb_cflags=$($pkg_config --cflags libusb-1.0) - libusb_libs=$($pkg_config --libs libusb-1.0) -@@ -5501,7 +5508,51 @@ if test "$debug_stack_usage" = "yes"; then - fi - fi - -+########################################## -+# pcap probe - -+if test "$pcap" = "yes" -a "$pcap" != "no"; then -+ cat > $TMPC << EOF -+#include -+int main(void) { return (pcap_lib_version() == (char *)0 ? 1 : 0); } -+EOF -+ if test "$mingw32" = "no" ; then -+ libpcap=-lpcap -+ else -+ libpcap=-lwpcap -+ fi -+ if compile_prog "" "$libpcap" ; then -+ : -+ else -+ echo -+ echo "Error: Could not find pcap" -+ echo "Make sure to have the pcap libs and headers installed." -+ echo -+ exit 1 -+ fi -+ cat > $TMPC << EOF -+#include -+int main(void) -+{ -+ char errbuf[PCAP_ERRBUF_SIZE]; -+ return (pcap_create("foo", errbuf) == (pcap_t *)0 ? 1 : 0); -+} -+EOF -+ if compile_prog "" "$libpcap" ; then -+ pcap_create="yes" -+ fi -+ cat > $TMPC << EOF -+#define PCAP_DONT_INCLUDE_PCAP_BPF_H -+#include -+#include -+int main(void) { return (BPF_MAJOR_VERSION); } -+EOF -+ if compile_prog ; then -+ bpf="yes" -+ fi -+ libs_softmmu="$libpcap $libs_softmmu" -+fi # test "$pcap" -+ - ########################################## - # check if we have open_by_handle_at - -@@ -6627,6 +6678,7 @@ echo "Audio drivers $audio_drv_list" - echo "Block whitelist (rw) $block_drv_rw_whitelist" - echo "Block whitelist (ro) $block_drv_ro_whitelist" - echo "VirtFS support $virtfs" -+echo "pcap support $pcap" - echo "Multipath support $mpath" - echo "VNC support $vnc" - if test "$vnc" = "yes" ; then -@@ -6864,6 +6916,15 @@ fi - if test "$want_tools" = "yes" ; then - echo "CONFIG_TOOLS=y" >> $config_host_mak - fi -+if test "$pcap" = "yes" ; then -+ echo "CONFIG_PCAP=y" >> $config_host_mak -+ if test "$pcap_create" = "yes" ; then -+ echo "CONFIG_PCAP_CREATE=y" >> $config_host_mak -+ fi -+ if test "$bpf" = "yes" ; then -+ echo "CONFIG_BPF=y" >> $config_host_mak -+ fi -+fi - if test "$slirp" != "no"; then - echo "CONFIG_SLIRP=y" >> $config_host_mak - echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak -@@ -7120,6 +7181,9 @@ fi - # if this macro is set. - if test "$have_fsxattr" = "yes" ; then - echo "HAVE_FSXATTR=y" >> $config_host_mak -+fi -+if test "$have_ifaddrs_h" = "yes" ; then -+ echo "HAVE_IFADDRS_H=y" >> $config_host_mak - fi - if test "$have_copy_file_range" = "yes" ; then - echo "HAVE_COPY_FILE_RANGE=y" >> $config_host_mak diff --git a/emulators/qemu50/files/patch-include_net_net.h b/emulators/qemu50/files/patch-include_net_net.h deleted file mode 100644 index 876aee40a62e..000000000000 --- a/emulators/qemu50/files/patch-include_net_net.h +++ /dev/null @@ -1,13 +0,0 @@ ---- include/net/net.h.orig 2020-04-28 16:49:24 UTC -+++ include/net/net.h -@@ -208,8 +208,8 @@ void netdev_add(QemuOpts *opts, Error **errp); - int net_hub_id_for_client(NetClientState *nc, int *id); - NetClientState *net_hub_port_find(int hub_id); - --#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup" --#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown" -+#define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup" -+#define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown" - #define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper" - #define DEFAULT_BRIDGE_INTERFACE "br0" - diff --git a/emulators/qemu50/files/patch-include_qemu_atomic.h b/emulators/qemu50/files/patch-include_qemu_atomic.h deleted file mode 100644 index 384ef52bfd3c..000000000000 --- a/emulators/qemu50/files/patch-include_qemu_atomic.h +++ /dev/null @@ -1,41 +0,0 @@ ---- include/qemu/atomic.h.orig 2020-04-28 16:49:24 UTC -+++ include/qemu/atomic.h -@@ -228,10 +228,12 @@ - /* And even shorter names that return void. */ - #define atomic_inc(ptr) ((void) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST)) - #define atomic_dec(ptr) ((void) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST)) -+#ifndef __cplusplus - #define atomic_add(ptr, n) ((void) __atomic_fetch_add(ptr, n, __ATOMIC_SEQ_CST)) - #define atomic_sub(ptr, n) ((void) __atomic_fetch_sub(ptr, n, __ATOMIC_SEQ_CST)) - #define atomic_and(ptr, n) ((void) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST)) - #define atomic_or(ptr, n) ((void) __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST)) -+#endif - #define atomic_xor(ptr, n) ((void) __atomic_fetch_xor(ptr, n, __ATOMIC_SEQ_CST)) - - #else /* __ATOMIC_RELAXED */ -@@ -406,10 +408,12 @@ - - #define atomic_inc_fetch(ptr) __sync_add_and_fetch(ptr, 1) - #define atomic_dec_fetch(ptr) __sync_add_and_fetch(ptr, -1) -+#ifndef __cplusplus - #define atomic_add_fetch(ptr, n) __sync_add_and_fetch(ptr, n) - #define atomic_sub_fetch(ptr, n) __sync_sub_and_fetch(ptr, n) - #define atomic_and_fetch(ptr, n) __sync_and_and_fetch(ptr, n) - #define atomic_or_fetch(ptr, n) __sync_or_and_fetch(ptr, n) -+#endif - #define atomic_xor_fetch(ptr, n) __sync_xor_and_fetch(ptr, n) - - #define atomic_cmpxchg(ptr, old, new) __sync_val_compare_and_swap(ptr, old, new) -@@ -418,10 +422,12 @@ - /* And even shorter names that return void. */ - #define atomic_inc(ptr) ((void) __sync_fetch_and_add(ptr, 1)) - #define atomic_dec(ptr) ((void) __sync_fetch_and_add(ptr, -1)) -+#ifndef __cplusplus - #define atomic_add(ptr, n) ((void) __sync_fetch_and_add(ptr, n)) - #define atomic_sub(ptr, n) ((void) __sync_fetch_and_sub(ptr, n)) - #define atomic_and(ptr, n) ((void) __sync_fetch_and_and(ptr, n)) - #define atomic_or(ptr, n) ((void) __sync_fetch_and_or(ptr, n)) -+#endif - #define atomic_xor(ptr, n) ((void) __sync_fetch_and_xor(ptr, n)) - - #endif /* __ATOMIC_RELAXED */ diff --git a/emulators/qemu50/files/pcap-patch-net_clients.h b/emulators/qemu50/files/pcap-patch-net_clients.h deleted file mode 100644 index 5b56f1b2f49a..000000000000 --- a/emulators/qemu50/files/pcap-patch-net_clients.h +++ /dev/null @@ -1,13 +0,0 @@ ---- net/clients.h.orig 2018-04-24 16:30:47 UTC -+++ net/clients.h -@@ -61,4 +61,10 @@ int net_init_netmap(const Netdev *netdev, const char * - int net_init_vhost_user(const Netdev *netdev, const char *name, - NetClientState *peer, Error **errp); - -+#ifdef CONFIG_PCAP -+int net_init_pcap(const Netdev *netdev, const char *name, -+ NetClientState *peer, Error **errp); -+#endif -+ -+ - #endif /* QEMU_NET_CLIENTS_H */ diff --git a/emulators/qemu50/files/pcap-patch-net_net.c b/emulators/qemu50/files/pcap-patch-net_net.c deleted file mode 100644 index 6fa5ca941f7d..000000000000 --- a/emulators/qemu50/files/pcap-patch-net_net.c +++ /dev/null @@ -1,250 +0,0 @@ ---- net/net.c.orig 2018-04-24 16:30:47 UTC -+++ net/net.c -@@ -52,6 +52,11 @@ - #include "net/filter.h" - #include "qapi/string-output-visitor.h" - -+#include -+#ifdef __FreeBSD__ -+#include -+#endif -+ - /* Net bridge is currently not supported for W32. */ - #if !defined(_WIN32) - # define CONFIG_NET_BRIDGE -@@ -929,7 +934,225 @@ static int net_init_nic(const Netdev *netdev, const ch - return idx; - } - -+#if defined(CONFIG_PCAP) -+#if defined(CONFIG_BPF) -+#define PCAP_DONT_INCLUDE_PCAP_BPF_H -+#include -+#endif -+#include - -+struct PCAPState { -+ NetClientState nc; -+ pcap_t *handle; -+ int max_eth_frame_size; -+}; -+ -+static ssize_t pcap_receive(NetClientState *nc, const uint8_t *buf, size_t size) -+{ -+ struct PCAPState *s = DO_UPCAST(struct PCAPState, nc, nc); -+ -+ return pcap_inject(s->handle, (u_char*)buf, size); -+} -+ -+static void pcap_callback(u_char *user, struct pcap_pkthdr *phdr, u_char *pdata -+ ) -+{ -+ NetClientState *nc = (NetClientState *)user; -+ -+ int len = phdr->len; -+#ifdef __FreeBSD__ -+ struct PCAPState *s = DO_UPCAST(struct PCAPState, nc, nc); -+ int max_eth_frame_size = s->max_eth_frame_size; -+ -+ if (len > max_eth_frame_size) { -+ fprintf(stderr, -+ "pcap_send: packet size > %d (%d), truncating\n", -+ max_eth_frame_size, len); -+ len = max_eth_frame_size; -+ } -+#endif -+ qemu_send_packet(nc, pdata, len); -+} -+ -+static void pcap_send(void *opaque) -+{ -+ struct PCAPState *s = (struct PCAPState *)opaque; -+ -+ for (;;) { -+ if (pcap_dispatch(s->handle, 0, (pcap_handler)&pcap_callback, (u_char *)&s->nc) >= 0) -+ break; -+ } -+} -+ -+static void pcap_cleanup(NetClientState *nc) -+{ -+ struct PCAPState *s = DO_UPCAST(struct PCAPState, nc, nc); -+ -+ qemu_purge_queued_packets(nc); -+ pcap_close(s->handle); -+} -+ -+static NetClientInfo net_pcap_info = { -+ .type = NET_CLIENT_DRIVER_PCAP, -+ .size = sizeof(struct PCAPState), -+ .receive = pcap_receive, -+// .receive_raw = pcap_receive_raw, -+// .receive_iov = pcap_receive_iov, -+// .poll = pcap_poll, -+ .cleanup = pcap_cleanup, -+}; -+/* -+ * ... -net pcap,ifname="..." -+ */ -+ -+int net_init_pcap(const Netdev *netdev, -+ const char *name, NetClientState *peer, Error **errp) -+{ -+ const NetdevPcapOptions *pcap_opts; -+ NetClientState *nc; -+ struct PCAPState *s; -+ const char *ifname; -+ char errbuf[PCAP_ERRBUF_SIZE]; -+#if defined(_WIN32) -+ HANDLE h; -+#endif -+ int i; -+ -+ assert(netdev->type == NET_CLIENT_DRIVER_PCAP); -+ pcap_opts = &netdev->u.pcap; -+ if (!pcap_opts->has_ifname) -+ return -1; -+ -+ ifname = pcap_opts->ifname; -+ -+ /* create the object */ -+ nc = qemu_new_net_client(&net_pcap_info, peer, "pcap", ifname); -+ s = DO_UPCAST(struct PCAPState, nc, nc); -+ -+ if (ifname == NULL && (ifname = pcap_lookupdev(errbuf)) == NULL) { -+ fprintf(stderr, "qemu: pcap_create: %s\n", errbuf); -+ goto fail; -+ } -+ -+#ifdef __FreeBSD__ -+ /* -+ * We want to avoid passing oversize packets to the guest, which -+ * at least on FreeBSD can happen if the host interface uses tso -+ * (seen with an em(4) in this case) - so find out the host -+ * interface's mtu and assume the guest is configured the same. -+ */ -+ s->max_eth_frame_size = 1514; -+ i = socket(AF_INET, SOCK_DGRAM, 0); -+ if (i >= 0) { -+ struct ifreq ifr; -+ -+ (void) memset(&ifr, 0, sizeof(ifr)); -+ strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); -+ if (ioctl(i, SIOCGIFMTU, &ifr) != -1) -+ s->max_eth_frame_size = ifr.ifr_mtu + 14; -+ close(i); -+ } -+#endif -+ -+#if defined(CONFIG_PCAP_CREATE) || defined(_WIN32) -+ /* -+ * Create pcap handle for the device, set promiscuous mode and activate. -+ */ -+ s->handle = (void *)pcap_create(ifname, errbuf); -+ if (!s->handle) { -+ fprintf(stderr, "qemu: pcap_create: %s\n", errbuf); -+ goto fail; -+ } -+ if (pcap_set_promisc(s->handle, 1) != 0) { -+ pcap_perror(s->handle, (char *)"qemu: pcap_set_promisc:"); -+ goto fail; -+ } -+ if (pcap_activate(s->handle) != 0) { -+ pcap_perror(s->handle, (char *)"qemu: pcap_activate:"); -+ goto fail; -+ } -+#else -+ /* Attempt to connect device. */ -+ s->handle = (void *)pcap_open_live(ifname, 65535, 1, 0, errbuf); -+ if (!s->handle) { -+ fprintf(stderr, "qemu: pcap_open_live: %s\n", errbuf); -+ goto fail; -+ } -+#endif -+ -+ /* Set non-blocking mode. */ -+ if (pcap_setnonblock(s->handle, 1, errbuf) < 0) { -+ fprintf(stderr, "qemu: pcap_setnonblock: %s\n", errbuf); -+ goto fail; -+ } -+ -+#if defined(_WIN32) -+ /* -+ * Tell the kernel that the packet has to be seen immediately. -+ */ -+ if (pcap_setmintocopy(s->handle, 0) < 0) { -+ fprintf(stderr, "qemu: pcap failed to set immediate mode\n"); -+ goto fail; -+ } -+#else /* !_WIN32 */ -+#if defined(CONFIG_BPF) -+#if defined(BIOCIMMEDIATE) -+ /* -+ * Tell the kernel that the packet has to be seen immediately. -+ */ -+ { -+ unsigned int one = 1; -+ if (ioctl(pcap_fileno(s->handle), BIOCIMMEDIATE, &one) < 0) { -+ fprintf(stderr, "qemu: pcap failed to set immediate mode\n"); -+ goto fail; -+ } -+ } -+#endif /* BIOCIMMEDIATE */ -+#if defined(BIOCFEEDBACK) -+ /* -+ * Tell the kernel that the sent packet has to be fed back. -+ * This is necessary to connect host and guest. -+ */ -+ { -+ unsigned int one = 1; -+ if (ioctl(pcap_fileno(s->handle), BIOCFEEDBACK, &one) < 0) { -+ fprintf(stderr, "qemu: pcap failed to set feedback mode\n"); -+ goto fail; -+ } -+ } -+#endif /* BIOCFEEDBACK */ -+#endif /* CONFIG_BPF */ -+#endif /* _WIN32 */ -+ -+ snprintf(s->nc.info_str, sizeof(s->nc.info_str), "pcap redirector"); -+ -+#if defined(_WIN32) -+ if ((h = pcap_getevent(s->handle)) == NULL) { -+ fprintf(stderr, "qemu: pcap_getevent failed\n"); -+ goto fail; -+ } -+ qemu_add_wait_object(h, pcap_send, s); -+#else /* !_WIN32 */ -+ if ((i = pcap_get_selectable_fd(s->handle)) < 0) { -+ fprintf(stderr, "qemu: pcap_get_selectable_fd failed\n"); -+ goto fail; -+ } -+ qemu_set_fd_handler(i, pcap_send, NULL, s); -+#endif /* _WIN32 */ -+ -+ return 0; -+ -+fail: -+ if (s) { -+ if (s->handle) -+ pcap_close(s->handle); -+ } -+ -+ return -1; -+} -+ -+#endif -+ - static int (* const net_client_init_fun[NET_CLIENT_DRIVER__MAX])( - const Netdev *netdev, - const char *name, -@@ -955,6 +1178,9 @@ static int (* const net_client_init_fun[NET_CLIENT_DRI - #endif - #ifdef CONFIG_L2TPV3 - [NET_CLIENT_DRIVER_L2TPV3] = net_init_l2tpv3, -+#endif -+#ifdef CONFIG_PCAP -+ [NET_CLIENT_DRIVER_PCAP] = net_init_pcap, - #endif - }; - diff --git a/emulators/qemu50/files/pcap-patch-qapi_net.json b/emulators/qemu50/files/pcap-patch-qapi_net.json deleted file mode 100644 index 39114c65d591..000000000000 --- a/emulators/qemu50/files/pcap-patch-qapi_net.json +++ /dev/null @@ -1,56 +0,0 @@ ---- qapi/net.json.orig 2018-04-24 16:30:47 UTC -+++ qapi/net.json -@@ -388,6 +388,19 @@ - '*helper': 'str' } } - - ## -+# @NetdevPcapOptions: -+# -+# Use ifname as a source to capture -+# -+# @ifname: #required to determine which interface to capture -+# -+# Since: 1.2 -+## -+{ 'struct': 'NetdevPcapOptions', -+ 'data': { -+ '*ifname': 'str' } } -+ -+## - # @NetdevHubPortOptions: - # - # Connect two or more net clients through a software hub. -@@ -454,7 +467,7 @@ - ## - { 'enum': 'NetClientDriver', - 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', *** 30 LINES SKIPPED ***