diff options
-rw-r--r-- | src/libssh-1-fixes.patch | 281 | ||||
-rw-r--r-- | src/libssh.mk | 4 | ||||
-rw-r--r-- | src/zstd-1-fixes.patch | 2 | ||||
-rw-r--r-- | src/zstd.mk | 4 |
4 files changed, 163 insertions, 128 deletions
diff --git a/src/libssh-1-fixes.patch b/src/libssh-1-fixes.patch index 789d19f..1b294a6 100644 --- a/src/libssh-1-fixes.patch +++ b/src/libssh-1-fixes.patch @@ -5,7 +5,7 @@ Contains ad hoc patches for cross building. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tony Theodore <tonyt@logyst.com> Date: Sun, 29 Oct 2017 00:11:28 +1100 -Subject: [PATCH 1/2] add option to disable shared libs +Subject: [PATCH 1/3] add option to disable shared libs Taken from: https://www.libssh.org/archive/libssh/2017-10/0000012.html @@ -14,59 +14,41 @@ diff --git a/DefineOptions.cmake b/DefineOptions.cmake index 1111111..2222222 100644 --- a/DefineOptions.cmake +++ b/DefineOptions.cmake -@@ -3,6 +3,7 @@ option(WITH_ZLIB "Build with ZLIB support" ON) - option(WITH_SSH1 "Build with SSH1 support" OFF) +@@ -2,6 +2,7 @@ option(WITH_GSSAPI "Build with GSSAPI support" ON) + option(WITH_ZLIB "Build with ZLIB support" ON) option(WITH_SFTP "Build with SFTP support" ON) option(WITH_SERVER "Build with SSH server support" ON) +option(WITH_SHARED_LIB "Build with a shared library" ON) option(WITH_STATIC_LIB "Build with a static library" OFF) option(WITH_DEBUG_CRYPTO "Build with cryto debug output" OFF) - option(WITH_DEBUG_CALLTRACE "Build with calltrace debug output" ON) + option(WITH_DEBUG_PACKET "Build with packet debug output" OFF) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1111111..2222222 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -225,6 +225,7 @@ include_directories( - ${LIBSSH_PRIVATE_INCLUDE_DIRS} - ) +@@ -285,6 +285,9 @@ include_directories( + # Set the path to the default map file + set(MAP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.map") +if (WITH_SHARED_LIB) - add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) - - target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES}) -@@ -259,6 +260,7 @@ install( ++add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) ++ + if (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND) + # Get the list of header files + get_file_list(dev_header_list +@@ -362,6 +365,7 @@ install( ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries ) +endif (WITH_SHARED_LIB) - if (WITH_STATIC_LIB) + if (BUILD_STATIC_LIB) add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS}) -diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt -index 1111111..2222222 100644 ---- a/src/threads/CMakeLists.txt -+++ b/src/threads/CMakeLists.txt -@@ -59,6 +59,7 @@ include_directories( - if (libssh_threads_SRCS) - set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL) - -+ if (WITH_SHARED_LIB) - add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS}) - - target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES}) -@@ -88,6 +89,7 @@ if (libssh_threads_SRCS) - ARCHIVE DESTINATION ${LIB_INSTALL_DIR} - COMPONENT libraries - ) -+ endif (WITH_SHARED_LIB) - - if (WITH_STATIC_LIB) - add_library(${LIBSSH_THREADS_STATIC_LIBRARY} STATIC ${libssh_threads_SRCS}) From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tony Theodore <tonyt@logyst.com> Date: Sun, 29 Oct 2017 00:45:55 +1100 -Subject: [PATCH 2/2] add indentation for shared lib hunks +Subject: [PATCH 2/3] add indentation for shared lib hunks Taken from: https://www.libssh.org/archive/libssh/2017-10/0000012.html @@ -75,14 +57,114 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1111111..2222222 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -226,40 +226,40 @@ include_directories( - ) +@@ -286,85 +286,85 @@ include_directories( + set(MAP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.map") if (WITH_SHARED_LIB) -add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) ++ add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) ++ ++ if (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND) ++ # Get the list of header files ++ get_file_list(dev_header_list ++ DIRECTORIES "${LIBSSH_PUBLIC_INCLUDE_DIRS}/libssh" ++ FILES_PATTERNS "*.h") ++ ++ # Extract the symbols marked as "LIBSSH_API" from the header files ++ extract_symbols("${PROJECT_NAME}_dev.symbols" ++ HEADERS_LIST dev_header_list ++ FILTER_PATTERN "LIBSSH_API") ++ ++ if (WITH_ABI_BREAK) ++ set(ALLOW_ABI_BREAK "BREAK_ABI") ++ endif() ++ ++ # Generate the symbol version map file ++ generate_map_file("${PROJECT_NAME}_dev.map" ++ SYMBOLS "${PROJECT_NAME}_dev.symbols" ++ RELEASE_NAME_VERSION ${PROJECT_NAME}_AFTER_${LIBRARY_VERSION} ++ CURRENT_MAP ${MAP_PATH} ++ ${ALLOW_ABI_BREAK}) + +-if (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND) +- # Get the list of header files +- get_file_list(dev_header_list +- DIRECTORIES "${LIBSSH_PUBLIC_INCLUDE_DIRS}/libssh" +- FILES_PATTERNS "*.h") ++ set(libssh_SRCS ++ ${libssh_SRCS} ++ ${PROJECT_NAME}_dev.map ++ ) ++ endif (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND) ++ ++ add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) ++ target_compile_options(${LIBSSH_SHARED_LIBRARY} ++ PRIVATE ++ ${DEFAULT_C_COMPILE_FLAGS} ++ -D_GNU_SOURCE) + +- # Extract the symbols marked as "LIBSSH_API" from the header files +- extract_symbols("${PROJECT_NAME}_dev.symbols" +- HEADERS_LIST dev_header_list +- FILTER_PATTERN "LIBSSH_API") ++ target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES}) + +- if (WITH_ABI_BREAK) +- set(ALLOW_ABI_BREAK "BREAK_ABI") +- endif() ++ if (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT) ++ if (ABIMAP_FOUND) ++ # Change path to devel map file ++ set(MAP_PATH "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_dev.map") ++ endif (ABIMAP_FOUND) + +- # Generate the symbol version map file +- generate_map_file("${PROJECT_NAME}_dev.map" +- SYMBOLS "${PROJECT_NAME}_dev.symbols" +- RELEASE_NAME_VERSION ${PROJECT_NAME}_AFTER_${LIBRARY_VERSION} +- CURRENT_MAP ${MAP_PATH} +- ${ALLOW_ABI_BREAK}) ++ set_target_properties(${LIBSSH_SHARED_LIBRARY} ++ PROPERTIES LINK_FLAGS ++ "-Wl,--version-script,\"${MAP_PATH}\"") ++ endif (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT) + +- set(libssh_SRCS +- ${libssh_SRCS} +- ${PROJECT_NAME}_dev.map ++ set_target_properties( ++ ${LIBSSH_SHARED_LIBRARY} ++ PROPERTIES ++ VERSION ++ ${LIBRARY_VERSION} ++ SOVERSION ++ ${LIBRARY_SOVERSION} ++ OUTPUT_NAME ++ ssh ++ DEFINE_SYMBOL ++ LIBSSH_EXPORTS + ) +-endif (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND) +- +-add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) +-target_compile_options(${LIBSSH_SHARED_LIBRARY} +- PRIVATE +- ${DEFAULT_C_COMPILE_FLAGS} +- -D_GNU_SOURCE) - -target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES}) - +-if (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT) +- if (ABIMAP_FOUND) +- # Change path to devel map file +- set(MAP_PATH "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_dev.map") +- endif (ABIMAP_FOUND) +- +- set_target_properties(${LIBSSH_SHARED_LIBRARY} +- PROPERTIES LINK_FLAGS +- "-Wl,--version-script,\"${MAP_PATH}\"") +-endif (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT) +- -set_target_properties( - ${LIBSSH_SHARED_LIBRARY} - PROPERTIES @@ -95,36 +177,20 @@ index 1111111..2222222 100644 - DEFINE_SYMBOL - LIBSSH_EXPORTS -) -+ add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) -+ -+ target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES}) -+ -+ set_target_properties( -+ ${LIBSSH_SHARED_LIBRARY} -+ PROPERTIES -+ VERSION -+ ${LIBRARY_VERSION} -+ SOVERSION -+ ${LIBRARY_SOVERSION} -+ OUTPUT_NAME -+ ssh -+ DEFINE_SYMBOL -+ LIBSSH_EXPORTS -+ ) -if (WITH_VISIBILITY_HIDDEN) - set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") -endif (WITH_VISIBILITY_HIDDEN) -+ if (WITH_VISIBILITY_HIDDEN) ++ if (WITH_VISIBILITY_HIDDEN) + set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") -+ endif (WITH_VISIBILITY_HIDDEN) ++ endif (WITH_VISIBILITY_HIDDEN) -if (MINGW) - set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES LINK_FLAGS "-Wl,--enable-stdcall-fixup") -endif () -+ if (MINGW) -+ set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES LINK_FLAGS "-Wl,--enable-stdcall-fixup") -+ endif () ++ if (MINGW) ++ set_target_properties(${LIBSSH_SHARED_LIBRARY} PROPERTIES LINK_FLAGS "-Wl,--enable-stdcall-fixup") ++ endif () -install( @@ -135,80 +201,49 @@ index 1111111..2222222 100644 - ARCHIVE DESTINATION ${LIB_INSTALL_DIR} - COMPONENT libraries -) -+ install( ++ install( + TARGETS -+ ${LIBSSH_SHARED_LIBRARY} ++ ${LIBSSH_SHARED_LIBRARY} + RUNTIME DESTINATION ${BIN_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + COMPONENT libraries -+ ) ++ ) endif (WITH_SHARED_LIB) - if (WITH_STATIC_LIB) -diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt + if (BUILD_STATIC_LIB) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> +Date: Tue, 20 Aug 2019 21:39:19 +0200 +Subject: [PATCH 3/3] remove unwanted dependencies from example program + + +diff --git a/examples/knownhosts.c b/examples/knownhosts.c index 1111111..2222222 100644 ---- a/src/threads/CMakeLists.txt -+++ b/src/threads/CMakeLists.txt -@@ -60,35 +60,35 @@ if (libssh_threads_SRCS) - set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL) +--- a/examples/knownhosts.c ++++ b/examples/knownhosts.c +@@ -17,14 +17,11 @@ The goal is to show the API in action. It's not a reference on how terminal + clients must be made or how a client should react. + */ - if (WITH_SHARED_LIB) -- add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS}) -- -- target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES}) +-#include "config.h" - -- set_target_properties( -- ${LIBSSH_THREADS_SHARED_LIBRARY} -- PROPERTIES -- VERSION -- ${LIBRARY_VERSION} -- SOVERSION -- ${LIBRARY_SOVERSION} -- OUTPUT_NAME -- ssh_threads -- DEFINE_SYMBOL -- LIBSSH_EXPORTS -- ) -+ add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS}) - -- if (WITH_VISIBILITY_HIDDEN) -- set_target_properties(${LIBSSH_THREADS_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") -- endif (WITH_VISIBILITY_HIDDEN) -+ target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES}) - -- install( -- TARGETS -+ set_target_properties( - ${LIBSSH_THREADS_SHARED_LIBRARY} -- RUNTIME DESTINATION ${BIN_INSTALL_DIR} -- LIBRARY DESTINATION ${LIB_INSTALL_DIR} -- ARCHIVE DESTINATION ${LIB_INSTALL_DIR} -- COMPONENT libraries -- ) -+ PROPERTIES -+ VERSION -+ ${LIBRARY_VERSION} -+ SOVERSION -+ ${LIBRARY_SOVERSION} -+ OUTPUT_NAME -+ ssh_threads -+ DEFINE_SYMBOL -+ LIBSSH_EXPORTS -+ ) -+ -+ if (WITH_VISIBILITY_HIDDEN) -+ set_target_properties(${LIBSSH_THREADS_SHARED_LIBRARY} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") -+ endif (WITH_VISIBILITY_HIDDEN) -+ -+ install( -+ TARGETS -+ ${LIBSSH_THREADS_SHARED_LIBRARY} -+ RUNTIME DESTINATION ${BIN_INSTALL_DIR} -+ LIBRARY DESTINATION ${LIB_INSTALL_DIR} -+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR} -+ COMPONENT libraries -+ ) - endif (WITH_SHARED_LIB) - - if (WITH_STATIC_LIB) + #include <errno.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> + +-#include "libssh/priv.h" + #include <libssh/libssh.h> + #include "examples_common.h" + +@@ -74,7 +71,7 @@ int verify_knownhost(ssh_session session) + fprintf(stderr,"Could not find known host file. If you accept the host key here,\n"); + fprintf(stderr,"the file will be automatically created.\n"); + /* fallback to SSH_SERVER_NOT_KNOWN behavior */ +- FALL_THROUGH; ++ /* FALL_THROUGH; */ + case SSH_SERVER_NOT_KNOWN: + fprintf(stderr, + "The server is unknown. Do you trust the host key (yes/no)?\n"); diff --git a/src/libssh.mk b/src/libssh.mk index afe808c..c9358bd 100644 --- a/src/libssh.mk +++ b/src/libssh.mk @@ -4,8 +4,8 @@ PKG := libssh $(PKG)_WEBSITE := https://www.libssh.org $(PKG)_DESCR := SSHv2 and SSHv1 protocol on client and server side $(PKG)_IGNORE := -$(PKG)_VERSION := 0.7.5 -$(PKG)_CHECKSUM := d275b1b3622c36efacfac748d5eecaf0e80349a551f72abb6ce5afa8c2e6b784 +$(PKG)_VERSION := 0.9.0 +$(PKG)_CHECKSUM := 3ac02237947a18c0bf82f3678954f25d5f2338f0f1676bdc11a1b9eb1ce5fcf6 $(PKG)_SUBDIR := libssh-$($(PKG)_VERSION) $(PKG)_FILE := libssh-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://git.libssh.org/projects/libssh.git/snapshot/libssh-$($(PKG)_VERSION).tar.gz diff --git a/src/zstd-1-fixes.patch b/src/zstd-1-fixes.patch index c373fa0..b0a282e 100644 --- a/src/zstd-1-fixes.patch +++ b/src/zstd-1-fixes.patch @@ -13,7 +13,7 @@ diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt index 1111111..2222222 100644 --- a/build/cmake/lib/CMakeLists.txt +++ b/build/cmake/lib/CMakeLists.txt -@@ -165,7 +165,7 @@ if (ZSTD_BUILD_STATIC) +@@ -130,7 +130,7 @@ if (ZSTD_BUILD_STATIC) OUTPUT_NAME ${STATIC_LIBRARY_BASE_NAME}) endif () diff --git a/src/zstd.mk b/src/zstd.mk index 5757e2e..f320940 100644 --- a/src/zstd.mk +++ b/src/zstd.mk @@ -4,8 +4,8 @@ PKG := zstd $(PKG)_WEBSITE := https://github.com/facebook/zstd $(PKG)_DESCR := Zstandard is a fast lossless compression algorithm $(PKG)_IGNORE := -$(PKG)_VERSION := 1.4.2 -$(PKG)_CHECKSUM := 7a6e1dad34054b35e2e847eb3289be8820a5d378228802239852f913c6dcf6a7 +$(PKG)_VERSION := 1.4.3 +$(PKG)_CHECKSUM := 5eda3502ecc285c3c92ee0cc8cd002234dee39d539b3f692997a0e80de1d33de $(PKG)_GH_CONF := facebook/zstd/tags,v $(PKG)_DEPS := cc |