aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2020-04-27 20:42:30 +0800
committerTing-Wei Lan <lantw44@gmail.com>2020-04-27 20:42:30 +0800
commit21a1e51bf56faaf451df28eb3d1231bc17780bdf (patch)
treee034cbd5b2dc01ba9f8d5b0b0994cf4babf91933
parentb73e8002654a46c15e805d9ecc2f04384ef90170 (diff)
downloadcopr-rpm-spec-21a1e51bf56faaf451df28eb3d1231bc17780bdf.tar
copr-rpm-spec-21a1e51bf56faaf451df28eb3d1231bc17780bdf.tar.gz
copr-rpm-spec-21a1e51bf56faaf451df28eb3d1231bc17780bdf.tar.bz2
copr-rpm-spec-21a1e51bf56faaf451df28eb3d1231bc17780bdf.tar.lz
copr-rpm-spec-21a1e51bf56faaf451df28eb3d1231bc17780bdf.tar.xz
copr-rpm-spec-21a1e51bf56faaf451df28eb3d1231bc17780bdf.tar.zst
copr-rpm-spec-21a1e51bf56faaf451df28eb3d1231bc17780bdf.zip
guix: guile-ssh 0.11.3 -> 0.12.0
-rw-r--r--guix/guile-ssh/guile-ssh-0.11.3-fix-segfault.patch104
-rw-r--r--guix/guile-ssh/guile-ssh-0.11.3-libssh-0.8-name.patch88
-rw-r--r--guix/guile-ssh/guile-ssh-0.11.3-libssh-0.8-tests.patch26
-rw-r--r--guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-1.patch23
-rw-r--r--guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-2.patch27
-rw-r--r--guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa.patch97
-rw-r--r--guix/guile-ssh/guile-ssh.spec15
7 files changed, 6 insertions, 374 deletions
diff --git a/guix/guile-ssh/guile-ssh-0.11.3-fix-segfault.patch b/guix/guile-ssh/guile-ssh-0.11.3-fix-segfault.patch
deleted file mode 100644
index 787dc04..0000000
--- a/guix/guile-ssh/guile-ssh-0.11.3-fix-segfault.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From c468d9c2dc343446757360857a295736359b3024 Mon Sep 17 00:00:00 2001
-From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
-Date: Tue, 7 Aug 2018 07:55:00 +0300
-Subject: [PATCH] libguile-ssh/channel-type.c (ptob_close): Bugfix: fix a
- segfault
-
-'ptob_close' would always get a segfault when it tried to free a closed
-channel. This patch fixes that by adding a check if a channel is already
-closed.
-
-Reported by Michael Bowcutt <mbowcutt@case.edu> in
- <https://github.com/artyom-poptsov/guile-ssh/issues/8>
- and Njagi Mwaniki in a personal email.
-
-* libguile-ssh/channel-type.c (ptob_close): Check if a channel is already
- closed before trying to close and free it. Improve logging.
-* libguile-ssh/log.c (_gssh_log_debug, _gssh_log_debug1): New procedures
-* libguile-ssh/log.h: Likewise.
----
- libguile-ssh/channel-type.c | 10 +++++++++-
- libguile-ssh/log.c | 21 +++++++++++++++++++++
- libguile-ssh/log.h | 3 +++
- 3 files changed, 33 insertions(+), 1 deletion(-)
-
-diff --git a/libguile-ssh/channel-type.c b/libguile-ssh/channel-type.c
-index ffcca64..4b0b9ae 100644
---- a/libguile-ssh/channel-type.c
-+++ b/libguile-ssh/channel-type.c
-@@ -29,6 +29,7 @@
- #include "channel-type.h"
- #include "error.h"
- #include "common.h"
-+#include "log.h"
-
-
- /* The channel port type. Guile 2.2 introduced a new port API, so we have a
-@@ -223,10 +224,17 @@ ptob_close (SCM channel)
- ptob_flush (channel);
- #endif
-
-- if (ch)
-+ if (ch && ssh_channel_is_open (ch->ssh_channel))
- {
-+ _gssh_log_debug ("ptob_close", "closing and freeing the channel...",
-+ channel);
- ssh_channel_close (ch->ssh_channel);
- ssh_channel_free (ch->ssh_channel);
-+ _gssh_log_debug1 ("ptob_close", "closing and freeing the channel... done");
-+ }
-+ else
-+ {
-+ _gssh_log_debug1 ("ptob_close", "the channel is already freeed.");
- }
-
- SCM_SETSTREAM (channel, NULL);
-diff --git a/libguile-ssh/log.c b/libguile-ssh/log.c
-index 6588749..e0e3027 100644
---- a/libguile-ssh/log.c
-+++ b/libguile-ssh/log.c
-@@ -270,6 +270,27 @@ _gssh_log_warning (const char* function_name, const char* msg, SCM args)
- scm_dynwind_end ();
- }
-
-+void
-+_gssh_log_debug (const char* function_name, const char* msg, SCM args)
-+{
-+ char *c_str;
-+ scm_dynwind_begin (0);
-+
-+ c_str = scm_to_locale_string (scm_object_to_string (args, SCM_UNDEFINED));
-+ scm_dynwind_free (c_str);
-+
-+ _ssh_log (SSH_LOG_FUNCTIONS, function_name, "[GSSH DEBUG] %s: %s",
-+ msg, c_str);
-+
-+ scm_dynwind_end ();
-+}
-+
-+void
-+_gssh_log_debug1 (const char* function_name, const char* msg)
-+{
-+ _ssh_log (SSH_LOG_FUNCTIONS, function_name, "[GSSH DEBUG] %s", msg);
-+}
-+
-
- /* Initialization */
-
-diff --git a/libguile-ssh/log.h b/libguile-ssh/log.h
-index dd1424b..c3fe866 100644
---- a/libguile-ssh/log.h
-+++ b/libguile-ssh/log.h
-@@ -28,6 +28,9 @@ extern void _gssh_log_error (const char* function_name, const char* msg,
-
- extern void _gssh_log_warning (const char* function_name, const char* msg,
- SCM args);
-+extern void _gssh_log_debug (const char* function_name, const char* msg,
-+ SCM args);
-+extern void _gssh_log_debug1 (const char* function_name, const char* msg);
-
- extern void init_log_func (void);
-
---
-2.20.1
-
diff --git a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.8-name.patch b/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.8-name.patch
deleted file mode 100644
index 0f3d58d..0000000
--- a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.8-name.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 01cafef0dd87b6afda41942070e73b55b45a5ed2 Mon Sep 17 00:00:00 2001
-From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
-Date: Mon, 1 Oct 2018 05:11:27 +0300
-Subject: [PATCH] libguile-ssh: Fix building with libssh 0.8
-
-The 'libguile-ssh' library would fail to build due to missing 'libssh_threads'
-library that was removed libssh 0.8. This patch fixes that.
-
-Reported by lantw44 in
-<https://github.com/artyom-poptsov/guile-ssh/issues/9>
-
-* configure.ac: Add check for libssh 0.8
-* libguile-ssh/Makefile.am: Don't use 'libssh_threads' library when building
- with libssh 0.8+.
-* NEWS: Update.
----
- NEWS | 17 +++++++++++++++++
- configure.ac | 7 +++++++
- libguile-ssh/Makefile.am | 7 ++++++-
- 3 files changed, 30 insertions(+), 1 deletion(-)
-
-diff --git a/NEWS b/NEWS
-index 84d455b..8c73d1b 100644
---- a/NEWS
-+++ b/NEWS
-@@ -7,6 +7,23 @@ Copyright (C) Artyom V. Poptsov <poptsov.artyom@gmail.com>
- are permitted in any medium without royalty provided the copyright
- notice and this notice are preserved.
-
-+* Unreleased
-+** Bugfixes
-+*** Fix a segfault in 'libguile-ssh'
-+ The library would always fail with segmentation fault error when an
-+ application tried to free a closed channel. Now it should be fixed.
-+
-+ Reported by Michael Bowcutt <mbowcutt@case.edu> in
-+ <https://github.com/artyom-poptsov/guile-ssh/issues/8>
-+ and Njagi Mwaniki in a personal email.
-+*** Fix building with libssh 0.8
-+ The 'libguile-ssh' library would fail to build due to missing
-+ 'libssh_threads' library that was removed libssh 0.8. Now 'libguile-ssh'
-+ builds without 'libssh_threads' when using libssh 0.8+.
-+
-+ Reported by lantw44 in
-+ <https://github.com/artyom-poptsov/guile-ssh/issues/9>
-+
- * Changes in version 0.11.3 (2018-03-27)
- ** Bugfixes
- *** 'node-run-server' now checks for errors
-diff --git a/configure.ac b/configure.ac
-index c818208..74271f7 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -64,6 +64,13 @@ PKG_CHECK_MODULES([LIBSSH_0_7_3], [libssh >= 0.7.3],
- Using a potentially vulnerable version of libssh
- <https://www.libssh.org/2016/02/23/libssh-0-7-3-security-and-bugfix-release/>])])
-
-+dnl Checking for libssh 0.8.x
-+PKG_CHECK_MODULES([LIBSSH_0_8], [libssh >= 0.8.0],
-+ [AC_DEFINE(HAVE_LIBSSH_0_8, 1, [Use libssh 0.8])],
-+ [AC_DEFINE(HAVE_LIBSSH_0_8, 0, [Use libssh < 0.8])])
-+
-+AM_CONDITIONAL(HAVE_LIBSSH_0_8, $HAVE_LIBSSH_0_8)
-+
- # -------------------------------------------------------------------------------
-
- dnl These macros must be provided by guile.m4.
-diff --git a/libguile-ssh/Makefile.am b/libguile-ssh/Makefile.am
-index 1ffb6c0..523d77a 100644
---- a/libguile-ssh/Makefile.am
-+++ b/libguile-ssh/Makefile.am
-@@ -44,7 +44,12 @@ BUILT_SOURCES = auth.x channel-func.x channel-type.x error.x \
-
- libguile_ssh_la_CPPFLAGS = $(GUILE_CFLAGS)
-
--libguile_ssh_la_LDFLAGS = -module -no-undefined -lssh_threads -lssh \
-+SSH_LD_FLAGS = -lssh
-+if ! HAVE_LIBSSH_0_8
-+SSH_LD_FLAGS += -lssh_threads
-+endif
-+
-+libguile_ssh_la_LDFLAGS = -module -no-undefined $(SSH_LD_FLAGS) \
- -version-info $(LIBGUILE_SSH_INTERFACE) $(GUILE_LDFLAGS)
-
- AM_CFLAGS = $(WARN_CFLAGS)
---
-2.20.1
-
diff --git a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.8-tests.patch b/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.8-tests.patch
deleted file mode 100644
index 8b1b652..0000000
--- a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.8-tests.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From dac7ae6f3347056f46d664f6104cf6425ae25394 Mon Sep 17 00:00:00 2001
-From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
-Date: Wed, 2 Jan 2019 11:47:50 +0300
-Subject: [PATCH] tests/server.scm ("server-set!, valid values"): Add fix for
- libssh 0.8
-
----
- tests/server.scm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/server.scm b/tests/server.scm
-index 7a37a96..c7f8b6c 100644
---- a/tests/server.scm
-+++ b/tests/server.scm
-@@ -52,7 +52,7 @@
- (topdir (getenv "abs_top_srcdir"))
- (options `((bindaddr "127.0.0.1")
- (bindport 22)
-- ,(if (= %libssh-minor-version 7)
-+ ,(if (>= %libssh-minor-version 7)
- (list 'hostkey %rsakey %dsakey)
- '(hostkey "ssh-rsa" "ssh-dss"))
- (rsakey ,%rsakey)
---
-2.20.1
-
diff --git a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-1.patch b/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-1.patch
deleted file mode 100644
index 6dbbe98..0000000
--- a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-1.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From a15543f7114b3f1ade8cce2cd1065e6aa60c14cc Mon Sep 17 00:00:00 2001
-From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
-Date: Tue, 17 Sep 2019 22:31:50 +0300
-Subject: [PATCH] configure.ac: Add missing AM_CONDITIONAL
-
-* configure.ac: Add missing AM_CONDITIONAL for 'HAVE_LIBSSH_0_8' constant.
----
- configure.ac | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 99d35af..1d8baf2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -69,6 +69,8 @@ PKG_CHECK_MODULES([LIBSSH_0_8], [libssh >= 0.8.0],
- [AC_DEFINE(HAVE_LIBSSH_0_8, 1, [Use libssh 0.8])],
- [AC_DEFINE(HAVE_LIBSSH_0_8, 0, [Use libssh < 0.8])])
-
-+AM_CONDITIONAL(HAVE_LIBSSH_0_8, $HAVE_LIBSSH_0_8)
-+
- PKG_CHECK_MODULES([LIBSSH_0_9], [libssh >= 0.9.0],
- [AC_DEFINE(HAVE_LIBSSH_0_9, 1, [Use libssh 0.9])],
- [AC_DEFINE(HAVE_LIBSSH_0_9, 0, [Use libssh < 0.9])])
diff --git a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-2.patch b/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-2.patch
deleted file mode 100644
index d3a98eb..0000000
--- a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-2.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 75cec44f60e07730cbd25157b4a19c98fc8583fb Mon Sep 17 00:00:00 2001
-From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
-Date: Thu, 19 Sep 2019 20:09:30 +0300
-Subject: [PATCH] libguile-ssh/key-type.c: Fix libssh 9.0 check
-
-Reported by lantw44 in
-<https://github.com/artyom-poptsov/guile-ssh/issues/12>
-
-* libguile-ssh/key-type.c: Use 'if' instead of 'ifdef' to check the presence
- of libssh 9.0.
----
- libguile-ssh/key-type.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libguile-ssh/key-type.c b/libguile-ssh/key-type.c
-index 12617ce..10e7c4a 100644
---- a/libguile-ssh/key-type.c
-+++ b/libguile-ssh/key-type.c
-@@ -44,7 +44,7 @@ static const struct symbol_mapping key_types[] = {
- { "rsa1", SSH_KEYTYPE_RSA1 },
- { "ecdsa", SSH_KEYTYPE_ECDSA }, /* Deprecated in libssh 0.9 */
-
--#ifdef HAVE_LIBSSH_0_9
-+#if HAVE_LIBSSH_0_9
- { "ecdsa-p256", SSH_KEYTYPE_ECDSA_P256 },
- { "ecdsa-p384", SSH_KEYTYPE_ECDSA_P384 },
- { "ecdsa-p521", SSH_KEYTYPE_ECDSA_P521 },
diff --git a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa.patch b/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa.patch
deleted file mode 100644
index c8e85c5..0000000
--- a/guix/guile-ssh/guile-ssh-0.11.3-libssh-0.9-ecdsa.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 104d797096e966e91f777959d7cc5d8831c1a942 Mon Sep 17 00:00:00 2001
-From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
-Date: Sun, 15 Sep 2019 21:03:07 +0300
-Subject: [PATCH] key-type.c: Add new ECDSA key types from libssh 0.9
-
-The Guile-SSH key procedures would fail when libssh 0.9 + openssl is used on
-ECDSA keys because it was missing support of new ECDSA key subtypes. This
-change fixes the library and the tests.
-
-* libguile-ssh/key-type.c: Add new ECDSA key types from libssh 0.9
-* tests/key.scm: Update tests.
-* configure.ac: Check for libssh 0.9
----
- configure.ac | 8 ++++++--
- libguile-ssh/key-type.c | 12 +++++++++++-
- tests/key.scm | 13 +++++++++----
- 3 files changed, 26 insertions(+), 7 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 74271f7..99d35af 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -69,7 +69,11 @@ PKG_CHECK_MODULES([LIBSSH_0_8], [libssh >= 0.8.0],
- [AC_DEFINE(HAVE_LIBSSH_0_8, 1, [Use libssh 0.8])],
- [AC_DEFINE(HAVE_LIBSSH_0_8, 0, [Use libssh < 0.8])])
-
--AM_CONDITIONAL(HAVE_LIBSSH_0_8, $HAVE_LIBSSH_0_8)
-+PKG_CHECK_MODULES([LIBSSH_0_9], [libssh >= 0.9.0],
-+ [AC_DEFINE(HAVE_LIBSSH_0_9, 1, [Use libssh 0.9])],
-+ [AC_DEFINE(HAVE_LIBSSH_0_9, 0, [Use libssh < 0.9])])
-+
-+AM_CONDITIONAL(HAVE_LIBSSH_0_9, $HAVE_LIBSSH_0_9)
-
- # -------------------------------------------------------------------------------
-
-diff --git a/libguile-ssh/key-type.c b/libguile-ssh/key-type.c
-index ab67ecd..12617ce 100644
---- a/libguile-ssh/key-type.c
-+++ b/libguile-ssh/key-type.c
-@@ -42,7 +42,17 @@ static const struct symbol_mapping key_types[] = {
- { "dss", SSH_KEYTYPE_DSS },
- { "rsa", SSH_KEYTYPE_RSA },
- { "rsa1", SSH_KEYTYPE_RSA1 },
-- { "ecdsa", SSH_KEYTYPE_ECDSA },
-+ { "ecdsa", SSH_KEYTYPE_ECDSA }, /* Deprecated in libssh 0.9 */
-+
-+#ifdef HAVE_LIBSSH_0_9
-+ { "ecdsa-p256", SSH_KEYTYPE_ECDSA_P256 },
-+ { "ecdsa-p384", SSH_KEYTYPE_ECDSA_P384 },
-+ { "ecdsa-p521", SSH_KEYTYPE_ECDSA_P521 },
-+ { "ecdsa-p256-cert01", SSH_KEYTYPE_ECDSA_P256_CERT01 },
-+ { "ecdsa-p384-cert01", SSH_KEYTYPE_ECDSA_P384_CERT01 },
-+ { "ecdsa-p521-cert01", SSH_KEYTYPE_ECDSA_P521_CERT01 },
-+#endif
-+
- { "ed25519", SSH_KEYTYPE_ED25519 },
- { "unknown", SSH_KEYTYPE_UNKNOWN },
- { NULL, -1 }
-diff --git a/tests/key.scm b/tests/key.scm
-index c4394b1..be31378 100644
---- a/tests/key.scm
-+++ b/tests/key.scm
-@@ -89,9 +89,11 @@
-
- (test-assert-with-log "get-key-type"
- (and (eq? 'rsa (get-key-type *rsa-key*))
-- (eq? 'dss (get-key-type *dsa-key*))
-+ (eq? 'dss (get-key-type *dsa-key*)) ;))
- (when-openssl
-- (eq? 'ecdsa (get-key-type *ecdsa-key*)))))
-+ (or (eq? 'ecdsa-p256 (get-key-type *ecdsa-key*))
-+ ;; For libssh versions prior to 0.9
-+ (eq? 'ecdsa (get-key-type *ecdsa-key*))))))
-
-
- (test-assert-with-log "private-key-to-file"
-@@ -138,7 +140,9 @@
-
- (when-openssl
- (test-equal "string->public-key, ECDSA"
-- (public-key->string (string->public-key %ecdsakey-pub-string 'ecdsa))
-+ (if (string=? (cadr (string-split (get-libssh-version) #\.)) "9")
-+ (public-key->string (string->public-key %ecdsakey-pub-string 'ecdsa-p256))
-+ (public-key->string (string->public-key %ecdsakey-pub-string 'ecdsa)))
- %ecdsakey-pub-string))
-
- (test-assert-with-log "string->public-key, RSA, gc test"
-@@ -162,7 +166,8 @@
- (when-openssl
- (let ((key (make-keypair 'ecdsa 256)))
- (and (key? key)
-- (eq? (get-key-type key) 'ecdsa))))))
-+ (or (eq? (get-key-type key) 'ecdsa) ; libssh < 0.9
-+ (eq? (get-key-type key) 'ecdsa-p256)))))))
-
- ;;;
-
diff --git a/guix/guile-ssh/guile-ssh.spec b/guix/guile-ssh/guile-ssh.spec
index daa3b54..50ec69b 100644
--- a/guix/guile-ssh/guile-ssh.spec
+++ b/guix/guile-ssh/guile-ssh.spec
@@ -1,19 +1,12 @@
Name: guile-ssh
-Version: 0.11.3
-Release: 6%{?dist}
+Version: 0.12.0
+Release: 1%{?dist}
Summary: A library that provides access to the SSH protocol for GNU Guile
License: GPLv3+
URL: https://github.com/artyom-poptsov/guile-ssh
Source0: https://github.com/artyom-poptsov/guile-ssh/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-Patch0: guile-ssh-0.11.3-fix-segfault.patch
-Patch1: guile-ssh-0.11.3-libssh-0.8-name.patch
-Patch2: guile-ssh-0.11.3-libssh-0.8-tests.patch
-Patch3: guile-ssh-0.11.3-libssh-0.9-ecdsa.patch
-Patch4: guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-1.patch
-Patch5: guile-ssh-0.11.3-libssh-0.9-ecdsa-fixup-2.patch
-
%global guile_source_dir %{_datadir}/guile/site/2.2
%global guile_ccache_dir %{_libdir}/guile/2.2/site-ccache
@@ -45,6 +38,7 @@ autoreconf -fi
%check
+sed -i 's|/usr/bin/guile|%{_bindir}/guile2.2|g' tests/common.scm
%{__make} %{?_smp_mflags} check
@@ -83,6 +77,9 @@ fi
%changelog
+* Sun Apr 26 2020 Ting-Wei Lan <lantw44@gmail.com> - 0.12.0-1
+- Update to 0.12.0
+
* Fri Sep 20 2019 Ting-Wei Lan <lantw44@gmail.com> - 0.11.3-6
- Fix build with libssh 0.8