mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-27 16:41:11 +02:00
net-analyzer/nmap: Sync with Gentoo
It's from Gentoo commit 64620d3c640666e4e9a345d92babb5167b4e7692.
This commit is contained in:
parent
2d50ecbad9
commit
53cbe753c5
@ -2,3 +2,6 @@ DIST nmap-7.92.tar.bz2 10498200 BLAKE2B 0f3022e797ffca7d1d3497990c86bb60ac9a80bb
|
||||
DIST nmap-7.92.tar.bz2.asc 195 BLAKE2B a8052138e58cd8009341a5f3fb3a31f55af9383b9dbb6c7ce858d80541e000b17953c053e9a3a6d86a5551244cf13f181e6e3943095b86335cbb5dae96e20bdd SHA512 300a22ab097bbff67de354de6b22a8e3287f95dd6318fcabd546ba52158e9589b19ede175587c6e31518c47bc118c7dd05db43755def075d810b16945b65e05a
|
||||
DIST nmap-7.93.tar.bz2 10823114 BLAKE2B e9fa0fe0f219258ab29cf59a98f09142ce1e5e70395f6578d57e644d343ff95764a8208f2fd00a686a14217821adb038a1bb4cdf25f355696e68131773cc1995 SHA512 4ec9295e25bd7a215e718c3dbbf09bfe6339b60850f4a8d09b5ad0cbf41a0da8ece0168efc5ca91ba1ecbd83b1d31735d77dacd5f1ec1a9fd212454dd1f0f0fd
|
||||
DIST nmap-7.93.tar.bz2.asc 195 BLAKE2B 0c18200507c8c0901df6f0fa3230330eff72dd5e54f2d862d35a1df26b9ff3b189cebe0b91cdf47c4f87fef523cc6d9c3bcc36a42d8fcc8be7830fc861c64b5f SHA512 9bd8e436a6f7010ba2e3578affc4174fae12e2e7b78e523ceeb94ba44ccd928ac2cf5da52d02a00c4f190f71425671cc817b44a6a2f8d0b42b10d535bb1af3a9
|
||||
DIST nmap-7.94-patches.tar.xz 4112 BLAKE2B 0720242bf507f2a1502cf854592d94a57a33d5ac1e520c752e548092f91bbffeb0f6f762f4da27ff445419ff3845060242aa43aba53d0161ae2bebccf728cc97 SHA512 d47e2215e1923af65e3a392c3d990d650e68135f139013c311a26d12cfd0b27d9d5c3cbc27bb8583251a353a6284fb9d518373f17624db242be7060b8bfa0ba5
|
||||
DIST nmap-7.94.tar.bz2 11102195 BLAKE2B 5819b458b50e33f6a507ad3c32a731c13e730c40d31a61731c3cfcd41fad8e3fdfcbb721ef46b05a80e406d0a646d0966d4b645551711144822551ef374a443a SHA512 a55cddf9c1d9272243d01251eb3315b26f232d0596818857083222a385398618b428dc2bd8282c3e832527e135a74aeb020ca8609d83d8337342f5d8a04d7f2c
|
||||
DIST nmap-7.94.tar.bz2.asc 198 BLAKE2B 38a363499fe236f675238ecf015a7e597d66cdd84eef13bed4986b4081c4f1f7a288121e3666e0f31a9282fd84f30cbceb65341f1c173086c7421a8ea719afe9 SHA512 dcbaf88e9ead21f303a7ee5390de0d2bd67477c2628858dc3380b0ac7d73d4d1b330f3b303ff32b0cb9a22eaa37af535bd7aa622531451e404a8c9a256a98eec
|
||||
|
187
sdk_container/src/third_party/portage-stable/net-analyzer/nmap/nmap-7.94.ebuild
vendored
Normal file
187
sdk_container/src/third_party/portage-stable/net-analyzer/nmap/nmap-7.94.ebuild
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LUA_COMPAT=( lua5-4 )
|
||||
LUA_REQ_USE="deprecated"
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
PLOCALES="de es fr hi hr hu id it ja pl pt_BR pt_PR ro ru sk zh"
|
||||
PLOCALE_BACKUP="en"
|
||||
inherit autotools lua-single plocale python-single-r1 toolchain-funcs
|
||||
|
||||
DESCRIPTION="Network exploration tool and security / port scanner"
|
||||
HOMEPAGE="https://nmap.org/"
|
||||
if [[ ${PV} == *9999* ]] ; then
|
||||
inherit git-r3
|
||||
|
||||
EGIT_REPO_URI="https://github.com/nmap/nmap"
|
||||
|
||||
else
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/nmap.asc
|
||||
inherit verify-sig
|
||||
|
||||
SRC_URI="https://nmap.org/dist/${P}.tar.bz2"
|
||||
SRC_URI+=" verify-sig? ( https://nmap.org/dist/sigs/${P}.tar.bz2.asc )"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
fi
|
||||
|
||||
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-7.94-patches.tar.xz"
|
||||
|
||||
# https://github.com/nmap/nmap/issues/2199
|
||||
LICENSE="NPSL-0.95"
|
||||
SLOT="0"
|
||||
IUSE="ipv6 libssh2 ncat ndiff nping nls +nse ssl symlink zenmap"
|
||||
REQUIRED_USE="
|
||||
${PYTHON_REQUIRED_USE}
|
||||
nse? ( ${LUA_REQUIRED_USE} )
|
||||
symlink? ( ncat )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/liblinear:=
|
||||
dev-libs/libpcre
|
||||
net-libs/libpcap
|
||||
ndiff? ( ${PYTHON_DEPS} )
|
||||
libssh2? (
|
||||
net-libs/libssh2[zlib]
|
||||
sys-libs/zlib
|
||||
)
|
||||
nls? ( virtual/libintl )
|
||||
nse? (
|
||||
${LUA_DEPS}
|
||||
sys-libs/zlib
|
||||
)
|
||||
ssl? ( dev-libs/openssl:= )
|
||||
symlink? (
|
||||
ncat? (
|
||||
!net-analyzer/netcat
|
||||
!net-analyzer/openbsd-netcat
|
||||
)
|
||||
)
|
||||
zenmap? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pygobject:3[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
# Python is always needed at build time for some scripts
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
if [[ ${PV} != *9999* ]] ; then
|
||||
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-nmap )"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${WORKDIR}"/${PN}-7.94-patches
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
|
||||
use nse && lua-single_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git-r3_src_unpack
|
||||
elif use verify-sig ; then
|
||||
# Needed for downloaded patch (which is unsigned, which is fine)
|
||||
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.asc}
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Drop bundled libraries
|
||||
rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
|
||||
|
||||
cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
|
||||
|
||||
delete_disabled_locale() {
|
||||
# Force here as PLOCALES contains supported locales for man
|
||||
# pages and zenmap doesn't have all of those
|
||||
rm -rf zenmap/share/zenmap/locale/${1} || die
|
||||
rm -f zenmap/share/zenmap/locale/${1}.po || die
|
||||
}
|
||||
plocale_for_each_disabled_locale delete_disabled_locale
|
||||
|
||||
sed -i \
|
||||
-e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
|
||||
Makefile.in || die
|
||||
|
||||
cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
|
||||
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# We need the original for a Darwin-specific fix, bug #604432
|
||||
mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export ac_cv_path_PYTHON="${PYTHON}"
|
||||
export am_cv_pathless_PYTHON="${EPYTHON}"
|
||||
|
||||
local myeconfargs=(
|
||||
$(use_enable ipv6)
|
||||
$(use_enable nls)
|
||||
$(use_with libssh2)
|
||||
$(use_with ncat)
|
||||
$(use_with ndiff)
|
||||
$(use_with nping)
|
||||
$(use_with nse liblua)
|
||||
$(use_with ssl openssl)
|
||||
$(use_with zenmap)
|
||||
$(usex libssh2 --with-zlib)
|
||||
$(usex nse --with-zlib)
|
||||
--cache-file="${S}"/config.cache
|
||||
# The bundled libdnet is incompatible with the version available in the
|
||||
# tree, so we cannot use the system library here.
|
||||
--with-libdnet=included
|
||||
--with-pcre="${ESYSROOT}"/usr
|
||||
--without-dpdk
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local directory
|
||||
for directory in . libnetutil nsock/src $(usev ncat) $(usev nping) ; do
|
||||
emake -C "${directory}" makefile.dep
|
||||
done
|
||||
|
||||
emake \
|
||||
AR="$(tc-getAR)" \
|
||||
RANLIB="$(tc-getRANLIB)"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# See bug #831713 for return of -j1
|
||||
LC_ALL=C emake \
|
||||
-j1 \
|
||||
DESTDIR="${D}" \
|
||||
STRIP=: \
|
||||
nmapdatadir="${EPREFIX}"/usr/share/nmap \
|
||||
install
|
||||
|
||||
dodoc CHANGELOG HACKING docs/README docs/*.txt
|
||||
|
||||
if use ndiff || use zenmap ; then
|
||||
python_optimize
|
||||
fi
|
||||
|
||||
use symlink && dosym /usr/bin/ncat /usr/bin/nc
|
||||
}
|
@ -3,9 +3,9 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
LUA_COMPAT=( lua5-3 )
|
||||
LUA_COMPAT=( lua5-4 )
|
||||
LUA_REQ_USE="deprecated"
|
||||
PYTHON_COMPAT=( python3_{9..11} )
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
PLOCALES="de es fr hi hr hu id it ja pl pt_BR pt_PR ro ru sk zh"
|
||||
PLOCALE_BACKUP="en"
|
||||
inherit autotools lua-single plocale python-single-r1 toolchain-funcs
|
||||
@ -27,6 +27,8 @@ else
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
fi
|
||||
|
||||
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-7.94-patches.tar.xz"
|
||||
|
||||
# https://github.com/nmap/nmap/issues/2199
|
||||
LICENSE="NPSL-0.95"
|
||||
SLOT="0"
|
||||
@ -78,16 +80,7 @@ if [[ ${PV} != *9999* ]] ; then
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-5.10_beta1-string.patch
|
||||
"${FILESDIR}"/${PN}-5.21-python.patch
|
||||
"${FILESDIR}"/${PN}-6.46-uninstaller.patch
|
||||
"${FILESDIR}"/${PN}-6.25-liblua-ar.patch
|
||||
"${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
|
||||
"${FILESDIR}"/${PN}-7.25-libpcre.patch
|
||||
"${FILESDIR}"/${PN}-7.31-libnl.patch
|
||||
"${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch
|
||||
"${FILESDIR}"/${PN}-7.91-no-FORTIFY_SOURCE.patch
|
||||
"${FILESDIR}"/${PN}-9999-netutil-else.patch
|
||||
"${WORKDIR}"/${PN}-7.94-patches
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
@ -96,6 +89,17 @@ pkg_setup() {
|
||||
use nse && lua-single_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git-r3_src_unpack
|
||||
elif use verify-sig ; then
|
||||
# Needed for downloaded patch (which is unsigned, which is fine)
|
||||
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.asc}
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user