From 7b81defd3b6d68d2e4e61175a2e488049944643d Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Fri, 13 Feb 2009 20:11:13 +0000 Subject: Upgrade to 1.4.3 which fixes all of the bugs I had patched around and more. Prodded by: Michael (ages ago), portscout (via miwi) --- security/pssh/Makefile | 13 +++++++++-- security/pssh/distinfo | 6 ++--- security/pssh/files/patch-bin_pnuke | 19 ---------------- security/pssh/files/patch-bin_prsync | 18 --------------- security/pssh/files/patch-bin_pscp | 18 --------------- security/pssh/files/patch-bin_pslurp | 18 --------------- security/pssh/files/patch-bin_pssh | 19 ---------------- security/pssh/files/patch-psshlib_basethread.py | 28 ----------------------- security/pssh/files/patch-psshlib_psshutil.py | 30 ++----------------------- 9 files changed, 16 insertions(+), 153 deletions(-) delete mode 100644 security/pssh/files/patch-bin_pnuke delete mode 100644 security/pssh/files/patch-bin_prsync delete mode 100644 security/pssh/files/patch-bin_pscp delete mode 100644 security/pssh/files/patch-bin_pslurp delete mode 100644 security/pssh/files/patch-bin_pssh delete mode 100644 security/pssh/files/patch-psshlib_basethread.py (limited to 'security/pssh') diff --git a/security/pssh/Makefile b/security/pssh/Makefile index 543dc2737c66..af0d5d17ac37 100644 --- a/security/pssh/Makefile +++ b/security/pssh/Makefile @@ -6,8 +6,7 @@ # 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} @@ -21,4 +20,14 @@ 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 diff --git a/security/pssh/distinfo b/security/pssh/distinfo index 7096924ba628..29d784b2bf80 100644 --- a/security/pssh/distinfo +++ b/security/pssh/distinfo @@ -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 diff --git a/security/pssh/files/patch-bin_pnuke b/security/pssh/files/patch-bin_pnuke deleted file mode 100644 index a209aa6fba0a..000000000000 --- a/security/pssh/files/patch-bin_pnuke +++ /dev/null @@ -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) - diff --git a/security/pssh/files/patch-bin_prsync b/security/pssh/files/patch-bin_prsync deleted file mode 100644 index 8a6ea33f70fc..000000000000 --- a/security/pssh/files/patch-bin_prsync +++ /dev/null @@ -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) diff --git a/security/pssh/files/patch-bin_pscp b/security/pssh/files/patch-bin_pscp deleted file mode 100644 index 758d1e4eaa58..000000000000 --- a/security/pssh/files/patch-bin_pscp +++ /dev/null @@ -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) diff --git a/security/pssh/files/patch-bin_pslurp b/security/pssh/files/patch-bin_pslurp deleted file mode 100644 index b53f4eba0cd5..000000000000 --- a/security/pssh/files/patch-bin_pslurp +++ /dev/null @@ -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) diff --git a/security/pssh/files/patch-bin_pssh b/security/pssh/files/patch-bin_pssh deleted file mode 100644 index a05010b2ca86..000000000000 --- a/security/pssh/files/patch-bin_pssh +++ /dev/null @@ -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) - diff --git a/security/pssh/files/patch-psshlib_basethread.py b/security/pssh/files/patch-psshlib_basethread.py deleted file mode 100644 index bdca6d2497d7..000000000000 --- a/security/pssh/files/patch-psshlib_basethread.py +++ /dev/null @@ -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() diff --git a/security/pssh/files/patch-psshlib_psshutil.py b/security/pssh/files/patch-psshlib_psshutil.py index a8d90a7dded8..4f6da7662709 100644 --- a/security/pssh/files/patch-psshlib_psshutil.py +++ b/security/pssh/files/patch-psshlib_psshutil.py @@ -3,41 +3,15 @@ $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: -- cgit v1.2.3