nmap: use git as source and bump to PCRE2 support commit

Use git as source and bump version to PCRE2 support commit.

Move nmap to PCRE2 library as PCRE is EOL and won't receive any security
update in the future.

Patch 001-Use-correct-HAVE_-macros-for-Lua-5.4.-Fixes-2648.patch has
been merged upstream and can be dropped.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2023-10-25 05:51:57 +02:00 committed by Josef Schlehofer
parent 2d94a4d2f0
commit 277d8e2e5c
2 changed files with 16 additions and 42 deletions

View File

@ -13,13 +13,22 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nmap
PKG_VERSION:=7.94
# PKG_VERSION:=7.94
PKG_RELEASE:=1
PKG_MAINTAINER:=Nuno Gonçalves <nunojpg@gmail.com>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://nmap.org/dist/
PKG_HASH:=d71be189eec43d7e099bac8571509d316c4577ca79491832ac3e1217bc8f92cc
# Restore PKG_VERSION and revert to using release as soon as NMAP publish a new
# version that supports PCRE2.
# PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
# PKG_SOURCE_URL:=https://nmap.org/dist/
# PKG_HASH:=d71be189eec43d7e099bac8571509d316c4577ca79491832ac3e1217bc8f92cc
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/nmap/nmap
PKG_SOURCE_DATE:=2023-08-28
PKG_SOURCE_VERSION:=7dcea0187a9b8bccd552487de91512c97c791e3d
PKG_MIRROR_HASH:=3a086013df4759f394c93a23254689fddd2dcbb06574d4898ea276bdabdf5bff
PKG_LICENSE:=NPSL-0.94-or-NPSL-0.95
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:nmap:nmap
@ -32,7 +41,7 @@ PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1
include $(INCLUDE_DIR)/package.mk
include ../../lang/python/python3-package.mk
NMAP_DEPENDS:=+libpcap +libstdcpp +zlib +libpcre
NMAP_DEPENDS:=+libpcap +libstdcpp +zlib +libpcre2
NCAT_DEPENDS:=+libpcap
NPING_DEPENDS:=+libpcap +libpthread +libstdcpp
SSL_DEPENDS:=+libopenssl +ca-certs
@ -60,7 +69,7 @@ endef
define Package/nmap-full
$(call Package/nmap/default)
DEPENDS:=$(NMAP_DEPENDS) +libopenssl +liblua5.4 +libssh2
DEPENDS:=$(NMAP_DEPENDS) $(SSL_DEPENDS) +liblua5.4 +libssh2
VARIANT:=full
TITLE:=Nmap (with OpenSSL and scripting support)
endef
@ -81,7 +90,7 @@ endef
define Package/ncat-full
$(call Package/nmap/default)
DEPENDS:=$(NCAT_DEPENDS) +libopenssl +liblua5.4
DEPENDS:=$(NCAT_DEPENDS) $(SSL_DEPENDS) +liblua5.4
VARIANT:=full
TITLE:=Ncat (with OpenSSL and scripting support)
endef

View File

@ -1,35 +0,0 @@
From b9263f056ab3acd666d25af84d399410560d48ac Mon Sep 17 00:00:00 2001
From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
Date: Tue, 30 May 2023 18:33:07 +0000
Subject: [PATCH] Use correct HAVE_ macros for Lua 5.4. Fixes #2648
---
ncat/config.h.in | 4 ++--
nmap_config.h.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--- a/ncat/config.h.in
+++ b/ncat/config.h.in
@@ -191,7 +191,7 @@
/* Defines for locating Lua */
#undef LUA_INCLUDED
-#undef HAVE_LUA5_3_LUA_H
-#undef HAVE_LUA_5_3_LUA_H
+#undef HAVE_LUA5_4_LUA_H
+#undef HAVE_LUA_5_4_LUA_H
#undef HAVE_LUA_H
#undef HAVE_LUA_LUA_H
--- a/nmap_config.h.in
+++ b/nmap_config.h.in
@@ -172,8 +172,8 @@ extern "C" int gethostname (char *, unsi
#undef HAVE_PCAP_SET_IMMEDIATE_MODE
/* Various possibilities for lua.h */
-#undef HAVE_LUA5_3_LUA_H
-#undef HAVE_LUA_5_3_LUA_H
+#undef HAVE_LUA5_4_LUA_H
+#undef HAVE_LUA_5_4_LUA_H
#undef HAVE_LUA_H
#undef HAVE_LUA_LUA_H