diff options
Diffstat (limited to 'net-analyzer/zmap')
-rw-r--r-- | net-analyzer/zmap/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/zmap/files/zmap-2.1.1-always-install-config.patch | 20 | ||||
-rw-r--r-- | net-analyzer/zmap/files/zmap-2.1.1-json-c.patch | 31 | ||||
-rw-r--r-- | net-analyzer/zmap/metadata.xml | 5 | ||||
-rw-r--r-- | net-analyzer/zmap/zmap-2.1.1-r5.ebuild (renamed from net-analyzer/zmap/zmap-2.1.1-r4.ebuild) | 30 | ||||
-rw-r--r-- | net-analyzer/zmap/zmap-4.1.1.ebuild | 49 | ||||
-rw-r--r-- | net-analyzer/zmap/zmap-9999.ebuild | 23 |
7 files changed, 137 insertions, 22 deletions
diff --git a/net-analyzer/zmap/Manifest b/net-analyzer/zmap/Manifest index c31ac5b49776..0706d5d7fd6b 100644 --- a/net-analyzer/zmap/Manifest +++ b/net-analyzer/zmap/Manifest @@ -1 +1,2 @@ DIST zmap-2.1.1.tar.gz 131689 BLAKE2B c4bcea835b080dca879c227691230ad135d1822db0b81245ea60963b0a78ac71fd64df7ddca5d5a762c3d7dc67f2d689fd9d0d13e0ee9be21033de75c61ebd1f SHA512 9d62dceff77fa20ff5945516b0766340366175947130bb844f19c11dac7676e658bcdedd6be29ffc945706aa3cdc0e4ac207bd127b618592769a4d3e75892857 +DIST zmap-4.1.1.tar.gz 202697 BLAKE2B 35bc21e4d4c4c452deb2e34ac837ee4ae728b3adf97aefb5b88f55dde719bd78787b8a2826a89eaff92170b3eb2e5003194e3dc636616a845efef82bea663114 SHA512 eff32c9bda7b28a48fce85e3acb598c6adc8dc952ffec21cd4d581462e481a3cf61a6285a71c16741d8e9deedf7c8e3b71d4f375a931244b96acc8779c225929 diff --git a/net-analyzer/zmap/files/zmap-2.1.1-always-install-config.patch b/net-analyzer/zmap/files/zmap-2.1.1-always-install-config.patch new file mode 100644 index 000000000000..b3a8f9003dc5 --- /dev/null +++ b/net-analyzer/zmap/files/zmap-2.1.1-always-install-config.patch @@ -0,0 +1,20 @@ +We always want to install configs as the host machine may be different from +the one where zmap is installed to. Plus we have CONFIG_PROTECT in Gentoo +for protecting the user's existing configuration. + +Bug: https://bugs.gentoo.org/885707 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -135,11 +135,7 @@ message(STATUS "Default ZMap configuration file location is /etc/zmap") + foreach(EACH_CONF ${CONF_FILES}) + get_filename_component(CONF_BASENAME ${EACH_CONF} NAME) + message(STATUS "Checking if ${CONF_BASENAME} exists there...") +- if(NOT EXISTS "/etc/zmap/${CONF_BASENAME}") +- install(FILES ${EACH_CONF} DESTINATION ${CONFIG_DESTINATION}) +- else() +- message(WARNING "Existing configuration file detected at /etc/zmap/${CONF_BASENAME}, ${CONF_BASENAME} from sources will NOT be installed. Please check and install manually!") +- endif() ++ install(FILES ${EACH_CONF} DESTINATION ${CONFIG_DESTINATION}) + endforeach() + + # Allow Debian Packaging diff --git a/net-analyzer/zmap/files/zmap-2.1.1-json-c.patch b/net-analyzer/zmap/files/zmap-2.1.1-json-c.patch new file mode 100644 index 000000000000..78a80b801218 --- /dev/null +++ b/net-analyzer/zmap/files/zmap-2.1.1-json-c.patch @@ -0,0 +1,31 @@ +From 5473b6a907ff47e813e8ac3509a0f63d1253023b Mon Sep 17 00:00:00 2001 +From: Martin Milata <martin@martinmilata.cz> +Date: Wed, 1 Jul 2020 16:47:18 +0200 +Subject: [PATCH] Fix build against json-c-0.14 (#609) + +The new pkgconfig file contains two include directories: + + Cflags: -I${includedir} -I${includedir}/json-c + +Apparently pkg_check_modules returns them as a semicolon-separated +string ("CMake list"), which causes the build to fail when appended +directly to CMAKE_C_FLAGS. + +Origin: backport, https://github.com/zmap/zmap/commit/5473b6a907ff47e813e8ac3509a0f63d1253023b +Applied-Upstream: 3.0 +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +Index: zmap-2.1.1/CMakeLists.txt +=================================================================== +--- zmap-2.1.1.orig/CMakeLists.txt 2024-01-23 15:29:55.436869754 -0500 ++++ zmap-2.1.1/CMakeLists.txt 2024-01-23 15:30:32.505023070 -0500 +@@ -72,6 +72,7 @@ + endif() + + add_definitions("-DJSON") ++ string(REPLACE ";" " " JSON_CFLAGS "${JSON_CFLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${JSON_CFLAGS}") + endif() + diff --git a/net-analyzer/zmap/metadata.xml b/net-analyzer/zmap/metadata.xml index 378248ac6c65..741c091de292 100644 --- a/net-analyzer/zmap/metadata.xml +++ b/net-analyzer/zmap/metadata.xml @@ -1,10 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>jsmolic@gentoo.org</email> - <name>Jakov Smolić</name> - </maintainer> + <!-- maintainer-needed --> <longdescription> ZMap is an open-source network scanner that enables researchers to easily perform Internet-wide network studies. With a single machine and a well diff --git a/net-analyzer/zmap/zmap-2.1.1-r4.ebuild b/net-analyzer/zmap/zmap-2.1.1-r5.ebuild index 6b1d7f0b8261..2a7eb5b56829 100644 --- a/net-analyzer/zmap/zmap-2.1.1-r4.ebuild +++ b/net-analyzer/zmap/zmap-2.1.1-r5.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit cmake fcaps @@ -14,18 +14,29 @@ SLOT="0" KEYWORDS="amd64 arm ~arm64 x86" IUSE="mongo redis" -RDEPEND="dev-libs/gmp:= +RDEPEND=" + dev-libs/gmp:= net-libs/libpcap dev-libs/json-c:= mongo? ( dev-db/mongodb dev-libs/mongo-c-driver ) - redis? ( dev-libs/hiredis:= )" -DEPEND="${RDEPEND} + redis? ( dev-libs/hiredis:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" dev-util/gengetopt - sys-devel/flex - dev-util/byacc" + app-alternatives/lex + dev-util/byacc +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.1.1-always-install-config.patch + "${FILESDIR}"/${PN}-2.1.1-json-c.patch +) + +FILECAPS=( cap_net_raw=ep usr/sbin/zmap ) src_prepare() { sed \ @@ -40,8 +51,7 @@ src_configure() { -DWITH_WERROR=OFF -DWITH_MONGO="$(usex mongo)" -DWITH_REDIS="$(usex redis)" - ) + ) + cmake_src_configure } - -FILECAPS=( cap_net_raw=ep usr/sbin/zmap ) diff --git a/net-analyzer/zmap/zmap-4.1.1.ebuild b/net-analyzer/zmap/zmap-4.1.1.ebuild new file mode 100644 index 000000000000..2ffbd683d165 --- /dev/null +++ b/net-analyzer/zmap/zmap-4.1.1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake fcaps + +DESCRIPTION="Fast network scanner designed for Internet-wide network surveys" +HOMEPAGE="https://zmap.io/" +SRC_URI="https://github.com/zmap/zmap/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="mongo redis" + +RDEPEND=" + dev-libs/gmp:= + dev-libs/judy + dev-util/gengetopt + net-libs/libpcap + dev-libs/json-c:= + redis? ( dev-libs/hiredis:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-alternatives/lex + dev-util/gengetopt + dev-util/byacc + virtual/pkgconfig +" + +FILECAPS=( cap_net_raw=ep usr/sbin/zmap ) + +src_prepare() { + sed \ + -e '/ggo/s:CMAKE_CURRENT_SOURCE_DIR}:CMAKE_BINARY_DIR}/src:g' \ + -i src/CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_DEVELOPMENT=OFF + -DWITH_WERROR=OFF + ) + + cmake_src_configure +} diff --git a/net-analyzer/zmap/zmap-9999.ebuild b/net-analyzer/zmap/zmap-9999.ebuild index 6a7cb8480b94..5d5794b8f52a 100644 --- a/net-analyzer/zmap/zmap-9999.ebuild +++ b/net-analyzer/zmap/zmap-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit cmake fcaps git-r3 @@ -17,20 +17,27 @@ RDEPEND=" dev-libs/gmp:= net-libs/libpcap dev-libs/json-c:= - redis? ( dev-libs/hiredis:= )" -DEPEND="${RDEPEND} + redis? ( dev-libs/hiredis:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" dev-util/gengetopt - sys-devel/flex + app-alternatives/lex dev-util/byacc " +PATCHES=( + "${FILESDIR}"/${PN}-2.1.1-always-install-config.patch +) + +FILECAPS=( cap_net_raw=ep usr/sbin/zmap ) + src_configure() { local mycmakeargs=( -DENABLE_DEVELOPMENT=OFF -DWITH_WERROR=OFF -DWITH_REDIS="$(usex redis)" - ) + ) + cmake_src_configure } - -FILECAPS=( cap_net_raw=ep usr/sbin/zmap ) |