File kdump-drop-libssh2-dep.patch of Package kdump

From: Petr Tesarik <ptesarik@suse.cz>
Date: Wed Apr 15 13:51:06 2015 +0200
Subject: Drop dependency on libssh2
References: FATE#318874, bsc#917747
Patch-mainline: v0.8.16
Git-commit c5ee386c9191973e8e2bb0cfe4b07ea33481b3e1

The libssh2 project lacks many features, most notably support for
recent ciphers and hashing algorithms. It seems that the best
approach is using the system ssh binary, because it causes least
confusion to admins who use it to test an SSH connection to the
dump target host.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

---
 CMakeLists.txt          |   13 --------
 README                  |    1 
 cmake/Findlibssh2.cmake |   75 ------------------------------------------------
 config.h.in             |    1 
 kdumptool/kdumptool.cc  |    7 ----
 5 files changed, 1 insertion(+), 96 deletions(-)

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -98,19 +98,6 @@ IF(NOT CURL_FOUND)
     MESSAGE(FATAL_ERROR "CURL not found. Install curl-devel or something like that")
 ENDIF(NOT CURL_FOUND)
 
-# libssh2
-INCLUDE(Findlibssh2)
-IF (LIBSSH2_FOUND)
-    SET(EXTRA_LIBS ${EXTRA_LIBS} ${LIBSSH2_LIBRARIES})
-    INCLUDE_DIRECTORIES(${LIBSSH2_INCLUDE_DIRS})
-ENDIF (LIBSSH2_FOUND)
-
-IF(NOT LIBSSH2_FOUND)
-    MESSAGE("libssh2 not found. Install libssh2-devel or something like that")
-    MESSAGE("Building without SSH support")
-    SET(LIBSSH2_FOUND FALSE)
-ENDIF(NOT LIBSSH2_FOUND)
-
 # libesmtp
 INCLUDE(Findesmtp)
 
--- a/README
+++ b/README
@@ -21,7 +21,6 @@ It's designed to take the whole dump in
 Requirements:
 
   - libelf (http://directory.fsf.org/project/libelf/),
-  - libssh2 (http://www.libssh2.org/),
   - libcurl (http://curl.haxx.se/),
   - asciidoc (http://www.methods.co.nz/asciidoc/),
   - cmake (http://www.cmake.org/).
--- a/cmake/Findlibssh2.cmake
+++ /dev/null
@@ -1,75 +0,0 @@
-# - Try to find libssh2
-# Once done this will define
-#
-#  LIBSSH2_FOUND - system has libssh2
-#  LIBSSH2_INCLUDE_DIRS - the libssh2 include directory
-#  LIBSSH2_LIBRARIES - Link these to use libssh2
-#  LIBSSH2_DEFINITIONS - Compiler switches required for using libssh2
-#
-#  Copyright (c) 2008 Bernhard Walle <bwalle@suse.de>
-#
-#  Redistribution and use is allowed according to the terms of the New
-#  BSD license.
-#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-
-
-if (LIBSSH2_LIBRARIES AND LIBSSH2_INCLUDE_DIRS)
-  # in cache already
-  set(LIBSSH2_FOUND TRUE)
-else (LIBSSH2_LIBRARIES AND LIBSSH2_INCLUDE_DIRS)
-  find_path(LIBSSH2_INCLUDE_DIR
-    NAMES
-      libssh2.h
-    PATHS
-      /usr/include
-      /usr/local/include
-      /opt/local/include
-      /sw/include
-  )
-
-  find_library(LIBSSH2_LIBRARY
-    NAMES
-      ssh2
-    PATHS
-      /usr/lib
-      /usr/local/lib
-      /opt/local/lib
-      /sw/lib
-  )
-  mark_as_advanced(LIBSSH2_LIBRARY)
-
-  if (LIBSSH2_LIBRARY)
-    set(LIBSSH2_FOUND TRUE)
-  endif (LIBSSH2_LIBRARY)
-
-  set(LIBSSH2_INCLUDE_DIRS
-    ${LIBSSH2_INCLUDE_DIR}
-  )
-
-  if (LIBSSH2_FOUND)
-    set(LIBSSH2_LIBRARIES
-      ${LIBSSH2_LIBRARIES}
-      ${LIBSSH2_LIBRARY}
-    )
-  endif (LIBSSH2_FOUND)
-
-  if (LIBSSH2_INCLUDE_DIRS AND LIBSSH2_LIBRARIES)
-     set(LIBSSH2_FOUND TRUE)
-  endif (LIBSSH2_INCLUDE_DIRS AND LIBSSH2_LIBRARIES)
-
-  if (LIBSSH2_FOUND)
-    if (NOT libssh2_FIND_QUIETLY)
-      message(STATUS "Found libssh2: ${LIBSSH2_LIBRARIES}")
-    endif (NOT libssh2_FIND_QUIETLY)
-  else (LIBSSH2_FOUND)
-    if (libssh2_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find libssh2")
-    endif (libssh2_FIND_REQUIRED)
-  endif (LIBSSH2_FOUND)
-
-  # show the LIBSSH2_INCLUDE_DIRS and LIBSSH2_LIBRARIES variables only in the advanced view
-  mark_as_advanced(LIBSSH2_INCLUDE_DIRS LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARIES)
-
-endif (LIBSSH2_LIBRARIES AND LIBSSH2_INCLUDE_DIRS)
-
--- a/config.h.in
+++ b/config.h.in
@@ -5,7 +5,6 @@
 #define TRUE                true
 #define FALSE               false
 
-#define HAVE_LIBSSH2        @LIBSSH2_FOUND@
 #define HAVE_LIBESMTP       @ESMTP_FOUND@
 #define HAVE_LIBSSL         @LIBSSL_FOUND@
 #define HAVE_FADUMP         @HAVE_FADUMP@
--- a/kdumptool/kdumptool.cc
+++ b/kdumptool/kdumptool.cc
@@ -177,12 +177,7 @@ void KdumpTool::printVersion()
     cerr << "Features: ";
 
     // SFTP
-    cerr << "SFTP: ";
-#if HAVE_LIBSSH2
-    cerr << "enabled";
-#else // HAVE_LIBSSH2
-    cerr << "disabled";
-#endif
+    cerr << "SFTP: " << "enabled";
 
     cerr << " - ";
 
openSUSE Build Service is sponsored by