From 9353dccefba3fa6583f954417e81193a58b6d704 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Fri, 4 Aug 2017 10:35:30 +0200 Subject: [PATCH] Use upstream patch --- nmap-7.60-bundled_libssh2_libz.patch | 43 +++++++++++++--------------- nmap.spec | 6 +++- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/nmap-7.60-bundled_libssh2_libz.patch b/nmap-7.60-bundled_libssh2_libz.patch index bc1866f..9d4c5a4 100644 --- a/nmap-7.60-bundled_libssh2_libz.patch +++ b/nmap-7.60-bundled_libssh2_libz.patch @@ -1,48 +1,45 @@ -commit 32153fe41b9a3f461326348f16c9a71c6d980e89 -Author: Pavel Zhukov -Date: Thu Aug 3 13:18:01 2017 +0200 +commit fd0db097498d5ff29f647508a80915d4d0e8d84a +Author: dmiller +Date: Thu Aug 3 15:16:49 2017 +0000 - Use nmap-libssh2 and nmap-zlib headers for included only - - Nmap specific libssh2/libz headers contain hardcoded version number thus - version information is incorrect if system version of library is chosen. + Report appropriate zlib/libssh2 versions. Closes #957 diff --git a/nmap.cc b/nmap.cc -index 512cb4a6e..79f7e77b5 100644 +index 512cb4a6e..5345d7311 100644 --- a/nmap.cc +++ b/nmap.cc -@@ -182,11 +182,19 @@ +@@ -182,11 +182,11 @@ #endif #if HAVE_LIBSSH2 -+#ifdef LIBSSH2_INCLUDED - #include "libssh2/libssh2v.h" -+#else -+#include "libssh2.h" -+#endif +-#include "libssh2/libssh2v.h" ++#include #endif #if HAVE_LIBZ -+#ifdef ZLIB_INCLUDED - #include "libz/libzv.h" -+#else -+#include "zlib.h" -+#endif +-#include "libz/libzv.h" ++#include #endif /* To get the version number only. */ -@@ -2722,7 +2730,7 @@ static void display_nmap_version() { +@@ -2720,9 +2720,9 @@ static void display_nmap_version() { + + #if HAVE_LIBSSH2 #ifdef LIBSSH2_INCLUDED - with.push_back(std::string("nmap-libssh2-") + get_word_or_quote(LIBSSH2_VERSION_TEXT, 1)); +- with.push_back(std::string("nmap-libssh2-") + get_word_or_quote(LIBSSH2_VERSION_TEXT, 1)); ++ with.push_back(std::string("nmap-libssh2-") + get_word_or_quote(LIBSSH2_VERSION, 0)); #else - with.push_back(std::string("libssh2-") + get_word_or_quote(LIBSSH2_VERSION_TEXT, 1)); + with.push_back(std::string("libssh2-") + get_word_or_quote(LIBSSH2_VERSION, 0)); #endif #else without.push_back("libssh2"); -@@ -2732,7 +2740,7 @@ static void display_nmap_version() { +@@ -2730,9 +2730,9 @@ static void display_nmap_version() { + + #if HAVE_LIBZ #ifdef ZLIB_INCLUDED - with.push_back(std::string("nmap-libz-") + get_word_or_quote(LIBZ_VERSION_TEXT, 1)); +- with.push_back(std::string("nmap-libz-") + get_word_or_quote(LIBZ_VERSION_TEXT, 1)); ++ with.push_back(std::string("nmap-libz-") + get_word_or_quote(ZLIB_VERSION, 0)); #else - with.push_back(std::string("libz-") + get_word_or_quote(LIBZ_VERSION_TEXT, 1)); + with.push_back(std::string("libz-") + get_word_or_quote(ZLIB_VERSION, 0)); diff --git a/nmap.spec b/nmap.spec index 225ebe5..b4fbe8c 100644 --- a/nmap.spec +++ b/nmap.spec @@ -8,7 +8,7 @@ Name: nmap Epoch: 2 Version: 7.60 #global prerelease TEST5 -Release: 6%{?dist} +Release: 7%{?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,6 +28,7 @@ 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 +## https://github.com/nmap/nmap/commit/fd0db097498d5ff29f647508a80915d4d0e8d84a Patch7: nmap-7.60-bundled_libssh2_libz.patch URL: http://nmap.org/ @@ -240,6 +241,9 @@ rm -rf %{buildroot} %changelog * Thu Aug 3 2017 Pavel Zhukov - 2:7.60-7 +- Use upstream patch + +* Thu Aug 3 2017 Pavel Zhukov - 2:7.60-6 - Fix library version for non-included libraries * Thu Aug 3 2017 Pavel Zhukov - 2:7.60-4