From nobody@FreeBSD.org  Mon Mar 14 19:33:51 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BA66D106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 14 Mar 2011 19:33:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A6B728FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 14 Mar 2011 19:33:51 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2EJXpNk050808
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 14 Mar 2011 19:33:51 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p2EJXpEQ050787;
	Mon, 14 Mar 2011 19:33:51 GMT
	(envelope-from nobody)
Message-Id: <201103141933.p2EJXpEQ050787@red.freebsd.org>
Date: Mon, 14 Mar 2011 19:33:51 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [ports] qemu-devel broken on recent installs of CURRENT
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         155558
>Category:       ports
>Synopsis:       emulators/qemu-devel broken on recent installs of CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    nox
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 14 19:40:10 UTC 2011
>Closed-Date:    Fri Apr 01 19:43:29 UTC 2011
>Last-Modified:  Sat Apr 27 17:20:00 UTC 2013
>Originator:     Garrett Cooper
>Release:        CURRENT
>Organization:
>Environment:
FreeBSD bayonetta.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r218938M: Mon Feb 21 23:10:51 PST 2011     gcooper@bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA  amd64
>Description:
Since mdf's rototilling of SYSCTL(9) in r217586, emulators/*qemu* is failing to build with errors like this:

/usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c: In function 'sysctl_oldcvt':
/usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c:215: error: 'CTLTYPE_QUAD' undeclared (first use in this function)
/usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c:215: error: (Each undeclared identifier is reported only once
/usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c:215: error: for each function it appears in.)

What needs to happen is that the instance of CTLTYPE_QUAD needs to be replaced with CTLTYPE_U64:

$ grep -B 4 -A 4 _QUAD /usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c 
    case CTLTYPE_ULONG:
        *(uint64_t *)holdp = tswap64(*(unsigned long *)holdp);
        break;
#endif
    case CTLTYPE_QUAD:
        *(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
        break;
    case CTLTYPE_STRING:
        break;
>How-To-Repeat:
Upgrade to CURRENT r217586+ and try to build emulators/*qemu*.
>Fix:
Patch with an ifdef, like:

#if __FreeBSD_version__ < 900031
    case CTLTYPE_QUAD:
#else
    case CTLTYPE_U64:
#endif

Unfortunately mdf@ didn't bump __FreeBSD_version__ appropriately for the SYSCTL(9) KPI change.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->nox 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Mar 14 20:08:48 UTC 2011 
Responsible-Changed-Why:  
Fix synopsis and assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155558 

From: Garrett Cooper <yaneurabeya@gmail.com>
To: bug-followup@FreeBSD.org, yanegomi@gmail.com
Cc:  
Subject: Re: ports/155558: emulators/qemu-devel broken on recent installs of CURRENT
Date: Tue, 15 Mar 2011 05:38:31 -0700

     This patch unbreaks the compile when ALL_TARGETS isn't defined in
 the Makefile; unfortunately things fail to link with -lpthread when
 ALL_TARGETS is specified.
 Thanks,
 -Garrett

From: Garrett Cooper <yaneurabeya@gmail.com>
To: bug-followup@freebsd.org, yanegomi@gmail.com
Cc:  
Subject: Re: ports/155558: emulators/qemu-devel broken on recent installs of CURRENT
Date: Tue, 15 Mar 2011 05:55:42 -0700

 --000e0cd5bc6c2fa504049e84f2d1
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 On Tue, Mar 15, 2011 at 5:38 AM, Garrett Cooper <yaneurabeya@gmail.com> wrote:
 > =A0 =A0This patch unbreaks the compile when ALL_TARGETS isn't defined in
 > the Makefile; unfortunately things fail to link with -lpthread when
 > ALL_TARGETS is specified.
 
 Let's try again.. this can and should be renamed to
 files/patch-qemu-devel-patch-bsd-user-syscall.c
 -Garrett
 
 --000e0cd5bc6c2fa504049e84f2d1
 Content-Type: text/x-patch; charset=US-ASCII; 
 	name="qemu-devel-patch-bsd-user-syscall.patch"
 Content-Disposition: attachment; 
 	filename="qemu-devel-patch-bsd-user-syscall.patch"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_glatojb80
 
 ZGlmZiAtLWdpdCBhL2JzZC11c2VyL3N5c2NhbGwuYyBiL2JzZC11c2VyL3N5c2NhbGwuYwppbmRl
 eCBlYjFjZGYyLi4yYzMyNjM3IDEwMDY0NAotLS0gYS9ic2QtdXNlci9zeXNjYWxsLmMKKysrIGIv
 YnNkLXVzZXIvc3lzY2FsbC5jCkBAIC0yMTIsNyArMjEyLDExIEBAIHN0YXRpYyBpbnQgc3lzY3Rs
 X29sZGN2dCh2b2lkICpob2xkcCwgc2l6ZV90IGhvbGRsZW4sIHVpbnQzMl90IGtpbmQpCiAgICAg
 ICAgICoodWludDY0X3QgKilob2xkcCA9IHRzd2FwNjQoKih1bnNpZ25lZCBsb25nICopaG9sZHAp
 OwogICAgICAgICBicmVhazsKICNlbmRpZgorI2lmICFkZWZpbmVkKF9fRnJlZUJTRF92ZXJzaW9u
 KSB8fCBfX0ZyZWVCU0RfdmVyc2lvbiA8IDkwMDAzMQogICAgIGNhc2UgQ1RMVFlQRV9RVUFEOgor
 I2Vsc2UKKyAgICBjYXNlIENUTFRZUEVfVTY0OgorI2VuZGlmCiAgICAgICAgICoodWludDY0X3Qg
 Kilob2xkcCA9IHRzd2FwNjQoKih1aW50NjRfdCAqKWhvbGRwKTsKICAgICAgICAgYnJlYWs7CiAg
 ICAgY2FzZSBDVExUWVBFX1NUUklORzoK
 --000e0cd5bc6c2fa504049e84f2d1--
State-Changed-From-To: open->patched 
State-Changed-By: nox 
State-Changed-When: Tue Mar 15 18:34:08 UTC 2011 
State-Changed-Why:  
Patch committed, please tell me if the port builds now since I currently 
don't have a head box to test it on. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155558 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/155558: commit references a PR
Date: Tue, 15 Mar 2011 18:30:18 +0000 (UTC)

 nox         2011-03-15 18:30:02 UTC
 
   FreeBSD ports repository
 
   Added files:
     emulators/qemu-devel/files patch-bsd-user-syscall.c 
   Log:
   - (Attempt to) fix build on head.
   - No PORTREVISION bump since this is a build fix.
   
   PR:             ports/155558
   Submitted by:   Garrett Cooper <yaneurabeya@gmail.com>
   
   Revision  Changes    Path
   1.1       +16 -0     ports/emulators/qemu-devel/files/patch-bsd-user-syscall.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/155558: commit references a PR
Date: Fri,  1 Apr 2011 19:30:35 +0000 (UTC)

 nox         2011-04-01 19:30:21 UTC
 
   FreeBSD ports repository
 
   Modified files:
     emulators/qemu-devel Makefile distinfo pkg-message pkg-plist 
     emulators/qemu-devel/files patch-90_security patch-Makefile 
                                patch-bsd-user-ld patch-tapclose 
                                pcap-patch 
   Added files:
     emulators/qemu-devel/files patch-qemu-timer.h 
   Removed files:
     emulators/qemu-devel/files patch-block-sheepdog.c 
                                patch-hw-vmware_vga.c 
                                patch-hw-zaurus.c patch-omap-uart 
   Log:
   - Update to 0.14.0 .
   - Update amd64 host bsd-user linker script to fix build on
     -current/amd64. [1]
   - Some updates to the pkg-message.
   
   PR:             ports/155558 [1]
   Submitted by:   Garrett Cooper <yaneurabeya@gmail.com> [1]
   
   Revision  Changes    Path
   1.119     +9 -8      ports/emulators/qemu-devel/Makefile
   1.57      +2 -3      ports/emulators/qemu-devel/distinfo
   1.8       +0 -13     ports/emulators/qemu-devel/files/patch-90_security
   1.10      +0 -9      ports/emulators/qemu-devel/files/patch-Makefile
   1.2       +0 -15     ports/emulators/qemu-devel/files/patch-block-sheepdog.c (dead)
   1.3       +239 -24   ports/emulators/qemu-devel/files/patch-bsd-user-ld
   1.3       +0 -74     ports/emulators/qemu-devel/files/patch-hw-vmware_vga.c (dead)
   1.2       +0 -24     ports/emulators/qemu-devel/files/patch-hw-zaurus.c (dead)
   1.2       +0 -146    ports/emulators/qemu-devel/files/patch-omap-uart (dead)
   1.1       +13 -0     ports/emulators/qemu-devel/files/patch-qemu-timer.h (new)
   1.2       +4 -3      ports/emulators/qemu-devel/files/patch-tapclose
   1.6       +11 -11    ports/emulators/qemu-devel/files/pcap-patch
   1.35      +26 -31    ports/emulators/qemu-devel/pkg-message
   1.28      +3 -2      ports/emulators/qemu-devel/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: nox 
State-Changed-When: Fri Apr 1 19:43:28 UTC 2011 
State-Changed-Why:  
Should be fixed with the latest update. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155558 

From: Patrick Welche <prlw1@cam.ac.uk>
To: bug-followup@FreeBSD.org, yaneurabeya@gmail.com
Cc: prlw1@cam.ac.uk
Subject: Re: ports/155558: emulators/qemu-devel broken on recent installs of
 CURRENT
Date: Sat, 27 Apr 2013 10:55:29 +0100

 I saw this patch fly by one of the qemu lists. Wouldn't an OS agnostic
 patch of the form:
 
 #ifdef CTLTYPE_U64
     case CTLTYPE_U64:
 #else
     case CTLTYPE_QUAD:
 #endif
 
 have worked? 
 
 - it avoids relying on the accuracy of __FreeBSD_version__
 - what happens when other OSes follow your lead in sysctl rototilling?
 
 Cheers,
 
 Patrick

From: Garrett Cooper <yaneurabeya@gmail.com>
To: Patrick Welche <prlw1@cam.ac.uk>
Cc: "bug-followup@FreeBSD.org" <bug-followup@FreeBSD.org>,
 "prlw1@cam.ac.uk" <prlw1@cam.ac.uk>
Subject: Re: ports/155558: emulators/qemu-devel broken on recent installs of CURRENT
Date: Sat, 27 Apr 2013 10:13:18 -0700

 Yeah, that'd work too! It just makes figuring out the instigator of the chan=
 ge a bit more difficult..
 Thanks!
 -Garrett
 
 Sent from my iPhone
 
 On Apr 27, 2013, at 2:55 AM, Patrick Welche <prlw1@cam.ac.uk> wrote:
 
 > I saw this patch fly by one of the qemu lists. Wouldn't an OS agnostic
 > patch of the form:
 >=20
 > #ifdef CTLTYPE_U64
 >    case CTLTYPE_U64:
 > #else
 >    case CTLTYPE_QUAD:
 > #endif
 >=20
 > have worked?=20
 >=20
 > - it avoids relying on the accuracy of __FreeBSD_version__
 > - what happens when other OSes follow your lead in sysctl rototilling?
 >=20
 > Cheers,
 >=20
 > Patrick
>Unformatted:
