From 34503ac954302b8345e8760d837ebe4869dd183d Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 3 Aug 2017 12:08:50 +0200 Subject: [PATCH] Drop libssh2 patch and use nmap-specific defines --- nmap-7.60-libssh2.patch | 33 --------------------------------- nmap.spec | 28 ++++++++++++++++++---------- 2 files changed, 18 insertions(+), 43 deletions(-) delete mode 100644 nmap-7.60-libssh2.patch diff --git a/nmap-7.60-libssh2.patch b/nmap-7.60-libssh2.patch deleted file mode 100644 index a843aac..0000000 --- a/nmap-7.60-libssh2.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/nmap.cc b/nmap.cc -index c0a2edf..951c131 100644 ---- a/nmap.cc -+++ b/nmap.cc -@@ -182,12 +182,26 @@ - #endif - - #if HAVE_LIBSSH2 -+#ifdef LIBSSH2_INCLUDED - #include "libssh2/libssh2v.h" --#endif -+#else -+#include "libssh2.h" -+#ifndef LIBSSH2_VERSION_TEXT -+#define LIBSSH2_VERSION_TEXT "Libssh2 #LIBSSH2_VERSION" -+#endif /* LIBSSH2_VERSION_TEXT */ -+#endif /* LIBSSH2_INCLUDED */ -+#endif /* HAVE_LIBSSH2 */ - - #if HAVE_LIBZ -+#ifdef LIBZ_INCLUDED - #include "libz/libzv.h" --#endif -+#else -+#include "zlib.h" -+#ifndef LIBZ_VERSION_TEXT -+#define LIBZ_VERSION_TEXT "Libz #LIBZ_VERSION" -+#endif /* LIBZ_VERSION_TEXT */ -+#endif /* LIBZ_INCLUDED */ -+#endif /* HAVE_LIBZ */ - - /* To get the version number only. */ - #ifdef WIN32 diff --git a/nmap.spec b/nmap.spec index 5325a06..76b9356 100644 --- a/nmap.spec +++ b/nmap.spec @@ -8,7 +8,7 @@ Name: nmap Epoch: 2 Version: 7.60 #global prerelease TEST5 -Release: 4%{?dist} +Release: 5%{?dist} # Uses combination of licenses based on GPL license, but with extra modification # so it got its own license tag rhbz#1055861 License: Nmap @@ -28,10 +28,6 @@ Patch2: nmap-4.52-noms.patch # upstream provided patch for rhbz#845005, not yet in upstream repository Patch5: ncat_reg_stdin.diff Patch6: nmap-6.25-displayerror.patch -# Use system libssh2 -# https://github.com/nmap/nmap/pull/956 -Patch7: %{name}-7.60-libssh2.patch - URL: http://nmap.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -98,11 +94,19 @@ BuildArch: noarch %patch2 -p1 -b .noms %patch5 -p1 -b .ncat_reg_stdin %patch6 -p1 -b .displayerror -%patch7 -p1 -b .libssh2 #be sure we're not using tarballed copies of some libraries #rm -rf liblua libpcap libpcre macosx mswin32 ###TODO### -rm -rf libpcap libpcre macosx mswin32 libssh2 libz + +## Deleteling libssh2 and libz but keeping +## nmap specific definition +for lib in libssh2 libz; do + mkdir ".${lib}" && cp "${lib}/${lib}v.h" ".${lib}/" + rm -rf "$lib" + mv ".${lib}" "${lib}" +done; + +rm -rf libpcap libpcre macosx mswin32 # for aarch64 support, not needed with autotools 2.69+ for f in acinclude.m4 configure.ac nping/configure.ac @@ -241,6 +245,10 @@ rm -rf %{buildroot} %{_mandir}/man1/xnmap.1.gz %changelog +* Thu Aug 3 2017 Pavel Zhukov - 2:7.60-4 +- Keep nmap specific libssh and libz headers +- Drop unused libssh2 patch + * Thu Aug 3 2017 Pavel Zhukov - 2:7.60-4 - Delete bundled libssh2 - Delete bundled zlib @@ -649,7 +657,7 @@ rm -rf %{buildroot} * Mon Nov 18 2002 Tim Powers - rebuild on all arches -- remove old desktop file from $%{buildroot} so rpm won't complain +- remove old desktop file from $$RPM_BUILD_ROOT so rpm won't complain * Thu Aug 1 2002 Harald Hoyer - version 3.0 @@ -697,7 +705,7 @@ rm -rf %{buildroot} * Fri Nov 3 2000 Tim Powers - fixed nmapdatadir in the install section, forgot lto include - %{buildroot} in the path + $RPM_BUILD_ROOT in the path * Thu Nov 2 2000 Tim Powers - update to nmap-2.54BETA7 to possibly fix bug #20199 @@ -733,7 +741,7 @@ rm -rf %{buildroot} - changed group to Applications/System - quiet setup - no need to create dirs in the install section, "make - prefix=%{buildroot}&{prefix} install" does this. + prefix=$RPM_BUILD_ROOT&{prefix} install" does this. - using defined %%{prefix}, %%{version} etc. for easier/quicker maint. - added docs - gzip man pages