From owner-svn-ports-all@freebsd.org Fri Mar 10 12:54:23 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEC90D04E8D; Fri, 10 Mar 2017 12:54:23 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 937161E43; Fri, 10 Mar 2017 12:54:23 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2ACsMlO044285; Fri, 10 Mar 2017 12:54:22 GMT (envelope-from bofh@FreeBSD.org) Received: (from bofh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2ACsLY5044275; Fri, 10 Mar 2017 12:54:21 GMT (envelope-from bofh@FreeBSD.org) Message-Id: <201703101254.v2ACsLY5044275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bofh set sender to bofh@FreeBSD.org using -f From: Muhammad Moinur Rahman Date: Fri, 10 Mar 2017 12:54:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r435826 - in head/emulators/qemu: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2017 12:54:23 -0000 Author: bofh Date: Fri Mar 10 12:54:21 2017 New Revision: 435826 URL: https://svnweb.freebsd.org/changeset/ports/435826 Log: emulators/qemu: Update version 2.6.1=>2.8.0 - Fix ncurses build uses to use base version and remove from CONFIGURE_ARGS for OPTIONS usage [1] PR: 211973[1] Submitted by: ilavsky.martin@gmail.com[1] Added: head/emulators/qemu/files/pcap-patch-net_clients.h (contents, props changed) Deleted: head/emulators/qemu/files/patch-slirp_slirp__config.h Modified: head/emulators/qemu/Makefile head/emulators/qemu/distinfo head/emulators/qemu/files/patch-Makefile head/emulators/qemu/files/patch-configure head/emulators/qemu/files/patch-include_qemu_atomic.h head/emulators/qemu/files/pcap-patch head/emulators/qemu/files/pcap-patch-net_net.c head/emulators/qemu/pkg-plist Modified: head/emulators/qemu/Makefile ============================================================================== --- head/emulators/qemu/Makefile Fri Mar 10 12:51:26 2017 (r435825) +++ head/emulators/qemu/Makefile Fri Mar 10 12:54:21 2017 (r435826) @@ -2,13 +2,12 @@ # $FreeBSD$ PORTNAME= qemu -PORTVERSION= 2.6.1 -PORTREVISION= 1 +PORTVERSION= 2.8.0 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/ DIST_SUBDIR= qemu/${PORTVERSION} -MAINTAINER= bofh@FreeBSD.org +MAINTAINER?= bofh@FreeBSD.org COMMENT?= QEMU CPU Emulator LICENSE= GPLv2 @@ -60,7 +59,8 @@ USBREDIR_BUILD_DEPENDS= usbredir>=0.6:ne 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 ${FILESDIR}/pcap-patch-net_net.c +PCAP_EXTRA_PATCHES= ${FILESDIR}/pcap-patch ${FILESDIR}/pcap-patch-net_net.c \ + ${FILESDIR}/pcap-patch-net_clients.h STATIC_LINK_CONFIGURE_ON= --static STATIC_LINK_PREVENTS= GTK2 X11 STATIC_LINK_PREVENTS_MSG= X11 ui cannot be built static @@ -70,12 +70,12 @@ DOCS_BUILD_DEPENDS= texi2html:textproc/t DOCS_USES= makeinfo DOCS_MAKE_ARGS_OFF= NOPORTDOCS=1 -PORTDOCS?= docs qemu-doc.html qemu-tech.html qmp-commands.txt +PORTDOCS?= docs qemu-doc.html qmp-commands.txt WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//} -CONFIGURE_ARGS?=--localstatedir=/var --extra-ldflags=-L\"${LOCALBASE}/lib\" \ - --disable-libssh2 --enable-debug \ +CONFIGURE_ARGS?=--localstatedir=/var --extra-ldflags=-L\"/usr/lib\" \ + --extra-ldflags=-L\"${LOCALBASE}/lib\" --disable-libssh2 --enable-debug \ --prefix=${PREFIX} --cc=${CC} --enable-docs --disable-kvm \ --disable-linux-user --disable-linux-aio --disable-xen \ --smbd=${LOCALBASE}/sbin/smbd --enable-debug-info --python=${PYTHON_CMD} \ @@ -107,6 +107,13 @@ MAKE_ARGS+= ARCH=ppc64 CONFIGURE_ARGS+= --sparc_cpu=v9 .endif +# clang in freebsd 10 is unable to assemble linuxboot_dma.bin +.if (${OSVERSION} < 1100000) +PLIST_SUB+= LINUXBOOT_DMA="@comment " +.else +PLIST_SUB+= LINUXBOOT_DMA="" +.endif + # -lprocstat actually only _needs_ -lelf after r249666 or r250870 (MFC) # but it shouldn't matter much post-patch: @@ -128,6 +135,15 @@ post-patch: @${REINPLACE_CMD} -E \ -e "1s|^(#! )/usr/bin/perl|\1${PERL}|" \ ${WRKSRC}/scripts/texi2pod.pl +# clang in freebsd 10 is unable to assemble linuxboot_dma.bin +.if (${OSVERSION} < 1100000) + @${REINPLACE_CMD} -E \ + -e 's|linuxboot_dma.bin||' \ + ${WRKSRC}/pc-bios/optionrom/Makefile + @${REINPLACE_CMD} -E \ + -e 's|linuxboot_dma.bin||' \ + ${WRKSRC}/Makefile +.endif post-patch-CDROM_DMA-off: @${REINPLACE_CMD} -e '/USE_DMA_CDROM/d' ${WRKSRC}/hw/ide/internal.h Modified: head/emulators/qemu/distinfo ============================================================================== --- head/emulators/qemu/distinfo Fri Mar 10 12:51:26 2017 (r435825) +++ head/emulators/qemu/distinfo Fri Mar 10 12:54:21 2017 (r435826) @@ -1,3 +1,3 @@ TIMESTAMP = 1471559363 -SHA256 (qemu/2.6.1/qemu-2.6.1.tar.bz2) = 4942fd1b6ee31f2f55ffc2201dd7397e6b9c55a2ef332e6d660c730d268e08d1 -SIZE (qemu/2.6.1/qemu-2.6.1.tar.bz2) = 25762855 +SHA256 (qemu/2.8.0/qemu-2.8.0.tar.bz2) = dafd5d7f649907b6b617b822692f4c82e60cf29bc0fc58bc2036219b591e5e62 +SIZE (qemu/2.8.0/qemu-2.8.0.tar.bz2) = 28368517 Modified: head/emulators/qemu/files/patch-Makefile ============================================================================== --- head/emulators/qemu/files/patch-Makefile Fri Mar 10 12:51:26 2017 (r435825) +++ head/emulators/qemu/files/patch-Makefile Fri Mar 10 12:54:21 2017 (r435826) @@ -1,24 +1,25 @@ ---- Makefile.orig 2016-04-14 20:19:53 UTC -+++ Makefile -@@ -90,7 +90,11 @@ LIBS+=-lz $(LIBS_TOOLS) +--- Makefile.orig 2016-12-20 13:16:43.000000000 -0700 ++++ Makefile 2017-03-05 08:08:54.529466000 -0700 +@@ -90,7 +90,11 @@ HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) ifdef BUILD_DOCS +ifdef NOPORTDOCS +DOCS=qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8 +else - DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8 + DOCS=qemu-doc.html qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8 +endif - DOCS+=qmp-commands.txt - ifdef CONFIG_LINUX - DOCS+=kvm_stat.1 -@@ -410,8 +414,10 @@ endif + ifdef CONFIG_VIRTFS + DOCS+=fsdev/virtfs-proxy-helper.1 + endif +@@ -429,9 +433,11 @@ + endif install-doc: $(DOCS) - $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" +ifndef NOPORTDOCS - $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)" - $(INSTALL_DATA) qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" + $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" + $(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)" + $(INSTALL_DATA) $(SRC_PATH)/docs/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" +endif ifdef CONFIG_POSIX $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" Modified: head/emulators/qemu/files/patch-configure ============================================================================== --- head/emulators/qemu/files/patch-configure Fri Mar 10 12:51:26 2017 (r435825) +++ head/emulators/qemu/files/patch-configure Fri Mar 10 12:54:21 2017 (r435826) @@ -1,6 +1,6 @@ ---- configure.orig 2016-04-14 20:19:53 UTC -+++ configure -@@ -245,7 +245,7 @@ DSOSUF=".so" +--- configure.orig 2016-12-20 13:16:44.000000000 -0700 ++++ configure 2017-03-05 08:10:46.513171000 -0700 +@@ -247,7 +247,7 @@ LDFLAGS_SHARED="-shared" modules="no" prefix="/usr/local" @@ -9,27 +9,18 @@ datadir="\${prefix}/share" qemu_docdir="\${prefix}/share/doc/qemu" bindir="\${prefix}/bin" -@@ -316,6 +316,10 @@ virglrenderer="" - tpm="yes" - libssh2="" - vhdx="" -+quorum="no" +@@ -322,6 +322,10 @@ + tcmalloc="no" + jemalloc="no" + replication="yes" +pcap="no" +pcap_create="no" +bpf="no" - numa="" - tcmalloc="no" - jemalloc="no" -@@ -575,7 +579,7 @@ FreeBSD) - audio_drv_list="oss" - audio_possible_drivers="oss sdl pa" - # needed for kinfo_getvmmap(3) in libutil.h -- LIBS="-lutil $LIBS" -+ LIBS="-lprocstat -lkvm -lelf -lutil $LIBS" - netmap="" # enable netmap autodetect - HOST_VARIANT_DIR="freebsd" - ;; -@@ -878,6 +882,10 @@ for opt do ++ + + # parse CC options first + for opt do +@@ -887,6 +891,10 @@ ;; --enable-vnc-png) vnc_png="yes" ;; @@ -39,8 +30,8 @@ + ;; --disable-slirp) slirp="no" ;; - --disable-uuid) uuid="no" -@@ -2157,7 +2165,7 @@ if test "$gtk" != "no"; then + --disable-vde) vde="no" +@@ -2266,7 +2274,7 @@ gtk_cflags="$gtk_cflags $x11_cflags" gtk_libs="$gtk_libs $x11_libs" fi @@ -49,7 +40,7 @@ gtk="yes" elif test "$gtk" = "yes"; then feature_not_found "gtk" "Install gtk2 or gtk3 devel" -@@ -2384,6 +2392,14 @@ if ! check_include "ifaddrs.h" ; then +@@ -2485,6 +2493,14 @@ fi ########################################## @@ -64,7 +55,7 @@ # VTE probe if test "$vte" != "no"; then -@@ -2526,6 +2542,50 @@ EOF +@@ -2644,6 +2660,50 @@ fi fi @@ -115,7 +106,7 @@ ########################################## # VNC SASL detection -@@ -3857,14 +3917,7 @@ fi +@@ -3970,14 +4030,7 @@ # Check if tools are available to build documentation. if test "$docs" != "no" ; then @@ -130,7 +121,7 @@ fi # Search for bswap_32 function -@@ -4769,6 +4834,7 @@ echo "Audio drivers $audio_drv_list" +@@ -5026,6 +5079,7 @@ echo "Block whitelist (rw) $block_drv_rw_whitelist" echo "Block whitelist (ro) $block_drv_ro_whitelist" echo "VirtFS support $virtfs" @@ -138,7 +129,7 @@ echo "VNC support $vnc" if test "$vnc" = "yes" ; then echo "VNC SASL support $vnc_sasl" -@@ -4950,6 +5016,15 @@ fi +@@ -5204,6 +5258,15 @@ if test "$profiler" = "yes" ; then echo "CONFIG_PROFILER=y" >> $config_host_mak fi @@ -154,9 +145,9 @@ if test "$slirp" = "yes" ; then echo "CONFIG_SLIRP=y" >> $config_host_mak echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak -@@ -5153,6 +5228,9 @@ fi - if test "$have_ifaddrs_h" = "yes" ; then - echo "HAVE_IFADDRS_H=y" >> $config_host_mak +@@ -5415,6 +5478,9 @@ + 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 Modified: head/emulators/qemu/files/patch-include_qemu_atomic.h ============================================================================== --- head/emulators/qemu/files/patch-include_qemu_atomic.h Fri Mar 10 12:51:26 2017 (r435825) +++ head/emulators/qemu/files/patch-include_qemu_atomic.h Fri Mar 10 12:54:21 2017 (r435826) @@ -1,6 +1,6 @@ ---- include/qemu/atomic.h.orig 2016-06-02 18:20:47 UTC -+++ include/qemu/atomic.h -@@ -136,10 +136,12 @@ +--- include/qemu/atomic.h.orig 2016-12-20 13:16:47.000000000 -0700 ++++ include/qemu/atomic.h 2017-03-05 08:15:48.793780000 -0700 +@@ -182,10 +182,12 @@ /* Provide shorter names for GCC atomic builtins, return old value */ #define atomic_fetch_inc(ptr) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST) #define atomic_fetch_dec(ptr) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST) @@ -10,19 +10,45 @@ #define atomic_fetch_and(ptr, n) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST) #define atomic_fetch_or(ptr, n) __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST) +#endif + #define atomic_fetch_xor(ptr, n) __atomic_fetch_xor(ptr, n, __ATOMIC_SEQ_CST) + #define atomic_inc_fetch(ptr) __atomic_add_fetch(ptr, 1, __ATOMIC_SEQ_CST) +@@ -199,10 +201,12 @@ /* And even shorter names that return void. */ #define atomic_inc(ptr) ((void) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST)) -@@ -330,10 +332,12 @@ - /* Provide shorter names for GCC atomic builtins. */ - #define atomic_fetch_inc(ptr) __sync_fetch_and_add(ptr, 1) - #define atomic_fetch_dec(ptr) __sync_fetch_and_add(ptr, -1) + #define atomic_dec(ptr) ((void) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST)) +#ifndef __cplusplus - #define atomic_fetch_add __sync_fetch_and_add - #define atomic_fetch_sub __sync_fetch_and_sub - #define atomic_fetch_and __sync_fetch_and_and - #define atomic_fetch_or __sync_fetch_and_or + #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_cmpxchg __sync_val_compare_and_swap + #define atomic_xor(ptr, n) ((void) __atomic_fetch_xor(ptr, n, __ATOMIC_SEQ_CST)) + #else /* __ATOMIC_RELAXED */ +@@ -370,10 +374,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) +@@ -382,10 +388,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 */ Modified: head/emulators/qemu/files/pcap-patch ============================================================================== --- head/emulators/qemu/files/pcap-patch Fri Mar 10 12:51:26 2017 (r435825) +++ head/emulators/qemu/files/pcap-patch Fri Mar 10 12:54:21 2017 (r435826) @@ -1,44 +1,26 @@ -diff -ruN net/clients.h net/clients.h ---- net/clients.h 2015-12-17 04:04:50.000000000 +0600 -+++ net/clients.h 2015-12-25 01:32:09.000000000 +0600 -@@ -47,6 +47,11 @@ - int net_init_bridge(const NetClientOptions *opts, const char *name, - NetClientState *peer, Error **errp); - -+#ifdef CONFIG_PCAP -+int net_init_pcap(const NetClientOptions *opts, const char *name, -+ NetClientState *peer, Error **errp); -+#endif -+ - int net_init_l2tpv3(const NetClientOptions *opts, const char *name, - NetClientState *peer, Error **errp); - #ifdef CONFIG_VDE -diff -ruN net/hub.c net/hub.c ---- net/hub.c 2015-12-17 04:04:50.000000000 +0600 -+++ net/hub.c 2015-12-25 01:32:09.000000000 +0600 -@@ -322,6 +322,7 @@ - case NET_CLIENT_OPTIONS_KIND_SOCKET: - case NET_CLIENT_OPTIONS_KIND_VDE: - case NET_CLIENT_OPTIONS_KIND_VHOST_USER: -+ case NET_CLIENT_OPTIONS_KIND_PCAP: - has_host_dev = 1; - break; - default: -diff -ruN qapi-schema.json qapi-schema.json ---- qapi-schema.json 2015-12-17 04:04:50.000000000 +0600 -+++ qapi-schema.json 2015-12-25 01:32:09.000000000 +0600 -@@ -2538,6 +2538,10 @@ - '*br': 'str', - '*helper': 'str' } } +--- qapi-schema.json.orig 2016-12-20 13:16:49.000000000 -0700 ++++ qapi-schema.json 2017-03-05 08:45:39.490366000 -0700 +@@ -2543,6 +2543,10 @@ + ## + { 'command': 'netdev_del', 'data': {'id': 'str'} } +{ 'struct': 'NetdevPcapOptions', + 'data': { + '*ifname': 'str' } } + ## - # @NetdevHubPortOptions + # @object-add: # -@@ -2608,6 +2612,7 @@ +@@ -2966,7 +2970,7 @@ + ## + { 'enum': 'NetClientDriver', + 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump', +- 'bridge', 'hubport', 'netmap', 'vhost-user' ] } ++ 'bridge', 'hubport', 'netmap', 'vhost-user', 'pcap' ] } + + ## + # @Netdev: +@@ -2989,6 +2993,7 @@ 'nic': 'NetLegacyNicOptions', 'user': 'NetdevUserOptions', 'tap': 'NetdevTapOptions', @@ -46,3 +28,11 @@ diff -ruN qapi-schema.json qapi-schema.j 'l2tpv3': 'NetdevL2TPv3Options', 'socket': 'NetdevSocketOptions', 'vde': 'NetdevVdeOptions', +@@ -3033,6 +3038,7 @@ + 'nic': 'NetLegacyNicOptions', + 'user': 'NetdevUserOptions', + 'tap': 'NetdevTapOptions', ++ 'pcap': 'NetdevPcapOptions', + 'l2tpv3': 'NetdevL2TPv3Options', + 'socket': 'NetdevSocketOptions', + 'vde': 'NetdevVdeOptions', Added: head/emulators/qemu/files/pcap-patch-net_clients.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/qemu/files/pcap-patch-net_clients.h Fri Mar 10 12:54:21 2017 (r435826) @@ -0,0 +1,13 @@ +--- net/clients.h.orig 2017-03-05 10:36:13.475005000 -0700 ++++ net/clients.h 2017-03-05 10:35:30.412539000 -0700 +@@ -61,4 +61,10 @@ + + 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 */ Modified: head/emulators/qemu/files/pcap-patch-net_net.c ============================================================================== --- head/emulators/qemu/files/pcap-patch-net_net.c Fri Mar 10 12:51:26 2017 (r435825) +++ head/emulators/qemu/files/pcap-patch-net_net.c Fri Mar 10 12:54:21 2017 (r435826) @@ -1,5 +1,5 @@ ---- net/net.c.orig 2016-04-14 20:19:54 UTC -+++ net/net.c +--- net/net.c.orig 2016-12-20 13:16:48.000000000 -0700 ++++ net/net.c 2017-03-05 08:04:17.606428000 -0700 @@ -48,6 +48,11 @@ #include "net/filter.h" #include "qapi/string-output-visitor.h" @@ -12,7 +12,7 @@ /* Net bridge is currently not supported for W32. */ #if !defined(_WIN32) # define CONFIG_NET_BRIDGE -@@ -931,7 +936,223 @@ static int net_init_nic(const NetClientO +@@ -933,7 +938,225 @@ return idx; } @@ -75,7 +75,7 @@ +} + +static NetClientInfo net_pcap_info = { -+ .type = NET_CLIENT_OPTIONS_KIND_PCAP, ++ .type = NET_CLIENT_DRIVER_PCAP, + .size = sizeof(struct PCAPState), + .receive = pcap_receive, +// .receive_raw = pcap_receive_raw, @@ -87,10 +87,10 @@ + * ... -net pcap,ifname="..." + */ + -+int net_init_pcap(const NetClientOptions *opts, ++int net_init_pcap(const Netdev *netdev, + const char *name, NetClientState *peer, Error **errp) +{ -+ const NetdevPcapOptions *pcap_opts = opts->u.pcap.data; ++ const NetdevPcapOptions *pcap_opts; + NetClientState *nc; + struct PCAPState *s; + const char *ifname; @@ -100,6 +100,8 @@ +#endif + int i; + ++ assert(netdev->type == NET_CLIENT_DRIVER_PCAP); ++ pcap_opts = &netdev->u.pcap; + if (!pcap_opts->has_ifname) + return -1; + @@ -113,13 +115,13 @@ + 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. ++ * interface's mtu and assume the guest is configured the same. + */ + s->max_eth_frame_size = 1514; + i = socket(AF_INET, SOCK_DGRAM, 0); @@ -147,7 +149,7 @@ + pcap_perror(s->handle, (char *)"qemu: pcap_set_promisc:"); + goto fail; + } -+ if (pcap_activate(s->handle) != 0) { ++ if (pcap_activate(s->handle) != 0) { + pcap_perror(s->handle, (char *)"qemu: pcap_activate:"); + goto fail; + } @@ -219,7 +221,7 @@ + } + qemu_set_fd_handler(i, pcap_send, NULL, s); +#endif /* _WIN32 */ -+ + + return 0; + +fail: @@ -233,16 +235,16 @@ + +#endif + - static int (* const net_client_init_fun[NET_CLIENT_OPTIONS_KIND__MAX])( - const NetClientOptions *opts, + static int (* const net_client_init_fun[NET_CLIENT_DRIVER__MAX])( + const Netdev *netdev, const char *name, -@@ -952,6 +1172,9 @@ static int (* const net_client_init_fun[ - #ifdef CONFIG_NET_BRIDGE - [NET_CLIENT_OPTIONS_KIND_BRIDGE] = net_init_bridge, +@@ -961,6 +1182,9 @@ + #ifdef CONFIG_L2TPV3 + [NET_CLIENT_DRIVER_L2TPV3] = net_init_l2tpv3, #endif +#ifdef CONFIG_PCAP -+ [NET_CLIENT_OPTIONS_KIND_PCAP] = net_init_pcap, ++ [NET_CLIENT_DRIVER_PCAP] = net_init_pcap, +#endif - [NET_CLIENT_OPTIONS_KIND_HUBPORT] = net_init_hubport, - #ifdef CONFIG_VHOST_NET_USED - [NET_CLIENT_OPTIONS_KIND_VHOST_USER] = net_init_vhost_user, + }; + + Modified: head/emulators/qemu/pkg-plist ============================================================================== --- head/emulators/qemu/pkg-plist Fri Mar 10 12:51:26 2017 (r435825) +++ head/emulators/qemu/pkg-plist Fri Mar 10 12:54:21 2017 (r435826) @@ -48,11 +48,13 @@ man/man8/qemu-nbd.8.gz %%DATADIR%%/bios-256k.bin %%DATADIR%%/bios.bin %%DATADIR%%/efi-e1000.rom +%%DATADIR%%/efi-e1000e.rom %%DATADIR%%/efi-eepro100.rom %%DATADIR%%/efi-ne2k_pci.rom %%DATADIR%%/efi-pcnet.rom %%DATADIR%%/efi-rtl8139.rom %%DATADIR%%/efi-virtio.rom +%%DATADIR%%/efi-vmxnet3.rom %%DATADIR%%/vgabios.bin %%DATADIR%%/vgabios-cirrus.bin %%DATADIR%%/vgabios-qxl.bin @@ -75,14 +77,16 @@ man/man8/qemu-nbd.8.gz %%DATADIR%%/slof.bin %%DATADIR%%/s390-ccw.img %%DATADIR%%/linuxboot.bin +%%LINUXBOOT_DMA%%%%DATADIR%%/linuxboot_dma.bin %%DATADIR%%/multiboot.bin %%DATADIR%%/sgabios.bin +%%DATADIR%%/skiboot.lid +%%DATADIR%%/trace-events-all %%DATADIR%%/petalogix-s3adsp1800.dtb %%DATADIR%%/bamboo.dtb %%DATADIR%%/kvmvapic.bin %%DATADIR%%/qemu-icon.bmp %%DATADIR%%/qemu_logo_no_text.svg -%%DATADIR%%/trace-events %%DATADIR%%/u-boot.e500 %%DATADIR%%/keymaps/ar %%DATADIR%%/keymaps/bepo @@ -121,6 +125,7 @@ man/man8/qemu-nbd.8.gz %%DATADIR%%/keymaps/sv %%DATADIR%%/keymaps/th %%DATADIR%%/keymaps/tr +%%GTK2%%share/locale/bg/LC_MESSAGES/qemu.mo %%GTK2%%share/locale/de_DE/LC_MESSAGES/qemu.mo %%GTK2%%share/locale/fr_FR/LC_MESSAGES/qemu.mo %%GTK2%%share/locale/it/LC_MESSAGES/qemu.mo