From a817fff05a418cd34ddddd32a2cde8d2ed163aae Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Sun, 4 Sep 2011 19:31:56 +0000 Subject: [PATCH] Massh makes it possible to perform the following on hundreds, or even thousands of hosts in a parallelized fashion: * Run Remote Commands * Push and Execute Pre-Written Scripts * Push Files * Pull Files WWW: http://m.a.tt/er/massh/ PR: ports/159770 Submitted by: Sascha Klauder Approved by: bapt (mentor) --- security/Makefile | 1 + security/massh/Makefile | 57 ++++++++++++++++++++++++++++++++++++++++ security/massh/distinfo | 2 ++ security/massh/pkg-descr | 9 +++++++ security/massh/pkg-plist | 11 ++++++++ 5 files changed, 80 insertions(+) create mode 100644 security/massh/Makefile create mode 100644 security/massh/distinfo create mode 100644 security/massh/pkg-descr create mode 100644 security/massh/pkg-plist diff --git a/security/Makefile b/security/Makefile index 1150342be01c..249b1416726f 100644 --- a/security/Makefile +++ b/security/Makefile @@ -277,6 +277,7 @@ SUBDIR += mailzu SUBDIR += makepasswd SUBDIR += manipulate_data + SUBDIR += massh SUBDIR += matrixssl SUBDIR += mcrypt SUBDIR += md4coll diff --git a/security/massh/Makefile b/security/massh/Makefile new file mode 100644 index 000000000000..b19e1d8a065f --- /dev/null +++ b/security/massh/Makefile @@ -0,0 +1,57 @@ +# New ports collection makefile for: massh +# Date created: 2011-08-09 +# Whom: Sascha Klauder +# +# $FreeBSD$ +# + +PORTNAME= massh +PORTVERSION= 2.0.57 +CATEGORIES= security sysutils +MASTER_SITES= http://m.a.tt/er/ +DISTNAME= massh +EXTRACT_SUFX= .tgz + +MAINTAINER= sklauder@trimind.de +COMMENT= Parallel ssh command execution and file transfer on multiple hosts + +LICENSE= GPLv3 + +RUN_DEPENDS= bash:${PORTSDIR}/shells/bash \ + ambit:${PORTSDIR}/shells/ambit + +MASSHDIR?= /var/spool/massh +MAN1= massh.1 +MANCOMPRESSED= yes +NO_BUILD= yes +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +PLIST_SUB= MASSHDIR=${MASSHDIR} + +pre-patch: + @${REINPLACE_CMD} -e "s!/bin/bash!${LOCALBASE}/bin/bash!" \ + ${WRKSRC}/usr/bin/massh + @${REINPLACE_CMD} -e 's!/etc/.MyNameIs/!${PREFIX}/etc/!' \ + ${WRKSRC}/usr/bin/massh + @${REINPLACE_CMD} -e "s!/usr/lib/.MyNameIs/!${PREFIX}/lib/!" \ + ${WRKSRC}/usr/bin/massh + @${REINPLACE_CMD} -e "s!/var/.MyNameIs!${MASSHDIR}!" \ + ${WRKSRC}/usr/bin/massh + @${REINPLACE_CMD} -e "s!PATH=/usr/bin:/bin!PATH=/usr/bin:/bin:${LOCALBASE}/bin!" \ + ${WRKSRC}/etc/massh/massh.conf + @${REINPLACE_CMD} -e 's!SyslogMassh="yes"!SyslogMassh="no"!' \ + ${WRKSRC}/etc/massh/massh.conf + +do-install: + ${MKDIR} ${MASSHDIR}/pull + ${MKDIR} ${MASSHDIR}/push + ${MKDIR} ${MASSHDIR}/scripts + ${INSTALL_SCRIPT} ${WRKSRC}/usr/bin/massh ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/usr/lib/massh/libmassh.sh ${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/etc/massh/massh.conf ${PREFIX}/etc/massh.conf.example + @if [ ! - ${PREFIX}/etc/${PORTNAME}.conf ]; \ + ${CP} -p ${PREFIX}/etc/${PORTNAME}.conf.example ${PREFIX}/etc/${PORTNAME}.conf; \ + fi + ${INSTALL_MAN} ${WRKSRC}/usr/share/man/man1/massh.1.gz ${MAN1PREFIX} + +.include diff --git a/security/massh/distinfo b/security/massh/distinfo new file mode 100644 index 000000000000..7cf09029e0fb --- /dev/null +++ b/security/massh/distinfo @@ -0,0 +1,2 @@ +SHA256 (massh.tgz) = 2697b2dd9e7d63b4c26c44094e6a6cdf9105e91520b22271d3675ee67180248b +SIZE (massh.tgz) = 8713 diff --git a/security/massh/pkg-descr b/security/massh/pkg-descr new file mode 100644 index 000000000000..d7d359b5db6b --- /dev/null +++ b/security/massh/pkg-descr @@ -0,0 +1,9 @@ +Massh makes it possible to perform the following on hundreds, or even +thousands of hosts in a parallelized fashion: + + * Run Remote Commands + * Push and Execute Pre-Written Scripts + * Push Files + * Pull Files + +WWW: http://m.a.tt/er/massh/ diff --git a/security/massh/pkg-plist b/security/massh/pkg-plist new file mode 100644 index 000000000000..e0de9245d503 --- /dev/null +++ b/security/massh/pkg-plist @@ -0,0 +1,11 @@ +bin/massh +lib/libmassh.sh +etc/massh.conf.example +@exec mkdir -p %%MASSHDIR%%/pull +@exec mkdir -p %%MASSHDIR%%/push +@exec mkdir -p %%MASSHDIR%%/scripts +@cwd / +@dirrmtry %%MASSHDIR%%/pull +@dirrmtry %%MASSHDIR%%/push +@dirrmtry %%MASSHDIR%%/scripts +@dirrmtry %%MASSHDIR%%