git: 9db74072ecee - main - net/dshell: Resurrect port and update to the snapshot on 2021-06-10.

From: MANTANI Nobutaka <nobutaka_at_FreeBSD.org>
Date: Sun, 10 Oct 2021 14:12:20 UTC
The branch main has been updated by nobutaka:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9db74072eceebe4e0abad2e4f4f22c42cbaf63b1

commit 9db74072eceebe4e0abad2e4f4f22c42cbaf63b1
Author:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
AuthorDate: 2021-10-10 14:11:06 +0000
Commit:     MANTANI Nobutaka <nobutaka@FreeBSD.org>
CommitDate: 2021-10-10 14:11:06 +0000

    net/dshell: Resurrect port and update to the snapshot on 2021-06-10.
    
    This port was previously removed due to lack of Python 3 support.
    Current version supports Python 3.
---
 MOVED                           |  1 -
 net/Makefile                    |  1 +
 net/dshell/Makefile             | 41 +++++++++++++++++++++++++++++++++++++++++
 net/dshell/distinfo             |  3 +++
 net/dshell/files/pkg-message.in | 13 +++++++++++++
 net/dshell/pkg-descr            | 12 ++++++++++++
 6 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index a6389f9743c6..f8fce88ca611 100644
--- a/MOVED
+++ b/MOVED
@@ -15096,7 +15096,6 @@ databases/postgresql94-plpython|databases/postgresql95-plpython|2020-07-24|Has e
 databases/postgresql94-server|databases/postgresql95-server|2020-07-24|Has expired: PostgreSQL-9.4 has reached end-of-life
 databases/postgresql94-pltcl|databases/postgresql95-pltcl|2020-07-24|Has expired: PostgreSQL-9.4 has reached end-of-life
 databases/postgresql94-plperl|databases/postgresql95-plperl|2020-07-24|Has expired: PostgreSQL-9.4 has reached end-of-life
-net/dshell||2020-07-24|Uses deprecated version of python
 databases/sqliteodbc-sqlite2|databases/sqliteodbc|2020-07-27|Has expired: SQLite2 has stopped development in 2005, please move to SQLite3
 graphics/wayland-info|graphics/wayland-utils|2020-08-02|Project renamed
 devel/rubygem-grape11|devel/rubygem-grape|2020-08-03|Has expired: use devel/rubygem-grape instead
diff --git a/net/Makefile b/net/Makefile
index e0943bdb7d77..1bcb2aadb409 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -131,6 +131,7 @@
     SUBDIR += drive
     SUBDIR += dropbox-api-command
     SUBDIR += dropbox-uploader
+    SUBDIR += dshell
     SUBDIR += dtcp
     SUBDIR += dtcpclient
     SUBDIR += dual-dhclient
diff --git a/net/dshell/Makefile b/net/dshell/Makefile
new file mode 100644
index 000000000000..61ee9a5c7fb1
--- /dev/null
+++ b/net/dshell/Makefile
@@ -0,0 +1,41 @@
+PORTNAME=	dshell
+PORTVERSION=	3.2.1.b.${SNAPDATE}
+CATEGORIES=	net
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	nobutaka@FreeBSD.org
+COMMENT=	Extensible network forensic analysis framework
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	bash:shells/bash \
+		${PYTHON_PKGNAMEPREFIX}tabulate>0:devel/py-tabulate@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}GeoIP2>0:net/py-GeoIP2@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}netifaces>0:net/py-netifaces@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pcapy>0:net/py-pcapy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pypacker>0:net/py-pypacker@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}openssl>0:security/py-openssl@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}elasticsearch>0:textproc/py-elasticsearch@${PY_FLAVOR}
+RUN_DEPENDS:=	${BUILD_DEPENDS}
+
+USES=		python
+USE_GITHUB=	yes
+USE_PYTHON=	autoplist distutils
+
+NO_ARCH=	yes
+
+GH_ACCOUNT=	USArmyResearchLab
+GH_PROJECT=	Dshell
+GH_TAGNAME=	502a546
+SNAPDATE=	20210610
+
+SUB_FILES=	pkg-message
+SUB_LIST=	PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR}
+
+post-patch:
+	${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}/bin/bash|' \
+			 -e 's|python3|${PYTHON_CMD}|' ${WRKSRC}/scripts/dshell
+	${REINPLACE_CMD} -e 's|python3|${PYTHON_CMD}|' ${WRKSRC}/dshell/data/dshellrc
+
+.include <bsd.port.mk>
diff --git a/net/dshell/distinfo b/net/dshell/distinfo
new file mode 100644
index 000000000000..1991aa529cd8
--- /dev/null
+++ b/net/dshell/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1633790744
+SHA256 (USArmyResearchLab-Dshell-3.2.1.b.20210610-502a546_GH0.tar.gz) = 7b06caa6a72a157a6abc879ff33076150192e93d710b3bc24d765e6eb1d10134
+SIZE (USArmyResearchLab-Dshell-3.2.1.b.20210610-502a546_GH0.tar.gz) = 191755
diff --git a/net/dshell/files/pkg-message.in b/net/dshell/files/pkg-message.in
new file mode 100644
index 000000000000..75a7f847e9c6
--- /dev/null
+++ b/net/dshell/files/pkg-message.in
@@ -0,0 +1,13 @@
+[
+{ type: install
+  message: <<EOM
+To use the GeoIP Databases from DShell, please download
+GeoLite2-ASN_[date].tar.gz, GeoLite2-City_[date].tar.gz, and
+GeoLite2-Country_[date].tar.gz from the following URL and place
+GeoLite2-ASN.mmdb, GeoLite2-City.mmdb, and GeoLite2-Country.mmdb
+into %%PYTHON_SITELIBDIR%%/dshell/data/GeoIP .
+
+https://dev.maxmind.com/geoip/geoip2/geolite2/
+EOM
+}
+]
diff --git a/net/dshell/pkg-descr b/net/dshell/pkg-descr
new file mode 100644
index 000000000000..7682f6f08b73
--- /dev/null
+++ b/net/dshell/pkg-descr
@@ -0,0 +1,12 @@
+DShell is an extensible network forensic analysis framework.
+Enables rapid development of plugins to support the dissection of
+network packet captures.
+
+Key features:
+- Deep packet analysis using specialized plugins
+- Robust stream reassembly
+- IPv4 and IPv6 support
+- Custom output handlers
+- Chainable plugins
+
+WWW: https://github.com/USArmyResearchLab/Dshell