[v2] nmap: Migrate to python3

Message ID 20210515215003.4133546-1-adolf.belka@ipfire.org
State Accepted
Commit 38b4dcd72913720686182f946120ee2bcb9988d2
Headers
Series [v2] nmap: Migrate to python3 |

Commit Message

Adolf Belka May 15, 2021, 9:50 p.m. UTC
  - Added PYTHON=python3 prior to configure. This then builds nmap with
   python3.
- ndiff is written as python2 only and currently no patches to make it
   work wih python3 have been accepted by the nmap team. It looks like ndiff
   will stay as it is for some time so ndiff will be removed from the nmap
   package install.
- Added --without-ndiff to configure so nmap is built without ndiff
- Updated rootfile

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/packages/nmap |  5 -----
 lfs/nmap                       | 14 ++++++++------
 2 files changed, 8 insertions(+), 11 deletions(-)
  

Patch

diff --git a/config/rootfiles/packages/nmap b/config/rootfiles/packages/nmap
index 028408ca0..7c6b0ee83 100644
--- a/config/rootfiles/packages/nmap
+++ b/config/rootfiles/packages/nmap
@@ -1,9 +1,5 @@ 
-usr/bin/ndiff
 usr/bin/nmap
 usr/bin/nping
-#usr/bin/uninstall_ndiff
-usr/lib/python2.7/site-packages/ndiff.py
-#usr/lib/python2.7/site-packages/ndiff.pyc
 #usr/share/man/de/man1/nmap.1
 #usr/share/man/es/man1/nmap.1
 #usr/share/man/fr/man1/nmap.1
@@ -15,7 +11,6 @@  usr/lib/python2.7/site-packages/ndiff.py
 #usr/share/man/hu/man1/nmap.1
 #usr/share/man/it/man1/nmap.1
 #usr/share/man/ja/man1/nmap.1
-#usr/share/man/man1/ndiff.1
 #usr/share/man/man1/nmap.1
 #usr/share/man/man1/nping.1
 #usr/share/man/pl
diff --git a/lfs/nmap b/lfs/nmap
index d0d4d3428..bd2ea9b03 100644
--- a/lfs/nmap
+++ b/lfs/nmap
@@ -32,7 +32,7 @@  DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = nmap
-PAK_VER    = 12
+PAK_VER    = 13
 
 DEPS       =
 
@@ -78,11 +78,13 @@  $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
 	$(UPDATE_AUTOMAKE)
-	cd $(DIR_APP) && ./configure \
-		--prefix=/usr \
-		--without-nmapfe \
-		--without-zenmap \
-		--without-ncat
+	cd $(DIR_APP) && PYTHON=python3 	\
+			./configure 		\
+			--prefix=/usr 		\
+			--without-nmapfe 	\
+			--without-zenmap 	\
+			--without-ncat		\
+			--without-ndiff
 	cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
 	cd $(DIR_APP) && make install
 	@rm -rf $(DIR_APP)