[arch-commits] Commit in tmate/repos (3 files)

Christian Hesse eworm at archlinux.org
Tue Jul 30 11:38:47 UTC 2019


    Date: Tuesday, July 30, 2019 @ 11:38:46
  Author: eworm
Revision: 495222

archrelease: copy trunk to community-x86_64

Added:
  tmate/repos/community-x86_64/
  tmate/repos/community-x86_64/0001-add-new-channel-after-authentication.patch
    (from rev 495221, tmate/trunk/0001-add-new-channel-after-authentication.patch)
  tmate/repos/community-x86_64/PKGBUILD
    (from rev 495221, tmate/trunk/PKGBUILD)

-------------------------------------------------+
 0001-add-new-channel-after-authentication.patch |   44 ++++++++++++++++++++++
 PKGBUILD                                        |   39 +++++++++++++++++++
 2 files changed, 83 insertions(+)

Copied: tmate/repos/community-x86_64/0001-add-new-channel-after-authentication.patch (from rev 495221, tmate/trunk/0001-add-new-channel-after-authentication.patch)
===================================================================
--- community-x86_64/0001-add-new-channel-after-authentication.patch	                        (rev 0)
+++ community-x86_64/0001-add-new-channel-after-authentication.patch	2019-07-30 11:38:46 UTC (rev 495222)
@@ -0,0 +1,44 @@
+From d95281d7f248ba5aa31a8977909a3344ec5b132c Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail at eworm.de>
+Date: Tue, 30 Jul 2019 08:15:59 +0200
+Subject: [PATCH 1/1] add new channel after authentication
+
+With libssh commit 8a885f0b ("channels: Add check if we are authenticated
+before we create a channel") connection fails if channel is added before
+successful authentication. So add the channel after authentication.
+
+Fixes #154
+---
+ tmate-ssh-client.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/tmate-ssh-client.c b/tmate-ssh-client.c
+index 96da14c8..2a9afee0 100644
+--- a/tmate-ssh-client.c
++++ b/tmate-ssh-client.c
+@@ -241,12 +241,6 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
+ 
+ 		ssh_set_callbacks(session, &client->ssh_callbacks);
+ 
+-		client->channel = channel = ssh_channel_new(session);
+-		if (!channel) {
+-			tmate_fatal("cannot initialize");
+-			return;
+-		}
+-
+ 		ssh_set_blocking(session, 0);
+ 		ssh_options_set(session, SSH_OPTIONS_HOST, client->server_ip);
+ 		ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
+@@ -370,6 +364,12 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
+ 		case SSH_AUTH_SUCCESS:
+ 			tmate_debug("Auth successful");
+ 			client->state = SSH_OPEN_CHANNEL;
++
++			client->channel = channel = ssh_channel_new(session);
++			if (!channel) {
++				tmate_fatal("cannot initialize");
++				return;
++			}
+ 			/* fall through */
+ 		}
+ 

Copied: tmate/repos/community-x86_64/PKGBUILD (from rev 495221, tmate/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2019-07-30 11:38:46 UTC (rev 495222)
@@ -0,0 +1,39 @@
+# Maintainer: Christian Hesse <mail at eworm.de>
+# Contributor: "Amhairghin" Oscar Garcia Amor
+# Contributors: bhushan, huma, adlaiff6, Invie, solarce
+
+pkgname=tmate
+pkgver=2.2.1
+pkgrel=3
+pkgdesc='Instant terminal sharing'
+arch=('x86_64')
+url='http://tmate.io/'
+license=('BSD')
+depends=('libevent' 'libssh' 'libutempter' 'msgpack-c')
+makedepends=('cmake' 'ruby')
+source=("https://github.com/tmate-io/${pkgname}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+        '0001-add-new-channel-after-authentication.patch')
+sha256sums=('d9c2ac59f42e65aac5f500f0548ea8056fd79c9c5285e5af324d833e2a84c305'
+            '85029b3b32f6306fe44fb4a7c0a7307007436a69c4e5c2c00bfabec4db9f117c')
+
+prepare() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+
+  patch -Np1 < ../0001-add-new-channel-after-authentication.patch
+}
+
+build() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+
+  ./autogen.sh
+  ./configure --prefix=/usr
+  make
+}
+
+package() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+
+  make DESTDIR=${pkgdir} install
+
+  install -D -m0644 COPYING ${pkgdir}/usr/share/licenses/tmate/COPYING
+}



More information about the arch-commits mailing list