ports/161020: Update unSSH port

Dax Labrador semprix at gmx.com
Sun Sep 25 22:40:10 UTC 2011


>Number:         161020
>Category:       ports
>Synopsis:       Update unSSH port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 25 22:40:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Dax Labrador
>Release:        FreeBSD 7.2-RELEASE
>Organization:
>Environment:
FreeBSD audrey 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 08:49:13 UTC 2009     root at walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Updated unSSH port

v1.5

code sanitising
- quote variables where harmful to do not
- use the builtin [[ in favour of [
- drop quotes inside [[ statements as they're not needed

fix argument parsing
- the parsing shortcut wasn't aware of non-hostname arguments containing a semicolon or at-sign, messing things up when e.g. -L was given
- add support for handling -w (this code should get more robust against unknown params)
- have special handling for flags like -p, which has a value with ssh and none with scp



>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	unssh/
#	unssh/Makefile
#	unssh/distinfo
#	unssh/pkg-descr
#	unssh/files
#	unssh/files/extra-patch-unssh.sh.in
#	unssh/Makefile.orig
#	unssh/distinfo.orig
#	unssh/Makefile-patch
#
echo c - unssh/
mkdir -p unssh/ > /dev/null 2>&1
echo x - unssh/Makefile
sed 's/^X//' >unssh/Makefile << 'f5aa43f00d7255db3ee269054ebbf0ba'
X# New ports collection makefile for:	unssh
X# Date created:				30 July 2009
X# Whom:					Dax Labrador <semprix at bsdmail.org>
X#
X# $FreeBSD: ports/security/unssh/Makefile,v 1.3 2011/04/03 07:39:01 culot Exp $
X#
X
XPORTNAME=	unssh
XPORTVERSION=	1.5
XCATEGORIES=	security
XMASTER_SITES=	http://www.semprixd.com/shares/ports/
X
XMAINTAINER=	semprix at gmx.com
XCOMMENT=	Fast way to delete entries from OpenSSH known_hosts file
X
XRUN_DEPENDS=	bash:${PORTSDIR}/shells/bash
X
XNO_BUILD=	yes
XPLIST_FILES=	bin/unssh
X
Xpre-patch:
X.for patch in ${PATCH_LIST}
X	@${SED} ${_SUB_LIST_TEMP} ${FILESDIR}/${patch}.in > ${WRKDIR}/${patch}
X.endfor
X
Xdo-install:
X	@${INSTALL} -d ${PREFIX}/bin
X	@${CP} ${WRKSRC}/unssh.sh ${PREFIX}/bin/unssh
X	@${CHMOD} ${BINMODE} ${PREFIX}/bin/unssh
X
X.include <bsd.port.mk>
f5aa43f00d7255db3ee269054ebbf0ba
echo x - unssh/distinfo
sed 's/^X//' >unssh/distinfo << '8ebb32e4c52fda90f864888aca1203d0'
XSHA256 (unssh-1.5.tar.gz) = 75122a6c264eb690df8464e2aefd64e7b7df8461bcb9525f3a4f27d6593053f6
XSIZE (unssh-1.5.tar.gz) = 11528
8ebb32e4c52fda90f864888aca1203d0
echo x - unssh/pkg-descr
sed 's/^X//' >unssh/pkg-descr << 'a72e23364feb4147bb1721f78c840194'
XProvide a fast way to delete entries from OpenSSH's known_hosts
Xfile. This is a simple automation of the things normally done by
Xthe user when having an "offending key" in his/her known_hosts file
Xcaused by a changing host key of the destination.
X
XWWW:    http://unssh.sourceforge.net/
a72e23364feb4147bb1721f78c840194
echo c - unssh/files
mkdir -p unssh/files > /dev/null 2>&1
echo x - unssh/files/extra-patch-unssh.sh.in
sed 's/^X//' >unssh/files/extra-patch-unssh.sh.in << 'debfc9cc2240de7fa770a05441a68c25'
X--- ./unssh.sh.orig	2009-07-12 19:31:45.000000000 -0400
X+++ ./unssh.sh	2010-01-18 17:57:11.000000000 -0500
X@@ -1,4 +1,4 @@
X-#!/bin/bash
X+#!%%LOCALBASE%%/bin/bash
X #  This  simple script helps deleting hosts from the user's known_hosts
X #  file when their pubkey has changed.
X #    Copyright (C) 2006-2009 by Phil Sutter <phil at nwl.cc>
X@@ -52,7 +52,7 @@
X 	return $1
X }
X search_in_sshcnf() { # (expr)
X-	grep -qi "^host $1$" $SSH_CNF || return 1
X+	grep -qi "^host $1$" $SSH_CNF >/dev/null 2>&1 || return 1
X 	# the code below  calls awk in three steps:
X 	# * filter empty and commented out lines
X 	# * divide content into records containing a single "Host" definition
X@@ -107,7 +107,7 @@
X 		name="$1"
X 	fi
X 	# does a host lookup to get the corresponding IP/hostname
X-	eval "$(hostx "$name" 2>&1 | \
X+	eval "$(nslookup "$name" 2>&1 | \
X 			 awk '/exist/{exit 1} \
X 			 	/Name:/{print "LU_HOST="$2} \
X 				/Address:/{print "LU_IP="$2} \
debfc9cc2240de7fa770a05441a68c25
echo x - unssh/Makefile.orig
sed 's/^X//' >unssh/Makefile.orig << 'ead89698e8e0736d6c711d692c2dfd75'
X# New ports collection makefile for:	unssh
X# Date created:				30 July 2009
X# Whom:					Dax Labrador <semprix at bsdmail.org>
X#
X# $FreeBSD: ports/security/unssh/Makefile,v 1.3 2011/04/03 07:39:01 culot Exp $
X#
X
XPORTNAME=	unssh
XPORTVERSION=	1.4
XCATEGORIES=	security
XMASTER_SITES=	http://www.semprixd.com/shares/ports/
X
XMAINTAINER=	semprix at gmx.com
XCOMMENT=	Fast way to delete entries from OpenSSH known_hosts file
X
XRUN_DEPENDS=	bash:${PORTSDIR}/shells/bash
X
XNO_BUILD=	yes
XPLIST_FILES=	bin/unssh
X
XPATCH_LIST=	extra-patch-unssh.sh
XEXTRA_PATCHES=	${PATCH_LIST:C|^|${WRKDIR}/|g}
X
Xpre-patch:
X.for patch in ${PATCH_LIST}
X	@${SED} ${_SUB_LIST_TEMP} ${FILESDIR}/${patch}.in > ${WRKDIR}/${patch}
X.endfor
X
Xdo-install:
X	@${INSTALL} -d ${PREFIX}/bin
X	@${CP} ${WRKSRC}/unssh.sh ${PREFIX}/bin/unssh
X	@${CHMOD} ${BINMODE} ${PREFIX}/bin/unssh
X
X.include <bsd.port.mk>
ead89698e8e0736d6c711d692c2dfd75
echo x - unssh/distinfo.orig
sed 's/^X//' >unssh/distinfo.orig << '73bf8b00315305a01d21706dba638a15'
XSHA256 (unssh-1.4.tar.gz) = 8252d0818d044452241a279031a903634b983cf94e4671e32f4df5a754f686f2
XSIZE (unssh-1.4.tar.gz) = 11381
73bf8b00315305a01d21706dba638a15
echo x - unssh/Makefile-patch
sed 's/^X//' >unssh/Makefile-patch << 'a04f439ffc1916123c8c30be701c1282'
X--- Makefile.orig	2011-09-26 13:49:40.000000000 +0800
X+++ Makefile	2011-09-26 13:53:13.000000000 +0800
X@@ -6,7 +6,7 @@
X #
X 
X PORTNAME=	unssh
X-PORTVERSION=	1.4
X+PORTVERSION=	1.5
X CATEGORIES=	security
X MASTER_SITES=	http://www.semprixd.com/shares/ports/
X 
X@@ -18,9 +18,6 @@
X NO_BUILD=	yes
X PLIST_FILES=	bin/unssh
X 
X-PATCH_LIST=	extra-patch-unssh.sh
X-EXTRA_PATCHES=	${PATCH_LIST:C|^|${WRKDIR}/|g}
X-
X pre-patch:
X .for patch in ${PATCH_LIST}
X 	@${SED} ${_SUB_LIST_TEMP} ${FILESDIR}/${patch}.in > ${WRKDIR}/${patch}
a04f439ffc1916123c8c30be701c1282
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list