Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 May 2015 19:23:56 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r385209 - in head/net: . hanstunnel hanstunnel/files miruo
Message-ID:  <201505021923.t42JNulR046967@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sat May  2 19:23:55 2015
New Revision: 385209
URL: https://svnweb.freebsd.org/changeset/ports/385209

Log:
  net/miruo: add new port
  
  Network monitor/analyzer which prints packets on terminal in neat style.
  Packet data can also be read from a file saved by tcpdump(1).
  
  WWW: https://github.com/KLab/miruo
  
  PR:		199723
  Submitted by:	Koichiro IWAO <meta+ports@vmeta.jp>

Added:
  head/net/hanstunnel/files/patch-src_echo.cpp
     - copied, changed from r385154, head/net/hanstunnel/files/patch-echo.cpp
  head/net/hanstunnel/files/patch-src_tun.cpp
     - copied, changed from r384558, head/net/hanstunnel/files/patch-tun.cpp
  head/net/hanstunnel/files/patch-src_tun__dev__freebsd.c   (contents, props changed)
  head/net/hanstunnel/pkg-message
     - copied unchanged from r384558, head/net/hanstunnel/files/pkg-message.in
  head/net/miruo/
  head/net/miruo/Makefile   (contents, props changed)
  head/net/miruo/distinfo   (contents, props changed)
  head/net/miruo/pkg-descr   (contents, props changed)
Deleted:
  head/net/hanstunnel/files/patch-Makefile
  head/net/hanstunnel/files/patch-client.cpp
  head/net/hanstunnel/files/patch-echo.cpp
  head/net/hanstunnel/files/patch-main.cpp
  head/net/hanstunnel/files/patch-tun.cpp
  head/net/hanstunnel/files/patch-utility.cpp
  head/net/hanstunnel/files/pkg-message.in
Modified:
  head/net/Makefile
  head/net/hanstunnel/Makefile
  head/net/hanstunnel/distinfo
  head/net/hanstunnel/pkg-descr

Modified: head/net/Makefile
==============================================================================
--- head/net/Makefile	Sat May  2 19:08:43 2015	(r385208)
+++ head/net/Makefile	Sat May  2 19:23:55 2015	(r385209)
@@ -376,6 +376,7 @@
     SUBDIR += miniupnpc
     SUBDIR += miniupnpd
     SUBDIR += miredo
+    SUBDIR += miruo
     SUBDIR += mono-zeroconf
     SUBDIR += mopd
     SUBDIR += morebalance

Modified: head/net/hanstunnel/Makefile
==============================================================================
--- head/net/hanstunnel/Makefile	Sat May  2 19:08:43 2015	(r385208)
+++ head/net/hanstunnel/Makefile	Sat May  2 19:23:55 2015	(r385209)
@@ -2,42 +2,30 @@
 # $FreeBSD$
 
 PORTNAME=	hans
-PORTVERSION=	0.4.1
-PORTREVISION=	1
+PORTVERSION=	0.4.4
 CATEGORIES=	net security
 MASTER_SITES=	SF/hanstunnel/source
 
 MAINTAINER=	vsityz@gmail.com
 COMMENT=	Hans makes it possible to tunnel IPv4 through ICMP
 
-LICENSE=	GPLv3
-
-OPTIONS_DEFINE=	CLANG
-
-CLANG_DESC=	Build with Clang instead of GCC
-
-OPTIONS_DEFAULT=	CLANG
-
+LICENSE=	FPL GPLv3 # or any later version
+LICENSE_COMB=	multi
+LICENSE_NAME_FPL=Freeware Public License
+LICENSE_FILE_FPL=${WRKSRC}/src/sha1_license.txt
+LICENSE_PERMS_FPL=dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+
+USES=		dos2unix
+DOS2UNIX_FILES=	${LICENSE_FILE_FPL}
+MAKE_ARGS=	GCC="${CC}" GPP="${CXX}" \
+		CFLAGS="${CFLAGS} -c" LDFLAGS="${LDFLAGS}" \
+		TUN_DEV_FILE="src/tun_dev_freebsd.c"
 PLIST_FILES=	bin/hans
 
-SUB_FILES=	pkg-message
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MCLANG}
-.if ${OSVERSION} >= 900033 && exists(/usr/bin/clang)
-CC=		clang
-CXX=		clang++
-.else
-BUILD_DEPENDS+=	clang33:${PORTSDIR}/lang/clang33
-CC=		clang33
-CXX=		clang++33
-.endif
-.else
-USE_GCC=	any
-.endif
+# Remove CRs before ask-license to fix formatting in dialog(1)
+post-extract:	dos2unix
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/hans ${STAGEDIR}${LOCALBASE}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/hans ${STAGEDIR}${PREFIX}/bin
 
 .include <bsd.port.mk>

Modified: head/net/hanstunnel/distinfo
==============================================================================
--- head/net/hanstunnel/distinfo	Sat May  2 19:08:43 2015	(r385208)
+++ head/net/hanstunnel/distinfo	Sat May  2 19:23:55 2015	(r385209)
@@ -1,2 +1,2 @@
-SHA256 (hans-0.4.1.tar.gz) = 8e4df005bcf6a877ffd0810cc9b31aa3ae04f23d798bea6cc2893a3f26cac29c
-SIZE (hans-0.4.1.tar.gz) = 32860
+SHA256 (hans-0.4.4.tar.gz) = 81378258b8c9510ac01ad4d69f191e2927b9304daae033ee097f6ba4d39f6bb3
+SIZE (hans-0.4.4.tar.gz) = 33992

Copied and modified: head/net/hanstunnel/files/patch-src_echo.cpp (from r385154, head/net/hanstunnel/files/patch-echo.cpp)
==============================================================================
--- head/net/hanstunnel/files/patch-echo.cpp	Fri May  1 22:22:55 2015	(r385154, copy source)
+++ head/net/hanstunnel/files/patch-src_echo.cpp	Sat May  2 19:23:55 2015	(r385209)
@@ -1,9 +1,10 @@
---- echo.cpp.orig	2014-08-06 10:11:40.000000000 -0400
-+++ echo.cpp	2014-08-06 10:11:56.000000000 -0400
-@@ -20,6 +20,7 @@
+--- src/echo.cpp.orig	2014-02-07 03:36:31 UTC
++++ src/echo.cpp
+@@ -19,7 +19,7 @@
+ 
  #include "echo.h"
  #include "exception.h"
- 
+-
 +#include <sys/types.h>
  #include <sys/socket.h>
  #include <netinet/in_systm.h>

Copied and modified: head/net/hanstunnel/files/patch-src_tun.cpp (from r384558, head/net/hanstunnel/files/patch-tun.cpp)
==============================================================================
--- head/net/hanstunnel/files/patch-tun.cpp	Thu Apr 23 11:11:11 2015	(r384558, copy source)
+++ head/net/hanstunnel/files/patch-src_tun.cpp	Sat May  2 19:23:55 2015	(r385209)
@@ -1,45 +1,11 @@
---- tun.cpp.orig	2010-02-17 10:30:21.000000000 -0500
-+++ tun.cpp	2014-08-06 10:10:51.000000000 -0400
-@@ -21,6 +21,7 @@
+--- src/tun.cpp.orig	2014-02-07 03:36:31 UTC
++++ src/tun.cpp
+@@ -20,7 +20,7 @@
+ #include "tun.h"
  #include "exception.h"
  #include "utility.h"
- 
+-
 +#include <sys/types.h>
  #include <arpa/inet.h>
  #include <netinet/in_systm.h>
  #include <netinet/in.h>
-@@ -41,8 +42,7 @@
- 
- 	if (device != NULL)
- 	{
--		strncpy(this->device, device, VTUN_DEV_LEN);
--		this->device[VTUN_DEV_LEN] = 0;
-+		strlcpy(this->device, device, VTUN_DEV_LEN);
- 	}
- 	else
- 		this->device[0] = 0;
-@@ -68,23 +68,17 @@
- 	string ips = Utility::formatIp(ip);
- 	string destIps = Utility::formatIp(destIp);
- 
--#ifdef LINUX
--	snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s %s netmask 255.255.255.0", device, ips.c_str());
--#else
--	snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s %s %s netmask 255.255.255.255", device, ips.c_str(), destIps.c_str());
--#endif
-+	snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s %s %s netmask 255.255.255.0", device, ips.c_str(), destIps.c_str());
- 
- 	if (system(cmdline) != 0)
- 		syslog(LOG_ERR, "could not set tun device ip address");
- 
--#ifndef LINUX
- 	if (includeSubnet)
- 	{
- 		snprintf(cmdline, sizeof(cmdline), "/sbin/route add %s/24 %s", destIps.c_str(), destIps.c_str());
- 		if (system(cmdline) != 0)
- 			syslog(LOG_ERR, "could not add route");
- 	}
--#endif
- }
- 
- void Tun::write(const char *buffer, int length)

Added: head/net/hanstunnel/files/patch-src_tun__dev__freebsd.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/hanstunnel/files/patch-src_tun__dev__freebsd.c	Sat May  2 19:23:55 2015	(r385209)
@@ -0,0 +1,14 @@
+--- src/tun_dev_freebsd.c.orig	2014-02-07 03:36:31 UTC
++++ src/tun_dev_freebsd.c
+@@ -31,7 +31,11 @@
+ #include <errno.h>
+ 
+ #include <sys/ioctl.h>
++#ifdef __DragonFly__
++#include <net/tun/if_tun.h>
++#else
+ #include <net/if_tun.h>
++#endif
+ 
+ /* #include "vtun.h"
+ #include "lib.h" */

Modified: head/net/hanstunnel/pkg-descr
==============================================================================
--- head/net/hanstunnel/pkg-descr	Sat May  2 19:08:43 2015	(r385208)
+++ head/net/hanstunnel/pkg-descr	Sat May  2 19:23:55 2015	(r385209)
@@ -3,4 +3,7 @@ could call it a ping tunnel. This can be
 in the situation that your Internet access is firewalled, but pings are
 allowed.
 
+Hans runs on Linux as a client and a server. It runs on Mac OS X,
+iPhone/iPod touch, FreeBSD and OpenBSD as a client only.
+
 WWW: http://code.gerade.org/hans/

Copied: head/net/hanstunnel/pkg-message (from r384558, head/net/hanstunnel/files/pkg-message.in)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/hanstunnel/pkg-message	Sat May  2 19:23:55 2015	(r385209, copy of r384558, head/net/hanstunnel/files/pkg-message.in)
@@ -0,0 +1,23 @@
+------------------------------------------------------------
+
+Hans runs on Linux as a client and a server.
+It runs on FreeBSD client only.
+
+NOTE: that Hans can not receive echo requests on BSD systems.
+Therefore the server only works on Linux.
+
+------------------------------------------------------------
+
+### Running as a server ###
+
+% hans -s 10.1.2.0 -r -p password -u nobody
+
+### Running as a client ###
+
+% hans -c server_address -p password -u nobody
+
+### Help ###
+
+% hans
+
+------------------------------------------------------------

Added: head/net/miruo/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/miruo/Makefile	Sat May  2 19:23:55 2015	(r385209)
@@ -0,0 +1,19 @@
+# Created by: Koichiro IWAO <meta+ports@vmeta.jp>
+# $FreeBSD$
+
+PORTNAME=	miruo
+PORTVERSION=	0.9.5
+CATEGORIES=	net
+
+MAINTAINER=	meta+ports@vmeta.jp
+COMMENT=	Pretty-print TCP session monitor/analyzer
+
+LICENSE=	GPLv3
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	KLab
+
+GNU_CONFIGURE=	yes
+PLIST_FILES=	sbin/miruo
+
+.include <bsd.port.mk>

Added: head/net/miruo/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/miruo/distinfo	Sat May  2 19:23:55 2015	(r385209)
@@ -0,0 +1,2 @@
+SHA256 (KLab-miruo-0.9.5_GH0.tar.gz) = adb57d766dd91c1509c8239fc0c92c570fcb5e5900c2513807817424fc7eeffd
+SIZE (KLab-miruo-0.9.5_GH0.tar.gz) = 116387

Added: head/net/miruo/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/miruo/pkg-descr	Sat May  2 19:23:55 2015	(r385209)
@@ -0,0 +1,4 @@
+Network monitor/analyzer which prints packets on terminal in neat style.
+Packet data can also be read from a file saved by tcpdump(1).
+
+WWW: https://github.com/KLab/miruo



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