Index: head/security/pssh/Makefile =================================================================== --- head/security/pssh/Makefile (revision 228224) +++ head/security/pssh/Makefile (revision 228225) @@ -1,24 +1,33 @@ # Ports collection makefile for: pssh # Date created: Mon Jul 2, 2007 # Whom: Brooks Davis # # $FreeBSD$ # PORTNAME= pssh -PORTVERSION= 1.3.1 -PORTREVISION= 1 +PORTVERSION= 1.4.3 CATEGORIES= security net sysutils MASTER_SITES= http://www.theether.org/pssh/ \ ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= brooks MAINTAINER= brooks@FreeBSD.org COMMENT= Parallel versions of the openssh tools RUN_DEPENDS= rsync:${PORTSDIR}/net/rsync USE_PYTHON= YES USE_PYDISTUTILS=easy_install + +FIX_PYPATH= bin/pnuke \ + bin/prsync \ + bin/pscp \ + bin/pslurp \ + bin/pssh + +post-patch: + ${REINPLACE_CMD} -e 's|#!/usr/bin/env python|#!${PYTHON_CMD}|' \ + ${FIX_PYPATH:S/^/${WRKSRC}\//} .include Property changes on: head/security/pssh/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/security/pssh/distinfo =================================================================== --- head/security/pssh/distinfo (revision 228224) +++ head/security/pssh/distinfo (revision 228225) @@ -1,3 +1,3 @@ -MD5 (pssh-1.3.1.tar.gz) = f01bc890a473f5e1c1ca1957320fcd5c -SHA256 (pssh-1.3.1.tar.gz) = 4701aacbcbdc018d1e87c02624589e09c956080455c87cac1497d1b2a82055a1 -SIZE (pssh-1.3.1.tar.gz) = 37742 +MD5 (pssh-1.4.3.tar.gz) = dcb8e1497fdd53dced9c3a5d33053757 +SHA256 (pssh-1.4.3.tar.gz) = 165460acc1e8e96754b9641676b4ae28adbe2ac67e76eace584007f535512438 +SIZE (pssh-1.4.3.tar.gz) = 37403 Property changes on: head/security/pssh/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/security/pssh/files/patch-bin_prsync =================================================================== --- head/security/pssh/files/patch-bin_prsync (revision 228224) +++ head/security/pssh/files/patch-bin_prsync (nonexistent) @@ -1,18 +0,0 @@ - -$FreeBSD$ - ---- bin/prsync.orig -+++ bin/prsync -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/local/bin/python - # -*- Mode: python -*- - # - # Usage: prsync [OPTIONS] -h hosts.txt local remote -@@ -141,6 +141,5 @@ - sys.exit(3) - hosts, ports, users = psshutil.read_hosts(flags["hosts"]) - psshutil.patch_users(hosts, ports, users, flags["user"]) -- signal.signal(signal.SIGCHLD, psshutil.reaper) - os.setpgid(0, 0) - do_prsync(hosts, ports, users, local, remote, flags) Property changes on: head/security/pssh/files/patch-bin_prsync ___________________________________________________________________ Deleted: cvs2svn:cvs-rev ## -1 +0,0 ## -1.1 \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/security/pssh/files/patch-bin_pssh =================================================================== --- head/security/pssh/files/patch-bin_pssh (revision 228224) +++ head/security/pssh/files/patch-bin_pssh (nonexistent) @@ -1,19 +0,0 @@ - -$FreeBSD$ - ---- bin/pssh.orig -+++ bin/pssh -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/local/bin/python - # -*- Mode: python -*- - # - # Usage: pssh [OPTIONS] -h hosts.txt prog [arg0] [arg1] .. -@@ -141,7 +141,6 @@ - cmdline = " ".join(args) - hosts, ports, users = psshutil.read_hosts(flags["hosts"]) - psshutil.patch_users(hosts, ports, users, flags["user"]) -- signal.signal(signal.SIGCHLD, psshutil.reaper) - os.setpgid(0, 0) - do_pssh(hosts, ports, users, cmdline, flags) - Property changes on: head/security/pssh/files/patch-bin_pssh ___________________________________________________________________ Deleted: cvs2svn:cvs-rev ## -1 +0,0 ## -1.1 \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/security/pssh/files/patch-bin_pscp =================================================================== --- head/security/pssh/files/patch-bin_pscp (revision 228224) +++ head/security/pssh/files/patch-bin_pscp (nonexistent) @@ -1,18 +0,0 @@ - -$FreeBSD$ - ---- bin/pscp.orig -+++ bin/pscp -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/local/bin/python - # -*- Mode: python -*- - # - # Usage: pscp [OPTIONS] -h hosts.txt local remote -@@ -132,6 +132,5 @@ - sys.exit(3) - hosts, ports, users = psshutil.read_hosts(flags["hosts"]) - psshutil.patch_users(hosts, ports, users, flags["user"]) -- signal.signal(signal.SIGCHLD, psshutil.reaper) - os.setpgid(0, 0) - do_pscp(hosts, ports, users, local, remote, flags) Property changes on: head/security/pssh/files/patch-bin_pscp ___________________________________________________________________ Deleted: cvs2svn:cvs-rev ## -1 +0,0 ## -1.1 \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/security/pssh/files/patch-psshlib_basethread.py =================================================================== --- head/security/pssh/files/patch-psshlib_basethread.py (revision 228224) +++ head/security/pssh/files/patch-psshlib_basethread.py (nonexistent) @@ -1,28 +0,0 @@ - -$FreeBSD$ - ---- psshlib/basethread.py.orig -+++ psshlib/basethread.py -@@ -1,4 +1,4 @@ --import color, cStringIO, fcntl, os, select, signal, sys, threading, time, Queue -+import color, cStringIO, errno, fcntl, os, select, signal, sys, threading, time, Queue - from subprocess import Popen, PIPE - - class BaseThread(threading.Thread): -@@ -35,7 +35,15 @@ - timeout = self.flags["timeout"] - (time.time() - start) - if timeout <= 0: - raise Exception("Timeout") -- r, w, e = select.select([ cstdout, cstderr ], [], [], timeout) -+ while True: -+ try: -+ r, w, e = select.select([ cstdout, cstderr ], [], [], timeout) -+ break -+ except select.error, v: -+ if v[0] == errno.EINTR: -+ continue -+ else: -+ raise - try: - for f in r: - chunk = f.read() Property changes on: head/security/pssh/files/patch-psshlib_basethread.py ___________________________________________________________________ Deleted: cvs2svn:cvs-rev ## -1 +0,0 ## -1.1 \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/security/pssh/files/patch-bin_pnuke =================================================================== --- head/security/pssh/files/patch-bin_pnuke (revision 228224) +++ head/security/pssh/files/patch-bin_pnuke (nonexistent) @@ -1,19 +0,0 @@ - -$FreeBSD$ - ---- bin/pnuke.orig -+++ bin/pnuke -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/local/bin/python - # -*- Mode: python -*- - # - # Usage: pnuke [OPTIONS] -h hosts.txt pattern -@@ -123,7 +123,6 @@ - cmdline = " ".join(args) - hosts, ports, users = psshutil.read_hosts(flags["hosts"]) - psshutil.patch_users(hosts, ports, users, flags["user"]) -- signal.signal(signal.SIGCHLD, psshutil.reaper) - os.setpgid(0, 0) - do_pnuke(hosts, ports, users, pattern, flags) - Property changes on: head/security/pssh/files/patch-bin_pnuke ___________________________________________________________________ Deleted: cvs2svn:cvs-rev ## -1 +0,0 ## -1.1 \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/security/pssh/files/patch-bin_pslurp =================================================================== --- head/security/pssh/files/patch-bin_pslurp (revision 228224) +++ head/security/pssh/files/patch-bin_pslurp (nonexistent) @@ -1,18 +0,0 @@ - -$FreeBSD$ - ---- bin/pslurp.orig -+++ bin/pslurp -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/local/bin/python - # -*- Mode: python -*- - # - # Usage: pslurp [OPTIONS] -h hosts.txt -o outdir remote local -@@ -145,6 +145,5 @@ - sys.exit(3) - hosts, ports, users = psshutil.read_hosts(flags["hosts"]) - psshutil.patch_users(hosts, ports, users, flags["user"]) -- signal.signal(signal.SIGCHLD, psshutil.reaper) - os.setpgid(0, 0) - do_pslurp(hosts, ports, users, remote, local, flags) Property changes on: head/security/pssh/files/patch-bin_pslurp ___________________________________________________________________ Deleted: cvs2svn:cvs-rev ## -1 +0,0 ## -1.1 \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/security/pssh/files/patch-psshlib_psshutil.py =================================================================== --- head/security/pssh/files/patch-psshlib_psshutil.py (revision 228224) +++ head/security/pssh/files/patch-psshlib_psshutil.py (revision 228225) @@ -1,43 +1,17 @@ $FreeBSD$ --- psshlib/psshutil.py.orig +++ psshlib/psshutil.py -@@ -1,22 +1,18 @@ - import os, signal, sys - --def reaper(signo, frame): -- while 1: -- try: -- pid, status = os.waitpid(-1, os.WNOHANG) -- except: -- break -- if not pid: -- break -- - def read_hosts(pathname): - """ - Read hostfile with lines of the form: host[:port] [login]. Return +@@ -7,7 +7,10 @@ three arrays: hosts, ports, and users. These can be used directly for all ssh-based commands (e.g., ssh, scp, rsync -e ssh, etc.) -+ Empty lines and lines where the first non-blank character is a -+ '#' character are ignored. """ - import re - f = open(pathname) + if pathname == "-": -+ f = open("/dev/stdin") ++ f = open("/dev/stdin") + else: + f = open(pathname) lines = f.readlines() lines = map(lambda x: x.strip(), lines) addrs = [] -@@ -24,7 +20,7 @@ - ports = [] - users = [] - for line in lines: -- if re.match("^\s+$", line) or len(line) == 0: -+ if re.match("^\s*(#|$)", line): - continue - fields = re.split("\s", line) - if len(fields) == 1: Property changes on: head/security/pssh/files/patch-psshlib_psshutil.py ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property