2004-09-09 09:17:24 +00:00
|
|
|
Name: nmap
|
2024-07-09 14:36:42 +00:00
|
|
|
Epoch: 4
|
|
|
|
Version: 7.92
|
2012-06-05 08:59:57 +00:00
|
|
|
#global prerelease TEST5
|
2024-07-09 13:56:08 +00:00
|
|
|
Release: %autorelease
|
2019-08-12 15:45:29 +00:00
|
|
|
Summary: Network exploration tool and security scanner
|
|
|
|
URL: http://nmap.org/
|
2024-07-09 14:36:42 +00:00
|
|
|
# https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/thread/Q67UGCHSCKCLJOVOHSLYU4AERAHBS5YE/
|
|
|
|
# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/543
|
|
|
|
License: LicenseRef-Nmap
|
2019-08-12 15:45:29 +00:00
|
|
|
|
2013-07-30 09:42:35 +00:00
|
|
|
Source0: http://nmap.org/dist/%{name}-%{version}%{?prerelease}.tar.bz2
|
2020-10-29 07:27:48 +00:00
|
|
|
Source1: https://nmap.org/dist/sigs/%{name}-%{version}.tar.bz2.asc
|
|
|
|
Source2: https://svn.nmap.org/nmap/docs/nmap_gpgkeys.txt
|
2008-12-15 10:39:25 +00:00
|
|
|
|
2021-01-10 19:44:47 +00:00
|
|
|
|
2008-12-15 10:39:25 +00:00
|
|
|
#prevent possible race condition for shtool, rhbz#158996
|
2008-01-07 13:50:33 +00:00
|
|
|
Patch1: nmap-4.03-mktemp.patch
|
2008-12-15 10:39:25 +00:00
|
|
|
|
|
|
|
#don't suggest to scan microsoft
|
2008-01-07 13:50:33 +00:00
|
|
|
Patch2: nmap-4.52-noms.patch
|
2008-12-15 10:39:25 +00:00
|
|
|
|
2012-08-13 10:21:44 +00:00
|
|
|
# upstream provided patch for rhbz#845005, not yet in upstream repository
|
2019-08-12 15:45:29 +00:00
|
|
|
Patch3: ncat_reg_stdin.diff
|
2024-07-09 14:36:42 +00:00
|
|
|
# TODO: review after GUI gets enabled again
|
|
|
|
#Patch4: nmap-6.25-displayerror.patch
|
2021-02-10 11:54:44 +00:00
|
|
|
# https://github.com/nmap/nmap/pull/2247
|
|
|
|
Patch7: nmap_resolve_config.patch
|
2023-11-17 01:57:46 +00:00
|
|
|
# backport of upstream pcre2 migration, rhbz#2128336
|
|
|
|
Patch8: nmap-pcre2.patch
|
2024-07-09 16:07:00 +00:00
|
|
|
# https://github.com/nmap/nmap/pull/2724
|
|
|
|
Patch9: nmap-ems-ssl-enum-ciphers.patch
|
2018-01-22 14:41:17 +00:00
|
|
|
|
2020-10-22 14:58:40 +00:00
|
|
|
|
2021-01-10 19:44:47 +00:00
|
|
|
BuildRequires: automake make
|
2019-08-12 15:45:29 +00:00
|
|
|
BuildRequires: autoconf
|
2018-02-19 11:05:25 +00:00
|
|
|
BuildRequires: gcc-c++
|
2019-08-12 15:45:29 +00:00
|
|
|
BuildRequires: gettext-devel
|
|
|
|
BuildRequires: libpcap-devel
|
2020-08-20 09:31:49 +00:00
|
|
|
%if 0%{?fedora}
|
2017-08-03 08:32:53 +00:00
|
|
|
BuildRequires: libssh2-devel
|
2020-08-20 09:31:49 +00:00
|
|
|
%endif
|
2019-08-12 15:45:29 +00:00
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: lua-devel
|
|
|
|
BuildRequires: openssl-devel
|
2023-11-17 01:57:46 +00:00
|
|
|
BuildRequires: pcre2-devel
|
2020-08-20 09:31:49 +00:00
|
|
|
BuildRequires: zlib-devel
|
2020-10-29 07:27:48 +00:00
|
|
|
BuildRequires: gnupg2
|
2019-08-12 15:45:29 +00:00
|
|
|
Requires: %{name}-ncat = %{epoch}:%{version}-%{release}
|
2004-09-09 09:17:24 +00:00
|
|
|
|
2024-07-09 14:36:42 +00:00
|
|
|
Obsoletes: nmap-frontend < 7.70-1
|
|
|
|
Obsoletes: nmap-ndiff < 7.70-1
|
2018-09-10 08:20:46 +00:00
|
|
|
|
2008-01-07 13:50:33 +00:00
|
|
|
%define pixmap_srcdir zenmap/share/pixmaps
|
|
|
|
|
2004-09-09 09:17:24 +00:00
|
|
|
%description
|
|
|
|
Nmap is a utility for network exploration or security auditing. It supports
|
|
|
|
ping scanning (determine which hosts are up), many port scanning techniques
|
|
|
|
(determine what services the hosts are offering), and TCP/IP fingerprinting
|
|
|
|
(remote host operating system identification). Nmap also offers flexible target
|
|
|
|
and port specification, decoy scanning, determination of TCP sequence
|
2011-03-28 08:08:06 +00:00
|
|
|
predictability characteristics, reverse-identd scanning, and more. In addition
|
|
|
|
to the classic command-line nmap executable, the Nmap suite includes a flexible
|
|
|
|
data transfer, redirection, and debugging tool (netcat utility ncat), a utility
|
2017-06-30 08:20:26 +00:00
|
|
|
for comparing scan results (ndiff), and a packet generation and response
|
|
|
|
analysis tool (nping).
|
2004-09-09 09:17:24 +00:00
|
|
|
|
2012-07-18 14:45:04 +00:00
|
|
|
%package ncat
|
|
|
|
Summary: Nmap's Netcat replacement
|
2021-03-07 17:04:34 +00:00
|
|
|
Requires(post): %{_sbindir}/alternatives
|
|
|
|
Requires(preun): %{_sbindir}/alternatives
|
2019-08-13 09:40:47 +00:00
|
|
|
Obsoletes: nc < 1.109.20120711-2
|
2017-06-30 07:52:16 +00:00
|
|
|
Obsoletes: nc6 < 1.00-22
|
2024-07-09 14:36:42 +00:00
|
|
|
Provides: nc = %{epoch}:%{version}-%{release}
|
|
|
|
Provides: nc6 = %{epoch}:%{version}-%{release}
|
|
|
|
Provides: ncat = %{epoch}:%{version}-%{release}
|
2017-06-30 07:52:16 +00:00
|
|
|
|
2012-07-18 14:45:04 +00:00
|
|
|
%description ncat
|
|
|
|
Ncat is a feature packed networking utility which will read and
|
|
|
|
write data across a network from the command line. It uses both
|
|
|
|
TCP and UDP for communication and is designed to be a reliable
|
|
|
|
back-end tool to instantly provide network connectivity to other
|
|
|
|
applications and users. Ncat will not only work with IPv4 and IPv6
|
|
|
|
but provides the user with a virtually limitless number of potential
|
|
|
|
uses.
|
|
|
|
|
2017-07-18 12:18:27 +00:00
|
|
|
|
2004-09-09 09:17:24 +00:00
|
|
|
%prep
|
2020-10-29 07:27:48 +00:00
|
|
|
%{gpgverify} --keyring=%{SOURCE2} --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
2019-08-12 15:45:29 +00:00
|
|
|
%autosetup -p1
|
2023-11-17 01:57:46 +00:00
|
|
|
autoconf -f
|
2008-01-07 13:50:33 +00:00
|
|
|
|
2024-07-09 14:36:42 +00:00
|
|
|
#TODO: stop using local copy of libdnet, once system distributed version
|
|
|
|
#supports sctp (grep sctp /usr/include/dnet.h)
|
2017-08-03 08:32:53 +00:00
|
|
|
#be sure we're not using tarballed copies of some libraries
|
|
|
|
#rm -rf liblua libpcap libpcre macosx mswin32 ###TODO###
|
2017-08-03 10:08:50 +00:00
|
|
|
|
2017-08-03 11:29:02 +00:00
|
|
|
rm -rf libpcap libpcre macosx mswin32 libssh2 libz
|
2017-08-03 08:32:53 +00:00
|
|
|
|
2004-09-09 09:17:24 +00:00
|
|
|
%build
|
2012-11-29 13:45:20 +00:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
|
|
|
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
2017-06-30 08:20:26 +00:00
|
|
|
### TODO ## configure --with-libpcap=/usr ###TODO###
|
2018-04-19 09:28:01 +00:00
|
|
|
%configure --with-libpcap=yes --with-liblua=included \
|
2019-08-12 15:45:29 +00:00
|
|
|
--without-zenmap --without-ndiff \
|
2020-08-20 09:31:49 +00:00
|
|
|
%if 0%{?fedora}
|
|
|
|
--with-libssh2=yes \
|
|
|
|
%else
|
|
|
|
--with-libssh2=no \
|
|
|
|
%endif
|
|
|
|
--enable-dbus
|
2019-08-12 15:45:29 +00:00
|
|
|
|
|
|
|
%make_build
|
2004-09-09 09:17:24 +00:00
|
|
|
|
2013-05-24 11:37:56 +00:00
|
|
|
#fix man page (rhbz#813734)
|
|
|
|
sed -i 's/-md/-mf/' nping/docs/nping.1
|
|
|
|
|
2004-09-09 09:17:24 +00:00
|
|
|
%install
|
2012-06-05 11:06:32 +00:00
|
|
|
#prevent stripping - replace strip command with 'true'
|
2017-08-03 08:32:53 +00:00
|
|
|
make DESTDIR=%{buildroot} STRIP=true install
|
2008-12-15 10:39:25 +00:00
|
|
|
|
2011-12-08 11:05:52 +00:00
|
|
|
#do not include certificate bundle (#734389)
|
2017-08-03 08:32:53 +00:00
|
|
|
rm -f %{buildroot}%{_datadir}/ncat/ca-bundle.crt
|
|
|
|
rmdir %{buildroot}%{_datadir}/ncat
|
2011-12-08 11:05:52 +00:00
|
|
|
|
2021-03-07 17:04:34 +00:00
|
|
|
#we provide 'nc' replacement (#1653119)
|
|
|
|
touch %{buildroot}%{_mandir}/man1/nc.1.gz
|
|
|
|
touch %{buildroot}%{_bindir}/nc
|
2018-04-19 09:28:01 +00:00
|
|
|
|
2010-04-30 11:26:48 +00:00
|
|
|
%find_lang nmap --with-man
|
2004-09-09 09:18:32 +00:00
|
|
|
|
2021-03-07 17:04:34 +00:00
|
|
|
%post ncat
|
|
|
|
%{_sbindir}/alternatives --install %{_bindir}/nc nc %{_bindir}/ncat 10 \
|
|
|
|
--slave %{_mandir}/man1/nc.1.gz nc-man %{_mandir}/man1/ncat.1.gz
|
|
|
|
|
|
|
|
%preun ncat
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
%{_sbindir}/alternatives --remove nc %{_bindir}/ncat
|
|
|
|
fi
|
|
|
|
|
2010-04-30 11:26:48 +00:00
|
|
|
%files -f nmap.lang
|
2021-04-08 09:41:49 +00:00
|
|
|
%license LICENSE
|
2008-07-24 08:44:17 +00:00
|
|
|
%doc docs/README
|
|
|
|
%doc docs/nmap.usage.txt
|
2004-09-09 09:17:24 +00:00
|
|
|
%{_bindir}/nmap
|
2011-02-07 12:47:27 +00:00
|
|
|
%{_bindir}/nping
|
2004-09-09 09:17:24 +00:00
|
|
|
%{_mandir}/man1/nmap.1.gz
|
2011-02-07 12:47:27 +00:00
|
|
|
%{_mandir}/man1/nping.1.gz
|
2009-06-18 14:12:29 +00:00
|
|
|
%{_datadir}/nmap
|
2004-09-09 09:17:24 +00:00
|
|
|
|
2012-07-18 14:45:04 +00:00
|
|
|
%files ncat
|
2021-04-08 09:41:49 +00:00
|
|
|
%license LICENSE
|
2019-08-12 15:45:29 +00:00
|
|
|
%doc ncat/docs/AUTHORS ncat/docs/README ncat/docs/THANKS ncat/docs/examples
|
2021-03-07 17:04:34 +00:00
|
|
|
%ghost %{_bindir}/nc
|
2012-07-18 14:45:04 +00:00
|
|
|
%{_bindir}/ncat
|
2021-03-07 17:04:34 +00:00
|
|
|
%ghost %{_mandir}/man1/nc.1.gz
|
2012-07-18 14:45:04 +00:00
|
|
|
%{_mandir}/man1/ncat.1.gz
|
|
|
|
|
2004-09-09 09:17:24 +00:00
|
|
|
%changelog
|
2024-07-09 13:56:08 +00:00
|
|
|
%autochangelog
|