ports/158752: [emulators/gns3] Update to release 0.7.4

Olivier Cochard-Labbe olivier at cochard.me
Sat Jul 9 21:30:11 UTC 2011


>Number:         158752
>Category:       ports
>Synopsis:       [emulators/gns3] Update to release 0.7.4
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 09 21:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Olivier Cochard-Labbe
>Release:        8.2
>Organization:
>Environment:
FreeBSD d630.bsdrp.net 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root at mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Here is the update from GNS3 0.7.3 to 0.7.4 and a fix to qemu usage with GNS3 (thanks to nox@) !
Before to update this port, emulators/qemu[-devel] need to be updated (UDP tunnel mode and multicast fix): See nox@ for more information about theses updates.

Regards,

Olivier
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN gns3.old/Makefile gns3/Makefile
--- gns3.old/Makefile	2011-07-02 11:19:35.000000000 +0200
+++ gns3/Makefile	2011-07-03 23:49:42.000000000 +0200
@@ -2,12 +2,11 @@
 # Date created:		24 may 2009
 # Whom:			Olivier Cochard-Labbe <olivier at cochard.me>
 #
-# $FreeBSD: ports/emulators/gns3/Makefile,v 1.11 2011/07/01 17:30:40 nox Exp $
+# $FreeBSD$
 #
 
 PORTNAME=	gns3
-PORTVERSION=	0.7.3
-PORTREVISION=	1
+PORTVERSION=	0.7.4
 CATEGORIES=	emulators
 MASTER_SITES=	SF/gns-3/GNS3/${PORTVERSION}
 DISTNAME=	GNS3-${PORTVERSION}-src
@@ -20,14 +19,15 @@
 		${PYTHON_SITELIBDIR}/PyQt4/QtNetwork.so:${PORTSDIR}/net/py-qt4-network \
 		dynamips:${PORTSDIR}/emulators/dynamips-community \
 		dynagen:${PORTSDIR}/emulators/dynagen \
-		qemu>=0.11:${PORTSDIR}/emulators/qemu
+		qemu:${PORTSDIR}/emulators/qemu
 
-USE_PYTHON=		2.5+
+USE_PYTHON=		2.6+
 USE_PYDISTUTILS=	yes
 PYDISTUTILS_PKGNAME=	GNS3
 MAN1=			gns3.1
 LICENSE=		GPLv2
 
+
 post-install:
 .if !defined(NO_INSTALL_MANPAGES)
 	${INSTALL_MAN} ${WRKSRC}/docs/man/gns3.1 ${MANPREFIX}/man/man1
@@ -35,4 +35,12 @@
 	${INSTALL_SCRIPT} ${WRKSRC}/qemuwrapper/qemuwrapper.py \
 		${PREFIX}/bin/qemuwrapper.py
 	@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+
+.include <bsd.port.pre.mk>
+
+QEMU_GNS3!= qemu -help | ${GREP} -q "net udp" >/dev/null 2>&1 && ${ECHO_CMD} 'yes' || true
+.  if ${QEMU_GNS3} == ""
+IGNORE=         must be used with a gns3 patched qemu
+.  endif
+
+.include <bsd.port.post.mk>
diff -ruN gns3.old/distinfo gns3/distinfo
--- gns3.old/distinfo	2011-07-02 11:19:35.000000000 +0200
+++ gns3/distinfo	2011-07-02 11:30:43.000000000 +0200
@@ -1,2 +1,2 @@
-SHA256 (GNS3-0.7.3-src.tar.gz) = 352e8a076d83992269ec4a12fb33ab2431f14f968c0facc0571d7e6dd83521de
-SIZE (GNS3-0.7.3-src.tar.gz) = 4418850
+SHA256 (GNS3-0.7.4-src.tar.gz) = 77a2c9b251d199a435ba85936349a1f8b1760df14a2594b68f8c1fee36f9588d
+SIZE (GNS3-0.7.4-src.tar.gz) = 4512420
diff -ruN gns3.old/files/patch-Page_PreferencesCapture.py gns3/files/patch-Page_PreferencesCapture.py
--- gns3.old/files/patch-Page_PreferencesCapture.py	1970-01-01 01:00:00.000000000 +0100
+++ gns3/files/patch-Page_PreferencesCapture.py	2011-07-03 00:52:36.000000000 +0200
@@ -0,0 +1,11 @@
+--- src/GNS3/Ui/ConfigurationPages/Page_PreferencesCapture.py.orig	2011-07-03 00:10:04.000000000 +0200
++++ src/GNS3/Ui/ConfigurationPages/Page_PreferencesCapture.py	2011-07-03 00:10:29.000000000 +0200
+@@ -52,7 +52,7 @@
+             elif sys.platform.startswith('win'):
+                 self.conf.cap_cmd = unicode("C:\Program Files\Wireshark\wireshark.exe %c")
+             else:
+-                self.conf.cap_cmd = unicode("/usr/bin/wireshark %c")
++                self.conf.cap_cmd = unicode("/usr/local/bin/wireshark %c")
+ 
+         if self.conf.workdir == '':
+             if os.environ.has_key("TEMP"):
diff -ruN gns3.old/files/patch-Page_PreferencesDynamips.py gns3/files/patch-Page_PreferencesDynamips.py
--- gns3.old/files/patch-Page_PreferencesDynamips.py	1970-01-01 01:00:00.000000000 +0100
+++ gns3/files/patch-Page_PreferencesDynamips.py	2011-07-03 00:52:46.000000000 +0200
@@ -0,0 +1,13 @@
+--- src/GNS3/Ui/ConfigurationPages/Page_PreferencesDynamips.py.orig	2011-07-03 00:11:46.000000000 +0200
++++ src/GNS3/Ui/ConfigurationPages/Page_PreferencesDynamips.py	2011-07-03 00:32:42.000000000 +0200
+@@ -55,7 +55,9 @@
+         # Default path to dynamips executable
+         if self.conf.path == '' and sys.platform.startswith('win'):
+             self.conf.path = unicode('dynamips-wxp.exe')
+-            
++        else:
++			self.conf.path = unicode('/usr/local/bin/dynamips')
++    
+         # Default path to working directory
+         if self.conf.workdir == '':
+             if os.environ.has_key("TEMP"):
diff -ruN gns3.old/files/patch-Page_PreferencesQemu.py gns3/files/patch-Page_PreferencesQemu.py
--- gns3.old/files/patch-Page_PreferencesQemu.py	1970-01-01 01:00:00.000000000 +0100
+++ gns3/files/patch-Page_PreferencesQemu.py	2011-07-03 00:52:57.000000000 +0200
@@ -0,0 +1,11 @@
+--- src/GNS3/Ui/ConfigurationPages/Page_PreferencesQemu.py.orig	2011-07-03 00:06:36.000000000 +0200
++++ src/GNS3/Ui/ConfigurationPages/Page_PreferencesQemu.py	2011-07-03 00:07:26.000000000 +0200
+@@ -97,7 +97,7 @@
+             if sys.platform.startswith('win'):
+                 self.conf.qemuwrapper_path = unicode('qemuwrapper.exe')
+             else:
+-                path = os.getcwd() + '/qemuwrapper/qemuwrapper.py'
++                path = '/usr/local/bin/qemuwrapper.py'
+                 self.conf.qemuwrapper_path = unicode(path, errors='replace')
+         
+         # Default path to working directory
diff -ruN gns3.old/files/patch-qemuwrapper.py gns3/files/patch-qemuwrapper.py
--- gns3.old/files/patch-qemuwrapper.py	1970-01-01 01:00:00.000000000 +0100
+++ gns3/files/patch-qemuwrapper.py	2011-07-09 23:08:15.000000000 +0200
@@ -0,0 +1,52 @@
+--- qemuwrapper/qemuwrapper.py.orig
++++ qemuwrapper/qemuwrapper.py
+@@ -45,6 +45,7 @@ import SocketServer
+ import time
+ import random
+ import pemubin
++import ctypes
+ 
+ 
+ __author__ = 'Thomas Pani and Jeremy Grossmann'
+@@ -118,6 +119,33 @@ class xEMUInstance(object):
+     def unbase_disk(self):
+         pass
+ 
++    def preexec(self):
++        # FreeBSD preexec_fn hack to unblock signals in child processes
++        # to work around the bug in this PR:
++        #        http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/153167
++        # inspired by:
++        #        http://stackoverflow.com/questions/3791398/how-to-stop-python-from-propagating-signals-to-subprocesses
++
++        # Get the size of the array used to
++        # represent the signal mask
++        SIGSET_NWORDS = 1024 / (8 * ctypes.sizeof(ctypes.c_uint))
++
++        # Define the sigset_t structure
++        class SIGSET(ctypes.Structure):
++            _fields_ = [
++                ('val', ctypes.c_uint * SIGSET_NWORDS)
++            ]
++
++        # Create a new sigset_t to mask out SIGINT
++        sigs = (ctypes.c_uint * SIGSET_NWORDS)()
++        mask = SIGSET(sigs)
++
++        SIG_SETMASK = 3
++        libc = ctypes.CDLL('libc.so')
++
++        # Unblock all signals
++        libc.sigprocmask(SIG_SETMASK, ctypes.pointer(mask), 0)
++
+     def start(self):
+         command = self._build_command()
+ 
+@@ -125,6 +152,7 @@ class xEMUInstance(object):
+         try:
+             self.process = subprocess.Popen(command,
+                                             stdin=subprocess.PIPE,
++                                            preexec_fn=self.preexec,
+                                             cwd=self.workdir)
+         except OSError, e:
+             print >> sys.stderr, "Unable to start instance", self.name, "of", self.__class__
diff -ruN gns3.old/pkg-message gns3/pkg-message
--- gns3.old/pkg-message	2011-07-02 11:19:35.000000000 +0200
+++ gns3/pkg-message	2011-07-03 10:37:24.000000000 +0200
@@ -1,6 +1,5 @@
-===============================================================================
+=====================================
 GNS3 FreeBSD limitations :
 
-There are some limitations with GNS3 under FreeBSD because qemu port isn't
-patched for suppporting PIX/ASA and UDP communications with Dynamips.
-===============================================================================
+pemu (PIX emulator) is not available
+=====================================
diff -ruN gns3.old/pkg-plist gns3/pkg-plist
--- gns3.old/pkg-plist	2011-07-02 11:19:35.000000000 +0200
+++ gns3/pkg-plist	2011-07-03 01:20:17.000000000 +0200
@@ -94,6 +94,9 @@
 %%PYTHON_SITELIBDIR%%/GNS3/HypervisorManager.py
 %%PYTHON_SITELIBDIR%%/GNS3/HypervisorManager.pyc
 %%PYTHON_SITELIBDIR%%/GNS3/HypervisorManager.pyo
+%%PYTHON_SITELIBDIR%%/GNS3/IDLEPCDialog.py
+%%PYTHON_SITELIBDIR%%/GNS3/IDLEPCDialog.pyc
+%%PYTHON_SITELIBDIR%%/GNS3/IDLEPCDialog.pyo
 %%PYTHON_SITELIBDIR%%/GNS3/IOSDialog.py
 %%PYTHON_SITELIBDIR%%/GNS3/IOSDialog.pyc
 %%PYTHON_SITELIBDIR%%/GNS3/IOSDialog.pyo
@@ -109,6 +112,7 @@
 %%PYTHON_SITELIBDIR%%/GNS3/Langs/Lang_es.qm
 %%PYTHON_SITELIBDIR%%/GNS3/Langs/Lang_fa.qm
 %%PYTHON_SITELIBDIR%%/GNS3/Langs/Lang_fr.qm
+%%PYTHON_SITELIBDIR%%/GNS3/Langs/Lang_gr.qm
 %%PYTHON_SITELIBDIR%%/GNS3/Langs/Lang_it.qm
 %%PYTHON_SITELIBDIR%%/GNS3/Langs/Lang_jp.qm
 %%PYTHON_SITELIBDIR%%/GNS3/Langs/Lang_kr.qm
@@ -357,6 +361,9 @@
 %%PYTHON_SITELIBDIR%%/GNS3/Ui/Form_About.py
 %%PYTHON_SITELIBDIR%%/GNS3/Ui/Form_About.pyc
 %%PYTHON_SITELIBDIR%%/GNS3/Ui/Form_About.pyo
+%%PYTHON_SITELIBDIR%%/GNS3/Ui/Form_IDLEPCDialog.py
+%%PYTHON_SITELIBDIR%%/GNS3/Ui/Form_IDLEPCDialog.pyc
+%%PYTHON_SITELIBDIR%%/GNS3/Ui/Form_IDLEPCDialog.pyo
 %%PYTHON_SITELIBDIR%%/GNS3/Ui/Form_IOSDialog.py
 %%PYTHON_SITELIBDIR%%/GNS3/Ui/Form_IOSDialog.pyc
 %%PYTHON_SITELIBDIR%%/GNS3/Ui/Form_IOSDialog.pyo


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



More information about the freebsd-ports-bugs mailing list