Skip to contentSkip to conversation

package/nmap: bump to version 7.92

PATCH Applied Adam Duskett 2 participants 8 messages Oct 12, 2021 – Oct 21, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/nmap: bump to version 7.92

In addition:
- Remove upstream patch
- Update license hash to reflect license version bump from 0.92 to 0.93

---
 package/nmap/0002-ncat-unix-socket.patch | 30 ------------------------
 package/nmap/nmap.hash                   |  6 ++---
 package/nmap/nmap.mk                     |  2 +-
 3 files changed, 4 insertions(+), 34 deletions(-)
 delete mode 100644 package/nmap/0002-ncat-unix-socket.patch
package/nmap/0002-ncat-unix-socket.patch deleted +0 -30
deleted file mode 100644
index b6484ebeea..0000000000
@@ -1,30 +0,0 @@
-ChangeLog:
-
-o [Ncat][GH#2154] Ncat no longer crashes when used with Unix domain sockets.
-
-Backported from: r38121
-
-Signed-off-by: Alexey Neyman <[email protected]>
-
-Index: ncat/ncat_main.c
-===================================================================
---- a/ncat/ncat_main.c	(revision 38120)
-+++ b/ncat/ncat_main.c	(revision 38121)
-@@ -846,7 +846,7 @@
-             targetaddrs->addr.un.sun_family = AF_UNIX;
-             strncpy(targetaddrs->addr.un.sun_path, argv[optind], sizeof(targetaddrs->addr.un.sun_path));
-             targetaddrs->addrlen = SUN_LEN(&targetaddrs->addr.un);
--            o.target = argv[optind];
-+            o.sslservername = o.target = argv[optind];
-             optind++;
-         } else
- #endif
-@@ -865,7 +865,7 @@
-                 targetaddrs->addr.vm.svm_cid = long_cid;
- 
-                 targetaddrs->addrlen = sizeof(targetaddrs->addr.vm);
--                o.target = argv[optind];
-+                o.sslservername = o.target = argv[optind];
-                 optind++;
-             }
-         } else
package/nmap/nmap.hash +3 -3
index 8f69bbf613..dc379f30d4 100644
@@ -1,5 +1,5 @@
-# From https://nmap.org/dist/sigs/nmap-7.91.tar.bz2.digest.txt (lowercase)
-sha256  18cc4b5070511c51eb243cdd2b0b30ff9b2c4dc4544c6312f75ce3a67a593300  nmap-7.91.tar.bz2
+# From https://nmap.org/dist/sigs/nmap-7.92.tar.bz2.digest.txt (lowercase)
+sha256  a5479f2f8a6b0b2516767d2f7189c386c1dc858d997167d7ec5cfc798c7571a1  nmap-7.92.tar.bz2
 
 # Locally calculated
-sha256  8254a9bc733f3312c6dcfe0d5a129c29e96ecb8b33408c652a8c7beb2e25b471  LICENSE
+sha256  133794301a764dfe8a60e38601e56657b7113e0337b452189725bbbed58baea0  LICENSE
package/nmap/nmap.mk +1 -1
index 34cf61ff0b..f3994e9b38 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-NMAP_VERSION = 7.91
+NMAP_VERSION = 7.92
 NMAP_SITE = https://nmap.org/dist
 NMAP_SOURCE = nmap-$(NMAP_VERSION).tar.bz2
 NMAP_DEPENDENCIES = liblinear libpcap
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/4 package/python-xmljson: new package

This package is a dependency for pyndiff

---
 package/Config.in                          |  1 +
 package/python-xmljson/Config.in           |  6 ++++++
 package/python-xmljson/python-xmljson.hash |  5 +++++
 package/python-xmljson/python-xmljson.mk   | 14 ++++++++++++++
 4 files changed, 26 insertions(+)
 create mode 100644 package/python-xmljson/Config.in
 create mode 100644 package/python-xmljson/python-xmljson.hash
 create mode 100644 package/python-xmljson/python-xmljson.mk
package/Config.in +1 -0
index ba1ee4005c..09e9665f48 100644
@@ -1276,6 +1276,7 @@ menu "External python modules"
 	source "package/python-xlsxwriter/Config.in"
 	source "package/python-xlutils/Config.in"
 	source "package/python-xlwt/Config.in"
+	source "package/python-xmljson/Config.in"
 	source "package/python-xmltodict/Config.in"
 	source "package/python-xmodem/Config.in"
 	source "package/python-yarl/Config.in"
package/python-xmljson/Config.in new file +6 -0
new file mode 100644
index 0000000000..486f344361
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PYTHON_XMLJSON
+	bool "python-xmljson"
+	help
+	  Converts XML into JSON/Python dicts/arrays and vice-versa.
+
+	  https://github.com/sanand0/xmljson
package/python-xmljson/python-xmljson.hash new file +5 -0
new file mode 100644
index 0000000000..245a74a33e
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/xmljson/json
+md5  fc4df2390ad209928ee4311a3540cb17  xmljson-0.2.1.tar.gz
+sha256  b4158e66aa1e62ee39f7f80eb2fe4f767670ba3c0d5de9804420dc53427fdec8  xmljson-0.2.1.tar.gz
+# Locally computed sha256 checksums
+sha256  5ce42ba7d76e81428bdacef83658eb6213dbd1ad4a3b6d380bb6e0e8c73f0fb7  LICENSE
package/python-xmljson/python-xmljson.mk new file +14 -0
new file mode 100644
index 0000000000..913dce2670
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-xmljson
+#
+################################################################################
+
+PYTHON_XMLJSON_VERSION = 0.2.1
+PYTHON_XMLJSON_SOURCE = xmljson-$(PYTHON_XMLJSON_VERSION).tar.gz
+PYTHON_XMLJSON_SITE = https://files.pythonhosted.org/packages/e8/6f/d9f109ba19be510fd3098bcb72143c67ca6743cedb48ac75aef05ddfe960
+PYTHON_XMLJSON_SETUP_TYPE = setuptools
+PYTHON_XMLJSON_LICENSE = MIT
+PYTHON_XMLJSON_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/4] package/python-xmljson: new package

Quoted 3 lines · Adam Duskett

This package is a dependency for pyndiff

Applied to master, thanks.

Regards,
Arnout

Quoted 56 lines
---
  package/Config.in                          |  1 +
  package/python-xmljson/Config.in           |  6 ++++++
  package/python-xmljson/python-xmljson.hash |  5 +++++
  package/python-xmljson/python-xmljson.mk   | 14 ++++++++++++++
  4 files changed, 26 insertions(+)

create mode 100644 package/python-xmljson/Config.in create mode 100644 package/python-xmljson/python-xmljson.hash create mode 100644 package/python-xmljson/python-xmljson.mk

package/Config.in +1 -0
index ba1ee4005c..09e9665f48 100644
@@ -1276,6 +1276,7 @@ menu "External python modules"
  	source "package/python-xlsxwriter/Config.in"
  	source "package/python-xlutils/Config.in"
  	source "package/python-xlwt/Config.in"
+	source "package/python-xmljson/Config.in"
  	source "package/python-xmltodict/Config.in"
  	source "package/python-xmodem/Config.in"
  	source "package/python-yarl/Config.in"
package/python-xmljson/Config.in new file +6 -0
new file mode 100644
index 0000000000..486f344361
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PYTHON_XMLJSON
+	bool "python-xmljson"
+	help
+	  Converts XML into JSON/Python dicts/arrays and vice-versa.
+
+	  https://github.com/sanand0/xmljson
package/python-xmljson/python-xmljson.hash new file +5 -0
new file mode 100644
index 0000000000..245a74a33e
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/xmljson/json
+md5  fc4df2390ad209928ee4311a3540cb17  xmljson-0.2.1.tar.gz
+sha256  b4158e66aa1e62ee39f7f80eb2fe4f767670ba3c0d5de9804420dc53427fdec8  xmljson-0.2.1.tar.gz
+# Locally computed sha256 checksums
+sha256  5ce42ba7d76e81428bdacef83658eb6213dbd1ad4a3b6d380bb6e0e8c73f0fb7  LICENSE
package/python-xmljson/python-xmljson.mk new file +4 -0
new file mode 100644
index 0000000000..913dce2670
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-xmljson
+#

package/python-xmljson/python-xmljson.mk line 14

Quoted 10 lines
package/python-xmljson/python-xmljson.mk new file +10 -0
+################################################################################
+
+PYTHON_XMLJSON_VERSION = 0.2.1
+PYTHON_XMLJSON_SOURCE = xmljson-$(PYTHON_XMLJSON_VERSION).tar.gz
+PYTHON_XMLJSON_SITE = https://files.pythonhosted.org/packages/e8/6f/d9f109ba19be510fd3098bcb72143c67ca6743cedb48ac75aef05ddfe960
+PYTHON_XMLJSON_SETUP_TYPE = setuptools
+PYTHON_XMLJSON_LICENSE = MIT
+PYTHON_XMLJSON_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

PATCH 3/4 package/python-pyndiff: new package, drop nmap ndiff option

In reply to Adam Duskett

The ndiff package provided by Nmap relies on python2; moreover, there have been pending pull requests to move ndiff to python3 for over two years with very little engagement by the maintainers (https://github.com/nmap/nmap/pull/1807).

Remove the option to select ndiff altogether, and introduce a new package:
python-pyndiff, which provides the same functionality (and more) as the ndiff provided by nmap, and is compatible with python3.

---
 Config.in.legacy                           |  8 ++++++++
 package/Config.in                          |  1 +
 package/nmap/Config.in                     | 12 +-----------
 package/nmap/nmap.mk                       |  9 ---------
 package/python-pyndiff/Config.in           |  9 +++++++++
 package/python-pyndiff/python-pyndiff.hash |  5 +++++
 package/python-pyndiff/python-pyndiff.mk   | 14 ++++++++++++++
 7 files changed, 38 insertions(+), 20 deletions(-)
 create mode 100644 package/python-pyndiff/Config.in
 create mode 100644 package/python-pyndiff/python-pyndiff.hash
 create mode 100644 package/python-pyndiff/python-pyndiff.mk
Config.in.legacy +8 -0
index 3ec48edb87..a4b5c88dea 100644
@@ -146,6 +146,14 @@ endif
 
 comment "Legacy options removed in 2021.11"
 
+config BR2_PACKAGE_NMAP_NDIFF
+	bool "The ndiff utility has been removed."
+	select BR2_LEGACY
+	help
+	  The ndiff utility provided by nmap requires python2 which is
+	  deprecated. The same functionality is provided by the python
+	  package pyndiff.
+
 config BR2_GDB_VERSION_8_3
 	bool "gdb version 8.3.x removed"
 	select BR2_LEGACY
package/Config.in +1 -0
index 09e9665f48..fe5c8d43b5 100644
@@ -1150,6 +1150,7 @@ menu "External python modules"
 	source "package/python-pymupdf/Config.in"
 	source "package/python-pymysql/Config.in"
 	source "package/python-pynacl/Config.in"
+	source "package/python-pyndiff/Config.in"
 	source "package/python-pyopenssl/Config.in"
 	source "package/python-pyparsing/Config.in"
 	source "package/python-pyparted/Config.in"
package/nmap/Config.in +1 -11
index 51dd3423ea..fc6312d0fc 100644
@@ -6,7 +6,7 @@ config BR2_PACKAGE_NMAP
 	select BR2_PACKAGE_LIBLINEAR
 	select BR2_PACKAGE_LIBPCAP
 	select BR2_PACKAGE_NMAP_NMAP \
-	       if !BR2_PACKAGE_NMAP_NCAT && !BR2_PACKAGE_NMAP_NPING && !BR2_PACKAGE_NMAP_NDIFF
+	       if !BR2_PACKAGE_NMAP_NCAT && !BR2_PACKAGE_NMAP_NPING
 	help
 	  Nmap ("Network Mapper") is a free and open source (license)
 	  utility for network discovery and security auditing.
@@ -32,16 +32,6 @@ comment "a symlink from ncat to 'nc' will be installed"
 	depends on !BR2_PACKAGE_NETCAT
 	depends on !BR2_PACKAGE_NETCAT_OPENBSD
 
-config BR2_PACKAGE_NMAP_NDIFF
-	bool "install ndiff"
-	# ndiff only works with python2.x
-	depends on BR2_PACKAGE_PYTHON
-	help
-	  This option installs the 'ndiff' tool.
-
-comment "ndiff needs Python 2.x"
-	depends on !BR2_PACKAGE_PYTHON
-
 config BR2_PACKAGE_NMAP_NMAP
 	bool "install nmap"
 	select BR2_PACKAGE_PCRE
package/nmap/nmap.mk +0 -9
index f3994e9b38..f22a2295b1 100644
@@ -61,15 +61,6 @@ else
 NMAP_CONF_OPTS += --without-ncat
 endif
 
-ifeq ($(BR2_PACKAGE_NMAP_NDIFF),y)
-NMAP_DEPENDENCIES += python
-NMAP_CONF_OPTS += --with-ndiff
-NMAP_MAKE_OPTS += build-ndiff
-NMAP_INSTALL_TARGET_OPTS += install-ndiff
-else
-NMAP_CONF_OPTS += --without-ndiff
-endif
-
 ifeq ($(BR2_PACKAGE_NMAP_NMAP),y)
 NMAP_DEPENDENCIES += pcre
 NMAP_CONF_OPTS += --with-libpcre="$(STAGING_DIR)/usr"
package/python-pyndiff/Config.in new file +9 -0
new file mode 100644
index 0000000000..58ca35ba97
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PYTHON_PYNDIFF
+	bool "python-pyndiff"
+	select BR2_PACKAGE_PYTHON_XMLJSON # runtime
+	select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime
+	help
+	  Generate human-readable ndiff output when comparing 2 Nmap
+	  XML scan files.
+
+	  https://github.com/rackerlabs/pyndiff
package/python-pyndiff/python-pyndiff.hash new file +5 -0
new file mode 100644
index 0000000000..0afecfb6e2
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/pyndiff/json
+md5  32a9f994509cb883bbfeb563171f2668  pyndiff-1.0.2.tar.gz
+sha256  8a519b18a7bbb315c043d4543719ce9fb6db8098bfcdd04cb8054b276cc91368  pyndiff-1.0.2.tar.gz
+# Locally computed sha256 checksums
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
package/python-pyndiff/python-pyndiff.mk new file +14 -0
new file mode 100644
index 0000000000..e25374956c
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-pyndiff
+#
+################################################################################
+
+PYTHON_PYNDIFF_VERSION = 1.0.2
+PYTHON_PYNDIFF_SOURCE = pyndiff-$(PYTHON_PYNDIFF_VERSION).tar.gz
+PYTHON_PYNDIFF_SITE = https://files.pythonhosted.org/packages/83/3b/fb13918710c4fba40367140f22e3449998f4f66869a7564d0e547ad99ef8
+PYTHON_PYNDIFF_SETUP_TYPE = setuptools
+PYTHON_PYNDIFF_LICENSE = Apache-2.0
+PYTHON_PYNDIFF_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Re: [Buildroot] [PATCH 3/4] package/python-pyndiff: new package, drop nmap ndiff option

Quoted 9 lines · Adam Duskett

The ndiff package provided by Nmap relies on python2; moreover, there have been pending pull requests to move ndiff to python3 for over two years with very little engagement by the maintainers (https://github.com/nmap/nmap/pull/1807).

Remove the option to select ndiff altogether, and introduce a new package:
python-pyndiff, which provides the same functionality (and more) as the ndiff provided by nmap, and is compatible with python3.

I split this into two separate patches.

Quoted 18 lines
---
  Config.in.legacy                           |  8 ++++++++
  package/Config.in                          |  1 +
  package/nmap/Config.in                     | 12 +-----------
  package/nmap/nmap.mk                       |  9 ---------
  package/python-pyndiff/Config.in           |  9 +++++++++
  package/python-pyndiff/python-pyndiff.hash |  5 +++++
  package/python-pyndiff/python-pyndiff.mk   | 14 ++++++++++++++
  7 files changed, 38 insertions(+), 20 deletions(-)

create mode 100644 package/python-pyndiff/Config.in create mode 100644 package/python-pyndiff/python-pyndiff.hash create mode 100644 package/python-pyndiff/python-pyndiff.mk

Config.in.legacy +0 -0
index 3ec48edb87..a4b5c88dea 100644

Config.in.legacy endif · line 151

Quoted 6 lines
Config.in.legacy +3 -0
@@ -146,6 +146,14 @@ endif
 
  comment "Legacy options removed in 2021.11"
 
+config BR2_PACKAGE_NMAP_NDIFF
+	bool "The ndiff utility has been removed."
+	select BR2_LEGACY

I also added a select of python-pyndiff here.

Applied to master, thanks.

Regards,
Arnout

Quoted 107 lines
Config.in.legacy +5 -0
+	help
+	  The ndiff utility provided by nmap requires python2 which is
+	  deprecated. The same functionality is provided by the python
+	  package pyndiff.
+
  config BR2_GDB_VERSION_8_3
  	bool "gdb version 8.3.x removed"
  	select BR2_LEGACY
package/Config.in +1 -0
index 09e9665f48..fe5c8d43b5 100644
@@ -1150,6 +1150,7 @@ menu "External python modules"
  	source "package/python-pymupdf/Config.in"
  	source "package/python-pymysql/Config.in"
  	source "package/python-pynacl/Config.in"
+	source "package/python-pyndiff/Config.in"
  	source "package/python-pyopenssl/Config.in"
  	source "package/python-pyparsing/Config.in"
  	source "package/python-pyparted/Config.in"
package/nmap/Config.in +1 -11
index 51dd3423ea..fc6312d0fc 100644
@@ -6,7 +6,7 @@ config BR2_PACKAGE_NMAP
  	select BR2_PACKAGE_LIBLINEAR
  	select BR2_PACKAGE_LIBPCAP
  	select BR2_PACKAGE_NMAP_NMAP \
-	       if !BR2_PACKAGE_NMAP_NCAT && !BR2_PACKAGE_NMAP_NPING && !BR2_PACKAGE_NMAP_NDIFF
+	       if !BR2_PACKAGE_NMAP_NCAT && !BR2_PACKAGE_NMAP_NPING
  	help
  	  Nmap ("Network Mapper") is a free and open source (license)
  	  utility for network discovery and security auditing.
@@ -32,16 +32,6 @@ comment "a symlink from ncat to 'nc' will be installed"
  	depends on !BR2_PACKAGE_NETCAT
  	depends on !BR2_PACKAGE_NETCAT_OPENBSD
 
-config BR2_PACKAGE_NMAP_NDIFF
-	bool "install ndiff"
-	# ndiff only works with python2.x
-	depends on BR2_PACKAGE_PYTHON
-	help
-	  This option installs the 'ndiff' tool.
-
-comment "ndiff needs Python 2.x"
-	depends on !BR2_PACKAGE_PYTHON
-
  config BR2_PACKAGE_NMAP_NMAP
  	bool "install nmap"
  	select BR2_PACKAGE_PCRE
package/nmap/nmap.mk +0 -9
index f3994e9b38..f22a2295b1 100644
@@ -61,15 +61,6 @@ else
  NMAP_CONF_OPTS += --without-ncat
  endif
 
-ifeq ($(BR2_PACKAGE_NMAP_NDIFF),y)
-NMAP_DEPENDENCIES += python
-NMAP_CONF_OPTS += --with-ndiff
-NMAP_MAKE_OPTS += build-ndiff
-NMAP_INSTALL_TARGET_OPTS += install-ndiff
-else
-NMAP_CONF_OPTS += --without-ndiff
-endif
-
  ifeq ($(BR2_PACKAGE_NMAP_NMAP),y)
  NMAP_DEPENDENCIES += pcre
  NMAP_CONF_OPTS += --with-libpcre="$(STAGING_DIR)/usr"
package/python-pyndiff/Config.in new file +9 -0
new file mode 100644
index 0000000000..58ca35ba97
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PYTHON_PYNDIFF
+	bool "python-pyndiff"
+	select BR2_PACKAGE_PYTHON_XMLJSON # runtime
+	select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime
+	help
+	  Generate human-readable ndiff output when comparing 2 Nmap
+	  XML scan files.
+
+	  https://github.com/rackerlabs/pyndiff
package/python-pyndiff/python-pyndiff.hash new file +5 -0
new file mode 100644
index 0000000000..0afecfb6e2
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/pyndiff/json
+md5  32a9f994509cb883bbfeb563171f2668  pyndiff-1.0.2.tar.gz
+sha256  8a519b18a7bbb315c043d4543719ce9fb6db8098bfcdd04cb8054b276cc91368  pyndiff-1.0.2.tar.gz
+# Locally computed sha256 checksums
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
package/python-pyndiff/python-pyndiff.mk new file +4 -0
new file mode 100644
index 0000000000..e25374956c
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-pyndiff
+#

package/python-pyndiff/python-pyndiff.mk line 14

Quoted 10 lines
package/python-pyndiff/python-pyndiff.mk new file +10 -0
+################################################################################
+
+PYTHON_PYNDIFF_VERSION = 1.0.2
+PYTHON_PYNDIFF_SOURCE = pyndiff-$(PYTHON_PYNDIFF_VERSION).tar.gz
+PYTHON_PYNDIFF_SITE = https://files.pythonhosted.org/packages/83/3b/fb13918710c4fba40367140f22e3449998f4f66869a7564d0e547ad99ef8
+PYTHON_PYNDIFF_SETUP_TYPE = setuptools
+PYTHON_PYNDIFF_LICENSE = Apache-2.0
+PYTHON_PYNDIFF_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw

PATCH 4/4 support/testing/tests/package/test_python_pyndiff: new test

In reply to Adam Duskett

A simple test that runs nmap twice to create the files scanme-1.xml and scanme2.xml, then runs pyndiff on both files.

---
 .../tests/package/test_python_pyndiff.py      | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 support/testing/tests/package/test_python_pyndiff.py
support/testing/tests/package/test_python_pyndiff.py new file +29 -0
new file mode 100644
index 0000000000..86d6c38f8f
@@ -0,0 +1,29 @@
+import os
+import infra.basetest
+
+
+class TestPyNdiff(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        """
+        BR2_PACKAGE_NMAP=y
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_PYNDIFF=y
+        BR2_TARGET_ROOTFS_CPIO=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        """
+
+    def test_run(self):
+        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+        self.emulator.boot(arch="armv5",
+                           kernel="builtin",
+                           options=["-initrd", cpio_file])
+        self.emulator.login()
+
+        cmd = "nmap -F 127.0.0.1 -oX scanme-1.xml"
+        self.assertRunOk(cmd)
+
+        cmd = "nmap -F 127.0.0.1 -oX scanme-2.xml"
+        self.assertRunOk(cmd)
+
+        cmd = "pyndiff -f1 scanme-1.xml -f2 scanme-2.xml -t txt"
+        self.assertRunOk(cmd)
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

Re: [Buildroot] [PATCH 4/4] support/testing/tests/package/test_python_pyndiff: new test

Quoted 2 lines · Adam Duskett

A simple test that runs nmap twice to create the files scanme-1.xml and scanme2.xml, then runs pyndiff on both files.

Nice approach!

Applied to master, thanks.

Regards,
Arnout

Quoted 33 lines
---
  .../tests/package/test_python_pyndiff.py      | 29 +++++++++++++++++++
  1 file changed, 29 insertions(+)

create mode 100644 support/testing/tests/package/test_python_pyndiff.py

support/testing/tests/package/test_python_pyndiff.py new file +19 -0
new file mode 100644
index 0000000000..86d6c38f8f
@@ -0,0 +1,29 @@
+import os
+import infra.basetest
+
+
+class TestPyNdiff(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        """
+        BR2_PACKAGE_NMAP=y
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_PYNDIFF=y
+        BR2_TARGET_ROOTFS_CPIO=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        """
+
+    def test_run(self):
+        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+        self.emulator.boot(arch="armv5",
+                           kernel="builtin",
+                           options=["-initrd", cpio_file])

support/testing/tests/package/test_python_pyndiff.py line 29

Quoted 10 lines
support/testing/tests/package/test_python_pyndiff.py new file +10 -0
+        self.emulator.login()
+
+        cmd = "nmap -F 127.0.0.1 -oX scanme-1.xml"
+        self.assertRunOk(cmd)
+
+        cmd = "nmap -F 127.0.0.1 -oX scanme-2.xml"
+        self.assertRunOk(cmd)
+
+        cmd = "pyndiff -f1 scanme-1.xml -f2 scanme-2.xml -t txt"
+        self.assertRunOk(cmd)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#7 lore raw
In reply to Adam Duskett
Quoted 5 lines · Adam Duskett

In addition:
- Remove upstream patch
- Update license hash to reflect license version bump from 0.92 to 0.93

Applied to master, thanks.

Regards,
Arnout

Quoted 62 lines
---
  package/nmap/0002-ncat-unix-socket.patch | 30 ------------------------
  package/nmap/nmap.hash                   |  6 ++---
  package/nmap/nmap.mk                     |  2 +-
  3 files changed, 4 insertions(+), 34 deletions(-)

delete mode 100644 package/nmap/0002-ncat-unix-socket.patch

package/nmap/0002-ncat-unix-socket.patch deleted +0 -30
deleted file mode 100644
index b6484ebeea..0000000000
@@ -1,30 +0,0 @@
-ChangeLog:
-
-o [Ncat][GH#2154] Ncat no longer crashes when used with Unix domain sockets.
-
-Backported from: r38121
-
-Signed-off-by: Alexey Neyman <[email protected]>
-
-Index: ncat/ncat_main.c
-===================================================================
---- a/ncat/ncat_main.c	(revision 38120)
-+++ b/ncat/ncat_main.c	(revision 38121)
-@@ -846,7 +846,7 @@
-             targetaddrs->addr.un.sun_family = AF_UNIX;
-             strncpy(targetaddrs->addr.un.sun_path, argv[optind], sizeof(targetaddrs->addr.un.sun_path));
-             targetaddrs->addrlen = SUN_LEN(&targetaddrs->addr.un);
--            o.target = argv[optind];
-+            o.sslservername = o.target = argv[optind];
-             optind++;
-         } else
- #endif
-@@ -865,7 +865,7 @@
-                 targetaddrs->addr.vm.svm_cid = long_cid;
-
-                 targetaddrs->addrlen = sizeof(targetaddrs->addr.vm);
--                o.target = argv[optind];
-+                o.sslservername = o.target = argv[optind];
-                 optind++;
-             }
-         } else
package/nmap/nmap.hash +3 -3
index 8f69bbf613..dc379f30d4 100644
@@ -1,5 +1,5 @@
-# From https://nmap.org/dist/sigs/nmap-7.91.tar.bz2.digest.txt (lowercase)
-sha256  18cc4b5070511c51eb243cdd2b0b30ff9b2c4dc4544c6312f75ce3a67a593300  nmap-7.91.tar.bz2
+# From https://nmap.org/dist/sigs/nmap-7.92.tar.bz2.digest.txt (lowercase)
+sha256  a5479f2f8a6b0b2516767d2f7189c386c1dc858d997167d7ec5cfc798c7571a1  nmap-7.92.tar.bz2
 
  # Locally calculated
-sha256  8254a9bc733f3312c6dcfe0d5a129c29e96ecb8b33408c652a8c7beb2e25b471  LICENSE
+sha256  133794301a764dfe8a60e38601e56657b7113e0337b452189725bbbed58baea0  LICENSE
package/nmap/nmap.mk +0 -0
index 34cf61ff0b..f3994e9b38 100644

package/nmap/nmap.mk line 10

Quoted 8 lines
package/nmap/nmap.mk +1 -1
@@ -4,7 +4,7 @@
  #
  ################################################################################
 
-NMAP_VERSION = 7.91
+NMAP_VERSION = 7.92
  NMAP_SITE = https://nmap.org/dist
  NMAP_SOURCE = nmap-$(NMAP_VERSION).tar.bz2
  NMAP_DEPENDENCIES = liblinear libpcap

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot