Generally I'm OK with this but have a few tweaks in the diff below.
Sync other patches, minor Makefile things, more explicit note about the
license, regenerate plist.

Note that 7.91 is the last release which can still be used under the
previous license, I would like someone with a better eye on copyright law
to take a look at https://nmap.org/npsl/npsl-annotated.html especially
section 4 before this port is updated beyond that point as it may be
that we want to discontinue distributing source/packages.

Now the problem. The previous diff as sent didn't package so it's not
too clear what testing has been done...

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/nmap/Makefile,v
retrieving revision 1.139
diff -u -p -r1.139 Makefile
--- Makefile    23 Feb 2021 19:39:33 -0000      1.139
+++ Makefile    19 Jul 2021 19:28:44 -0000
@@ -3,11 +3,10 @@
 COMMENT-main=  scan ports and fingerprint stack of network hosts
 COMMENT-zenmap=        graphical frontend for nmap
 
-MODPY_EGG_VERSION=     7.80
+MODPY_EGG_VERSION=     7.91
 DISTNAME=              nmap-${MODPY_EGG_VERSION}
 PKGNAME-main=          ${DISTNAME}
 PKGNAME-zenmap=                nmap-zenmap-${MODPY_EGG_VERSION}
-REVISION=              0
 
 CATEGORIES=    net security
 MASTER_SITES=  ${HOMEPAGE}/dist/
@@ -15,9 +14,11 @@ EXTRACT_SUFX=        .tgz
 
 HOMEPAGE=      https://www.nmap.org/
 
-MAINTAINER=    David Carlier <[email protected]>
+MAINTAINER=    JR Aquino <[email protected]>
 
-# GPL (v2 only), with additional clarifications and exceptions, see COPYING
+# NPSL, https://nmap.org/npsl/npsl-annotated.html
+# For <=7.91, https://nmap.org/misc/nmap-v7.80-license.txt may be used instead
+# XXX license needs checking over before updating beyond 7.91
 PERMIT_PACKAGE=        Yes
 
 MULTI_PACKAGES=        -main -zenmap
@@ -27,11 +28,10 @@ COMPILER =          base-clang ports-gcc base-gc
 USE_GMAKE=     Yes
 MODLUA_SA=     Yes
 MODLUA_VERSION=        5.3
-# added manually for -zenmap
 MODPY_RUNDEP=  No
 MODULES=       lang/python \
                lang/lua
-MODPY_VERSION =        ${MODPY_DEFAULT_VERSION_2}
+MODPY_VERSION= ${MODPY_DEFAULT_VERSION_2}
 
 CONFIGURE_STYLE=autoconf
 AUTOCONF_VERSION=2.69
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/nmap/distinfo,v
retrieving revision 1.40
diff -u -p -r1.40 distinfo
--- distinfo    24 Aug 2019 06:37:13 -0000      1.40
+++ distinfo    19 Jul 2021 19:28:44 -0000
@@ -1,2 +1,2 @@
-SHA256 (nmap-7.80.tgz) = eAy/Sg3bnpzUnY+9+lx/NozHroV938ORAt0rg6kF16c=
-SIZE (nmap-7.80.tgz) = 13132692
+SHA256 (nmap-7.91.tgz) = 
9ecf2e93adad5a90c69fa7ab419937ef670398707dd4f97b12bf464d6b1e6cda
+SIZE (nmap-7.91.tgz) = 12971299
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/net/nmap/patches/patch-Makefile_in,v
retrieving revision 1.21
diff -u -p -r1.21 patch-Makefile_in
--- patches/patch-Makefile_in   24 Aug 2019 06:37:13 -0000      1.21
+++ patches/patch-Makefile_in   19 Jul 2021 19:28:44 -0000
@@ -1,8 +1,9 @@
 $OpenBSD: patch-Makefile_in,v 1.21 2019/08/24 06:37:13 giovanni Exp $
+
 Index: Makefile.in
 --- Makefile.in.orig
 +++ Makefile.in
-@@ -45,7 +45,7 @@ DEFS += -D_FORTIFY_SOURCE=2
+@@ -44,7 +44,7 @@ DEFS += -D_FORTIFY_SOURCE=2
  # Should only be enabled during debugging and not in any real release.
  # DEFS += -DMTRACE=1
  CXXFLAGS = @CXXFLAGS@ $(DBGFLAGS) $(CCOPT)
@@ -11,7 +12,7 @@ Index: Makefile.in
  CFLAGS = @CFLAGS@ $(DBGFLAGS) $(CCOPT)
  STATIC =
  LDFLAGS = @LDFLAGS@ $(DBGFLAGS) $(STATIC)
-@@ -351,8 +351,8 @@ $(NPINGDIR)/nping.h: nmap.h
+@@ -348,8 +348,8 @@ $(NPINGDIR)/nping.h: nmap.h
        mv -f [email protected] $@
  
  # Update the version number used by Zenmap.
@@ -20,5 +21,5 @@ Index: Makefile.in
 +#$(ZENMAPDIR)/zenmapCore/Version.py 
$(ZENMAPDIR)/share/zenmap/config/zenmap_version: nmap.h
 +#     cd $(ZENMAPDIR) && $(PYTHON) install_scripts/utils/version_update.py 
"$(NMAP_VERSION)"
  
- nmap-update/default_channel.h: nmap.h
-       sed -e 's/^#[ \t]*define[ \t]\+DEFAULT_CHANNEL[ \t]\+\(".*"\)/#define 
DEFAULT_CHANNEL "$(NMAP_UPDATE_CHANNEL)"/' $@ > [email protected]
+ tests/check_dns: $(OBJS)
+        $(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) 
tests/nmap_dns_test.cc
Index: patches/patch-libnetutil_netutil_cc
===================================================================
RCS file: patches/patch-libnetutil_netutil_cc
diff -N patches/patch-libnetutil_netutil_cc
--- patches/patch-libnetutil_netutil_cc 24 Aug 2019 06:37:13 -0000      1.11
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,91 +0,0 @@
-$OpenBSD: patch-libnetutil_netutil_cc,v 1.11 2019/08/24 06:37:13 giovanni Exp $
-
-first chunk:
-http://marc.info/?l=openbsd-ports&m=140284432321370&w=2
-
-similar diff to DLT_LINUX_SLL chunks sent upstream but they seem uninterested.
-http://marc.info/?l=nmap-dev&m=140179174718457&w=2
-
-chunks dealing with iovec: ???
-
-Index: libnetutil/netutil.cc
---- libnetutil/netutil.cc.orig
-+++ libnetutil/netutil.cc
-@@ -3159,7 +3159,6 @@ static int route_dst_netlink(const struct sockaddr_sto
-                              const struct sockaddr_storage *spoofss) {
-   struct sockaddr_nl snl;
-   struct msghdr msg;
--  struct iovec iov;
-   struct nlmsghdr *nlmsg;
-   struct rtmsg *rtmsg;
-   struct rtattr *rtattr;
-@@ -3211,22 +3210,14 @@ static int route_dst_netlink(const struct sockaddr_sto
-     add_rtattr_addr(nlmsg, &rtattr, &len, RTA_SRC, spoofss, intf_index);
-   }
- 
--  iov.iov_base = nlmsg;
--  iov.iov_len = nlmsg->nlmsg_len;
--
-   memset(&msg, 0, sizeof(msg));
-   msg.msg_name = &snl;
-   msg.msg_namelen = sizeof(snl);
--  msg.msg_iov = &iov;
--  msg.msg_iovlen = 1;
- 
-   rc = sendmsg(fd, &msg, 0);
-   if (rc == -1)
-     netutil_fatal("%s: cannot sendmsg: %s", __func__, strerror(errno));
- 
--  iov.iov_base = buf;
--  iov.iov_len = sizeof(buf);
--
-   len = recvmsg(fd, &msg, 0);
-   if (len <= 0)
-     netutil_fatal("%s: cannot recvmsg: %s", __func__, strerror(errno));
-@@ -3857,7 +3848,6 @@ static const unsigned char *add_exthdr_ancillary(struc
- static int send_ipv6_ip(const struct sockaddr_in6 *dst,
-   const unsigned char *packet, size_t packetlen) {
-   struct msghdr msg;
--  struct iovec iov;
- 
-   const unsigned char *end;
-   struct ip6_hdr *hdr;
-@@ -3876,8 +3866,6 @@ static int send_ipv6_ip(const struct sockaddr_in6 *dst
-   /* Set up sendmsg data structure. iov is filled in below. */
-   msg.msg_name = (void *) dst;
-   msg.msg_namelen = sizeof(*dst);
--  msg.msg_iov = &iov;
--  msg.msg_iovlen = 1;
-   msg.msg_control = NULL;
-   msg.msg_controllen = 0;
-   msg.msg_flags = 0;
-@@ -3936,8 +3924,6 @@ static int send_ipv6_ip(const struct sockaddr_in6 *dst
-   }
- 
-   assert(packet <= end);
--  iov.iov_base = (unsigned char *) packet;
--  iov.iov_len = end - packet;
- 
-   n = sendmsg(sd, &msg, 0);
-   if (n == -1)
-@@ -4165,9 +4151,6 @@ int datalink_offset(int datalink)
- {
-   if (datalink == DLT_EN10MB)
-     return ETH_HDR_LEN;
--  else if (datalink == DLT_LINUX_SLL)
--    /* The datalink type is Linux "cooked" sockets. See pcap-linktype(7). */
--    return 16;
-   else
-     return -1;
- }
-@@ -4293,10 +4276,6 @@ static bool accept_arp(const unsigned char *p, const s
- 
-   if (datalink == DLT_EN10MB) {
-     return ntohs(*((u16 *) (p + 12))) == ETH_TYPE_ARP;
--  } else if (datalink == DLT_LINUX_SLL) {
--    return ntohs(*((u16 *) (p + 2))) == ARPHRD_ETHER && /* sll_hatype */
--      ntohs(*((u16 *) (p + 4))) == 6 && /* sll_halen */
--      ntohs(*((u16 *) (p + 14))) == ETH_TYPE_ARP; /* sll_protocol */
-   } else {
-     return false;
-   }
Index: patches/patch-ndiff_setup_py
===================================================================
RCS file: /cvs/ports/net/nmap/patches/patch-ndiff_setup_py,v
retrieving revision 1.3
diff -u -p -r1.3 patch-ndiff_setup_py
--- patches/patch-ndiff_setup_py        7 Jan 2016 13:23:47 -0000       1.3
+++ patches/patch-ndiff_setup_py        19 Jul 2021 19:28:44 -0000
@@ -1,7 +1,9 @@
 $OpenBSD: patch-ndiff_setup_py,v 1.3 2016/01/07 13:23:47 giovanni Exp $
---- ndiff/setup.py.orig        Sun Sep 20 06:16:36 2015
-+++ ndiff/setup.py     Tue Dec 29 10:47:48 2015
-@@ -309,7 +309,7 @@ class my_uninstall(distutils.cmd.Command):
+
+Index: ndiff/setup.py
+--- ndiff/setup.py.orig
++++ ndiff/setup.py
+@@ -306,7 +306,7 @@ class my_uninstall(distutils.cmd.Command):
  
  distutils.core.setup(name=u"ndiff", scripts=[u"scripts/ndiff"],
      py_modules=[u"ndiff"],
Index: patches/patch-nping_EchoServer_cc
===================================================================
RCS file: /cvs/ports/net/nmap/patches/patch-nping_EchoServer_cc,v
retrieving revision 1.5
diff -u -p -r1.5 patch-nping_EchoServer_cc
--- patches/patch-nping_EchoServer_cc   5 Feb 2019 21:12:07 -0000       1.5
+++ patches/patch-nping_EchoServer_cc   19 Jul 2021 19:28:44 -0000
@@ -5,7 +5,7 @@ Ambiguous bind(2) call.
 Index: nping/EchoServer.cc
 --- nping/EchoServer.cc.orig
 +++ nping/EchoServer.cc
-@@ -281,12 +281,12 @@ int EchoServer::nep_listen_socket(){
+@@ -213,12 +213,12 @@ int EchoServer::nep_listen_socket(){
          server_addr6.sin6_len = sizeof(struct sockaddr_in6);
      #endif
      /* Bind to local address and the specified port */
@@ -20,7 +20,7 @@ Index: nping/EchoServer.cc
                  nping_fatal(QT_3, "Could not bind to port %d (%s).", port, 
strerror(errno));
              }else{ 
                  nping_print(VB_1, "Server bound to port %d", port);
-@@ -319,12 +319,12 @@ int EchoServer::nep_listen_socket(){
+@@ -251,12 +251,12 @@ int EchoServer::nep_listen_socket(){
  #endif
  
      /* Bind to local address and the specified port */
Index: patches/patch-scan-engine_cc
===================================================================
RCS file: /cvs/ports/net/nmap/patches/patch-scan-engine_cc,v
retrieving revision 1.12
diff -u -p -r1.12 patch-scan-engine_cc
--- patches/patch-scan-engine_cc        24 Aug 2019 06:37:13 -0000      1.12
+++ patches/patch-scan-engine_cc        19 Jul 2021 19:28:44 -0000
@@ -1,14 +1,11 @@
 $OpenBSD: patch-scan-engine_cc,v 1.12 2019/08/24 06:37:13 giovanni Exp $
 
-pcap_filter changes: to deal with base libpcap which doesn't support sctp
-(not currently needed as using internal libpcap)
-
-Format changes for 64-bit time_t, should go upstream
+Fix for 64-bit time_t on 32-bit archs
 
 Index: scan_engine.cc
 --- scan_engine.cc.orig
 +++ scan_engine.cc
-@@ -2059,7 +2059,7 @@ void ultrascan_host_probe_update(UltraScanInfo *USI, H
+@@ -2009,7 +2009,7 @@ void ultrascan_host_probe_update(UltraScanInfo *USI, H
      struct timeval tv;
  
      gettimeofday(&tv, NULL);
Index: patches/patch-timing_cc
===================================================================
RCS file: /cvs/ports/net/nmap/patches/patch-timing_cc,v
retrieving revision 1.9
diff -u -p -r1.9 patch-timing_cc
--- patches/patch-timing_cc     27 Sep 2017 09:50:00 -0000      1.9
+++ patches/patch-timing_cc     19 Jul 2021 19:28:44 -0000
@@ -1,8 +1,9 @@
 $OpenBSD: patch-timing_cc,v 1.9 2017/09/27 09:50:00 dcoppa Exp $
+
 Index: timing.cc
 --- timing.cc.orig
 +++ timing.cc
-@@ -134,4 +134,6 @@
+@@ -66,4 +66,6 @@
  
 +#include <limits>
 +
Index: patches/patch-zenmap_setup_py
===================================================================
RCS file: /cvs/ports/net/nmap/patches/patch-zenmap_setup_py,v
retrieving revision 1.16
diff -u -p -r1.16 patch-zenmap_setup_py
--- patches/patch-zenmap_setup_py       24 Aug 2019 06:37:13 -0000      1.16
+++ patches/patch-zenmap_setup_py       19 Jul 2021 19:28:44 -0000
@@ -1,8 +1,9 @@
 $OpenBSD: patch-zenmap_setup_py,v 1.16 2019/08/24 06:37:13 giovanni Exp $
+
 Index: zenmap/setup.py
 --- zenmap/setup.py.orig
 +++ zenmap/setup.py
-@@ -249,12 +249,11 @@ class my_install(install):
+@@ -181,12 +181,11 @@ class my_install(install):
          install.finalize_options(self)
  
      def run(self):
@@ -16,7 +17,7 @@ Index: zenmap/setup.py
          self.write_installed_files()
  
      def get_installed_files(self):
-@@ -413,19 +412,10 @@ for dir in dirs:
+@@ -345,19 +344,10 @@ for dir in dirs:
                  # See $(nmapdatadir) in nmap/Makefile.in.
                  "NMAPDATADIR": os.path.join(self.saved_prefix, "share", 
"nmap")
                  }
@@ -39,7 +40,7 @@ Index: zenmap/setup.py
          # Replace the path definitions.
          for path, replacement in interesting_paths.items():
              pcontent = re.sub("%s\s+=\s+.+" % path,
-@@ -447,11 +437,6 @@ for dir in dirs:
+@@ -379,11 +369,6 @@ for dir in dirs:
  
          desktop_filename = None
          root_desktop_filename = None
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/net/nmap/pkg/PLIST-main,v
retrieving revision 1.15
diff -u -p -r1.15 PLIST-main
--- pkg/PLIST-main      24 Aug 2019 06:37:13 -0000      1.15
+++ pkg/PLIST-main      19 Jul 2021 19:28:44 -0000
@@ -99,6 +99,7 @@ share/nmap/nselib/datafiles.lua
 share/nmap/nselib/datetime.lua
 share/nmap/nselib/dhcp.lua
 share/nmap/nselib/dhcp6.lua
+share/nmap/nselib/dicom.lua
 share/nmap/nselib/dns.lua
 share/nmap/nselib/dnsbl.lua
 share/nmap/nselib/dnssd.lua
@@ -157,6 +158,7 @@ share/nmap/nselib/omp2.lua
 share/nmap/nselib/oops.lua
 share/nmap/nselib/openssl.luadoc
 share/nmap/nselib/ospf.lua
+share/nmap/nselib/outlib.lua
 share/nmap/nselib/packet.lua
 share/nmap/nselib/pcre.luadoc
 share/nmap/nselib/pgsql.lua
@@ -301,6 +303,8 @@ share/nmap/scripts/daytime.nse
 share/nmap/scripts/db2-das-info.nse
 share/nmap/scripts/deluge-rpc-brute.nse
 share/nmap/scripts/dhcp-discover.nse
+share/nmap/scripts/dicom-brute.nse
+share/nmap/scripts/dicom-ping.nse
 share/nmap/scripts/dict-info.nse
 share/nmap/scripts/distcc-cve2004-2687.nse
 share/nmap/scripts/dns-blacklist.nse
@@ -791,6 +795,7 @@ share/nmap/scripts/ubiquiti-discovery.ns
 share/nmap/scripts/unittest.nse
 share/nmap/scripts/unusual-port.nse
 share/nmap/scripts/upnp-info.nse
+share/nmap/scripts/uptime-agent-info.nse
 share/nmap/scripts/url-snarf.nse
 share/nmap/scripts/ventrilo-info.nse
 share/nmap/scripts/versant-info.nse
Index: pkg/PLIST-zenmap
===================================================================
RCS file: /cvs/ports/net/nmap/pkg/PLIST-zenmap,v
retrieving revision 1.19
diff -u -p -r1.19 PLIST-zenmap
--- pkg/PLIST-zenmap    24 Aug 2019 06:37:13 -0000      1.19
+++ pkg/PLIST-zenmap    19 Jul 2021 19:28:44 -0000
@@ -225,8 +225,6 @@ lib/python${MODPY_VERSION}/site-packages
 
lib/python${MODPY_VERSION}/site-packages/zenmapGUI/higwidgets/higtextviewers.pyc
 lib/python${MODPY_VERSION}/site-packages/zenmapGUI/higwidgets/higwindows.py
 lib/python${MODPY_VERSION}/site-packages/zenmapGUI/higwidgets/higwindows.pyc
-lib/python${MODPY_VERSION}/site-packages/zenmapGUI/higwidgets/utils.py
-lib/python${MODPY_VERSION}/site-packages/zenmapGUI/higwidgets/utils.pyc
 @man man/man1/zenmap.1
 share/applications/zenmap-root.desktop
 share/applications/zenmap.desktop

Reply via email to