Thursday, August 31, 2017

[UPDATE] net/mininet

Index: patches/patch-INSTALL
===================================================================
RCS file: patches/patch-INSTALL
diff -N patches/patch-INSTALL
--- patches/patch-INSTALL 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,185 +0,0 @@
-$OpenBSD: patch-INSTALL,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-INSTALL moved to INSTALL.Linux
-Index: INSTALL
---- INSTALL.orig
-+++ INSTALL
-@@ -1,179 +0,0 @@
--
--Mininet Installation/Configuration Notes
------------------------------------------
--
--Mininet 2.3.0d1
-----
--
--The supported installation methods for Mininet are 1) using a
--pre-built VM image, and 2) native installation on Ubuntu. You can also
--easily create your own Mininet VM image (4).
--
--(Other distributions may be supported in the future - if you would
--like to contribute an installation script, we would welcome it!)
--
--1. Easiest "installation" - use our pre-built VM image!
--
-- The easiest way to get Mininet running is to start with one of our
-- pre-built virtual machine images from <http://mininet.org/>
--
-- Boot up the VM image, log in, and follow the instructions on the
-- Mininet web site.
--
-- One advantage of using the VM image is that it doesn't mess with
-- your native OS installation or damage it in any way.
--
-- Although a single Mininet instance can simulate multiple networks
-- with multiple controllers, only one Mininet instance may currently
-- be run at a time, and Mininet requires root access in the machine
-- it's running on. Therefore, if you have a multiuser system, you
-- may wish to consider running Mininet in a VM.
--
--2. Next-easiest option: use our Ubuntu package!
--
-- To install Mininet itself (i.e. `mn` and the Python API) on Ubuntu
-- 12.10+:
--
-- sudo apt-get install mininet
--
-- Note: if you are upgrading from an older version of Mininet, make
-- sure you remove the old OVS from `/usr/local`:
--
-- sudo rm /usr/local/bin/ovs*
-- sudo rm /usr/local/sbin/ovs*
--
--3. Native installation from source
--
--3.1. Native installation from source on Ubuntu 12.04+
--
-- If you're reading this, you've probably already done so, but the
-- command to download the Mininet source code is:
--
-- git clone git://github.com/mininet/mininet.git
--
-- Note that the above git command will check out the latest and greatest
-- Mininet (which we recommend!) If you want to run the last tagged/released
-- version of Mininet, you can look at the release tags using
--
-- cd mininet
-- git tag
--
-- and then
--
-- git checkout <release tag>
--
-- where <release tag> is the release you want to check out.
--
-- If you are running Ubuntu, Debian, or Fedora, you may be able to use
-- our handy `install.sh` script, which is in `util/`.
--
-- *WARNING: USE AT YOUR OWN RISK!*
--
-- `install.sh` is a bit intrusive and may possibly damage your OS
-- and/or home directory, by creating/modifying several directories
-- such as `mininet`, `openflow`, `oftest`, `pox`, etc.. We recommend
-- trying it in a VM before trying it on a system you use from day to day.
--
-- Although we hope it won't do anything completely terrible, you may
-- want to look at the script before you run it, and you should make
-- sure your system and home directory are backed up just in case!
--
-- To install Mininet itself, the OpenFlow reference implementation, and
-- Open vSwitch, you may use:
--
-- util/install.sh -fnv
--
-- This should be reasonably quick, and the following command should
-- work after the installation:
--
-- sudo mn --test pingall
--
-- To install ALL of the software which we use for OpenFlow tutorials,
-- including POX, the OpenFlow WireShark dissector, the `oftest`
-- framework, and other potentially useful software, you may use:
--
-- util/install.sh -a
--
-- This takes about 4 minutes on our test system.
--
-- You can change the directory where the dependencies are installed using
-- the -s <directory> flag.
--
-- util/install.sh -s <directory> -a
--
--3.2. Native installation from source on Fedora 18+.
--
-- As root execute the following operations:
--
-- * install git
--
-- yum install git
--
-- * create an user account (e.g. mininet) and add it to the wheel group
--
-- useradd [...] mininet
-- usermod -a -G wheel mininet
--
-- * change the SElinux setting to permissive. It can be done
-- temporarily with:
--
-- setenforce 0
--
-- then login with the new account (e.g. mininet) and do the following:
--
-- * clone the Mininet repository
--
-- git clone git://github.com/mininet/mininet.git
--
-- * install Mininet, the OpenFlow reference implementation, and
-- Open vSwitch
--
-- util/install.sh -fnv
--
-- * enable and start openvswitch
--
-- sudo systemctl enable openvswitch
-- sudo systemctl start openvswitch
--
-- * test the mininet installation
--
-- sudo mn --test pingall
--
--4. Creating your own Mininet/OpenFlow tutorial VM
--
-- Creating your own Ubuntu Mininet VM for use with the OpenFlow tutorial
-- is easy! First, create a new Ubuntu VM. Next, run two commands in it:
--
-- wget https://raw.github.com/mininet/mininet/master/util/vm/install-mininet-vm.sh
-- time install-mininet-vm.sh
--
-- Finally, verify that Mininet is installed and working in the VM:
--
-- sudo mn --test pingall
--
--5. Installation on other Linux distributions
--
-- Although we don't support other Linux distributions directly, it
-- should be possible to install and run Mininet with some degree of
-- manual effort.
--
-- In general, you must have:
--
-- * A Linux kernel compiled with network namespace support enabled
--
-- * An compatible software switch such as Open vSwitch or
-- the Linux bridge.
--
-- * Python, `bash`, `ping`, `iperf`, etc.
--
-- * Root privileges (required for network device access)
--
-- We encourage contribution of patches to the `install.sh` script to
-- support other Linux distributions.
--
--
--Good luck!
--
--Mininet Team
--
-----
Index: patches/patch-INSTALL_FreeBSD
===================================================================
RCS file: patches/patch-INSTALL_FreeBSD
diff -N patches/patch-INSTALL_FreeBSD
--- patches/patch-INSTALL_FreeBSD 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,79 +0,0 @@
-$OpenBSD: patch-INSTALL_FreeBSD,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: INSTALL.FreeBSD
---- INSTALL.FreeBSD.orig
-+++ INSTALL.FreeBSD
-@@ -0,0 +1,73 @@
-+Mininet installation notes for FreeBSD
-+--------------------------------------
-+
-+Currently, the only option is native installation.
-+
-+### Prerequisites
-+
-+This Mininet port relies heavily on VIMAGE. VIMAGE is supported by FreeBSD 8.0
-+and later, so anything past 8.0 should work - with the caveat that Mininet has
-+only been tested so far on 10.3 and newer.
-+
-+First and foremost, If it hasn't been already, the kernel must be recompiled with
-+the VIMAGE option in order for `jail` to be able to take advantage of virtual
-+network stacks (`vnet`s). A sample kernel configuration file, `VIMAGEMOD`, can
-+be found under `util/` of this repository. It also contains comments that describe
-+the minimum steps for recompiling a kernel.
-+
-+To use resource limited hosts, `rctl` must be enabled. Add to /boot/loader.conf:
-+
-+ kern.racct.enable=1
-+
-+The system must be rebooted for this to take effect, so it's best to add this
-+before building a VIMAGE kernel (as you're rebooting anyways).
-+
-+### Installation
-+
-+If they haven't been already, install `git` and `sudo`:
-+
-+ pkg install git-lite sudo
-+
-+Fetch the repo and checkout this branch:
-+
-+ git fetch https://github.com/akoshibe/mininet.git
-+
-+The install script, `install.sh`, can be used to install Mininet, Open
-+vSwitch, and Ryu along with their dependencies. It must be generated first:
-+
-+ cd mininet
-+ ./configure
-+ util/install.sh -a #or with flags -nvy
-+
-+The script uses `pkg` to install the dependencies, so this should take just a
-+minute or so (plus or minus confirming installation, and network speed).
-+
-+Next, start Open vSwitch (if not started):
-+
-+ sudo service ovsdb-server onestart
-+ sudo service ovs-vswitchd onestart
-+
-+The following lines can be added to /etc/rc.conf so that they start with
-+system startup/restart:
-+
-+ ovsdb_server_enable="YES"
-+ ovs_vswitchd_enable="YES"
-+
-+Finally, test the installation:
-+
-+ sudo mn --test=pingall --controller=ryu
-+
-+This should take about five or six seconds, a good chunk of which is waiting
-+for Ryu to start up. Alternatively, a `pingall` can be run from the CLI for a
-+similar sanity check with less waiting:
-+
-+ sudo mn --controller=ryu
-+ mininet> pingall
-+
-+### Removal
-+
-+The Mininet core files can be uninstalled with the same install script:
-+
-+ util/install.sh -u
-+
-+This essentially undoes `install.sh -n`, minus the package dependencies.
Index: patches/patch-INSTALL_Linux
===================================================================
RCS file: patches/patch-INSTALL_Linux
diff -N patches/patch-INSTALL_Linux
--- patches/patch-INSTALL_Linux 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,187 +0,0 @@
-$OpenBSD: patch-INSTALL_Linux,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-Was originally INSTALL
-Index: INSTALL.Linux
---- INSTALL.Linux.orig
-+++ INSTALL.Linux
-@@ -0,0 +1,181 @@
-+
-+Mininet Installation/Configuration Notes
-+----------------------------------------
-+
-+Mininet 2.3.0d1
-+---
-+
-+The supported installation methods for Mininet are 1) using a
-+pre-built VM image, and 2) native installation on Ubuntu. You can also
-+easily create your own Mininet VM image (4).
-+
-+(Other distributions may be supported in the future - if you would
-+like to contribute an installation script, we would welcome it!)
-+
-+1. Easiest "installation" - use our pre-built VM image!
-+
-+ The easiest way to get Mininet running is to start with one of our
-+ pre-built virtual machine images from <http://mininet.org/>
-+
-+ Boot up the VM image, log in, and follow the instructions on the
-+ Mininet web site.
-+
-+ One advantage of using the VM image is that it doesn't mess with
-+ your native OS installation or damage it in any way.
-+
-+ Although a single Mininet instance can simulate multiple networks
-+ with multiple controllers, only one Mininet instance may currently
-+ be run at a time, and Mininet requires root access in the machine
-+ it's running on. Therefore, if you have a multiuser system, you
-+ may wish to consider running Mininet in a VM.
-+
-+2. Next-easiest option: use our Ubuntu package!
-+
-+ To install Mininet itself (i.e. `mn` and the Python API) on Ubuntu
-+ 12.10+:
-+
-+ sudo apt-get install mininet
-+
-+ Note: if you are upgrading from an older version of Mininet, make
-+ sure you remove the old OVS from `/usr/local`:
-+
-+ sudo rm /usr/local/bin/ovs*
-+ sudo rm /usr/local/sbin/ovs*
-+
-+3. Native installation from source
-+
-+3.1. Native installation from source on Ubuntu 12.04+
-+
-+ If you're reading this, you've probably already done so, but the
-+ command to download the Mininet source code is:
-+
-+ git clone git://github.com/mininet/mininet.git
-+
-+ Note that the above git command will check out the latest and greatest
-+ Mininet (which we recommend!) If you want to run the last tagged/released
-+ version of Mininet, you can look at the release tags using
-+
-+ cd mininet
-+ git tag
-+
-+ and then
-+
-+ git checkout <release tag>
-+
-+ where <release tag> is the release you want to check out.
-+
-+ If you are running Ubuntu, Debian, or Fedora, you may be able to use
-+ our handy `install.sh` script, which is in `util/`.
-+
-+ *WARNING: USE AT YOUR OWN RISK!*
-+
-+ `install.sh` is a bit intrusive and may possibly damage your OS
-+ and/or home directory, by creating/modifying several directories
-+ such as `mininet`, `openflow`, `oftest`, `pox`, etc.. We recommend
-+ trying it in a VM before trying it on a system you use from day to day.
-+
-+ Although we hope it won't do anything completely terrible, you may
-+ want to look at the script before you run it, and you should make
-+ sure your system and home directory are backed up just in case!
-+
-+ To install Mininet itself, the OpenFlow reference implementation, and
-+ Open vSwitch, you may do the following:
-+
-+ ./configure
-+ util/install.sh -fnv
-+
-+ This should be reasonably quick, and the following command should
-+ work after the installation:
-+
-+ sudo mn --test pingall
-+
-+ To install ALL of the software which we use for OpenFlow tutorials,
-+ including POX, the OpenFlow WireShark dissector, the `oftest`
-+ framework, and other potentially useful software, you may use:
-+
-+ util/install.sh -a
-+
-+ This takes about 4 minutes on our test system.
-+
-+ You can change the directory where the dependencies are installed using
-+ the -s <directory> flag.
-+
-+ util/install.sh -s <directory> -a
-+
-+3.2. Native installation from source on Fedora 18+.
-+
-+ As root execute the following operations:
-+
-+ * install git
-+
-+ yum install git
-+
-+ * create an user account (e.g. mininet) and add it to the wheel group
-+
-+ useradd [...] mininet
-+ usermod -a -G wheel mininet
-+
-+ * change the SElinux setting to permissive. It can be done
-+ temporarily with:
-+
-+ setenforce 0
-+
-+ then login with the new account (e.g. mininet) and do the following:
-+
-+ * clone the Mininet repository
-+
-+ git clone git://github.com/mininet/mininet.git
-+
-+ * install Mininet, the OpenFlow reference implementation, and
-+ Open vSwitch
-+
-+ ./configure
-+ util/install.sh -fnv
-+
-+ * enable and start openvswitch
-+
-+ sudo systemctl enable openvswitch
-+ sudo systemctl start openvswitch
-+
-+ * test the mininet installation
-+
-+ sudo mn --test pingall
-+
-+4. Creating your own Mininet/OpenFlow tutorial VM
-+
-+ Creating your own Ubuntu Mininet VM for use with the OpenFlow tutorial
-+ is easy! First, create a new Ubuntu VM. Next, run two commands in it:
-+
-+ wget https://raw.github.com/mininet/mininet/master/util/vm/install-mininet-vm.sh
-+ time install-mininet-vm.sh
-+
-+ Finally, verify that Mininet is installed and working in the VM:
-+
-+ sudo mn --test pingall
-+
-+5. Installation on other Linux distributions
-+
-+ Although we don't support other Linux distributions directly, it
-+ should be possible to install and run Mininet with some degree of
-+ manual effort.
-+
-+ In general, you must have:
-+
-+ * A Linux kernel compiled with network namespace support enabled
-+
-+ * An compatible software switch such as Open vSwitch or
-+ the Linux bridge.
-+
-+ * Python, `bash`, `ping`, `iperf`, etc.
-+
-+ * Root privileges (required for network device access)
-+
-+ We encourage contribution of patches to the `install.sh` script to
-+ support other Linux distributions.
-+
-+
-+Good luck!
-+
-+Mininet Team
-+
-+---
Index: patches/patch-INSTALL_OpenBSD
===================================================================
RCS file: patches/patch-INSTALL_OpenBSD
diff -N patches/patch-INSTALL_OpenBSD
--- patches/patch-INSTALL_OpenBSD 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,73 +0,0 @@
-$OpenBSD: patch-INSTALL_OpenBSD,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: INSTALL.OpenBSD
---- INSTALL.OpenBSD.orig
-+++ INSTALL.OpenBSD
-@@ -0,0 +1,67 @@
-+Mininet installation (and general) notes for OpenBSD
-+----------------------------------------------------
-+
-+Currently, the only option is native installation.
-+
-+
-+### Prerequisites
-+
-+This Mininet port relies on the native OpenFlow switch and controller,
-+`switch(4)` and `switchd(8)`, respecitvely - meaning that it assumes that you
-+are using OpenBSD 6.1. It also makes use of `doas` instead of `sudo`.
-+
-+
-+### Installation
-+
-+If it hasn't been already, install `git`:
-+
-+ doas pkg_add git
-+
-+Fetch the repo and checkout this branch:
-+
-+ git fetch https://github.com/akoshibe/mininet.git
-+
-+The install script, `install.sh`, can be used to install the Mininet core
-+libraries along with its dependencies. It must be generated first:
-+
-+ cd mininet
-+ ./configure
-+ util/install.sh -a #or with flag -n
-+
-+`install.sh -h` will give you all available options.
-+
-+To test the installation:
-+
-+ doas mn --test=pingall
-+
-+This will create a two-host, one-switch network and ping across the hosts.
-+Alternatively, a `pingall` can be run from the CLI for a similar sanity check:
-+
-+ doas mn
-+ mininet> pingall
-+
-+
-+### Removal
-+
-+The Mininet core files can be uninstalled with the same install script:
-+
-+ util/install.sh -u
-+
-+This essentially undoes `install.sh -n` minus the package dependencies,
-+which is the same as `doas make uninstall`.
-+
-+
-+### Limitations and Bugs
-+
-+* The `iperf` CLI command is pretty unstable, and can hang or kill X.
-+
-+* The number of hosts (or nodes within their own 'namespaces') is limited to 255,
-+ the highest ID that can be given to an rdomain.
-+
-+* Only the basic network elements (Node, Switch, Link, Controller, Host) are
-+ supported, i.e. there are no NAT or any resource/bandwidth-limited elements.
-+ Additionally, no work has been done to try to support non-native components such
-+ as Open vSwitch or the many controllers (NOX, POX, Ryu...)
-+
-+* The `dpctl` CLI command (mapped to `switchctl`) isn't constrained to one
-+ switch, so it will print the same text per switch.
Index: patches/patch-mininet_freebsd___init___py
===================================================================
RCS file: patches/patch-mininet_freebsd___init___py
diff -N patches/patch-mininet_freebsd___init___py
--- patches/patch-mininet_freebsd___init___py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-$OpenBSD: patch-mininet_freebsd___init___py,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: mininet/freebsd/__init__.py
---- mininet/freebsd/__init__.py.orig
-+++ mininet/freebsd/__init__.py
-@@ -0,0 +1 @@
-+"Docstring to silence pylint; ignores --ignore option for __init__.py"
Index: patches/patch-mininet_freebsd_intf_py
===================================================================
RCS file: patches/patch-mininet_freebsd_intf_py
diff -N patches/patch-mininet_freebsd_intf_py
--- patches/patch-mininet_freebsd_intf_py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-$OpenBSD: patch-mininet_freebsd_intf_py,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: mininet/freebsd/intf.py
---- mininet/freebsd/intf.py.orig
-+++ mininet/freebsd/intf.py
-@@ -0,0 +1,35 @@
-+"""
-+A interface object that relies on ifconfig(8) to manipulate network
-+interfaces and devices.
-+"""
-+from mininet.baseintf import BaseIntf
-+
-+class Intf( BaseIntf ):
-+ """Interface objects that use 'ifconfig' to configure the underlying
-+ interface that it represents"""
-+
-+ def setMAC( self, macstr ):
-+ self.mac = macstr
-+ return ( self.ifconfig( 'down' ) +
-+ self.ifconfig( 'ether', macstr, 'up' ) )
-+
-+ def rename( self, newname ):
-+ "Rename interface"
-+ result = self.ifconfig( 'name', newname )
-+ self.name = newname
-+ return result
-+
-+ def delete( self ):
-+ "Delete interface"
-+ jopt = '-vnet ' + self.node.jid if self.node.jid else ''
-+ self.ifconfig( jopt, 'destroy' )
-+ self.node.delIntf( self )
-+ self.link = None
-+
-+ def status( self ):
-+ "Return intf status as a string"
-+ links, _err, _result = self.node.pexec( 'ifconfig -l' )
-+ if self.name in links:
-+ return "OK"
-+ else:
-+ return "MISSING"
Index: patches/patch-mininet_freebsd_node_py
===================================================================
RCS file: patches/patch-mininet_freebsd_node_py
diff -N patches/patch-mininet_freebsd_node_py
--- patches/patch-mininet_freebsd_node_py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,162 +0,0 @@
-$OpenBSD: patch-mininet_freebsd_node_py,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: mininet/freebsd/node.py
---- mininet/freebsd/node.py.orig
-+++ mininet/freebsd/node.py
-@@ -0,0 +1,156 @@
-+"""
-+Node: jail(2) based node. This currently requires a kernel capable of VIMAGE
-+resource virtualization.
-+
-+Mininet 'hosts' are created by running shells within jails with network
-+virtualization (see vnet(9)). Links are created by epair(4)s.
-+
-+This is a collection of helpers that call the right commands to manipulate these
-+components.
-+"""
-+import signal
-+from os import killpg
-+
-+from subprocess import PIPE, Popen
-+
-+from mininet.log import warn
-+from mininet.basenode import BaseNode
-+from mininet.util import quietRun
-+
-+class Node( BaseNode ):
-+ """A virtual network node that manipulates and tracks jails."""
-+
-+ def __init__( self, name, inNamespace=True, **params ):
-+ BaseNode.__init__( self, name, inNamespace, **params )
-+
-+ def getShell( self, master, slave, mnopts=None ):
-+ """
-+ Starts a shell used by the node to run commands. If inNamespace=True,
-+ this is a two-stage process where a persistent vnet jail is started,
-+ then a shell is started within the jail. Otherwise it just starts a
-+ shell.
-+ """
-+ execcmd = 'mnexec'
-+ opts = '-cd' if mnopts is None else mnopts
-+
-+ # -ci : create, then output just the JID;
-+ # vnet : with virtual network stack;
-+ # allow.raw_sockets : enable raw socket creation;
-+ # stop.timeout=0 : don't wait for a process to exit in a jail
-+
-+ if self.inNamespace:
-+ cmd = [ 'jail', '-ci', 'vnet', 'allow.raw_sockets', 'persist',
-+ 'stop.timeout=0', 'name=mininet:' + self.name, 'path=/' ]
-+ ret = Popen( cmd, stdout=PIPE ).communicate()[ 0 ][ :-1 ]
-+ execcmd = 'jexec'
-+ opts = self.jid = ret
-+ else:
-+ self.jid = None
-+
-+ # bash -i: force interactive
-+ # -s: pass $* to shell, and make process easy to find in ps outside of
-+ # a jail. prompt is set to sentinel chr( 127 )
-+ cmd = [ execcmd, opts, 'env', 'PS1=' + chr( 127 ),
-+ 'bash', '--norc', '-is', 'mininet:' + self.name ]
-+
-+ return Popen( cmd, stdin=slave, stdout=slave, stderr=slave,
-+ close_fds=False )
-+
-+ def mountPrivateDirs( self ):
-+ "mount private directories"
-+ # Avoid expanding a string into a list of chars
-+ assert not isinstance( self.privateDirs, basestring )
-+ for directory in self.privateDirs:
-+ if isinstance( directory, tuple ):
-+ # mount given private directory onto mountpoint
-+ mountPoint = directory[ 1 ] % self.__dict__
-+ privateDir = directory[ 0 ]
-+ diffDir = mountPoint + '_diff'
-+ quietRun( 'mkdir -p %s %s %s' %
-+ ( privateDir, mountPoint, diffDir ) )
-+ quietRun( 'mount -t nullfs %s %s' % ( privateDir, mountPoint ) )
-+ quietRun( 'mount -t unionfs %s %s' % ( diffDir, mountPoint ) )
-+ else:
-+ # mount temporary filesystem on directory + name
-+ quietRun( 'mkdir -p %s' % directory + self.name )
-+ quietRun( 'mount -n -t tmpfs tmpfs %s' % directory + self.name )
-+
-+ def unmountPrivateDirs( self ):
-+ "mount private directories - overridden"
-+ for directory in self.privateDirs:
-+ # all ops are from prison0
-+ if isinstance( directory, tuple ):
-+ quietRun( 'umount %s' % directory[ 1 ] % self.__dict__ )
-+ quietRun( 'umount %s' % directory[ 1 ] % self.__dict__ )
-+ else:
-+ quietRun( 'umount %s' % directory + self.name )
-+
-+ def terminate( self ):
-+ """
-+ Cleanup when node is killed. THis involves explicitly killing any
-+ processes in the jail, as stop.timeout seems to be ignored
-+ """
-+ self.unmountPrivateDirs()
-+ if self.jid:
-+ # for when stop.timeout=0 doesn't work
-+ quietRun( 'jexec ' + self.jid + ' pkill -9 bash' )
-+ quietRun( 'jail -r ' + self.jid )
-+ if self.shell:
-+ if self.shell.poll() is None:
-+ killpg( self.shell.pid, signal.SIGHUP )
-+ self.cleanup()
-+
-+ def popen( self, *args, **kwargs ):
-+ """Return a Popen() object in our namespace
-+ args: Popen() args, single list, or string
-+ kwargs: Popen() keyword args"""
-+ defaults = { 'stdout': PIPE, 'stderr': PIPE,
-+ 'mncmd':
-+ [ 'jexec', self.jid ] if self.jid else [ 'mnexec', '-d' ] }
-+ defaults.update( kwargs )
-+ if len( args ) == 1:
-+ if isinstance( args[ 0 ], list ):
-+ # popen([cmd, arg1, arg2...])
-+ cmd = args[ 0 ]
-+ elif isinstance( args[ 0 ], basestring ):
-+ # popen("cmd arg1 arg2...")
-+ cmd = args[ 0 ].split()
-+ else:
-+ raise Exception( 'popen() requires a string or list' )
-+ elif len( args ) > 0:
-+ # popen( cmd, arg1, arg2... )
-+ cmd = list( args )
-+ # Attach to our namespace using mnexec -a
-+ cmd = defaults.pop( 'mncmd' ) + cmd
-+ # Shell requires a string, not a list!
-+ if defaults.get( 'shell', False ):
-+ cmd = ' '.join( cmd )
-+ popen = self._popen( cmd, **defaults )
-+ return popen
-+
-+ def sendInt( self, intr=chr( 3 ) ):
-+ "Interrupt running command."
-+ quietRun( "pkill -2 -f -- '%s'" % self.lastCmd )
-+
-+ def setHostRoute( self, ip, intf ):
-+ """Add route to host.
-+ ip: IP address as dotted decimal
-+ intf: string, interface name
-+ intfs: interface map of names to Intf"""
-+ # add stronger checks for interface lookup
-+ self.cmd( 'route add -host %s %s' % ( ip, self.intfs( intf ).IP() ) )
-+
-+ def setDefaultRoute( self, intf=None ):
-+ """Set the default route to go through intf.
-+ intf: Intf or {dev <intfname> via <gw-ip> ...}"""
-+ # Note setParam won't call us if intf is none
-+ if isinstance( intf, basestring ):
-+ argv = intf.split(' ')
-+ if 'via' not in argv[ 0 ]:
-+ warn( '%s: setDefaultRoute takes a port name but we got: %s\n' %
-+ ( self.name, intf ) )
-+ return
-+ params = argv[ -1 ]
-+ else:
-+ params = intf.IP()
-+ self.cmd( 'route change default %s' % params )
Index: patches/patch-mininet_freebsd_util_py
===================================================================
RCS file: patches/patch-mininet_freebsd_util_py
diff -N patches/patch-mininet_freebsd_util_py
--- patches/patch-mininet_freebsd_util_py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,186 +0,0 @@
-$OpenBSD: patch-mininet_freebsd_util_py,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: mininet/freebsd/util.py
---- mininet/freebsd/util.py.orig
-+++ mininet/freebsd/util.py
-@@ -0,0 +1,180 @@
-+"""
-+OS-specific utility functions for FreeBSD, counterpart to util.py.
-+"""
-+
-+from mininet.log import output, error, warn, debug
-+from resource import getrlimit, setrlimit, RLIMIT_NPROC, RLIMIT_NOFILE
-+from mininet.util import ( quietRun, retry )
-+
-+
-+LO='lo0' # loopback name.
-+DP_MODE='user' # OVS mode - 'user' or 'kernel'.
-+
-+# Interface management
-+#
-+# Interfaces are managed as strings which are simply the
-+# interface names, of the form 'nodeN-ethM'.
-+#
-+# To connect nodes, we create virtual ethernet pairs (epairs), and then place
-+# them in the pair of nodes that we want to communicate. We then update the
-+# node's list of interfaces and connectivity map.
-+#
-+
-+def makeIntfPair( intf1, intf2, addr1=None, addr2=None, node1=None, node2=None,
-+ deleteIntfs=True, runCmd=None ):
-+ """Make a veth pair connnecting new interfaces intf1 and intf2
-+ intf1: name for interface 1
-+ intf2: name for interface 2
-+ addr1: MAC address for interface 1 (optional)
-+ addr2: MAC address for interface 2 (optional)
-+ node1: home node for interface 1 (optional)
-+ node2: home node for interface 2 (optional)
-+ deleteIntfs: delete intfs before creating them
-+ runCmd: function to run shell commands (quietRun)
-+ raises Exception on failure"""
-+ if not runCmd:
-+ runCmd = quietRun
-+ if deleteIntfs:
-+ # Delete any old interfaces with the same names - want intf-node map?
-+ quietRun( deleteCmd( intf1, node1 ) )
-+ quietRun( deleteCmd( intf2, node2 ) )
-+ # Create new pair
-+ out = quietRun( 'ifconfig epair create' )
-+ if 'epair' not in out:
-+ raise Exception( 'Encountered error while creating link: %s' % out )
-+ # Reconstruct the endpoint names: epair[n]{a,b}
-+ end1, end2 = out[ :-1 ], out[ :-2 ] + 'b'
-+
-+ # If MAC address(es) aren't specified, and endpoints are jailed, generate
-+ # MAC addresses to prevent if_index aliasing, pretty ugly for now
-+ if addr1 is None and addr2 is None:
-+ base = _colonHex( int( end1[ 5:-1 ] ), 3 )
-+ addr1 = '02:ff:' + base + ':0a'
-+ addr2 = '02:ff:' + base + ':0b'
-+ quietRun( 'ifconfig %s link %s name %s' % ( end1, addr1, intf1 ) )
-+ quietRun( 'ifconfig %s link %s name %s' % ( end2, addr2, intf2 ) )
-+
-+ # Move interfaces if necessary i.e. ends are specified
-+ if node1 and node1.jid:
-+ out1 = moveIntfNoRetry( intf1, node1 )
-+ if not ( out1 ):
-+ raise Exception( 'Failed to move %s to %s', intf1, node1 )
-+ if node2 and node2.jid:
-+ out2 = moveIntfNoRetry( intf2, node2 )
-+ if not ( out2 ):
-+ raise Exception( 'Failed to move %s to %s', intf2, node2 )
-+
-+ return end1, end2
-+
-+def deleteCmd( intf, node=None ):
-+ """Command to destroy an interface. If only intf is specified, assume that
-+ it's in the host."""
-+ if node and node.jid is not None:
-+ opts = '-vnet %s' % node.jid
-+ return 'ifconfig %s %s destroy' % ( intf, opts if opts else '' )
-+
-+def moveIntfNoRetry( intf, dstNode, printError=False ):
-+ """Move interface to node from host/root space, without retrying.
-+ intf: string, interface
-+ dstNode: destination Node
-+ printError: if true, print error"""
-+ intf = str( intf )
-+ cmd = 'ifconfig %s vnet %s' % ( intf, dstNode.jid )
-+ cmdOutput = quietRun( cmd )
-+ # If command does not produce any output, then we can assume
-+ # that the interface has been moved successfully.
-+ if cmdOutput:
-+ if printError:
-+ error( '*** Error: moveIntf: ' + intf +
-+ ' not successfully moved to ' + dstNode.name + ':\n',
-+ cmdOutput )
-+ return False
-+ return True
-+
-+# duplicate in util_linux
-+def moveIntf( intf, dstNode, printError=True,
-+ retries=3, delaySecs=0.001 ):
-+ """Move interface to node, retrying on failure.
-+ intf: string, interface
-+ dstNode: destination Node
-+ printError: if true, print error"""
-+ retry( retries, delaySecs, moveIntfNoRetry, intf, dstNode,
-+ printError=printError )
-+
-+# Other stuff we use
-+def sysctlTestAndSet( name, limit ):
-+ "Helper function to set sysctl limits"
-+ oldLimit = quietRun( 'sysctl -n ' + name )
-+ if 'sysctl' in oldLimit:
-+ error( 'Could not set value: %s' % out )
-+ return
-+ if isinstance( limit, int ):
-+ #compare integer limits before overriding
-+ if int( oldLimit ) < limit:
-+ quietRun( 'sysctl %s=%s' % name, limit )
-+ else:
-+ #overwrite non-integer limits
-+ quietRun( 'sysctl %s=%s' % name, limit )
-+
-+def rlimitTestAndSet( name, limit ):
-+ "Helper function to set rlimits"
-+ soft, hard = getrlimit( name )
-+ if soft < limit:
-+ hardLimit = hard if limit < hard else limit
-+ setrlimit( name, ( limit, hardLimit ) )
-+
-+def fixLimits():
-+ "Fix ridiculously small resource limits."
-+ # see what needs to be/should be tuned here
-+ pass
-+ #debug( "*** Setting resource limits\n" )
-+ #try:
-+ #rlimitTestAndSet( RLIMIT_NPROC, 8192 )
-+ #rlimitTestAndSet( RLIMIT_NOFILE, 16384 )
-+ #Increase open file limit
-+ #sysctlTestAndSet( 'kern.maxfiles', 10000 )
-+ #Increase network buffer space
-+ #sysctlTestAndSet( 'net.core.wmem_max', 16777216 )
-+ #sysctlTestAndSet( 'net.core.rmem_max', 16777216 )
-+ #sysctlTestAndSet( 'net.ipv4.tcp_rmem', '10240 87380 16777216' )
-+ #sysctlTestAndSet( 'net.ipv4.tcp_wmem', '10240 87380 16777216' )
-+ #sysctlTestAndSet( 'net.core.netdev_max_backlog', 5000 )
-+ #Increase arp cache size
-+ #sysctlTestAndSet( 'net.ipv4.neigh.default.gc_thresh1', 4096 )
-+ #sysctlTestAndSet( 'net.ipv4.neigh.default.gc_thresh2', 8192 )
-+ #sysctlTestAndSet( 'net.ipv4.neigh.default.gc_thresh3', 16384 )
-+ #Increase routing table size
-+ #sysctlTestAndSet( 'net.ipv4.route.max_size', 32768 )
-+ #Increase number of PTYs for nodes
-+ #sysctlTestAndSet( 'kernel.pty.max', 20000 )
-+ # pylint: disable=broad-except
-+ #except Exception:
-+ #warn( "*** Error setting resource limits. "
-+ # "Mininet's performance may be affected.\n" )
-+ # pylint: enable=broad-except
-+
-+def numCores():
-+ "Returns number of CPU cores based on /proc/cpuinfo"
-+ if hasattr( numCores, 'ncores' ):
-+ return numCores.ncores
-+ try:
-+ numCores.ncores = int( quietRun('sysctl -n hw.ncpu') )
-+ except ValueError:
-+ return 0
-+ return numCores.ncores
-+
-+# Kernel module manipulation
-+
-+def lsmod():
-+ """Return list of currently loaded kernel modules."""
-+ return quietRun( 'kldstat' )
-+
-+def rmmod( mod ):
-+ """Attempt to unload a specified module.
-+ mod: module string"""
-+ return quietRun( [ 'kldunload', mod ] )
-+
-+def modprobe( mod ):
-+ """Attempt to load a specified module.
-+ mod: module string"""
-+ return quietRun( [ 'kldload', mod ] )
Index: patches/patch-mininet_linux___init___py
===================================================================
RCS file: patches/patch-mininet_linux___init___py
diff -N patches/patch-mininet_linux___init___py
--- patches/patch-mininet_linux___init___py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-$OpenBSD: patch-mininet_linux___init___py,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: mininet/linux/__init__.py
---- mininet/linux/__init__.py.orig
-+++ mininet/linux/__init__.py
-@@ -0,0 +1 @@
-+"Docstring to silence pylint; ignores --ignore option for __init__.py"
Index: patches/patch-mininet_linux_intf_py
===================================================================
RCS file: patches/patch-mininet_linux_intf_py
diff -N patches/patch-mininet_linux_intf_py
--- patches/patch-mininet_linux_intf_py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-$OpenBSD: patch-mininet_linux_intf_py,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: mininet/linux/intf.py
---- mininet/linux/intf.py.orig
-+++ mininet/linux/intf.py
-@@ -0,0 +1,40 @@
-+"""
-+A interface object that relies on ifconfig(8) and ip(8) to manipulate
-+network interfaces and devices.
-+"""
-+from mininet.baseintf import BaseIntf
-+
-+class Intf( BaseIntf ):
-+ """Interface objects that use 'ip' and 'ifconfig' to configure the
-+ underlying interface that it represents"""
-+
-+ def setMAC( self, macstr ):
-+ self.mac = macstr
-+ return ( self.ifconfig( 'down' ) +
-+ self.ifconfig( 'hw', 'ether', macstr ) +
-+ self.ifconfig( 'up' ) )
-+
-+ def rename( self, newname ):
-+ "Rename interface"
-+ self.ifconfig( 'down' )
-+ result = self.cmd( 'ip link set', self.name, 'name', newname )
-+ self.name = newname
-+ self.ifconfig( 'up' )
-+
-+ def delete( self ):
-+ "Delete interface"
-+ self.cmd( 'ip link del ' + self.name )
-+ # We used to do this, but it slows us down:
-+ # if self.node.inNamespace:
-+ # Link may have been dumped into root NS
-+ # quietRun( 'ip link del ' + self.name )
-+ self.node.delIntf( self )
-+ self.link = None
-+
-+ def status( self ):
-+ "Return intf status as a string"
-+ links, _err, _result = self.node.pexec( 'ip link show' )
-+ if self.name in links:
-+ return "OK"
-+ else:
-+ return "MISSING"
Index: patches/patch-mininet_linux_node_py
===================================================================
RCS file: patches/patch-mininet_linux_node_py
diff -N patches/patch-mininet_linux_node_py
--- patches/patch-mininet_linux_node_py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,136 +0,0 @@
-$OpenBSD: patch-mininet_linux_node_py,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: mininet/linux/node.py
---- mininet/linux/node.py.orig
-+++ mininet/linux/node.py
-@@ -0,0 +1,130 @@
-+"""
-+A node implementing platform-specifics for various Linux distros.
-+
-+Mininet 'hosts' are shells running within network and filesystem namespaces.
-+Links are veth device pairs (see ip link(8)).
-+
-+This is a collection of helpers that call the right commands to manipulate these
-+components.
-+"""
-+import signal
-+from os import killpg
-+
-+from subprocess import PIPE, Popen
-+
-+from mininet.log import debug
-+from mininet.util import quietRun
-+from mininet.basenode import BaseNode
-+
-+class Node( BaseNode ):
-+ """A virtual network node that manipulates and tracks namespaces."""
-+
-+ def __init__( self, name, inNamespace=True, **params ):
-+ BaseNode.__init__( self, name, inNamespace, **params )
-+
-+ def getShell( self, master, slave, mnopts=None ):
-+ """
-+ Starts a shell used by the node to run commands. If inNamespace=True,
-+ then a shell is started in a network namespace. Otherwise it just starts
-+ a shell.
-+ """
-+ # mnexec: (c)lose descriptors, (d)etach from tty,
-+ # (p)rint pid, and run in (n)amespace
-+ opts = '-cd' if mnopts is None else mnopts
-+ if self.inNamespace:
-+ opts += 'n'
-+ # bash -i: force interactive
-+ # -s: pass $* to shell, and make process easy to find in ps
-+ # prompt is set to sentinel chr( 127 )
-+ cmd = [ 'mnexec', opts, 'env', 'PS1=' + chr( 127 ),
-+ 'bash', '--norc', '-is', 'mininet:' + self.name ]
-+
-+ return Popen( cmd, stdin=slave, stdout=slave, stderr=slave,
-+ close_fds=False )
-+
-+ def mountPrivateDirs( self ):
-+ "mount private directories"
-+ # Avoid expanding a string into a list of chars
-+ assert not isinstance( self.privateDirs, basestring )
-+ for directory in self.privateDirs:
-+ if isinstance( directory, tuple ):
-+ # mount given private directory
-+ privateDir = directory[ 1 ] % self.__dict__
-+ mountPoint = directory[ 0 ]
-+ self.cmd( 'mkdir -p %s' % privateDir )
-+ self.cmd( 'mkdir -p %s' % mountPoint )
-+ self.cmd( 'mount --bind %s %s' %
-+ ( privateDir, mountPoint ) )
-+ else:
-+ # mount temporary filesystem on directory
-+ self.cmd( 'mkdir -p %s' % directory )
-+ self.cmd( 'mount -n -t tmpfs tmpfs %s' % directory )
-+
-+ def unmountPrivateDirs( self ):
-+ "mount private directories - overridden"
-+ for directory in self.privateDirs:
-+ if isinstance( directory, tuple ):
-+ self.cmd( 'umount ', directory[ 0 ] )
-+ else:
-+ self.cmd( 'umount ', directory )
-+
-+ def terminate( self ):
-+ """ Cleanup when node is killed. """
-+ self.unmountPrivateDirs()
-+ if self.shell:
-+ if self.shell.poll() is None:
-+ killpg( self.shell.pid, signal.SIGHUP )
-+ self.cleanup()
-+
-+ def popen( self, *args, **kwargs ):
-+ """Return a Popen() object in our namespace
-+ args: Popen() args, single list, or string
-+ kwargs: Popen() keyword args"""
-+ defaults = { 'stdout': PIPE, 'stderr': PIPE,
-+ 'mncmd': [ 'mnexec', '-da', str( self.pid ) ] }
-+ defaults.update( kwargs )
-+ if len( args ) == 1:
-+ if isinstance( args[ 0 ], list ):
-+ # popen([cmd, arg1, arg2...])
-+ cmd = args[ 0 ]
-+ elif isinstance( args[ 0 ], basestring ):
-+ # popen("cmd arg1 arg2...")
-+ cmd = args[ 0 ].split()
-+ else:
-+ raise Exception( 'popen() requires a string or list' )
-+ elif len( args ) > 0:
-+ # popen( cmd, arg1, arg2... )
-+ cmd = list( args )
-+ # Attach to our namespace using mnexec -a
-+ cmd = defaults.pop( 'mncmd' ) + cmd
-+ # Shell requires a string, not a list!
-+ if defaults.get( 'shell', False ):
-+ cmd = ' '.join( cmd )
-+ popen = self._popen( cmd, **defaults )
-+ return popen
-+
-+ def sendInt( self, intr=chr( 3 ) ):
-+ "Interrupt running command."
-+ debug( 'sendInt: writing chr(%d)\n' % ord( intr ) )
-+ self.write( intr )
-+
-+ def setHostRoute( self, ip, intf ):
-+ """Add route to host.
-+ ip: IP address as dotted decimal
-+ intf: string, interface name
-+ intfs: interface map of names to Intf"""
-+ # add stronger checks for interface lookup
-+ self.cmd( 'route add -host %s dev %s' % ( ip, intf ) )
-+
-+ def setDefaultRoute( self, intf=None ):
-+ """Set the default route to go through intf.
-+ intf: Intf or {dev <intfname> via <gw-ip> ...}"""
-+ # Note setParam won't call us if intf is none
-+ if isinstance( intf, basestring ) and ' ' in intf:
-+ params = intf
-+ else:
-+ params = 'dev %s' % intf
-+ # Do this in one line in case we're messing with the root namespace
-+ self.cmd( 'route del default; route add default %s' % params )
-+
-+
Index: patches/patch-mininet_linux_util_py
===================================================================
RCS file: patches/patch-mininet_linux_util_py
diff -N patches/patch-mininet_linux_util_py
--- patches/patch-mininet_linux_util_py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,194 +0,0 @@
-$OpenBSD: patch-mininet_linux_util_py,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: mininet/linux/util.py
---- mininet/linux/util.py.orig
-+++ mininet/linux/util.py
-@@ -0,0 +1,188 @@
-+"""
-+OS-specific utility functions for Linux, counterpart to util.py.
-+"""
-+
-+from resource import getrlimit, setrlimit, RLIMIT_NPROC, RLIMIT_NOFILE
-+from mininet.log import error, warn, debug
-+from mininet.util import ( quietRun, retry )
-+
-+
-+LO='lo' # loopback name.
-+DP_MODE='kernel' # OVS mode - 'user' or 'kernel'.
-+
-+# Interface management
-+#
-+# Interfaces are managed as strings which are simply the
-+# interface names, of the form 'nodeN-ethM'.
-+#
-+# To connect nodes, we create a pair of veth interfaces, and then place them
-+# in the pair of nodes that we want to communicate. We then update the node's
-+# list of interfaces and connectivity map.
-+#
-+# For the kernel datapath, switch interfaces
-+# live in the root namespace and thus do not have to be
-+# explicitly moved.
-+
-+def makeIntfPair( intf1, intf2, addr1=None, addr2=None, node1=None, node2=None,
-+ deleteIntfs=True, runCmd=None ):
-+ """Make a veth pair connnecting new interfaces intf1 and intf2
-+ intf1: name for interface 1
-+ intf2: name for interface 2
-+ addr1: MAC address for interface 1 (optional)
-+ addr2: MAC address for interface 2 (optional)
-+ node1: home node for interface 1 (optional)
-+ node2: home node for interface 2 (optional)
-+ deleteIntfs: delete intfs before creating them
-+ runCmd: function to run shell commands (quietRun)
-+ raises Exception on failure"""
-+ if not runCmd:
-+ runCmd = quietRun if not node1 else node1.cmd
-+ runCmd2 = quietRun if not node2 else node2.cmd
-+ if deleteIntfs:
-+ # Delete any old interfaces with the same names
-+ runCmd( deleteCmd( intf1 ) )
-+ runCmd2( deleteCmd( intf2 ) )
-+ # Create new pair
-+ netns = 1 if not node2 else node2.pid
-+ if addr1 is None and addr2 is None:
-+ cmdOutput = runCmd( 'ip link add name %s '
-+ 'type veth peer name %s '
-+ 'netns %s' % ( intf1, intf2, netns ) )
-+ else:
-+ cmdOutput = runCmd( 'ip link add name %s '
-+ 'address %s '
-+ 'type veth peer name %s '
-+ 'address %s '
-+ 'netns %s' %
-+ ( intf1, addr1, intf2, addr2, netns ) )
-+ if cmdOutput:
-+ raise Exception( "Error creating interface pair (%s,%s): %s " %
-+ ( intf1, intf2, cmdOutput ) )
-+
-+ return intf1, intf2
-+
-+
-+def deleteCmd( intf, node=None ):
-+ """Command to destroy an interface."""
-+ return 'ip link del ' + intf
-+
-+def moveIntfNoRetry( intf, dstNode, printError=False ):
-+ """Move interface to node, without retrying.
-+ intf: string, interface
-+ dstNode: destination Node
-+ printError: if true, print error"""
-+ intf = str( intf )
-+ cmd = 'ip link set %s netns %s' % ( intf, dstNode.pid )
-+ cmdOutput = quietRun( cmd )
-+ # If ip link set does not produce any output, then we can assume
-+ # that the link has been moved successfully.
-+ if cmdOutput:
-+ if printError:
-+ error( '*** Error: moveIntf: ' + intf +
-+ ' not successfully moved to ' + dstNode.name + ':\n',
-+ cmdOutput )
-+ return False
-+ return True
-+
-+# duplicate in util_freebsd
-+def moveIntf( intf, dstNode, printError=True,
-+ retries=3, delaySecs=0.001 ):
-+ """Move interface to node, retrying on failure.
-+ intf: string, interface
-+ dstNode: destination Node
-+ printError: if true, print error"""
-+ retry( retries, delaySecs, moveIntfNoRetry, intf, dstNode,
-+ printError=printError )
-+
-+# Other stuff we use
-+def sysctlTestAndSet( name, limit ):
-+ "Helper function to set sysctl limits"
-+ #convert non-directory names into directory names
-+ if '/' not in name:
-+ name = '/proc/sys/' + name.replace( '.', '/' )
-+ #read limit
-+ with open( name, 'r' ) as readFile:
-+ oldLimit = readFile.readline()
-+ if isinstance( limit, int ):
-+ #compare integer limits before overriding
-+ if int( oldLimit ) < limit:
-+ with open( name, 'w' ) as writeFile:
-+ writeFile.write( "%d" % limit )
-+ else:
-+ #overwrite non-integer limits
-+ with open( name, 'w' ) as writeFile:
-+ writeFile.write( limit )
-+
-+def rlimitTestAndSet( name, limit ):
-+ "Helper function to set rlimits"
-+ soft, hard = getrlimit( name )
-+ if soft < limit:
-+ hardLimit = hard if limit < hard else limit
-+ setrlimit( name, ( limit, hardLimit ) )
-+
-+def fixLimits():
-+ "Fix ridiculously small resource limits."
-+ debug( "*** Setting resource limits\n" )
-+ try:
-+ rlimitTestAndSet( RLIMIT_NPROC, 8192 )
-+ rlimitTestAndSet( RLIMIT_NOFILE, 16384 )
-+ #Increase open file limit
-+ sysctlTestAndSet( 'fs.file-max', 10000 )
-+ #Increase network buffer space
-+ sysctlTestAndSet( 'net.core.wmem_max', 16777216 )
-+ sysctlTestAndSet( 'net.core.rmem_max', 16777216 )
-+ sysctlTestAndSet( 'net.ipv4.tcp_rmem', '10240 87380 16777216' )
-+ sysctlTestAndSet( 'net.ipv4.tcp_wmem', '10240 87380 16777216' )
-+ sysctlTestAndSet( 'net.core.netdev_max_backlog', 5000 )
-+ #Increase arp cache size
-+ sysctlTestAndSet( 'net.ipv4.neigh.default.gc_thresh1', 4096 )
-+ sysctlTestAndSet( 'net.ipv4.neigh.default.gc_thresh2', 8192 )
-+ sysctlTestAndSet( 'net.ipv4.neigh.default.gc_thresh3', 16384 )
-+ #Increase routing table size
-+ sysctlTestAndSet( 'net.ipv4.route.max_size', 32768 )
-+ #Increase number of PTYs for nodes
-+ sysctlTestAndSet( 'kernel.pty.max', 20000 )
-+ # pylint: disable=broad-except
-+ except Exception:
-+ warn( "*** Error setting resource limits. "
-+ "Mininet's performance may be affected.\n" )
-+ # pylint: enable=broad-except
-+
-+
-+def mountCgroups():
-+ "Make sure cgroups file system is mounted"
-+ mounts = quietRun( 'cat /proc/mounts' )
-+ cgdir = '/sys/fs/cgroup'
-+ csdir = cgdir + '/cpuset'
-+ if ('cgroup %s' % cgdir not in mounts and
-+ 'cgroups %s' % cgdir not in mounts):
-+ raise Exception( "cgroups not mounted on " + cgdir )
-+ if 'cpuset %s' % csdir not in mounts:
-+ errRun( 'mkdir -p ' + csdir )
-+ errRun( 'mount -t cgroup -ocpuset cpuset ' + csdir )
-+
-+def numCores():
-+ "Returns number of CPU cores based on /proc/cpuinfo"
-+ if hasattr( numCores, 'ncores' ):
-+ return numCores.ncores
-+ try:
-+ numCores.ncores = int( quietRun('grep -c processor /proc/cpuinfo') )
-+ except ValueError:
-+ return 0
-+ return numCores.ncores
-+
-+# Kernel module manipulation
-+
-+def lsmod():
-+ "Return output of lsmod."
-+ return quietRun( 'lsmod' )
-+
-+def rmmod( mod ):
-+ """Return output of lsmod.
-+ mod: module string"""
-+ return quietRun( [ 'rmmod', mod ] )
-+
-+def modprobe( mod ):
-+ """Return output of modprobe
-+ mod: module string"""
-+ return quietRun( [ 'modprobe', mod ] )
Index: patches/patch-util_VIMAGEMOD
===================================================================
RCS file: patches/patch-util_VIMAGEMOD
diff -N patches/patch-util_VIMAGEMOD
--- patches/patch-util_VIMAGEMOD 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-$OpenBSD: patch-util_VIMAGEMOD,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: util/VIMAGEMOD
---- util/VIMAGEMOD.orig
-+++ util/VIMAGEMOD
-@@ -0,0 +1,23 @@
-+# VIMAGEMOD - sample kernel configuration file for VIMAGE support in jails.
-+#
-+# At a minimum, the following steps should get you up and running with this
-+# configuration file:
-+#
-+# (assuming that this is amd64 and you have the sources)
-+# # cp VIMAGEMOD /usr/src/sys/amd64/conf/
-+# # cd /usr/src
-+# # make buildkernel KERNCONF=VIMAGEMOD
-+# # make installkernel KERNCONF=VIMAGEMOD
-+# (reboot)
-+#
-+# For a better idea of what is involved, please refer to the following:
-+#
-+# https://www.freebsd.org/handbook/kernelconfig-config.html
-+#
-+
-+include GENERIC
-+ident VIMAGEMOD
-+
-+options VIMAGE
-+options DUMMYNET
-+options HZ=1000
Index: patches/patch-util_install-freebsd_sh
===================================================================
RCS file: patches/patch-util_install-freebsd_sh
diff -N patches/patch-util_install-freebsd_sh
--- patches/patch-util_install-freebsd_sh 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,134 +0,0 @@
-$OpenBSD: patch-util_install-freebsd_sh,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: util/install-freebsd.sh
---- util/install-freebsd.sh.orig
-+++ util/install-freebsd.sh
-@@ -0,0 +1,128 @@
-+#!/bin/sh
-+
-+# Mininet install script with just the bits that are currently supported.
-+# It follows the logic/contents of `install.sh`.
-+
-+dist=$(uname -s)
-+arch=$(uname -m)
-+
-+if [ "${dist}" = "FreeBSD" ]; then
-+ install='sudo pkg install'
-+ remove='sudo pkg remove'
-+ pkginst='sudo pkg add'
-+ #install='sudo pkg -o ASSUME_ALWAYS_YES=true install'
-+ #remove='sudo pkg -o ASSUME_ALWAYS_YES=true remove'
-+ #pkginst='sudo pkg -o ASSUME_ALWAYS_YES=true add'
-+else
-+ printf '%s\n' "This version of Mininet and script is for FreeBSD," \
-+ "but you are using ${dist}"
-+ exit 1
-+fi
-+
-+# Get directory containing mininet folder
-+MININET_DIR=$( CDPATH= cd -- "$( dirname -- "$0" )/../.." && pwd -P )
-+
-+# install everything
-+all () {
-+ mn_deps
-+ ovs
-+ ryu
-+}
-+
-+# base (non-OpenFlow) bits - Mininet Python bits, dependencies
-+mn_deps () {
-+ # check for VIMAGE support
-+ if [ ! "$(sysctl kern.conftxt | grep 'VIMAGE\|DUMMYNET')" ]; then
-+ printf '%s\n' \
-+ "*** VIMAGE and DUMMYNET are required but seem to be missing!"\
-+ "Please retry after rebuilding the kernel with these options."\
-+ "Take a look at util/VIMAGEMOD for a sample kernel config."
-+ exit 1
-+ fi
-+
-+ $install python socat psmisc xterm openssh-portable iperf help2man bash\
-+ py27-setuptools py27-pyflakes pylint-py27 py27-pep8 py27-pexpect #\
-+ # gcc gmake
-+
-+ printf '%s\n' "Installing Mininet core"
-+ cur=$(pwd -P)
-+ cd ${MININET_DIR}/mininet
-+ sudo make install
-+ cd ${cur}
-+}
-+
-+mn_undo () {
-+ printf '%s\n' "Uninstalling Mininet core"
-+ cur=$(pwd -P)
-+ cd ${MININET_DIR}/mininet
-+ sudo make uninstall
-+ cd ${cur}
-+}
-+
-+# Install/uninstall OVS.
-+ovs () {
-+ if [ "$1" = '-u' ]; then
-+ $remove openvswitch
-+ return
-+ else
-+ $install openvswitch && \
-+ printf '%s\n' "You may wish to add the following to rc.conf:" \
-+ ' ovsdb_server_enable="YES"' \
-+ ' ovs_vswitchd_enable="YES"'
-+ # start OVSDB and vswitchd
-+ printf '%s\n' "starting openvswitch bits"
-+ service ovsdb-server onestart
-+ service ovs-vswitchd onestart
-+ fi
-+}
-+
-+# Install RYU. `pip install ryu` should actually be sufficient.
-+ryu () {
-+ printf '%s\n' "Installing RYU..."
-+
-+ $install python py27-setuptools py27-eventlet py27-routes \
-+ py27-webob py27-paramiko py27-pip py27-msgpack-python
-+ pip install oslo.config tinyrpc ovs
-+
-+ # fetch RYU
-+ cd $MININET_DIR
-+ git clone git://github.com/osrg/ryu.git ryu
-+ cd ryu
-+
-+ # install ryu
-+ sudo python ./setup.py install
-+}
-+
-+usage () {
-+ printf '%s\n' \
-+ "" \
-+ "Usage: $(basename $0) [-anh]" \
-+ "" \
-+ "options:" \
-+ " -a: (default) install (A)ll packages" \
-+ " -h: print this (H)elp message" \
-+ " -n: install Mini(N)et dependencies + core files" \
-+ " -r: remove existing Open vSwitch packages" \
-+ " -u: (u)ninstall Mininet core files" \
-+ " -v: install Open (V)switch" \
-+ " -y: install R(y)u Controller"
-+ exit 2
-+}
-+
-+if [ $# -eq 0 ]; then
-+ all
-+else
-+ while getopts 'ahnruvy' OPTION; do
-+ case $OPTION in
-+ a) all ;;
-+ h) usage ;;
-+ r) ovs -u ;;
-+ n) mn_deps ;;
-+ u) mn_undo ;;
-+ v) ovs ;;
-+ y) ryu ;;
-+ ?) usage ;;
-+ esac
-+ done
-+ shift $(($OPTIND - 1))
-+fi
Index: patches/patch-util_install-linux_sh
===================================================================
RCS file: patches/patch-util_install-linux_sh
diff -N patches/patch-util_install-linux_sh
--- patches/patch-util_install-linux_sh 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,864 +0,0 @@
-$OpenBSD: patch-util_install-linux_sh,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-
-Index: util/install-linux.sh
---- util/install-linux.sh.orig
-+++ util/install-linux.sh
-@@ -0,0 +1,858 @@
-+#!/usr/bin/env bash
-+
-+# Mininet install script for Ubuntu (and Debian Wheezy+)
-+# Brandon Heller (brandonh@stanford.edu)
-+
-+# Fail on error
-+set -e
-+
-+# Fail on unset var usage
-+set -o nounset
-+
-+# Get directory containing mininet folder
-+MININET_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd -P )"
-+
-+# Set up build directory, which by default is the working directory
-+# unless the working directory is a subdirectory of mininet,
-+# in which case we use the directory containing mininet
-+BUILD_DIR="$(pwd -P)"
-+case $BUILD_DIR in
-+ $MININET_DIR/*) BUILD_DIR=$MININET_DIR;; # currect directory is a subdirectory
-+ *) BUILD_DIR=$BUILD_DIR;;
-+esac
-+
-+# Location of CONFIG_NET_NS-enabled kernel(s)
-+KERNEL_LOC=http://www.openflow.org/downloads/mininet
-+
-+# Attempt to identify Linux release
-+
-+DIST=Unknown
-+RELEASE=Unknown
-+CODENAME=Unknown
-+ARCH=`uname -m`
-+if [ "$ARCH" = "x86_64" ]; then ARCH="amd64"; fi
-+if [ "$ARCH" = "i686" ]; then ARCH="i386"; fi
-+
-+test -e /etc/debian_version && DIST="Debian"
-+grep Ubuntu /etc/lsb-release &> /dev/null && DIST="Ubuntu"
-+if [ "$DIST" = "Ubuntu" ] || [ "$DIST" = "Debian" ]; then
-+ # Truly non-interactive apt-get installation
-+ install='sudo DEBIAN_FRONTEND=noninteractive apt-get -y -q install'
-+ remove='sudo DEBIAN_FRONTEND=noninteractive apt-get -y -q remove'
-+ pkginst='sudo dpkg -i'
-+ update='sudo apt-get'
-+ # Prereqs for this script
-+ if ! which lsb_release &> /dev/null; then
-+ $install lsb-release
-+ fi
-+fi
-+test -e /etc/fedora-release && DIST="Fedora"
-+test -e /etc/redhat-release && DIST="RedHatEnterpriseServer"
-+if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
-+ install='sudo yum -y install'
-+ remove='sudo yum -y erase'
-+ pkginst='sudo rpm -ivh'
-+ update='sudo yum'
-+ # Prereqs for this script
-+ if ! which lsb_release &> /dev/null; then
-+ $install redhat-lsb-core
-+ fi
-+fi
-+test -e /etc/SuSE-release && DIST="SUSE Linux"
-+if [ "$DIST" = "SUSE Linux" ]; then
-+ install='sudo zypper --non-interactive install '
-+ remove='sudo zypper --non-interactive remove '
-+ pkginst='sudo rpm -ivh'
-+ # Prereqs for this script
-+ if ! which lsb_release &> /dev/null; then
-+ $install openSUSE-release
-+ fi
-+fi
-+if which lsb_release &> /dev/null; then
-+ DIST=`lsb_release -is`
-+ RELEASE=`lsb_release -rs`
-+ CODENAME=`lsb_release -cs`
-+fi
-+echo "Detected Linux distribution: $DIST $RELEASE $CODENAME $ARCH"
-+
-+# Kernel params
-+
-+KERNEL_NAME=`uname -r`
-+KERNEL_HEADERS=kernel-headers-${KERNEL_NAME}
-+
-+if ! echo $DIST | egrep 'Ubuntu|Debian|Fedora|RedHatEnterpriseServer|SUSE LINUX'; then
-+ echo "Install.sh currently only supports Ubuntu, Debian, RedHat and Fedora."
-+ exit 1
-+fi
-+
-+# More distribution info
-+DIST_LC=`echo $DIST | tr [A-Z] [a-z]` # as lower case
-+
-+
-+# Determine whether version $1 >= version $2
-+# usage: if version_ge 1.20 1.2.3; then echo "true!"; fi
-+function version_ge {
-+ # sort -V sorts by *version number*
-+ latest=`printf "$1\n$2" | sort -V | tail -1`
-+ # If $1 is latest version, then $1 >= $2
-+ [ "$1" == "$latest" ]
-+}
-+
-+
-+# Kernel Deb pkg to be removed:
-+KERNEL_IMAGE_OLD=linux-image-2.6.26-33-generic
-+
-+DRIVERS_DIR=/lib/modules/${KERNEL_NAME}/kernel/drivers/net
-+
-+OVS_RELEASE=1.4.0
-+OVS_PACKAGE_LOC=https://github.com/downloads/mininet/mininet
-+OVS_BUILDSUFFIX=-ignore
# was -2
-+OVS_PACKAGE_NAME=ovs-$OVS_RELEASE-core-$DIST_LC-$RELEASE-$ARCH$OVS_BUILDSUFFIX.tar
-+OVS_TAG=v$OVS_RELEASE
-+
-+OF13_SWITCH_REV=${OF13_SWITCH_REV:-""}
-+
-+
-+function kernel {
-+ echo "Install Mininet-compatible kernel if necessary"
-+ $update update
-+ if ! $install linux-image-$KERNEL_NAME; then
-+ echo "Could not install linux-image-$KERNEL_NAME"
-+ echo "Skipping - assuming installed kernel is OK."
-+ fi
-+}
-+
-+function kernel_clean {
-+ echo "Cleaning kernel..."
-+
-+ # To save disk space, remove previous kernel
-+ if ! $remove $KERNEL_IMAGE_OLD; then
-+ echo $KERNEL_IMAGE_OLD not installed.
-+ fi
-+
-+ # Also remove downloaded packages:
-+ rm -f $HOME/linux-headers-* $HOME/linux-image-*
-+}
-+
-+# Install Mininet deps
-+function mn_deps {
-+ echo "Installing Mininet dependencies"
-+ if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
-+ $install gcc make socat psmisc xterm openssh-clients iperf \
-+ iproute telnet python-setuptools libcgroup-tools \
-+ ethtool help2man pyflakes pylint python-pep8 python-pexpect
-+ elif [ "$DIST" = "SUSE LINUX" ]; then
-+ $install gcc make socat psmisc xterm openssh iperf \
-+ iproute telnet python-setuptools libcgroup-tools \
-+ ethtool help2man python-pyflakes python3-pylint python-pep8 python-pexpect
-+ else
-+ $install gcc make socat psmisc xterm ssh iperf iproute telnet \
-+ python-setuptools cgroup-bin ethtool help2man \
-+ pyflakes pylint pep8 python-pexpect
-+ fi
-+
-+ echo "Installing Mininet core"
-+ pushd $MININET_DIR/mininet
-+ sudo make install
-+ popd
-+}
-+
-+# Install Mininet developer dependencies
-+function mn_dev {
-+ echo "Installing Mininet developer dependencies"
-+ $install doxygen doxypy texlive-fonts-recommended
-+ if ! $install doxygen-latex; then
-+ echo "doxygen-latex not needed"
-+ fi
-+}
-+
-+# The following will cause a full OF install, covering:
-+# -user switch
-+# The instructions below are an abbreviated version from
-+# http://www.openflowswitch.org/wk/index.php/Debian_Install
-+function
of {
-+ echo "Installing OpenFlow reference implementation..."
-+ cd $BUILD_DIR
-+ $install autoconf automake libtool make gcc
-+ if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
-+ $install git pkgconfig glibc-devel
-+ elif [ "$DIST" = "SUSE LINUX" ]; then
-+ $install git pkgconfig glibc-devel
-+ else
-+ $install git-core autotools-dev pkg-config libc6-dev
-+ fi
-+ # was: git clone git://openflowswitch.org/openflow.git
-+ # Use our own fork on github for now:
-+ git clone git://github.com/mininet/openflow
-+ cd $BUILD_DIR/openflow
-+
-+ # Patch controller to handle more than 16 switches
-+ patch -p1 < $MININET_DIR/mininet/util/openflow-patches/controller.patch
-+
-+ # Resume the install:
-+ ./boot.sh
-+ ./configure
-+ make
-+ sudo make install
-+ cd $BUILD_DIR
-+}
-+
-+function of13 {
-+ echo "Installing OpenFlow 1.3 soft switch implementation..."
-+ cd $BUILD_DIR/
-+ $install git-core autoconf automake autotools-dev pkg-config \
-+ make gcc g++ libtool libc6-dev cmake libpcap-dev libxerces-c2-dev \
-+ unzip libpcre3-dev flex bison libboost-dev
-+
-+ if [ ! -d "ofsoftswitch13" ]; then
-+ git clone https://github.com/CPqD/ofsoftswitch13.git
-+ if [[ -n "$OF13_SWITCH_REV" ]]; then
-+ cd ofsoftswitch13
-+ git checkout ${OF13_SWITCH_REV}
-+ cd ..
-+ fi
-+ fi
-+
-+ # Install netbee
-+ if [ "$DIST" = "Ubuntu" ] && version_ge $RELEASE 14.04; then
-+ NBEESRC="nbeesrc-feb-24-2015"
-+ NBEEDIR="netbee"
-+ else
-+ NBEESRC="nbeesrc-jan-10-2013"
-+ NBEEDIR="nbeesrc-jan-10-2013"
-+ fi
-+
-+ NBEEURL=${NBEEURL:-http://www.nbee.org/download/}
-+ wget -nc ${NBEEURL}${NBEESRC}.zip
-+ unzip ${NBEESRC}.zip
-+ cd ${NBEEDIR}/src
-+ cmake .
-+ make
-+ cd $BUILD_DIR/
-+ sudo cp ${NBEEDIR}/bin/libn*.so /usr/local/lib
-+ sudo ldconfig
-+ sudo cp -R ${NBEEDIR}/include/ /usr/
-+
-+ # Resume the install:
-+ cd $BUILD_DIR/ofsoftswitch13
-+ ./boot.sh
-+ ./configure
-+ make
-+ sudo make install
-+ cd $BUILD_DIR
-+}
-+
-+
-+function install_wireshark {
-+ if ! which wireshark; then
-+ echo "Installing Wireshark"
-+ if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
-+ $install wireshark wireshark-gnome
-+ elif [ "$DIST" = "SUSE LINUX" ]; then
-+ $install wireshark
-+ else
-+ $install wireshark tshark
-+ fi
-+ fi
-+
-+ # Copy coloring rules: OF is white-on-blue:
-+ echo "Optionally installing wireshark color filters"
-+ mkdir -p $HOME/.wireshark
-+ cp -n $MININET_DIR/mininet/util/colorfilters $HOME/.wireshark
-+
-+ echo "Checking Wireshark version"
-+ WSVER=`wireshark -v | egrep -o '[0-9\.]+' | head -1`
-+ if version_ge $WSVER 1.12; then
-+ echo "Wireshark version $WSVER >= 1.12 - returning"
-+ return
-+ fi
-+
-+ echo "Cloning LoxiGen and building openflow.lua dissector"
-+ cd $BUILD_DIR
-+ git clone https://github.com/floodlight/loxigen.git
-+ cd loxigen
-+ make wireshark
-+
-+ # Copy into plugin directory
-+ # libwireshark0/ on 11.04; libwireshark1/ on later
-+ WSDIR=`find /usr/lib -type d -name 'libwireshark*' | head -1`
-+ WSPLUGDIR=$WSDIR/plugins/
-+ PLUGIN=loxi_output/wireshark/openflow.lua
-+ sudo cp $PLUGIN $WSPLUGDIR
-+ echo "Copied openflow plugin $PLUGIN to $WSPLUGDIR"
-+
-+ cd $BUILD_DIR
-+}
-+
-+
-+# Install Open vSwitch specific version Ubuntu package
-+function ubuntuOvs {
-+ echo "Creating and Installing Open vSwitch packages..."
-+
-+ OVS_SRC=$BUILD_DIR/openvswitch
-+ OVS_TARBALL_LOC=http://openvswitch.org/releases
-+
-+ if ! echo "$DIST" | egrep "Ubuntu|Debian" > /dev/null; then
-+ echo "OS must be Ubuntu or Debian"
-+ $cd BUILD_DIR
-+ return
-+ fi
-+ if [ "$DIST" = "Ubuntu" ] && ! version_ge $RELEASE 12.04; then
-+ echo "Ubuntu version must be >= 12.04"
-+ cd $BUILD_DIR
-+ return
-+ fi
-+ if [ "$DIST" = "Debian" ] && ! version_ge $RELEASE 7.0; then
-+ echo "Debian version must be >= 7.0"
-+ cd $BUILD_DIR
-+ return
-+ fi
-+
-+ rm -rf $OVS_SRC
-+ mkdir -p $OVS_SRC
-+ cd $OVS_SRC
-+
-+ if wget $OVS_TARBALL_LOC/openvswitch-$OVS_RELEASE.tar.gz 2> /dev/null; then
-+ tar xzf openvswitch-$OVS_RELEASE.tar.gz
-+ else
-+ echo "Failed to find OVS at $OVS_TARBALL_LOC/openvswitch-$OVS_RELEASE.tar.gz"
-+ cd $BUILD_DIR
-+ return
-+ fi
-+
-+ # Remove any old packages
-+
-+ $remove openvswitch-common openvswitch-datapath-dkms openvswitch-pki openvswitch-switch \
-+ openvswitch-controller || true
-+
-+ # Get build deps
-+ $install build-essential fakeroot debhelper autoconf automake libssl-dev \
-+ pkg-config bzip2 openssl python-all procps python-qt4 \
-+ python-zopeinterface python-twisted-conch dkms dh-python dh-autoreconf \
-+ uuid-runtime
-+
-+ # Build OVS
-+ parallel=`grep processor /proc/cpuinfo | wc -l`
-+ cd $BUILD_DIR/openvswitch/openvswitch-$OVS_RELEASE
-+ DEB_BUILD_OPTIONS='parallel=$parallel nocheck' fakeroot debian/rules binary
-+ cd ..
-+ for pkg in common datapath-dkms pki switch; do
-+ pkg=openvswitch-${pkg}_$OVS_RELEASE*.deb
-+ echo "Installing $pkg"
-+ $pkginst $pkg
-+ done
-+ if $pkginst openvswitch-controller_$OVS_RELEASE*.deb 2>/dev/null; then
-+ echo "Ignoring error installing openvswitch-controller"
-+ fi
-+
-+ /sbin/modinfo openvswitch
-+ sudo ovs-vsctl show
-+ # Switch can run on its own, but
-+ # Mininet should control the controller
-+ # This appears to only be an issue on Ubuntu/Debian
-+ if sudo service openvswitch-controller stop 2>/dev/null; then
-+ echo "Stopped running controller"
-+ fi
-+ if [ -e /etc/init.d/openvswitch-controller ]; then
-+ sudo update-rc.d openvswitch-controller disable
-+ fi
-+}
-+
-+
-+# Install Open vSwitch
-+
-+function ovs {
-+ echo "Installing Open vSwitch..."
-+
-+ if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
-+ $install openvswitch openvswitch-controller
-+ return
-+ fi
-+
-+ if [ "$DIST" = "Ubuntu" ] && ! version_ge $RELEASE 14.04; then
-+ # Older Ubuntu versions need openvswitch-datapath/-dkms
-+ # Manually installing openvswitch-datapath may be necessary
-+ # for manually built kernel .debs using Debian's defective kernel
-+ # packaging, which doesn't yield usable headers.
-+ if ! dpkg --get-selections | grep openvswitch-datapath; then
-+ # If you've already installed a datapath, assume you
-+ # know what you're doing and don't need dkms datapath.
-+ # Otherwise, install it.
-+ $install openvswitch-datapath-dkms
-+ fi
-+ fi
-+
-+ $install openvswitch-switch
-+ OVSC=""
-+ if $install openvswitch-controller; then
-+ OVSC="openvswitch-controller"
-+ else
-+ echo "Attempting to install openvswitch-testcontroller"
-+ if $install openvswitch-testcontroller; then
-+ OVSC="openvswitch-testcontroller"
-+ else
-+ echo "Failed - skipping openvswitch-testcontroller"
-+ fi
-+ fi
-+ if [ "$OVSC" ]; then
-+ # Switch can run on its own, but
-+ # Mininet should control the controller
-+ # This appears to only be an issue on Ubuntu/Debian
-+ if sudo service $OVSC stop; then
-+ echo "Stopped running controller"
-+ fi
-+ if [ -e /etc/init.d/$OVSC ]; then
-+ sudo update-rc.d $OVSC disable
-+ fi
-+ fi
-+}
-+
-+function remove_ovs {
-+ pkgs=`dpkg --get-selections | grep openvswitch | awk '{ print $1;}'`
-+ echo "Removing existing Open vSwitch packages:"
-+ echo $pkgs
-+ if ! $remove $pkgs; then
-+ echo "Not all packages removed correctly"
-+ fi
-+ # For some reason this doesn't happen
-+ if scripts=`ls /etc/init.d/*openvswitch* 2>/dev/null`; then
-+ echo $scripts
-+ for s in $scripts; do
-+ s=$(basename $s)
-+ echo SCRIPT $s
-+ sudo service $s stop
-+ sudo rm -f /etc/init.d/$s
-+ sudo update-rc.d -f $s remove
-+ done
-+ fi
-+ echo "Done removing OVS"
-+}
-+
-+function ivs {
-+ echo "Installing Indigo Virtual Switch..."
-+
-+ IVS_SRC=$BUILD_DIR/ivs
-+
-+ # Install dependencies
-+ $install gcc make
-+ if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
-+ $install git pkgconfig libnl3-devel libcap-devel openssl-devel
-+ else
-+ $install git-core pkg-config libnl-3-dev libnl-route-3-dev \
-+ libnl-genl-3-dev
-+ fi
-+
-+ # Install IVS from source
-+ cd $BUILD_DIR
-+ git clone git://github.com/floodlight/ivs $IVS_SRC
-+ cd $IVS_SRC
-+ git submodule update --init
-+ make
-+ sudo make install
-+}
-+
-+# Install RYU
-+function ryu {
-+ echo "Installing RYU..."
-+
-+ # install Ryu dependencies"
-+ $install autoconf automake g++ libtool python make
-+ if [ "$DIST" = "Ubuntu" -o "$DIST" = "Debian" ]; then
-+ $install libxml2 libxslt-dev python-pip python-dev
-+ sudo pip install --upgrade gevent pbr webob routes paramiko \\
-+ oslo.config
-+ fi
-+
-+ # if needed, update python-six
-+ SIX_VER=`pip show six | grep Version | awk '{print $2}'`
-+ if version_ge 1.7.0 $SIX_VER; then
-+ echo "Installing python-six version 1.7.0..."
-+ sudo pip install -I six==1.7.0
-+ fi
-+ # fetch RYU
-+ cd $BUILD_DIR/
-+ git clone git://github.com/osrg/ryu.git ryu
-+ cd ryu
-+
-+ # install ryu
-+ sudo pip install .
-+
-+ # Add symbolic link to /usr/bin
-+ sudo ln -s ./bin/ryu-manager /usr/local/bin/ryu-manager
-+}
-+
-+# Install NOX with tutorial files
-+function nox {
-+ echo "Installing NOX w/tutorial files..."
-+
-+ # Install NOX deps:
-+ $install autoconf automake g++ libtool python python-twisted \
-+ swig libssl-dev make
-+ if [ "$DIST" = "Debian" ]; then
-+ $install libboost1.35-dev
-+ elif [ "$DIST" = "Ubuntu" ]; then
-+ $install python-dev libboost-dev
-+ $install libboost-filesystem-dev
-+ $install libboost-test-dev
-+ fi
-+ # Install NOX optional deps:
-+ $install libsqlite3-dev python-simplejson
-+
-+ # Fetch NOX destiny
-+ cd $BUILD_DIR/
-+ git clone https://github.com/noxrepo/nox-classic.git noxcore
-+ cd noxcore
-+ if ! git checkout -b destiny remotes/origin/destiny ; then
-+ echo "Did not check out a new destiny branch - assuming current branch is destiny"
-+ fi
-+
-+ # Apply patches
-+ git checkout -b tutorial-destiny
-+ git am $MININET_DIR/mininet/util/nox-patches/*tutorial-port-nox-destiny*.patch
-+ if [ "$DIST" = "Ubuntu" ] && version_ge $RELEASE 12.04; then
-+ git am $MININET_DIR/mininet/util/nox-patches/*nox-ubuntu12-hacks.patch
-+ fi
-+
-+ # Build
-+ ./boot.sh
-+ mkdir build
-+ cd build
-+ ../configure
-+ make -j3
-+ #make check
-+
-+ # Add NOX_CORE_DIR env var:
-+ sed -i -e 's|# for examples$|&\nexport NOX_CORE_DIR=$BUILD_DIR/noxcore/build/src|' ~/.bashrc
-+
-+ # To verify this install:
-+ #cd ~/noxcore/build/src
-+ #./nox_core -v -i ptcp:
-+}
-+
-+# Install NOX Classic/Zaku for OpenFlow 1.3
-+function nox13 {
-+ echo "Installing NOX w/tutorial files..."
-+
-+ # Install NOX deps:
-+ $install autoconf automake g++ libtool python python-twisted \
-+ swig libssl-dev make
-+ if [ "$DIST" = "Debian" ]; then
-+ $install libboost1.35-dev
-+ elif [ "$DIST" = "Ubuntu" ]; then
-+ $install python-dev libboost-dev
-+ $install libboost-filesystem-dev
-+ $install libboost-test-dev
-+ fi
-+
-+ # Fetch NOX destiny
-+ cd $BUILD_DIR/
-+ git clone https://github.com/CPqD/nox13oflib.git
-+ cd nox13oflib
-+
-+ # Build
-+ ./boot.sh
-+ mkdir build
-+ cd build
-+ ../configure
-+ make -j3
-+ #make check
-+
-+ # To verify this install:
-+ #cd ~/nox13oflib/build/src
-+ #./nox_core -v -i ptcp:
-+}
-+
-+
-+# "Install" POX
-+function pox {
-+ echo "Installing POX into $BUILD_DIR/pox..."
-+ cd $BUILD_DIR
-+ git clone https://github.com/noxrepo/pox.git
-+}
-+
-+# Install OFtest
-+function oftest {
-+ echo "Installing oftest..."
-+
-+ # Install deps:
-+ $install tcpdump python-scapy
-+
-+ # Install oftest:
-+ cd $BUILD_DIR/
-+ git clone git://github.com/floodlight/oftest
-+}
-+
-+# Install cbench
-+function cbench {
-+ echo "Installing cbench..."
-+
-+ if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
-+ $install net-snmp-devel libpcap-devel libconfig-devel
-+ elif [ "$DIST" = "SUSE LINUX" ]; then
-+ $install net-snmp-devel libpcap-devel libconfig-devel
-+ else
-+ $install libsnmp-dev libpcap-dev libconfig-dev
-+ fi
-+ cd $BUILD_DIR/
-+ # was: git clone git://gitosis.stanford.edu/oflops.git
-+ # Use our own fork on github for now:
-+ git clone git://github.com/mininet/oflops
-+ cd oflops
-+ sh boot.sh || true # possible error in autoreconf, so run twice
-+ sh boot.sh
-+ ./configure --with-openflow-src-dir=$BUILD_DIR/openflow
-+ make
-+ sudo make install || true # make install fails; force past this
-+}
-+
-+function vm_other {
-+ echo "Doing other Mininet VM setup tasks..."
-+
-+ # Remove avahi-daemon, which may cause unwanted discovery packets to be
-+ # sent during tests, near link status changes:
-+ echo "Removing avahi-daemon"
-+ $remove avahi-daemon
-+
-+ # was: Disable IPv6. Add to /etc/modprobe.d/blacklist:
-+ #echo "Attempting to disable IPv6"
-+ #if [ "$DIST" = "Ubuntu" ]; then
-+ # BLACKLIST=/etc/modprobe.d/blacklist.conf
-+ #else
-+ # BLACKLIST=/etc/modprobe.d/blacklist
-+ #fi
-+ #sudo sh -c "echo 'blacklist net-pf-10\nblacklist ipv6' >> $BLACKLIST"
-+ echo "Disabling IPv6"
-+ # Disable IPv6
-+ if ! grep 'disable_ipv6' /etc/sysctl.conf; then
-+ echo 'Disabling IPv6'
-+ echo '
-+# Mininet: disable IPv6
-+net.ipv6.conf.all.disable_ipv6 = 1
-+net.ipv6.conf.default.disable_ipv6 = 1
-+net.ipv6.conf.lo.disable_ipv6 = 1' | sudo tee -a /etc/sysctl.conf > /dev/null
-+ fi
-+ # Since the above doesn't disable neighbor discovery, also do this:
-+ if ! grep 'ipv6.disable' /etc/default/grub; then
-+ sudo sed -i -e \
-+ 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 /' \
-+ /etc/default/grub
-+ sudo update-grub
-+ fi
-+ # Disabling IPv6 breaks X11 forwarding via ssh
-+ line='AddressFamily inet'
-+ file='/etc/ssh/sshd_config'
-+ echo "Adding $line to $file"
-+ if ! grep "$line" $file > /dev/null; then
-+ echo "$line" | sudo tee -a $file > /dev/null
-+ fi
-+
-+ # Enable command auto completion using sudo; modify ~/.bashrc:
-+ sed -i -e 's|# for examples$|&\ncomplete -cf sudo|' ~/.bashrc
-+
-+ # Install tcpdump, cmd-line packet dump tool. Also install gitk,
-+ # a graphical git history viewer.
-+ $install tcpdump gitk
-+
-+ # Install common text editors
-+ $install vim nano emacs
-+
-+ # Install NTP
-+ $install ntp
-+
-+ # Install vconfig for VLAN example
-+ if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
-+ $install vconfig
-+ else
-+ $install vlan
-+ fi
-+
-+ # Set git to colorize everything.
-+ git config --global color.diff auto
-+ git config --global color.status auto
-+ git config --global color.branch auto
-+
-+ # Reduce boot screen opt-out delay. Modify timeout in /boot/grub/menu.lst to 1:
-+ if [ "$DIST" = "Debian" ]; then
-+ sudo sed -i -e 's/^timeout.*$/timeout 1/' /boot/grub/menu.lst
-+ fi
-+
-+ # Clean unneeded debs:
-+ rm -f ~/linux-headers-* ~/linux-image-*
-+}
-+
-+# Script to copy built OVS kernel module to where modprobe will
-+# find them automatically. Removes the need to keep an environment variable
-+# for insmod usage, and works nicely with multiple kernel versions.
-+#
-+# The downside is that after each recompilation of OVS you'll need to
-+# re-run this script. If you're using only one kernel version, then it may be
-+# a good idea to use a symbolic link in place of the copy below.
-+function modprobe {
-+ echo "Setting up modprobe for OVS kmod..."
-+ set +o nounset
-+ if [ -z "$OVS_KMODS" ]; then
-+ echo "OVS_KMODS not set. Aborting."
-+ else
-+ sudo cp $OVS_KMODS $DRIVERS_DIR
-+ sudo depmod -a ${KERNEL_NAME}
-+ fi
-+ set -o nounset
-+}
-+
-+function all {
-+ if [ "$DIST" = "Fedora" ]; then
-+ printf "\nFedora 18+ support (still work in progress):\n"
-+ printf " * Fedora 18+ has kernel 3.10 RPMS in the updates repositories\n"
-+ printf " * Fedora 18+ has openvswitch 1.10 RPMS in the updates repositories\n"
-+ printf " * the install.sh script options [-bfnpvw] should work.\n"
-+ printf " * for a basic setup just try:\n"
-+ printf " install.sh -fnpv\n\n"
-+ exit 3
-+ fi
-+ echo "Installing all packages except for -eix (doxypy, ivs, nox-classic)..."
-+ kernel
-+ mn_deps
-+ # Skip mn_dev (doxypy/texlive/fonts/etc.) because it's huge
-+ # mn_dev
-+ of
-+ install_wireshark
-+ ovs
-+ # We may add ivs once it's more mature
-+ # ivs
-+ # NOX-classic is deprecated, but you can install it manually if desired.
-+ # nox
-+ pox
-+ oftest
-+ cbench
-+ echo "Enjoy Mininet!"
-+}
-+
-+# Restore disk space and remove sensitive files before shipping a VM.
-+function vm_clean {
-+ echo "Cleaning VM..."
-+ sudo apt-get clean
-+ sudo apt-get autoremove
-+ sudo rm -rf /tmp/*
-+ sudo rm -rf openvswitch*.tar.gz
-+
-+ # Remove sensistive files
-+ history -c # note this won't work if you have multiple bash sessions
-+ rm -f ~/.bash_history # need to clear in memory and remove on disk
-+ rm -f ~/.ssh/id_rsa* ~/.ssh/known_hosts
-+ sudo rm -f ~/.ssh/authorized_keys*
-+
-+ # Remove SSH keys and regenerate on boot
-+ echo 'Removing SSH keys from /etc/ssh/'
-+ sudo rm -f /etc/ssh/*key*
-+ if ! grep mininet /etc/rc.local >& /dev/null; then
-+ sudo sed -i -e "s/exit 0//" /etc/rc.local
-+ echo '
-+# mininet: regenerate ssh keys if we deleted them
-+if ! stat -t /etc/ssh/*key* >/dev/null 2>&1; then
-+ /usr/sbin/dpkg-reconfigure openssh-server
-+fi
-+exit 0
-+' | sudo tee -a /etc/rc.local > /dev/null
-+ fi
-+
-+ # Remove Mininet files
-+ #sudo rm -f /lib/modules/python2.5/site-packages/mininet*
-+ #sudo rm -f /usr/bin/mnexec
-+
-+ # Clear optional dev script for SSH keychain load on boot
-+ rm -f ~/.bash_profile
-+
-+ # Clear git changes
-+ git config --global user.name "None"
-+ git config --global user.email "None"
-+
-+ # Note: you can shrink the .vmdk in vmware using
-+ # vmware-vdiskmanager -k *.vmdk
-+ echo "Zeroing out disk blocks for efficient compaction..."
-+ time sudo dd if=/dev/zero of=/tmp/zero bs=1M || true
-+ sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero
-+
-+}
-+
-+function usage {
-+ printf '\nUsage: %s [-abcdfhikmnprtvVwxy03]\n\n' $(basename $0) >&2
-+
-+ printf 'This install script attempts to install useful packages\n' >&2
-+ printf 'for Mininet. It should (hopefully) work on Ubuntu 11.10+\n' >&2
-+ printf 'If you run into trouble, try\n' >&2
-+ printf 'installing one thing at a time, and looking at the \n' >&2
-+ printf 'specific installation function in this script.\n\n' >&2
-+
-+ printf 'options:\n' >&2
-+ printf -- ' -a: (default) install (A)ll packages - good luck!\n' >&2
-+ printf -- ' -b: install controller (B)enchmark (oflops)\n' >&2
-+ printf -- ' -c: (C)lean up after kernel install\n' >&2
-+ printf -- ' -d: (D)elete some sensitive files from a VM image\n' >&2
-+ printf -- ' -e: install Mininet d(E)veloper dependencies\n' >&2
-+ printf -- ' -f: install Open(F)low\n' >&2
-+ printf -- ' -h: print this (H)elp message\n' >&2
-+ printf -- ' -i: install (I)ndigo Virtual Switch\n' >&2
-+ printf -- ' -k: install new (K)ernel\n' >&2
-+ printf -- ' -m: install Open vSwitch kernel (M)odule from source dir\n' >&2
-+ printf -- ' -n: install Mini(N)et dependencies + core files\n' >&2
-+ printf -- ' -p: install (P)OX OpenFlow Controller\n' >&2
-+ printf -- ' -r: remove existing Open vSwitch packages\n' >&2
-+ printf -- ' -s <dir>: place dependency (S)ource/build trees in <dir>\n' >&2
-+ printf -- ' -t: complete o(T)her Mininet VM setup tasks\n' >&2
-+ printf -- ' -v: install Open (V)switch\n' >&2
-+ printf -- ' -V <version>: install a particular version of Open (V)switch on Ubuntu\n' >&2
-+ printf -- ' -w: install OpenFlow (W)ireshark dissector\n' >&2
-+ printf -- ' -y: install R(y)u Controller\n' >&2
-+ printf -- ' -x: install NO(X) Classic OpenFlow controller\n' >&2
-+ printf -- ' -0: (default) -0[fx] installs OpenFlow 1.0 versions\n' >&2
-+ printf -- ' -3: -3[fx] installs OpenFlow 1.3 versions\n' >&2
-+ exit 2
-+}
-+
-+OF_VERSION=1.0
-+
-+if [ $# -eq 0 ]
-+then
-+ all
-+else
-+ while getopts 'abcdefhikmnprs:tvV:wxy03' OPTION
-+ do
-+ case $OPTION in
-+ a) all;;
-+ b) cbench;;
-+ c) kernel_clean;;
-+ d) vm_clean;;
-+ e) mn_dev;;
-+ f) case $OF_VERSION in
-+ 1.0) of;;
-+ 1.3) of13;;
-+ *) echo "Invalid OpenFlow version $OF_VERSION";;
-+ esac;;
-+ h) usage;;
-+ i) ivs;;
-+ k) kernel;;
-+ m) modprobe;;
-+ n) mn_deps;;
-+ p) pox;;
-+ r) remove_ovs;;
-+ s) mkdir -p $OPTARG; # ensure the directory is created
-+ BUILD_DIR="$( cd -P "$OPTARG" && pwd )"; # get the full path
-+ echo "Dependency installation directory: $BUILD_DIR";;
-+ t) vm_other;;
-+ v) ovs;;
-+ V) OVS_RELEASE=$OPTARG;
-+ ubuntuOvs;;
-+ w) install_wireshark;;
-+ x) case $OF_VERSION in
-+ 1.0) nox;;
-+ 1.3) nox13;;
-+ *) echo "Invalid OpenFlow version $OF_VERSION";;
-+ esac;;
-+ y) ryu;;
-+ 0) OF_VERSION=1.0;;
-+ 3) OF_VERSION=1.3;;
-+ ?) usage;;
-+ esac
-+ done
-+ shift $(($OPTIND - 1))
-+fi
Hi,

This update removes the unneeded install notes and Linux and FreeBSD
-related files. The attached diff is for the 16 or so removed files.

Also copying over the changes to get the port to build/install when
the files are removed.


Thanks,
Ayaka


Index: patches/patch-mininet_moduledeps_py
===================================================================
RCS file: /cvs/ports/net/mininet/patches/patch-mininet_moduledeps_py,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 patch-mininet_moduledeps_py
--- patches/patch-mininet_moduledeps_py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ patches/patch-mininet_moduledeps_py 30 Aug 2017 06:19:05 -0000
@@ -4,12 +4,9 @@ more changes
Index: mininet/moduledeps.py
--- mininet/moduledeps.py.orig
+++ mininet/moduledeps.py
-@@ -2,21 +2,12 @@
-
- from mininet.util import quietRun
+@@ -4,19 +4,7 @@ from mininet.util import quietRun
from mininet.log import info, error, debug
--from os import environ
-+from os import environ, uname
+ from os import environ

-def lsmod():
- "Return output of lsmod."
@@ -24,10 +21,7 @@ Index: mininet/moduledeps.py
- """Return output of modprobe
- mod: module string"""
- return quietRun( [ 'modprobe', mod ] )
-+if uname()[ 0 ] == 'FreeBSD':
-+ from mininet.freebsd.util import ( lsmod, rmmod, modprobe )
-+else:
-+ from mininet.linux.util import ( lsmod, rmmod, modprobe )
++from mininet.openbsd.util import ( lsmod, rmmod, modprobe )

OF_KMOD = 'ofdatapath'
OVS_KMOD = 'openvswitch_mod' # Renamed 'openvswitch' in OVS 1.7+/Linux 3.5+
Index: patches/patch-setup_py
===================================================================
RCS file: /cvs/ports/net/mininet/patches/patch-setup_py,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 patch-setup_py
--- patches/patch-setup_py 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ patches/patch-setup_py 30 Aug 2017 06:19:05 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-setup_py,v 1.1.1.1 2017/
Index: setup.py
--- setup.py.orig
+++ setup.py
-@@ -20,7 +20,13 @@ setup(
+@@ -20,7 +20,11 @@ setup(
description='Process-based OpenFlow emulator',
author='Bob Lantz',
author_email='rlantz@cs.stanford.edu',
@@ -11,8 +11,6 @@ Index: setup.py
+ packages=[
+ 'mininet',
+ 'mininet.examples',
-+ 'mininet.linux',
-+ 'mininet.freebsd',
+ 'mininet.openbsd'
+ ],
long_description="""
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/mininet/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 PLIST
--- pkg/PLIST 21 Aug 2017 18:47:12 -0000 1.1.1.1
+++ pkg/PLIST 30 Aug 2017 06:19:05 -0000
@@ -93,26 +93,8 @@ lib/python${MODPY_VERSION}/site-packages
lib/python${MODPY_VERSION}/site-packages/mininet/examples/treeping64.pyc
lib/python${MODPY_VERSION}/site-packages/mininet/examples/vlanhost.py
lib/python${MODPY_VERSION}/site-packages/mininet/examples/vlanhost.pyc
-lib/python${MODPY_VERSION}/site-packages/mininet/freebsd/
-lib/python${MODPY_VERSION}/site-packages/mininet/freebsd/__init__.py
-lib/python${MODPY_VERSION}/site-packages/mininet/freebsd/__init__.pyc
-lib/python${MODPY_VERSION}/site-packages/mininet/freebsd/intf.py
-lib/python${MODPY_VERSION}/site-packages/mininet/freebsd/intf.pyc
-lib/python${MODPY_VERSION}/site-packages/mininet/freebsd/node.py
-lib/python${MODPY_VERSION}/site-packages/mininet/freebsd/node.pyc
-lib/python${MODPY_VERSION}/site-packages/mininet/freebsd/util.py
-lib/python${MODPY_VERSION}/site-packages/mininet/freebsd/util.pyc
lib/python${MODPY_VERSION}/site-packages/mininet/link.py
lib/python${MODPY_VERSION}/site-packages/mininet/link.pyc
-lib/python${MODPY_VERSION}/site-packages/mininet/linux/
-lib/python${MODPY_VERSION}/site-packages/mininet/linux/__init__.py
-lib/python${MODPY_VERSION}/site-packages/mininet/linux/__init__.pyc
-lib/python${MODPY_VERSION}/site-packages/mininet/linux/intf.py
-lib/python${MODPY_VERSION}/site-packages/mininet/linux/intf.pyc
-lib/python${MODPY_VERSION}/site-packages/mininet/linux/node.py
-lib/python${MODPY_VERSION}/site-packages/mininet/linux/node.pyc
-lib/python${MODPY_VERSION}/site-packages/mininet/linux/util.py
-lib/python${MODPY_VERSION}/site-packages/mininet/linux/util.pyc
lib/python${MODPY_VERSION}/site-packages/mininet/log.py
lib/python${MODPY_VERSION}/site-packages/mininet/log.pyc
lib/python${MODPY_VERSION}/site-packages/mininet/moduledeps.py

No comments:

Post a Comment