From 113852fc13f44d5138c0613004d4fd36d139671e6f762ff89d2e7b01e2d60ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Thu, 2 Feb 2012 04:31:06 +0000 Subject: [PATCH 1/2] Accepting request 102437 from home:elvigia:branches:devel:libraries:c_c++ - Update to version 1.4.0 plus git bugfixes OBS-URL: https://build.opensuse.org/request/show/102437 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libssh2_org?expand=0&rev=38 --- ...ssing-prototype-for-libssh2_session_.patch | 26 + 0005-Add-symbol-versioning.patch | 476 ++++++++++++++++++ 0006-missing-libssh2_session_banner_set.patch | 27 + libssh2-1.3.0.tar.bz2 | 3 - libssh2-1.4.0.tar.gz | 3 + libssh2_org.changes | 5 + libssh2_org.spec | 22 +- 7 files changed, 549 insertions(+), 13 deletions(-) create mode 100644 0004-libssh2.h-Add-missing-prototype-for-libssh2_session_.patch create mode 100644 0005-Add-symbol-versioning.patch create mode 100644 0006-missing-libssh2_session_banner_set.patch delete mode 100644 libssh2-1.3.0.tar.bz2 create mode 100644 libssh2-1.4.0.tar.gz diff --git a/0004-libssh2.h-Add-missing-prototype-for-libssh2_session_.patch b/0004-libssh2.h-Add-missing-prototype-for-libssh2_session_.patch new file mode 100644 index 0000000..33c8eda --- /dev/null +++ b/0004-libssh2.h-Add-missing-prototype-for-libssh2_session_.patch @@ -0,0 +1,26 @@ +From e95c7de4534cee15ba6362eac2fceb08e6eadc83 Mon Sep 17 00:00:00 2001 +From: Peter Stuge +Date: Wed, 1 Feb 2012 11:18:10 +0100 +Subject: [PATCH 4/6] libssh2.h: Add missing prototype for + libssh2_session_banner_set() + +--- + include/libssh2.h | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/include/libssh2.h b/include/libssh2.h +index 3395e6a..147330e 100644 +--- a/include/libssh2.h ++++ b/include/libssh2.h +@@ -466,6 +466,8 @@ LIBSSH2_API void **libssh2_session_abstract(LIBSSH2_SESSION *session); + + LIBSSH2_API void *libssh2_session_callback_set(LIBSSH2_SESSION *session, + int cbtype, void *callback); ++LIBSSH2_API int libssh2_session_banner_set(LIBSSH2_SESSION *session, ++ const char *banner); + LIBSSH2_API int libssh2_banner_set(LIBSSH2_SESSION *session, + const char *banner); + +-- +1.7.7 + diff --git a/0005-Add-symbol-versioning.patch b/0005-Add-symbol-versioning.patch new file mode 100644 index 0000000..f1f833b --- /dev/null +++ b/0005-Add-symbol-versioning.patch @@ -0,0 +1,476 @@ +From 11c0cce6018e05a92719d6989826ccc2a8f23c81 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Thu, 2 Feb 2012 00:57:32 -0300 +Subject: [PATCH 5/6] Add symbol versioning + +--- + configure.ac | 84 ++++++++---------------------- + m4/ld-version-script.m4 | 53 +++++++++++++++++++ + m4/visibility.m4 | 78 ++++++++++++++++++++++++++++ + src/Makefile.am | 11 +++- + src/libssh2.map | 132 +++++++++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 294 insertions(+), 64 deletions(-) + create mode 100644 m4/ld-version-script.m4 + create mode 100644 m4/visibility.m4 + create mode 100644 src/libssh2.map + +diff --git a/configure.ac b/configure.ac +index 5f94099..7d51197 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,10 +1,19 @@ +-# AC_PREREQ(2.57) +-AC_INIT(libssh2, [-], libssh2-devel@cool.haxx.se) ++AC_INIT([libssh2],[-],[libssh2-devel@cool.haxx.se]) + AC_CONFIG_MACRO_DIR([m4]) + AC_CONFIG_SRCDIR([src]) +-AM_CONFIG_HEADER([src/libssh2_config.h example/libssh2_config.h]) ++AC_CONFIG_HEADERS([src/libssh2_config.h example/libssh2_config.h]) + AM_MAINTAINER_MODE + ++AC_PROG_CC_STDC ++AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE ++AC_PROG_INSTALL ++AC_PROG_LN_S ++AC_PROG_MAKE_SET ++LT_INIT([win32-dll disable-static pic-only]) ++gl_VISIBILITY ++gl_LD_VERSION_SCRIPT ++ + dnl SED is needed by some of the tools + AC_PATH_PROG( SED, sed, sed-was-not-found-by-configure, + $PATH:/usr/bin:/usr/local/bin) +@@ -67,30 +76,22 @@ AC_SEARCH_LIBS(inet_addr, nsl) + + AC_SUBST(LIBS) + +-AC_PROG_CC +-AC_PROG_INSTALL +-AC_PROG_LN_S +-AC_PROG_MAKE_SET + AC_PATH_PROGS(SSHD, [sshd], [], + [$PATH$PATH_SEPARATOR/usr/libexec$PATH_SEPARATOR]dnl + [/usr/sbin$PATH_SEPARATOR/usr/etc$PATH_SEPARATOR/etc]) + AM_CONDITIONAL(SSHD, test -n "$SSHD") +-AC_LIBTOOL_WIN32_DLL +-AC_PROG_LIBTOOL + AC_C_BIGENDIAN + +-dnl check for how to do large files +-AC_SYS_LARGEFILE + + # Configure parameters + AC_ARG_WITH(libgcrypt, +- AC_HELP_STRING([--with-libgcrypt],[Use Libgcrypt for crypto]), ++ AS_HELP_STRING([--with-libgcrypt],[Use Libgcrypt for crypto]), + use_libgcrypt=$withval,use_libgcrypt=auto) + AC_ARG_WITH(openssl, +- AC_HELP_STRING([--with-openssl],[Use OpenSSL for crypto]), ++ AS_HELP_STRING([--with-openssl],[Use OpenSSL for crypto]), + use_openssl=$withval,use_openssl=auto) + AC_ARG_WITH(libz, +- AC_HELP_STRING([--with-libz],[Use Libz for compression]), ++ AS_HELP_STRING([--with-libz],[Use Libz for compression]), + use_libz=$withval,use_libz=auto) + + # Look for OpenSSL (default) +@@ -136,15 +137,15 @@ fi + # Optional Settings + # + AC_ARG_ENABLE(crypt-none, +- AC_HELP_STRING([--enable-crypt-none],[Permit "none" cipher -- NOT RECOMMENDED]), ++ AS_HELP_STRING([--enable-crypt-none],[Permit "none" cipher -- NOT RECOMMENDED]), + [AC_DEFINE(LIBSSH2_CRYPT_NONE, 1, [Enable "none" cipher -- NOT RECOMMENDED])]) + + AC_ARG_ENABLE(mac-none, +- AC_HELP_STRING([--enable-mac-none],[Permit "none" MAC -- NOT RECOMMENDED]), ++ AS_HELP_STRING([--enable-mac-none],[Permit "none" MAC -- NOT RECOMMENDED]), + [AC_DEFINE(LIBSSH2_MAC_NONE, 1, [Enable "none" MAC -- NOT RECOMMENDED])]) + + AC_ARG_ENABLE(gex-new, +- AC_HELP_STRING([--disable-gex-new],[Disable "new" diffie-hellman-group-exchange-sha1 method]), ++ AS_HELP_STRING([--disable-gex-new],[Disable "new" diffie-hellman-group-exchange-sha1 method]), + [GEX_NEW=$enableval]) + if test "$GEX_NEW" != "no"; then + AC_DEFINE(LIBSSH2_DH_GEX_NEW, 1, [Enable newer diffie-hellman-group-exchange-sha1 syntax]) +@@ -155,8 +156,8 @@ dnl option to switch on compiler debug options + dnl + AC_MSG_CHECKING([whether to enable pedantic and debug compiler options]) + AC_ARG_ENABLE(debug, +-AC_HELP_STRING([--enable-debug],[Enable pedantic and debug options]) +-AC_HELP_STRING([--disable-debug],[Disable debug options]), ++AS_HELP_STRING([--enable-debug],[Enable pedantic and debug options]) ++AS_HELP_STRING([--disable-debug],[Disable debug options]), + [ case "$enable_debug" in + no) + AC_MSG_RESULT(no) +@@ -176,45 +177,6 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]), + AC_MSG_RESULT(no) + ) + +-dnl ************************************************************ +-dnl Enable hiding of internal symbols in library to reduce its size and +-dnl speed dynamic linking of applications. This currently is only supported +-dnl on gcc >= 4.0 and SunPro C. +-dnl +-AC_MSG_CHECKING([whether to enable hidden symbols in the library]) +-AC_ARG_ENABLE(hidden-symbols, +-AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library]) +-AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]), +-[ case "$enableval" in +- no) +- AC_MSG_RESULT(no) +- ;; +- *) +- AC_MSG_CHECKING([whether $CC supports it]) +- if test "$GCC" = yes ; then +- if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then +- AC_MSG_RESULT(yes) +- AC_DEFINE(LIBSSH2_API, [__attribute__ ((visibility ("default")))], [to make a symbol visible]) +- CFLAGS="$CFLAGS -fvisibility=hidden" +- else +- AC_MSG_RESULT(no) +- fi +- +- else +- dnl Test for SunPro cc +- if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then +- AC_MSG_RESULT(yes) +- AC_DEFINE(LIBSSH2_API, [__global], [to make a symbol visible]) +- CFLAGS="$CFLAGS -xldscope=hidden" +- else +- AC_MSG_RESULT(no) +- fi +- fi +- ;; +- esac ], +- AC_MSG_RESULT(no) +-) +- + # Checks for header files. + # AC_HEADER_STDC + AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h sys/uio.h]) +@@ -254,16 +216,16 @@ AC_CHECK_FUNCS(gettimeofday select strtoll) + dnl Check for select() into ws2_32 for Msys/Mingw + if test "$ac_cv_func_select" != "yes"; then + AC_MSG_CHECKING([for select in ws2_32]) +- AC_TRY_LINK([ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #ifdef HAVE_WINSOCK2_H + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + #include + #endif +- ],[ ++ ]], [[ + select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL); +- ],[ ++ ]])],[ + AC_MSG_RESULT([yes]) + HAVE_SELECT="1" + AC_DEFINE_UNQUOTED(HAVE_SELECT, 1, +diff --git a/m4/ld-version-script.m4 b/m4/ld-version-script.m4 +new file mode 100644 +index 0000000..5ed93ef +--- /dev/null ++++ b/m4/ld-version-script.m4 +@@ -0,0 +1,53 @@ ++# ld-version-script.m4 serial 3 ++dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++dnl From Simon Josefsson ++ ++# FIXME: The test below returns a false positive for mingw ++# cross-compiles, 'local:' statements does not reduce number of ++# exported symbols in a DLL. Use --disable-ld-version-script to work ++# around the problem. ++ ++# gl_LD_VERSION_SCRIPT ++# -------------------- ++# Check if LD supports linker scripts, and define automake conditional ++# HAVE_LD_VERSION_SCRIPT if so. ++AC_DEFUN([gl_LD_VERSION_SCRIPT], ++[ ++ AC_ARG_ENABLE([ld-version-script], ++ AS_HELP_STRING([--enable-ld-version-script], ++ [enable linker version script (default is enabled when possible)]), ++ [have_ld_version_script=$enableval], []) ++ if test -z "$have_ld_version_script"; then ++ AC_MSG_CHECKING([if LD -Wl,--version-script works]) ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" ++ cat > conftest.map < conftest.map < +Date: Thu, 2 Feb 2012 01:04:52 -0300 +Subject: [PATCH 6/6] missing libssh2_session_banner_set + +--- + src/libssh2.map | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +--- libssh2-1.4.0.orig/src/libssh2.map ++++ libssh2-1.4.0/src/libssh2.map +@@ -70,7 +70,6 @@ libssh2_scp_recv; + libssh2_scp_send64; + libssh2_scp_send_ex; + libssh2_session_abstract; +-libssh2_session_banner_set; + libssh2_session_block_directions; + libssh2_session_callback_set; + libssh2_session_disconnect_ex; +@@ -126,6 +125,7 @@ local: *;}; + LIBSSH2_1.4.0 { + global: + libssh2_session_supported_algs; ++libssh2_session_banner_set; + libssh2_session_banner_get; + libssh2_sftp_get_channel; + } LIBSSH2_1.3.0; diff --git a/libssh2-1.3.0.tar.bz2 b/libssh2-1.3.0.tar.bz2 deleted file mode 100644 index d17786d..0000000 --- a/libssh2-1.3.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d82287141c33cfd9ff6d1e238a64f22082f69b60e4e06d10bef6b1e632a554e4 -size 521754 diff --git a/libssh2-1.4.0.tar.gz b/libssh2-1.4.0.tar.gz new file mode 100644 index 0000000..f265465 --- /dev/null +++ b/libssh2-1.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfc5bbad14a5049fea5c5e8a7a743130bb1e365730e13e2bb7d6494c92a4c581 +size 653514 diff --git a/libssh2_org.changes b/libssh2_org.changes index 947d6e8..eee9a85 100644 --- a/libssh2_org.changes +++ b/libssh2_org.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 2 04:27:50 UTC 2012 - crrodriguez@opensuse.org + +- Update to version 1.4.0 plus git bugfixes + ------------------------------------------------------------------- Tue Dec 27 03:41:32 UTC 2011 - crrodriguez@opensuse.org diff --git a/libssh2_org.spec b/libssh2_org.spec index 7f83d2e..a7cf01d 100644 --- a/libssh2_org.spec +++ b/libssh2_org.spec @@ -1,7 +1,7 @@ # # spec file for package libssh2_org # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,21 +19,25 @@ Summary: A library implementing the SSH2 protocol Name: libssh2_org -Version: 1.3.0 +Version: 1.4.0 Release: 3 License: BSD3c Url: http://www.libssh2.org/ %define pkg_name libssh2 Group: Development/Libraries/C and C++ -Source: http://heanet.dl.sourceforge.net/sourceforge/libssh2/%{pkg_name}-%{version}.tar.bz2 +Source: http://www.libssh2.org/download/%{pkg_name}-%{version}.tar.gz Source2: baselibs.conf BuildRequires: openssl-devel BuildRequires: pkgconfig BuildRequires: zlib-devel #for the test suite BuildRequires: openssh +BuildRequires: libtool BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch: libssh2-ocloexec.patch +Patch1: 0004-libssh2.h-Add-missing-prototype-for-libssh2_session_.patch +Patch2: 0005-Add-symbol-versioning.patch +Patch3: 0006-missing-libssh2_session_banner_set.patch %description libssh2 is a library implementing the SSH2 protocol as defined by @@ -66,10 +70,14 @@ SECSH-PUBLICKEY. %prep %setup -q -n %{pkg_name}-%{version} %patch -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build +./buildconf export CFLAGS="%optflags -DOPENSSL_LOAD_CONF" -%configure --enable-hidden-symbols \ +%configure \ --disable-static --with-pic \ --disable-rpath --with-libz=%{_prefix} \ --with-openssl=%{_prefix} @@ -79,12 +87,6 @@ make %{?_smp_mflags} make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_libdir}/*.la -%check -# testsuite fails in qemu due to non-implemented setsockopt() options (2011-10-01) -%if ! 0%{?qemu_user_space_build} -make check -%endif - %post -n libssh2-1 -p /sbin/ldconfig %postun -n libssh2-1 -p /sbin/ldconfig From de8818b3f7a8576bcddda96613772ee50de7b5dc4fd75e8f8174a02a6355eb2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 2 Feb 2012 13:39:51 +0000 Subject: [PATCH 2/2] Accepting request 102481 from home:elvigia:branches:devel:libraries:c_c++ - fix license OBS-URL: https://build.opensuse.org/request/show/102481 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libssh2_org?expand=0&rev=39 --- libssh2_org.changes | 5 +++++ libssh2_org.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libssh2_org.changes b/libssh2_org.changes index eee9a85..87b577d 100644 --- a/libssh2_org.changes +++ b/libssh2_org.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 2 13:36:17 UTC 2012 - crrodriguez@opensuse.org + +- fix license + ------------------------------------------------------------------- Thu Feb 2 04:27:50 UTC 2012 - crrodriguez@opensuse.org diff --git a/libssh2_org.spec b/libssh2_org.spec index a7cf01d..78006f9 100644 --- a/libssh2_org.spec +++ b/libssh2_org.spec @@ -21,7 +21,7 @@ Summary: A library implementing the SSH2 protocol Name: libssh2_org Version: 1.4.0 Release: 3 -License: BSD3c +License: BSD-3-Clause Url: http://www.libssh2.org/ %define pkg_name libssh2 Group: Development/Libraries/C and C++