Re: [UPDATE] net/mininet: new MASTER_SITES, remove patches, and use uploaded assets

2018-09-03 Thread Klemens Nanni
On Sun, Sep 02, 2018 at 04:35:12PM -0700, Ayaka Koshibe wrote:
> Thanks, will fix it but won't trouble the list with the giant diff again...
Sure.

> > Does Python 3 work or is Python 2 required? That's stuff for a separate
> > diff but I prefer ports to make it more obvious why a particular version
> > was chosen.
> 
> It requires Python 2. Should this be indicated somewhere e.g. in a comment?
Just set `MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}' explicitly instead
of relying on it as module default, optionally with a comment above
stating why Python 3 does not work so porters can start right there or
avoid trying it in the first place.



Re: [UPDATE] net/mininet: new MASTER_SITES, remove patches, and use uploaded assets

2018-09-02 Thread Ayaka Koshibe
On Mon, Sep 03, 2018 at 12:15:03AM +0200, Klemens Nanni wrote:
> On Thu, Aug 16, 2018 at 08:37:51PM -0700, Ayaka Koshibe wrote:
> > I've been talking with the maintainer of the project and was told that I can
> > use my fork of the repo as the upstream for this port. I wasn't sure about
> > what to do with the version, so I'm tentatively calling it 2.2.2, since
> > that is the latest release.
> > 
> > I've also uploaded a tarball, and removed the patches that are in the tree.
> > 
> > The manpages also broke again, as help2man was looking for a file in 
> > WRKBUILD
> > - the tweak for that is also included here.
> OK kn
> 
> Sorry, my initial reply got lost among other drafts; Few nits inline.
> 
> > +EXTRACT_SUFX=  .tar.gz
> Can you add a whitespace after = for consistency?
> 
> > +MASTER_SITES=  
> > https://github.com/akoshibe/mininet/releases/download/v$V/
> Same here.
> 
> > +
> >  MODULES =  lang/python

Thanks, will fix it but won't trouble the list with the giant diff again...

> Does Python 3 work or is Python 2 required? That's stuff for a separate
> diff but I prefer ports to make it more obvious why a particular version
> was chosen.

It requires Python 2. Should this be indicated somewhere e.g. in a comment?


Ayaka



Re: [UPDATE] net/mininet: new MASTER_SITES, remove patches, and use uploaded assets

2018-09-02 Thread Klemens Nanni
On Thu, Aug 16, 2018 at 08:37:51PM -0700, Ayaka Koshibe wrote:
> I've been talking with the maintainer of the project and was told that I can
> use my fork of the repo as the upstream for this port. I wasn't sure about
> what to do with the version, so I'm tentatively calling it 2.2.2, since
> that is the latest release.
> 
> I've also uploaded a tarball, and removed the patches that are in the tree.
> 
> The manpages also broke again, as help2man was looking for a file in WRKBUILD
> - the tweak for that is also included here.
OK kn

Sorry, my initial reply got lost among other drafts; Few nits inline.

> +EXTRACT_SUFX=.tar.gz
Can you add a whitespace after = for consistency?

> +MASTER_SITES=
> https://github.com/akoshibe/mininet/releases/download/v$V/
Same here.

> +
>  MODULES =lang/python
Does Python 3 work or is Python 2 required? That's stuff for a separate
diff but I prefer ports to make it more obvious why a particular version
was chosen.



Re: UPDATE: net/mininet - various bug fixes

2018-04-15 Thread Klemens Nanni
On Sun, Apr 15, 2018 at 12:15:20AM -0700, Ayaka Koshibe wrote:
> On Sun, Apr 08, 2018 at 07:17:30PM +0200, Klemens Nanni wrote:
> > On Sat, Apr 07, 2018 at 05:50:54PM -0700, Ayaka Koshibe wrote:
> > > And I found the manpage for mn isn't generated properly during last-minute
> > > testing...
> > > 
> > > Updated Makefile diff, plus cleanup to run MAKEDEV in /dev, rather than 
> > > create
> > > and move a file, as suggested by phessler.
> > How about these on top of your diff:
>  
> I wanted to keep my diffs as-is since they were purely bug fixes, and seemed
> better off separate from pure improvements.
That makes sense, I didn't want to stuff all that into your diff/commit.

> > Use CFLAGS in do-build, enabling DEBUG.
> > 
> > Compact .for loops in targets to smaller brace expansion. IMO the
> > examples/ path is clear enough, so I also avoided renaming switchd.conf.
> > 
> > Set SEPARATE_BUILD since you're already using WRKSRC and WRKBUILD
> > accordingly.
> > 
> > Feedback?
> 
> Personally I find it easier to read without the brace expansions, but
> otherwise the suggestions make sense to me, thanks.
Sure, updated diff below.

Note how README.md is now installed from WRKSRC from WRKBUILD: they
used to be the same so the fake target would work, but with
SEPARATE_BUILD this would fail.

> > Maybe also use the latest git commit instead of bumping revision?
> 
> If I understand correctly, this would be interpreted as an upstream version
> change, hence not need the REVSISON bump? 
Yes, GH_TAGNAME and DISTNAME would change instead of bumping REVISION.
But I looked closer and none of the new commits seem to affect us, so
that might just do next time.

pre-install now goes into post-install as well, as I could find a reason
to keep these apart.

Feedback? OK?

Index: Makefile
===
RCS file: /cvs/ports/net/mininet/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile10 Apr 2018 07:55:10 -  1.7
+++ Makefile15 Apr 2018 08:54:25 -
@@ -3,7 +3,7 @@
 COMMENT =  emulator for rapid prototyping of software defined networks
 
 DISTNAME = mininet-0.0.20170813
-REVISION = 4
+REVISION = 5
 GH_ACCOUNT =   mininet
 GH_PROJECT =   mininet
 GH_COMMIT =87e26ef931ee6063332ceba77db472140f832d3a
@@ -18,33 +18,30 @@ MAINTAINER =Ayaka Koshibe 

Re: UPDATE: net/mininet - various bug fixes

2018-04-08 Thread Christian Weisgerber
On 2018-04-08, Klemens Nanni  wrote:

> Compact .for loops in targets to smaller brace expansion.

I'm of somewhat mixed opinion on this since brace expansion is not
a sh(1) features, it's a ksh(1) extension.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: UPDATE: net/mininet - various bug fixes

2018-04-08 Thread Klemens Nanni
On Sat, Apr 07, 2018 at 05:50:54PM -0700, Ayaka Koshibe wrote:
> And I found the manpage for mn isn't generated properly during last-minute
> testing...
> 
> Updated Makefile diff, plus cleanup to run MAKEDEV in /dev, rather than create
> and move a file, as suggested by phessler.
How about these on top of your diff:

Use CFLAGS in do-build, enabling DEBUG.

Compact .for loops in targets to smaller brace expansion. IMO the
examples/ path is clear enough, so I also avoided renaming switchd.conf.

Set SEPARATE_BUILD since you're already using WRKSRC and WRKBUILD
accordingly.

Feedback?

Maybe also use the latest git commit instead of bumping revision?

Index: Makefile
===
RCS file: /cvs/ports/net/mininet/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- Makefile7 Dec 2017 06:33:40 -   1.6
+++ Makefile8 Apr 2018 17:16:12 -
@@ -3,7 +3,7 @@
 COMMENT =  emulator for rapid prototyping of software defined networks
 
 DISTNAME = mininet-0.0.20170813
-REVISION = 3
+REVISION = 4
 GH_ACCOUNT =   mininet
 GH_PROJECT =   mininet
 GH_COMMIT =87e26ef931ee6063332ceba77db472140f832d3a
@@ -18,33 +18,32 @@ MAINTAINER =Ayaka Koshibe 

Re: UPDATE net/mininet

2017-11-29 Thread Ayaka Koshibe
Hi all,

I have one more follow-up to add back a missing switchd(8) config file, and to
remove a bash invocation that I'd missed earlier.


Thanks,
Ayaka

Index: Makefile
===
RCS file: /cvs/ports/net/mininet/Makefile,v
retrieving revision 1.5
diff -u -p -u -r1.5 Makefile
--- Makefile16 Sep 2017 06:03:05 -  1.5
+++ Makefile28 Nov 2017 20:02:13 -
@@ -3,7 +3,7 @@
 COMMENT =  emulator for rapid prototyping of software defined networks
 
 DISTNAME = mininet-0.0.20170813
-REVISION = 2
+REVISION = 3
 GH_ACCOUNT =   mininet
 GH_PROJECT =   mininet
 GH_COMMIT =87e26ef931ee6063332ceba77db472140f832d3a
@@ -24,10 +24,6 @@ BUILD_DEPENDS =  devel/help2man
 RUN_DEPENDS =  net/socat \
net/iperf
 
-MAKE_ENV = BINDIR=${PREFIX}/bin \
-   MANDIR=${PREFIX}/man/man1 \
-   PKGDIR=${MODPY_SITEPKG} \
-   PYTHON=${MODPY_BIN}
 do-build:
$(CC) ${WRKSRC}/mnexec.c -o ${WRKBUILD}/mnexec
help2man -N -n "create a Mininet network."  --no-discard-stderr \
@@ -45,6 +41,8 @@ pre-install:
 
 post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mininet
+   ${INSTALL_DATA} ${WRKSRC}/util/switchd.conf \
+   ${PREFIX}/share/examples/mininet/switchd.mininet.conf-sample
 .for f in examples/README.md examples/*.py
${INSTALL_DATA} ${WRKSRC}/$f ${PREFIX}/share/examples/mininet
 .endfor
Index: patches/patch-Makefile
===
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile  21 Aug 2017 18:47:12 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,69 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-Refactoring to make things buildable with both GNU and BSD make
-and account for directory organization differences.
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -2,23 +2,23 @@ MININET = mininet/*.py
- TEST = mininet/test/*.py
- EXAMPLES = mininet/examples/*.py
- MN = bin/mn
--PYMN = python -B bin/mn
-+PYMN = $(PYTHON) -B bin/mn
- BIN = $(MN)
- PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN)
- MNEXEC = mnexec
- MANPAGES = mn.1 mnexec.1
- P8IGN = E251,E201,E302,E202,E126,E127,E203,E226
--BINDIR = /usr/bin
--MANDIR = /usr/share/man/man1
- DOCDIRS = doc/html doc/latex
- PDF = doc/latex/refman.pdf
- 
- CFLAGS += -Wall -Wextra
- 
-+include config.mk
-+
- all: codecheck test
- 
- clean:
--  rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGES) $(DOCDIRS)
-+  rm -rf config.mk util/install.sh build dist *.egg-info *.pyc $(MNEXEC) 
$(MANPAGES) $(DOCDIRS)
- 
- codecheck: $(PYSRC)
-   -echo "Running code check"
-@@ -49,23 +49,27 @@ mnexec: mnexec.c $(MN) mininet/net.py
- install: $(MNEXEC) $(MANPAGES)
-   install $(MNEXEC) $(BINDIR)
-   install $(MANPAGES) $(MANDIR)
--  python setup.py install
-+  $(PYTHON) setup.py install
- 
-+uninstall:
-+  rm -rf $(BINDIR)/$(MNEXEC) $(BINDIR)/mn $(PKGDIR)/mininet-*.egg
-+  printf $(MANDIR)'/%s\n' $(MANPAGES) | xargs rm
-+
- develop: $(MNEXEC) $(MANPAGES)
- # Perhaps we should link these as well
-   install $(MNEXEC) $(BINDIR)
-   install $(MANPAGES) $(MANDIR)
--  python setup.py develop
-+  $(PYTHON) setup.py develop
- 
- man: $(MANPAGES)
- 
--mn.1: $(MN)
--  PYTHONPATH=. help2man -N -n "create a Mininet network." \
--  --no-discard-stderr "$(PYMN)" -o $@
-+mn.1:
-+  help2man -N -n "create a Mininet network." \
-+  --no-discard-stderr "$(PYTHON) $(MN)" -o $@
- 
--mnexec.1: mnexec
-+mnexec.1:
-   help2man -N -n "execution utility for Mininet." \
--  -h "-h" -v "-v" --no-discard-stderr ./$< -o $@
-+  -h "-h" -v "-v" --no-discard-stderr ./$(MNEXEC) -o $@
- 
- .PHONY: doc
- 
Index: patches/patch-configure
===
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure 21 Aug 2017 18:47:12 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,43 +0,0 @@
-$OpenBSD: patch-configure,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-builds a config.mk (OS-dependent vars) used by Makefile
-Index: configure
 configure.orig
-+++ configure
-@@ -0,0 +1,37 @@
-+#!/bin/sh
-+
-+# everything should be in /usr/local, but to keep things unchanged for 
Linux...
-+
-+OS=`uname`
-+case $OS in
-+*Linux*)
-+prefix='/usr'
-+mandir='/usr/share'
-+inst=$(pwd)/util/install-linux.sh
-+python=python
-+;;
-+*FreeBSD*)
-+prefix='/usr/local'
-+mandir=$prefix
-+inst=$(pwd)/util/install-freebsd.sh
-+python=python
-+;;
-+*OpenBSD*)
-+prefix='/usr/local'
-+mandir='/usr/share'
-+inst=$(pwd)/util/install-openbsd.sh
-+# could just link 'python2.7' to 'python'
-+ 

Re: UPDATE net/mininet

2017-11-19 Thread Ayaka Koshibe
Hi all,

I've updated the previous diff to also remove patches for install-related
scripts that are never used, and hopefully to fix whatever else I did to
the diffs.


Thanks,
Ayaka


Index: Makefile
===
RCS file: /cvs/ports/net/mininet/Makefile,v
retrieving revision 1.5
diff -u -p -u -r1.5 Makefile
--- Makefile16 Sep 2017 06:03:05 -  1.5
+++ Makefile19 Nov 2017 07:57:41 -
@@ -3,7 +3,7 @@
 COMMENT =  emulator for rapid prototyping of software defined networks
 
 DISTNAME = mininet-0.0.20170813
-REVISION = 2
+REVISION = 3
 GH_ACCOUNT =   mininet
 GH_PROJECT =   mininet
 GH_COMMIT =87e26ef931ee6063332ceba77db472140f832d3a
@@ -24,10 +24,6 @@ BUILD_DEPENDS =  devel/help2man
 RUN_DEPENDS =  net/socat \
net/iperf
 
-MAKE_ENV = BINDIR=${PREFIX}/bin \
-   MANDIR=${PREFIX}/man/man1 \
-   PKGDIR=${MODPY_SITEPKG} \
-   PYTHON=${MODPY_BIN}
 do-build:
$(CC) ${WRKSRC}/mnexec.c -o ${WRKBUILD}/mnexec
help2man -N -n "create a Mininet network."  --no-discard-stderr \
Index: patches/patch-Makefile
===
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile  21 Aug 2017 18:47:12 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,69 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-Refactoring to make things buildable with both GNU and BSD make
-and account for directory organization differences.
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -2,23 +2,23 @@ MININET = mininet/*.py
- TEST = mininet/test/*.py
- EXAMPLES = mininet/examples/*.py
- MN = bin/mn
--PYMN = python -B bin/mn
-+PYMN = $(PYTHON) -B bin/mn
- BIN = $(MN)
- PYSRC = $(MININET) $(TEST) $(EXAMPLES) $(BIN)
- MNEXEC = mnexec
- MANPAGES = mn.1 mnexec.1
- P8IGN = E251,E201,E302,E202,E126,E127,E203,E226
--BINDIR = /usr/bin
--MANDIR = /usr/share/man/man1
- DOCDIRS = doc/html doc/latex
- PDF = doc/latex/refman.pdf
- 
- CFLAGS += -Wall -Wextra
- 
-+include config.mk
-+
- all: codecheck test
- 
- clean:
--  rm -rf build dist *.egg-info *.pyc $(MNEXEC) $(MANPAGES) $(DOCDIRS)
-+  rm -rf config.mk util/install.sh build dist *.egg-info *.pyc $(MNEXEC) 
$(MANPAGES) $(DOCDIRS)
- 
- codecheck: $(PYSRC)
-   -echo "Running code check"
-@@ -49,23 +49,27 @@ mnexec: mnexec.c $(MN) mininet/net.py
- install: $(MNEXEC) $(MANPAGES)
-   install $(MNEXEC) $(BINDIR)
-   install $(MANPAGES) $(MANDIR)
--  python setup.py install
-+  $(PYTHON) setup.py install
- 
-+uninstall:
-+  rm -rf $(BINDIR)/$(MNEXEC) $(BINDIR)/mn $(PKGDIR)/mininet-*.egg
-+  printf $(MANDIR)'/%s\n' $(MANPAGES) | xargs rm
-+
- develop: $(MNEXEC) $(MANPAGES)
- # Perhaps we should link these as well
-   install $(MNEXEC) $(BINDIR)
-   install $(MANPAGES) $(MANDIR)
--  python setup.py develop
-+  $(PYTHON) setup.py develop
- 
- man: $(MANPAGES)
- 
--mn.1: $(MN)
--  PYTHONPATH=. help2man -N -n "create a Mininet network." \
--  --no-discard-stderr "$(PYMN)" -o $@
-+mn.1:
-+  help2man -N -n "create a Mininet network." \
-+  --no-discard-stderr "$(PYTHON) $(MN)" -o $@
- 
--mnexec.1: mnexec
-+mnexec.1:
-   help2man -N -n "execution utility for Mininet." \
--  -h "-h" -v "-v" --no-discard-stderr ./$< -o $@
-+  -h "-h" -v "-v" --no-discard-stderr ./$(MNEXEC) -o $@
- 
- .PHONY: doc
- 
Index: patches/patch-configure
===
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure 21 Aug 2017 18:47:12 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,43 +0,0 @@
-$OpenBSD: patch-configure,v 1.1.1.1 2017/08/21 18:47:12 akoshibe Exp $
-builds a config.mk (OS-dependent vars) used by Makefile
-Index: configure
 configure.orig
-+++ configure
-@@ -0,0 +1,37 @@
-+#!/bin/sh
-+
-+# everything should be in /usr/local, but to keep things unchanged for 
Linux...
-+
-+OS=`uname`
-+case $OS in
-+*Linux*)
-+prefix='/usr'
-+mandir='/usr/share'
-+inst=$(pwd)/util/install-linux.sh
-+python=python
-+;;
-+*FreeBSD*)
-+prefix='/usr/local'
-+mandir=$prefix
-+inst=$(pwd)/util/install-freebsd.sh
-+python=python
-+;;
-+*OpenBSD*)
-+prefix='/usr/local'
-+mandir='/usr/share'
-+inst=$(pwd)/util/install-openbsd.sh
-+# could just link 'python2.7' to 'python'
-+python=python2.7
-+;;
-+*)
-+echo "Unknown platform: $OS"
-+exit 1
-+;;
-+esac
-+
-+ln -s $inst $(pwd)/util/install.sh
-+
-+echo "BINDIR=$prefix/bin" > config.mk
-+echo "MANDIR=$mandir/man/man1">> config.mk
-+echo 

Re: UPDATE net/mininet

2017-10-21 Thread akoshibe
Hi all,

As pointed out, I'd forgotten to bump the revision and had mangled the diff.
Hopefully fixed both.

Index: Makefile
===
RCS file: /cvs/ports/net/mininet/Makefile,v
retrieving revision 1.5
diff -u -p -u -r1.5 Makefile
--- Makefile16 Sep 2017 06:03:05 -  1.5
+++ Makefile21 Oct 2017 21:58:03 -
@@ -3,7 +3,7 @@
 COMMENT =  emulator for rapid prototyping of software defined networks
 
 DISTNAME = mininet-0.0.20170813
-REVISION = 2
+REVISION = 3
 GH_ACCOUNT =   mininet
 GH_PROJECT =   mininet
 GH_COMMIT =87e26ef931ee6063332ceba77db472140f832d3a
Index: patches/patch-mininet_node_py
===
RCS file: /cvs/ports/net/mininet/patches/patch-mininet_node_py,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-mininet_node_py
--- patches/patch-mininet_node_py   16 Sep 2017 06:03:05 -  1.3
+++ patches/patch-mininet_node_py   21 Oct 2017 21:58:03 -
@@ -904,24 +904,19 @@ Index: mininet/node.py
  pstr = ':%d ' % self.port
  clist = servers[ 0:1 ] + [ s for s in servers if pstr in s ]
  raise Exception( "Please shut down the controller which is"
-@@ -1405,9 +1026,13 @@ class Controller( Node ):
+@@ -1405,7 +1026,10 @@ class Controller( Node ):
  self.execed = False
  
  def stop( self, *args, **kwargs ):
 -"Stop controller."
--self.cmd( 'kill %' + self.command )
--self.cmd( 'wait %' + self.command )
 +"""
 +  Stop controller. Find processes associated with the command, and kill
-+  them.
++them.
 +  """
-+pids = " ".join( self.cmd( 'pgrep ' + self.command ).split( '\n' ) )
-+self.cmd( 'pkill ' + pids + ' 2>/dev/null' )
-+self.cmd( 'wait ' + pids )
+ self.cmd( 'kill %' + self.command )
+ self.cmd( 'wait %' + self.command )
  super( Controller, self ).stop( *args, **kwargs )
- 
- def IP( self, intf=None ):
-@@ -1470,12 +1095,19 @@ class NOX( Controller ):
+@@ -1470,12 +1094,19 @@ class NOX( Controller ):
  
  class Ryu( Controller ):
  "Controller to run Ryu application"
@@ -943,7 +938,7 @@ Index: mininet/node.py
  if not ryuArgs:
  warn( 'warning: no Ryu modules specified; '
'running simple_switch only\n' )
-@@ -1538,7 +1170,50 @@ class RemoteController( Controller ):
+@@ -1538,7 +1169,50 @@ class RemoteController( Controller ):
  else:
  return True
  


On Fri, Oct 20, 2017 at 11:55:02AM -0700, Ayaka Koshibe wrote:
> Hi all,
> 
> This is a minor update undoing an unneeded change (that also seemed
> buggy) that I made while porting.
> 
> OK?
> 
> 
> Thanks,
> Ayaka
> 
> 
> Index: patches/patch-mininet_node_py
> ===
> RCS file: /cvs/ports/net/mininet/patches/patch-mininet_node_py,v
> retrieving revision 1.3
> diff -u -p -u -r1.3 patch-mininet_node_py
> --- patches/patch-mininet_node_py   16 Sep 2017 06:03:05 -  1.3
> +++ patches/patch-mininet_node_py   20 Oct 2017 18:45:38 -
> @@ -904,24 +904,19 @@ Index: mininet/node.py
>   pstr = ':%d ' % self.port
>   clist = servers[ 0:1 ] + [ s for s in servers if pstr in s ]
>   raise Exception( "Please shut down the controller which is"
> -@@ -1405,9 +1026,13 @@ class Controller( Node ):
> +@@ -1405,7 +1026,10 @@ class Controller( Node ):
>   self.execed = False
> 
>   def stop( self, *args, **kwargs ):
>  -"Stop controller."
> --self.cmd( 'kill %' + self.command )
> --self.cmd( 'wait %' + self.command )
>  +"""
>  +  Stop controller. Find processes associated with the command, and kill
> -+  them.
> ++them.
>  +  """
> -+pids = " ".join( self.cmd( 'pgrep ' + self.command ).split( '\n' ) )
> -+self.cmd( 'pkill ' + pids + ' 2>/dev/null' )
> -+self.cmd( 'wait ' + pids )
> + self.cmd( 'kill %' + self.command )
> + self.cmd( 'wait %' + self.command )
>   super( Controller, self ).stop( *args, **kwargs )
> -
> - def IP( self, intf=None ):
> -@@ -1470,12 +1095,19 @@ class NOX( Controller ):
> +@@ -1470,12 +1094,19 @@ class NOX( Controller ):
> 
>   class Ryu( Controller ):
>   "Controller to run Ryu application"
> @@ -943,7 +938,7 @@ Index: mininet/node.py
>   if not ryuArgs:
>   warn( 'warning: no Ryu modules specified; '
> 'running simple_switch only\n' )
> -@@ -1538,7 +1170,50 @@ class RemoteController( Controller ):
> +@@ -1538,7 +1169,50 @@ class RemoteController( Controller ):
>   else:
>   return True



Re: UPDATE net/mininet

2017-09-15 Thread Peter Hessler
OK


On 2017 Sep 12 (Tue) at 13:35:14 -0700 (-0700), Ayaka Koshibe wrote:
:Hi all,
:
:This update fixes a bug introduced in the last revision. It also moves
:the examples to /usr/local/share/examples as it should be. The two
:example files left under /lib/python are actually not examples, but
:beta features which upstream had lumped in with examples.
:
:OK?
:
:
:Thanks,
:Ayaka
:
:Index: Makefile
:===
:RCS file: /cvs/ports/net/mininet/Makefile,v
:retrieving revision 1.4
:diff -u -p -u -r1.4 Makefile
:--- Makefile9 Sep 2017 21:18:30 -   1.4
:+++ Makefile12 Sep 2017 20:02:27 -
:@@ -3,7 +3,7 @@
: COMMENT =  emulator for rapid prototyping of software defined networks
:
: DISTNAME = mininet-0.0.20170813
:-REVISION = 1
:+REVISION = 2
: GH_ACCOUNT =   mininet
: GH_PROJECT =   mininet
: GH_COMMIT =87e26ef931ee6063332ceba77db472140f832d3a
:@@ -42,5 +42,11 @@ pre-install:
: .endfor
:${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mininet
:${INSTALL_DATA} ${WRKBUILD}/README.md ${PREFIX}/share/doc/mininet
:+
:+post-install:
:+   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mininet
:+.for f in examples/README.md examples/*.py
:+   ${INSTALL_DATA} ${WRKSRC}/$f ${PREFIX}/share/examples/mininet
:+.endfor
:
: .include 
:Index: patches/patch-mininet_node_py
:===
:RCS file: /cvs/ports/net/mininet/patches/patch-mininet_node_py,v
:retrieving revision 1.2
:diff -u -p -u -r1.2 patch-mininet_node_py
:--- patches/patch-mininet_node_py   9 Sep 2017 21:18:30 -   1.2
:+++ patches/patch-mininet_node_py   12 Sep 2017 20:02:27 -
:@@ -904,7 +904,7 @@ Index: mininet/node.py
:  pstr = ':%d ' % self.port
:  clist = servers[ 0:1 ] + [ s for s in servers if pstr in s ]
:  raise Exception( "Please shut down the controller which is"
:-@@ -1405,9 +1026,12 @@ class Controller( Node ):
:+@@ -1405,9 +1026,13 @@ class Controller( Node ):
:  self.execed = False
:
:  def stop( self, *args, **kwargs ):
:@@ -915,12 +915,13 @@ Index: mininet/node.py
: +  Stop controller. Find processes associated with the command, and kill
: +  them.
: +  """
:-+self.cmd( 'kill ' + pids + ' 2>/dev/null' )
:++pids = " ".join( self.cmd( 'pgrep ' + self.command ).split( '\n' ) )
:++self.cmd( 'pkill ' + pids + ' 2>/dev/null' )
: +self.cmd( 'wait ' + pids )
:  super( Controller, self ).stop( *args, **kwargs )
:
:  def IP( self, intf=None ):
:-@@ -1470,12 +1094,19 @@ class NOX( Controller ):
:+@@ -1470,12 +1095,19 @@ class NOX( Controller ):
:
:  class Ryu( Controller ):
:  "Controller to run Ryu application"
:@@ -942,7 +943,7 @@ Index: mininet/node.py
:  if not ryuArgs:
:  warn( 'warning: no Ryu modules specified; '
:'running simple_switch only\n' )
:-@@ -1538,7 +1169,50 @@ class RemoteController( Controller ):
:+@@ -1538,7 +1170,50 @@ class RemoteController( Controller ):
:  else:
:  return True
:
:Index: patches/patch-setup_py
:===
:RCS file: /cvs/ports/net/mininet/patches/patch-setup_py,v
:retrieving revision 1.2
:diff -u -p -u -r1.2 patch-setup_py
:--- patches/patch-setup_py  2 Sep 2017 23:10:52 -   1.2
:+++ patches/patch-setup_py  12 Sep 2017 20:02:27 -
:@@ -1,17 +1,21 @@
: $OpenBSD: patch-setup_py,v 1.2 2017/09/02 23:10:52 akoshibe Exp $
:-
:+examples/ is apparently used for beta feature modules, so pull in just
:+the absolutely needed ones.
: Index: setup.py
: --- setup.py.orig
: +++ setup.py
:-@@ -20,7 +20,11 @@ setup(
:+@@ -20,7 +20,14 @@ setup(
:  description='Process-based OpenFlow emulator',
:  author='Bob Lantz',
:  author_email='rla...@cs.stanford.edu',
: -packages=[ 'mininet', 'mininet.examples' ],
: +packages=[
: +'mininet',
:-+'mininet.examples',
: +'mininet.openbsd'
:++],
:++py_modules=[
:++'mininet.examples.cluster',
:++'mininet.examples.clustercli'
: +],
:  long_description="""
:  Mininet is a network emulator which uses lightweight
:Index: pkg/PLIST
:===
:RCS file: /cvs/ports/net/mininet/pkg/PLIST,v
:retrieving revision 1.2
:diff -u -p -u -r1.2 PLIST
:--- pkg/PLIST   2 Sep 2017 23:10:52 -   1.2
:+++ pkg/PLIST   12 Sep 2017 20:02:27 -
:@@ -21,78 +21,10 @@ lib/python${MODPY_VERSION}/site-packages
: lib/python${MODPY_VERSION}/site-packages/mininet/examples/
: lib/python${MODPY_VERSION}/site-packages/mininet/examples/__init__.py
: lib/python${MODPY_VERSION}/site-packages/mininet/examples/__init__.pyc
:-lib/python${MODPY_VERSION}/site-packages/mininet/examples/baresshd.py
:-lib/python${MODPY_VERSION}/site-packages/mininet/examples/baresshd.pyc