diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-09-30 17:44:16 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-09-30 17:53:23 +0200 |
commit | ef1c86d973076f7965df8ebd0cfb1e04d539c325 (patch) | |
tree | a6125d751a51a9a2cefcd98286a1ef4eafb8dbab /testing | |
parent | 359bffed16b70c438ce911d804ea34c1db9c4c30 (diff) | |
download | aports-ef1c86d973076f7965df8ebd0cfb1e04d539c325.tar.bz2 aports-ef1c86d973076f7965df8ebd0cfb1e04d539c325.tar.xz |
testing/pdsh: new aport
https://github.com/chaos/pdsh
A high performance, parallel remote shell utility
Diffstat (limited to 'testing')
-rw-r--r-- | testing/pdsh/APKBUILD | 63 | ||||
-rw-r--r-- | testing/pdsh/fix-test-t6036.patch | 15 | ||||
-rw-r--r-- | testing/pdsh/without-rresvport.patch | 94 |
3 files changed, 172 insertions, 0 deletions
diff --git a/testing/pdsh/APKBUILD b/testing/pdsh/APKBUILD new file mode 100644 index 0000000000..6e1068de8e --- /dev/null +++ b/testing/pdsh/APKBUILD @@ -0,0 +1,63 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=pdsh +pkgver=2.33 +pkgrel=0 +pkgdesc="A high performance, parallel remote shell utility" +url="https://github.com/chaos/pdsh" +arch="all" +license="GPL-2" +depends="perl" +makedepends="autoconf automake libtool readline-dev ncurses-dev" +subpackages="$pkgname-doc $pkgname-rcmd-ssh:_rcmd_ssh" +source="https://github.com/chaos/$pkgname/archive/$pkgname-$pkgver.tar.gz + without-rresvport.patch + fix-test-t6036.patch" +builddir="$srcdir/$pkgname-$pkgname-$pkgver" +options="!checkroot" + +prepare() { + default_prepare + + cd "$builddir" + ./bootstrap +} + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --disable-static \ + --without-rsh \ + --with-ssh \ + --with-readline + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +_rcmd_ssh() { + pkgdesc="Pdsh module for ssh rcmd functionality" + depends="$pkgname openssh-client" + install_if="$pkgname=$pkgver-r$pkgrel openssh-client" + + mkdir -p "$subpkgdir"/usr/lib/$pkgname + mv "$pkgdir"/usr/lib/$pkgname/sshcmd.* "$subpkgdir"/usr/lib/$pkgname/ +} + +sha512sums="cb6cd9c8449c9484ff35405a162930635cf2e7c83a5d2f476fff23f070c63a7e2d2eb1135b3480aaf76e707d4b13f563a07a787ed2e8ee7a6cba38cc0fcd4333 pdsh-2.33.tar.gz +97d9cde907cdfe51cb805dcf772011578cc1485d67ad177e24a4f81283aac2535a400a9d71cc79f4c08f4ae8e5886635203b1c92c910ae915a591eb616b7347a without-rresvport.patch +8ddfb37a4e7c9550f79e8bf0d24795203f23452541382f8d744adfe40889964fa966655795f2d4d594ee21af3f14c9d2fe93ad98a0620403d5c42aaab1f55949 fix-test-t6036.patch" diff --git a/testing/pdsh/fix-test-t6036.patch b/testing/pdsh/fix-test-t6036.patch new file mode 100644 index 0000000000..7901010625 --- /dev/null +++ b/testing/pdsh/fix-test-t6036.patch @@ -0,0 +1,15 @@ +Busybox fold does not accept -w greater than 10000: + + fold: number 80000 is not in 1..10000 range + +--- a/tests/t6036-long-output-lines.sh ++++ b/tests/t6036-long-output-lines.sh +@@ -22,7 +22,7 @@ + test_cmp testfile output + " + test_expect_success 'pdsh does not truncate even longer lines' " +- dd if=/dev/urandom bs=1024 count=100 | $base64 | tr -d '\n' | fold -w80000 > testfile2 && ++ dd if=/dev/urandom bs=1024 count=100 | $base64 | tr -d '\n' | fold -w10000 > testfile2 && + echo >>testfile2 && + pdsh -w foo -N -Rexec cat testfile2 > output2 && + test_cmp testfile2 output2 diff --git a/testing/pdsh/without-rresvport.patch b/testing/pdsh/without-rresvport.patch new file mode 100644 index 0000000000..e5c3a0f5aa --- /dev/null +++ b/testing/pdsh/without-rresvport.patch @@ -0,0 +1,94 @@ +From 48c728dfefa3b9aff01f598ff9d3f909001b8e81 Mon Sep 17 00:00:00 2001 +From: Mark Grondona <grondo@eris.llnl.gov> +Date: Thu, 10 Mar 2016 16:01:18 -0800 +Subject: [PATCH] privsep: do nothing if !HAVE_RRESVPORT + +If we don't have rresvport() do not enable privsep during +privsep_init() (it probably isn't used anyway). Also be sure +to undefine usage of rresvport and rresvport_af since these +symbols won't be found at compile or runtime. + +Fixes #74 + +Patch-Source: https://github.com/chaos/pdsh/commit/48c728dfefa3b9aff01f598ff9d3f909001b8e81 + +diff --git a/src/pdsh/privsep.c b/src/pdsh/privsep.c +index 7e4134f..2297b17 100644 +--- a/src/pdsh/privsep.c ++++ b/src/pdsh/privsep.c +@@ -123,6 +123,10 @@ static int send_rresvport (int pipefd, int fd, int lport) + + cmsg = (struct cmsghdr *) &buf; + #endif ++#if !HAVE_RRESVPORT ++ errno = ENOSYS; ++ return (-1); ++#endif + + memset (&msg, 0, sizeof (msg)); + +@@ -162,6 +166,7 @@ static int send_rresvport (int pipefd, int fd, int lport) + return (0); + } + ++#if HAVE_RRESVPORT + static int recv_rresvport (int pipefd, int *lptr) + { + int fd = -1; +@@ -203,19 +208,23 @@ static int recv_rresvport (int pipefd, int *lptr) + + return (fd); + } ++#endif /* HAVE_RRESVPORT */ + + + static int p_rresvport_af (int *port, int family) + { + #if HAVE_RRESVPORT_AF + return rresvport_af (port, family); +-#else ++#elif HAVE_RRESVPORT + /* Family must be AF_INET + */ + if (family != AF_INET) + err ("%p: rresvport called with family != AF_INET!\n"); + /* ignore family != AF_INET */ + return rresvport (port); ++#else ++ errno = ENOSYS; ++ return (-1); + #endif + } + +@@ -274,6 +283,9 @@ static int create_privileged_child (void) + + int privsep_init (void) + { ++#if !HAVE_RRESVPORT ++ return (0); ++#endif + if (geteuid() == getuid()) + return 0; + +@@ -285,6 +297,9 @@ int privsep_init (void) + + int privsep_fini (void) + { ++#if !HAVE_RRESVPORT ++ return (0); ++#endif + int status; + if (client_fd < 0 || cpid < 0) + return (0); +@@ -334,5 +349,11 @@ int privsep_rresvport_af (int *lport, int family) + + int privsep_rresvport (int *lport) + { ++#if HAVE_RRESVPORT + return privsep_rresvport_af (lport, AF_INET); ++#else ++ errno = ENOSYS; ++ return -1; ++#endif /* HAVE_RRESVPORT */ ++ + } |