Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 16560 - autossh update + fix
Summary: autossh update + fix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Ahlberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-28 09:03 UTC by Jedi/Sector One
Modified: 2003-03-10 04:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The patch (autossh-1.2d.patch,2.46 KB, patch)
2003-02-28 09:04 UTC, Jedi/Sector One
Details | Diff
The patch (autossh-1.2d.patch,2.46 KB, patch)
2003-02-28 09:04 UTC, Jedi/Sector One
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jedi/Sector One 2003-02-28 09:03:38 UTC
Here's an update for autossh (to version 1.2d), plus a fix to make it reuse previous ports. 
 
For conveniency, the patch is also available from 
ftp://ftp.fr.pureftpd.org/tmp/autossh-1.2d.patch 
 
diff -urN net-misc/autossh.old/autossh-1.2d.ebuild net-misc/autossh/autossh-1.2d.ebuild 
--- net-misc/autossh.old/autossh-1.2d.ebuild    1970-01-01 01:00:00.000000000 +0100 
+++ net-misc/autossh/autossh-1.2d.ebuild        2003-03-01 14:52:37.000000000 +0100 
@@ -0,0 +1,36 @@ 
+# Copyright 1999-2003 Gentoo Technologies, Inc. 
+# Distributed under the terms of the GNU General Public License v2 
+# $Header: /home/cvsroot/gentoo-x86/net-misc/autossh/autossh-1.2c.ebuild,v 1.1 
2003/02/13 10:19:02 aliz Exp $ 
+ 
+S=${WORKDIR}/${P} 
+DESCRIPTION="Automatically restart SSH sessions and tunnels" 
+HOMEPAGE="http://www.harding.motd.ca/autossh/" 
+LICENSE="BSD" 
+KEYWORDS="~x86" 
+SRC_URI="http://www.harding.motd.ca/autossh/${P}.tgz" 
+SLOT="0" 
+ 
+DEPEND="virtual/glibc 
+       sys-apps/sed" 
+RDEPEND="virtual/glibc 
+       net-misc/openssh" 
+ 
+src_unpack() { 
+       unpack ${A} 
+       cd ${S} 
+ 
+       patch -p0 < ${FILESDIR}/${PV}-reuse.patch 
+       mv Makefile.linux Makefile.linux.orig 
+       sed "s/CFLAGS=/CFLAGS=${CFLAGS}/g" Makefile.linux.orig >Makefile.linux 
+} 
+ 
+src_compile() { 
+       emake -f Makefile.linux || die "make failed" 
+} 
+ 
+src_install() { 
+       dobin autossh 
+       dodoc CHANGES README autossh.host rscreen 
+       doman autossh.1 
+} 
+ 
diff -urN net-misc/autossh.old/files/1.2d-reuse.patch net-misc/autossh/files/1.2d-reuse.patch 
--- net-misc/autossh.old/files/1.2d-reuse.patch 1970-01-01 01:00:00.000000000 +0100 
+++ net-misc/autossh/files/1.2d-reuse.patch     2003-03-01 14:53:02.000000000 +0100 
@@ -0,0 +1,22 @@ 
+diff -u autossh.c autossh.c-jedi 
+--- autossh.c  2003-02-14 00:47:46.000000000 +0100 
++++ autossh.c-jedi     2003-03-01 14:42:03.000000000 +0100 
+@@ -955,6 +955,7 @@ 
+ { 
+       int sock; 
+       struct addrinfo *res; 
++      int on = 1; 
+ 
+       /* 
+        * Unlike conn_remote, we don't need to cache the 
+@@ -967,6 +968,10 @@ 
+           res->ai_protocol)) == -1) 
+               xerrlog(LOG_ERR, "socket: %s", strerror(errno)); 
+ 
++      if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, 
++                       (char *) &on, sizeof on) != 0) { 
++              xerrlog(LOG_ERR, "socket: %s", strerror(errno)); 
++       } 
+       if (bind(sock, (struct sockaddr *)res->ai_addr, 
+           res->ai_addrlen) == -1) 
+               xerrlog(LOG_ERR, "bind: %s", strerror(errno)); 
diff -urN net-misc/autossh.old/files/digest-autossh-1.2d 
net-misc/autossh/files/digest-autossh-1.2d 
--- net-misc/autossh.old/files/digest-autossh-1.2d      1970-01-01 01:00:00.000000000 
+0100 
+++ net-misc/autossh/files/digest-autossh-1.2d  2003-03-01 14:47:26.000000000 +0100 
@@ -0,0 +1 @@ 
+MD5 6e73d325a8286ac3d8eddf63f2043d0d autossh-1.2d.tgz 15548
Comment 1 Jedi/Sector One 2003-02-28 09:04:21 UTC
Created attachment 8817 [details, diff]
The patch

Oops, sorry, I didn't know that it was possible to attach files.
Comment 2 Jedi/Sector One 2003-02-28 09:04:37 UTC
Created attachment 8818 [details, diff]
The patch

Oops, sorry, I didn't know that it was possible to attach files.
Comment 3 Daniel Ahlberg (RETIRED) gentoo-dev 2003-03-10 04:07:03 UTC
Commited, thanks for the submission!