Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2007 21:17:06 GMT
From:      Barry Pederson <bp@barryp.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/115610: devel/py-freebsd broken on FreeBSD-Current (7.0)
Message-ID:  <200708172117.l7HLH6cK007899@www.freebsd.org>
Resent-Message-ID: <200708172120.l7HLK1i8055959@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         115610
>Category:       ports
>Synopsis:       devel/py-freebsd broken on FreeBSD-Current (7.0)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 17 21:20:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Barry Pederson
>Release:        7.0-CURRENT
>Organization:
>Environment:
FreeBSD xxx.yyy.edu 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Fri Aug 17 10:13:10 CDT 2007     barryp@xxx.yyy.edu:/usr/obj/usr/src/sys/MYCONF  amd64
>Description:
The freebsd-python list received a notice that 
compiling devel/py-freebsd 0.9.3_1 fails on 7.0-Current with:

---------
src/netstat.c: In function 'PyFB_ifstats':
src/netstat.c:246: error: 'struct if_data' has no member named 'ifi_recvquota'
src/netstat.c:246: error: 'struct if_data' has no member named 'ifi_xmitquota'
error: command 'cc' failed with exit status 1
*** Error code 1
---------

Probably broken with this commit, removing those members:

  http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/if_var.h#rev1.115


>How-To-Repeat:
Try to compile the devel/py-freebsd port on a 7.0-CURRENT or higher system
>Fix:
I've attached a patch

Patch attached with submission follows:

diff -urN py-freebsd.orig/Makefile py-freebsd/Makefile
--- py-freebsd.orig/Makefile	2007-07-30 04:41:13.000000000 -0500
+++ py-freebsd/Makefile	2007-08-17 15:48:44.040358957 -0500
@@ -7,7 +7,7 @@
 
 PORTNAME=	freebsd
 PORTVERSION=	0.9.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel python
 MASTER_SITES=	${MASTER_SITE_LOCAL} \
 		http://people.freebsd.org/~perky/distfiles/
@@ -27,4 +27,11 @@
 		%%PYTHON_SITELIBDIR%%/freebsd_compat02.pyc \
 		%%PYTHON_SITELIBDIR%%/freebsd_compat02.pyo
 
-.include <bsd.port.mk>
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 700000
+EXTRA_PATCHES+=         ${FILESDIR}/freebsd7_patch-src-netstat.c
+.endif
+
+.include <bsd.port.post.mk>
diff -urN py-freebsd.orig/files/freebsd7_patch-src-netstat.c py-freebsd/files/freebsd7_patch-src-netstat.c
--- py-freebsd.orig/files/freebsd7_patch-src-netstat.c	1969-12-31 18:00:00.000000000 -0600
+++ py-freebsd/files/freebsd7_patch-src-netstat.c	2007-08-17 13:08:15.990921389 -0500
@@ -0,0 +1,10 @@
+--- src/netstat.c.orig	2007-08-17 13:07:10.654911645 -0500
++++ src/netstat.c	2007-08-17 13:07:19.496912514 -0500
+@@ -243,7 +243,6 @@
+ 		Py_DECREF(t);
+ 		p_int(type);        p_int(physical);
+ 		p_int(addrlen);     p_int(hdrlen);
+-		p_int(recvquota);   p_int(xmitquota);
+ 		p_long(mtu);        p_long(metric);
+ 		p_long(baudrate);   p_long(ipackets);
+ 		p_long(ierrors);    p_long(opackets);


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708172117.l7HLH6cK007899>