Package Details: dsh 0.25.10-1

Git Clone URL: https://aur.archlinux.org/dsh.git (read-only, click to copy)
Package Base: dsh
Description: Distributed shell (or dancer’s shell) executes command remotely on several different machines at the same time.
Upstream URL: http://www.netfort.gr.jp/~dancer/software/dsh.html
Licenses: GPL2
Submitter: dialuplama
Maintainer: dialuplama (muhas)
Last Packager: dialuplama
Votes: 3
Popularity: 0.038498
First Submitted: 2015-08-15 14:26 (UTC)
Last Updated: 2020-10-15 09:30 (UTC)

Latest Comments

mok0 commented on 2025-03-19 10:17 (UTC) (edited on 2025-03-19 10:29 (UTC) by mok0)

In addition to the test bug reported by others, there's a more serious bug in PKGBUILD, that results in the config file being placed in /etc/dsh, rather than in /etc/dsh/dsh.conf where it's supposed to be. Also, the manpage lists the following in the FILES section:

/etc/kgname/machines.list | $(HOME)/.dsh/machines.list
              List  of  machine names to be used for when -a command-line option is
              specified.

       /etc/kgname/group/groupname | $(HOME)/.dsh/group/groupname
              List of machine names to be used for when -g  groupname  command-line
              option is specified.

       /etc/kgname/dsh.conf | $(HOME)/.dsh/dsh.conf
              Configuration file containing the day-to-day default.

Clearly, make took the last characters of the word "pkgname" instead of the correct "dsh".

The fix is fortunately very simple, in PKGBUILD replace single quotes with double quotes:

build() {
        cd "$pkgname-$pkgver"
        ./configure \
         --prefix=/usr \
-        --sysconfdir='/etc/$pkgname'
+        --sysconfdir="/etc/${pkgname}"
        make
 }

or you could actually just hardwire /etc/dsh, which would actually be more correct, since there is no reason to name the dsh config directory after the package. When using dsh in a mixed environment of distributions, and managing for example with Ansible, the config is expected to be in the standard place where other distros also place it.

OBS When making this change in the package, it will fail to update if you have an earlier version of the package installed. You need to remove the file /etc/dsh manually.

barbuk commented on 2024-11-11 11:43 (UTC)

The check function is broken:

#! /bin/sh
# check if things are working in a POSIX way, and ensure that GNU getopt workaround is working.
set -e

[ "`./dsh -Mm hoge,test -r echo -c test -m other | sort`" = "\
hoge: hoge test -m other
test: test test -m other" ]

It produce on my system:

❯ ./dsh -Mm hoge,test -r echo -c test -m other
hoge: hoge test
test: test test
other: other test

It should be:

❯ ./dsh -Mm hoge,test -r echo -c 'test -m other'
hoge: hoge test -m other
test: test test -m other

A patch of the test function:

diff --git a/tests/param-gnu-getopt.sh b/tests/param-gnu-getopt.sh
index dd59d93..0161abb 100755
--- a/tests/param-gnu-getopt.sh
+++ b/tests/param-gnu-getopt.sh
@@ -2,6 +2,6 @@
 # check if things are working in a POSIX way, and ensure that GNU getopt workaround is working.
 set -e

-[ "`./dsh -Mm hoge,test -r echo -c test -m other | sort`" = "\
+[ "`./dsh -Mm hoge,test -r echo -c 'test -m other' | sort`" = "\
 hoge: hoge test -m other

And the patched PKGBUILD

diff --git a/PKGBUILD b/PKGBUILD
index 4227afb..27609bb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,11 +9,14 @@ arch=('any')
 url="http://www.netfort.gr.jp/~dancer/software/dsh.html"
 license=('GPL2')
 depends=('libdshconfig')
-source=("https://www.netfort.gr.jp/~dancer/software/downloads/$pkgname-$pkgver.tar.gz")        
-md5sums=('5269b26348cc1cc6252317c6dca5d219')
+source=("https://www.netfort.gr.jp/~dancer/software/downloads/$pkgname-$pkgver.tar.gz"
+"test.patch")        
+md5sums=('5269b26348cc1cc6252317c6dca5d219'
+         '528d5d370b895f85e3ac878d85e3210d')

 build() {
    cd "$pkgname-$pkgver"
+  patch -p1 < ../test.patch
    ./configure \
         --prefix=/usr \
         --sysconfdir='/etc/$pkgname'

simona commented on 2024-10-31 18:13 (UTC)

FAIL: tests/param-gnu-getopt.sh

hcartiaux commented on 2020-09-25 13:36 (UTC)

pkgver=0.25.10
sha512sums=('a53fba14e65644ce5858b1e9827601016db6d61cb50b0229ea53eeaee676f5870d2dbfd6ebde237008bfc7144316484529c646104e72d99868d44d814a41a009')

hcartiaux commented on 2017-03-17 18:16 (UTC)

The check function is broken. I commented it and successfully build a working pdsh.