2009-12-01 Laszlo (Laca) Peter <[email protected]>
authorlaca
Tue, 01 Dec 2009 11:03:56 +0000
changeset 17065 71eeb9bbac92
parent 17064 cefb937d2571
child 17066 cdb80c388222
2009-12-01 Laszlo (Laca) Peter <[email protected]> * SUNWPython.spec: add a nicer fix for the netpacket/packet.h build issue. * SUNWPython25.spec: add the same fix * SUNWPython26.spec: add the same fix again * patches/Python-18-disable-netpacket_h.diff: delete * patches/Python-18-netpacket-packet-h.diff: add * patches/Python25-14-netpacket-packet-h.diff: add * patches/Python26-17-disable-netpacket_h.diff: delete * patches/Python26-17-netpacket-packet-h.diff: add
ChangeLog
SUNWPython.spec
SUNWPython25.spec
SUNWPython26.spec
patches/Python-07-dtrace.diff
patches/Python-18-disable-netpacket_h.diff
patches/Python-18-netpacket-packet-h.diff
patches/Python25-14-netpacket-packet-h.diff
patches/Python26-17-disable-netpacket_h.diff
patches/Python26-17-netpacket-packet-h.diff
--- a/ChangeLog	Tue Dec 01 08:34:41 2009 +0000
+++ b/ChangeLog	Tue Dec 01 11:03:56 2009 +0000
@@ -1,3 +1,15 @@
+2009-12-01  Laszlo (Laca) Peter  <[email protected]>
+
+	* SUNWPython.spec: add a nicer fix for the netpacket/packet.h build
+	  issue.
+	* SUNWPython25.spec: add the same fix
+	* SUNWPython26.spec: add the same fix again
+	* patches/Python-18-disable-netpacket_h.diff: delete
+	* patches/Python-18-netpacket-packet-h.diff: add
+	* patches/Python25-14-netpacket-packet-h.diff: add
+	* patches/Python26-17-disable-netpacket_h.diff: delete
+	* patches/Python26-17-netpacket-packet-h.diff: add
+
 2009-12-01  Li Yuan <[email protected]>
 
 	* SUNWpyatspi.spec: Bump to 0.1.3.
--- a/SUNWPython.spec	Tue Dec 01 08:34:41 2009 +0000
+++ b/SUNWPython.spec	Tue Dec 01 11:03:56 2009 +0000
@@ -72,8 +72,10 @@
 # PSARC/2009/529 Python interface to privileges(5) & rbac(5)
 # written by [email protected]
 Patch17:                 Python-17-privrbac.diff
-# date:2009-11-25 owner:chrisk type:bug
-Patch18:                 Python-18-disable-netpacket_h.diff
+# date:2009-12-01 owner:laca type:bug
+# netpacket/packet.h on Solaris is incompatible with
+# python's socketmodule.c
+Patch18:                 Python-18-netpacket-packet-h.diff
 
 %include default-depend.inc
 BuildRequires: SUNWTk
@@ -340,6 +342,8 @@
 %{_libdir}/python?.?/py[cC][cC]
 
 %changelog
+* Tue Dec  1 2009 - [email protected]
+- add a nicer fix for the netpacket/packet.h build issue
 * Wed Nov 25 2009 - [email protected]
 - Add Python-18-disable-netpacket_h.diff. From snv_127 we have netpacket.h,
   which is incompatible with this verion python. The socket module silently
--- a/SUNWPython25.spec	Tue Dec 01 08:34:41 2009 +0000
+++ b/SUNWPython25.spec	Tue Dec 01 11:03:56 2009 +0000
@@ -63,6 +63,10 @@
 Patch12:                Python25-12-encoding-alias.diff
 # date:2009-01-23 owner:laca type:bug
 Patch13:                Python25-13-cflags.diff
+# date:2009-12-01 owner:laca type:bug
+# netpacket/packet.h on Solaris is incompatible with
+# python's socketmodule.c
+Patch14:                Python25-14-netpacket-packet-h.diff
 
 %include default-depend.inc
 BuildRequires: SUNWTk
@@ -109,6 +113,7 @@
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
 cd ..
 
 echo fixing python binary name/path in python scripts:
@@ -353,6 +358,8 @@
 %{_libdir}/python?.?/py[cC][cC]
 
 %changelog
+* Tue Dec  1 2009 - [email protected]
+- add fix for the netpacket/packet.h build issue with socketmodule.h
 * Sun Mar 22 2009 - [email protected]
 - bump to 2.5.4
 * Thu Mar 12 2009 - [email protected]
--- a/SUNWPython26.spec	Tue Dec 01 08:34:41 2009 +0000
+++ b/SUNWPython26.spec	Tue Dec 01 11:03:56 2009 +0000
@@ -74,8 +74,10 @@
 # PSARC/2009/529 Python interface to privileges(5) & rbac(5)
 # written by [email protected]
 Patch16:		 Python26-16-privrbac.diff
-# date:2009-11-19 owner:chrisk type:bug
-Patch17:		 Python26-17-disable-netpacket_h.diff
+# date:2009-12-01 owner:laca type:bug
+# netpacket/packet.h on Solaris is incompatible with
+# python's socketmodule.c
+Patch17:                 Python26-17-netpacket-packet-h.diff
 
 %include default-depend.inc
 BuildRequires: SUNWTk
@@ -396,6 +398,8 @@
 %{_libdir}/python?.?/py[cC][cC]
 
 %changelog
+* Tue Dec  1 2009 - [email protected]
+- add a nicer fix for the netpacket/packet.h build issue
 * Thu Nov 19 2009 - [email protected]
 - Add Python26-17-disable-netpacket_h. SUNWpacketh delivers 
   /usr/include/netpacket/packet.h which is incompatible with this version of 
--- a/patches/Python-07-dtrace.diff	Tue Dec 01 08:34:41 2009 +0000
+++ b/patches/Python-07-dtrace.diff	Tue Dec 01 11:03:56 2009 +0000
@@ -249,7 +249,7 @@
 diff -prauN Python-2.4.4/Python/phelper.d Python-new/Python/phelper.d
 --- Python-2.4.4/Python/phelper.d	1969-12-31 16:00:00.000000000 -0800
 +++ Python-new/Python/phelper.d	2007-07-03 07:59:58.727255000 -0700
-@@ -0,0 +1,137 @@
+@@ -0,0 +1,138 @@
 +
 +/*
 + * Python ustack helper.  This relies on the first argument (PyFrame *) being
@@ -267,6 +267,7 @@
 +#define _SYS_STAT_H
 +
 +#include <stdio.h>
++#include <sys/types.h>
 +
 +#include "pyport.h"
 +#include "object.h"
--- a/patches/Python-18-disable-netpacket_h.diff	Tue Dec 01 08:34:41 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-diff -ruN Python-2.4.6.orig/configure.in Python-2.4.6/configure.in
---- Python-2.4.6.orig/configure.in	2009-11-24 00:32:32.719223568 +0000
-+++ Python-2.4.6/configure.in	2009-11-24 00:32:44.840941291 +0000
-@@ -1105,7 +1105,7 @@
- sys/modem.h \
- sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/time.h \
- sys/times.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
--sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
-+sys/resource.h sysexits.h bluetooth.h \
- bluetooth/bluetooth.h)
- AC_HEADER_DIRENT
- AC_HEADER_MAJOR
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/Python-18-netpacket-packet-h.diff	Tue Dec 01 11:03:56 2009 +0000
@@ -0,0 +1,53 @@
+--- Python-2.4.6/Modules/socketmodule.c.packet	2006-10-11 05:20:41.000000000 +1300
++++ Python-2.4.6/Modules/socketmodule.c	2009-12-01 21:23:57.240536116 +1300
+@@ -61,6 +61,14 @@
+ 
+ */
+ 
++#ifdef HAVE_NETPACKET_PACKET_H
++#ifdef sun
++#define USE_NETPACKET_PACKET_H 0
++#else
++#define USE_NETPACKET_PACKET_H 1
++#endif
++#endif
++
+ #ifdef __APPLE__
+   /*
+    * inet_aton is not available on OSX 10.3, yet we want to use a binary
+@@ -1077,7 +1085,7 @@
+ 		}
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	case AF_PACKET:
+ 	{
+ 		struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
+@@ -1278,7 +1286,7 @@
+ 	}
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	case AF_PACKET:
+ 	{
+ 		struct sockaddr_ll* addr;
+@@ -1388,7 +1396,7 @@
+ 	}
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	case AF_PACKET:
+ 	{
+ 		*len_ret = sizeof (struct sockaddr_ll);
+@@ -4099,7 +4107,7 @@
+ 	PyModule_AddObject(m, "BDADDR_LOCAL", Py_BuildValue("s", "00:00:00:FF:FF:FF"));
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	PyModule_AddIntConstant(m, "AF_PACKET", AF_PACKET);
+ 	PyModule_AddIntConstant(m, "PF_PACKET", PF_PACKET);
+ 	PyModule_AddIntConstant(m, "PACKET_HOST", PACKET_HOST);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/Python25-14-netpacket-packet-h.diff	Tue Dec 01 11:03:56 2009 +0000
@@ -0,0 +1,53 @@
+--- Python-2.5.4/Modules/socketmodule.c.packet	2009-12-01 01:08:00.011626912 +1300
++++ Python-2.5.4/Modules/socketmodule.c	2009-12-01 01:10:20.911272258 +1300
+@@ -61,6 +61,14 @@
+ 
+ */
+ 
++#ifdef HAVE_NETPACKET_PACKET_H
++#ifdef sun
++#define USE_NETPACKET_PACKET_H 0
++#else
++#define USE_NETPACKET_PACKET_H 1
++#endif
++#endif
++
+ #ifdef __APPLE__
+   /*
+    * inet_aton is not available on OSX 10.3, yet we want to use a binary
+@@ -1130,7 +1138,7 @@
+ 		}
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	case AF_PACKET:
+ 	{
+ 		struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
+@@ -1375,7 +1383,7 @@
+ 	}
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	case AF_PACKET:
+ 	{
+ 		struct sockaddr_ll* addr;
+@@ -1499,7 +1507,7 @@
+ 	}
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	case AF_PACKET:
+ 	{
+ 		*len_ret = sizeof (struct sockaddr_ll);
+@@ -4425,7 +4433,7 @@
+ 	PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF");
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	PyModule_AddIntConstant(m, "AF_PACKET", AF_PACKET);
+ 	PyModule_AddIntConstant(m, "PF_PACKET", PF_PACKET);
+ 	PyModule_AddIntConstant(m, "PACKET_HOST", PACKET_HOST);
--- a/patches/Python26-17-disable-netpacket_h.diff	Tue Dec 01 08:34:41 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-diff -ruN Python-2.6.2.orig/configure.in Python-2.6.2/configure.in
---- Python-2.6.2.orig/configure.in	2009-11-19 14:11:37.138115706 +0000
-+++ Python-2.6.2/configure.in	2009-11-19 14:11:46.606838381 +0000
-@@ -1297,7 +1297,7 @@
- sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
- sys/termio.h sys/time.h \
- sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
--sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
-+sys/resource.h sysexits.h bluetooth.h \
- bluetooth/bluetooth.h linux/tipc.h)
- AC_HEADER_DIRENT
- AC_HEADER_MAJOR
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/Python26-17-netpacket-packet-h.diff	Tue Dec 01 11:03:56 2009 +0000
@@ -0,0 +1,53 @@
+--- Python-2.6.2/Modules/socketmodule.c.packet	2009-04-01 07:20:48.000000000 +1300
++++ Python-2.6.2/Modules/socketmodule.c	2009-12-01 21:25:04.133257645 +1300
+@@ -81,6 +81,14 @@
+ 
+ */
+ 
++#ifdef HAVE_NETPACKET_PACKET_H
++#ifdef sun
++#define USE_NETPACKET_PACKET_H 0
++#else
++#define USE_NETPACKET_PACKET_H 1
++#endif
++#endif
++
+ #ifdef __APPLE__
+   /*
+    * inet_aton is not available on OSX 10.3, yet we want to use a binary
+@@ -1092,7 +1100,7 @@
+ 		}
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	case AF_PACKET:
+ 	{
+ 		struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
+@@ -1382,7 +1390,7 @@
+ 	}
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	case AF_PACKET:
+ 	{
+ 		struct sockaddr_ll* addr;
+@@ -1559,7 +1567,7 @@
+ 	}
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	case AF_PACKET:
+ 	{
+ 		*len_ret = sizeof (struct sockaddr_ll);
+@@ -4575,7 +4583,7 @@
+ 	PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF");
+ #endif
+ 
+-#ifdef HAVE_NETPACKET_PACKET_H
++#if USE_NETPACKET_PACKET_H
+ 	PyModule_AddIntConstant(m, "AF_PACKET", AF_PACKET);
+ 	PyModule_AddIntConstant(m, "PF_PACKET", PF_PACKET);
+ 	PyModule_AddIntConstant(m, "PACKET_HOST", PACKET_HOST);