Hello community,

here is the log from the commit of package pdsh for openSUSE:Factory checked in 
at 2013-10-06 14:30:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pdsh (Old)
 and      /work/SRC/openSUSE:Factory/.pdsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pdsh"

Changes:
--------
--- /work/SRC/openSUSE:Factory/pdsh/pdsh.changes        2012-12-10 
17:17:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.pdsh.new/pdsh.changes   2013-10-06 
14:30:10.000000000 +0200
@@ -1,0 +2,9 @@
+Wed Oct  2 02:03:38 UTC 2013 - [email protected]
+
+- update to version 2.29 (2013-02-12)
+  -- Fix issue 42: --with-dshgroup sets DSHGROUP_PATH to "yes"
+  -- Fix issue 53: Add -P option to target SLURM partitions (Michael Fenn)
+  -- Fix issue 54: pdsh prints empty lines with -S
+  -- pdcp: Add more levels of directory recursion (Pythagoras Watson)
+
+-------------------------------------------------------------------

Old:
----
  pdsh-2.28.tar.bz2

New:
----
  pdsh-2.29.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pdsh.spec ++++++
--- /var/tmp/diff_new_pack.ADazwE/_old  2013-10-06 14:30:11.000000000 +0200
+++ /var/tmp/diff_new_pack.ADazwE/_new  2013-10-06 14:30:11.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package pdsh
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -22,12 +22,12 @@
 BuildRequires:  readline-devel
 BuildRequires:  rsh
 Url:            http://pdsh.googlecode.com/
-Version:        2.28
+Version:        2.29
 Release:        0
 Summary:        Parallel remote shell program
 License:        GPL-2.0+
 Group:          Productivity/Clustering/Computing
-Source:         %{name}-%version.tar.bz2
+Source:         https://pdsh.googlecode.com/files/%{name}-%version.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 # Prereq: 
 # Set this to 1 to build with genders support and framework for
@@ -59,7 +59,7 @@
 
 %files
 %defattr(-,root,root)
-%doc README DISCLAIMER README.KRB4
+%doc README DISCLAIMER README.* NEWS DISCLAIMER COPYING TODO
 %attr(755, root, root) /usr/bin/pdsh
 %attr(755, root, root) /usr/bin/pdcp 
 /usr/bin/dshbak

++++++ pdsh-2.28.tar.bz2 -> pdsh-2.29.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/META new/pdsh-2.29/META
--- old/pdsh-2.28/META  2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/META  2013-02-13 18:15:47.000000000 +0100
@@ -1,5 +1,9 @@
-  Meta:          1
-  Name:          pdsh
-  Release:       1
-  Release_tags:  dist
-  Version:       2.28
+##
+# $Id$
+##
+# Metadata for RPM/TAR makefile targets
+##
+  Meta:                1
+  Name:                pdsh
+  Version:     2.29
+  Release:     1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/Makefile.in new/pdsh-2.29/Makefile.in
--- old/pdsh-2.28/Makefile.in   2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/Makefile.in   2013-02-13 18:15:47.000000000 +0100
@@ -42,7 +42,7 @@
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(srcdir)/config.h.in \
        $(top_srcdir)/config/Make-inc.mk $(top_srcdir)/configure \
-       AUTHORS COPYING ChangeLog INSTALL NEWS TODO
+       AUTHORS COPYING INSTALL NEWS TODO
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/ac_connect_timeout.m4 \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/NEWS new/pdsh-2.29/NEWS
--- old/pdsh-2.28/NEWS  2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/NEWS  2013-02-13 18:15:47.000000000 +0100
@@ -1,6 +1,13 @@
 This file describes changes in recent versions of pdsh. It primarily
 documents those changes that are of interest to users and admins.
 
+* Changes in pdsh-2.29 (2013-02-12)
+===================================
+ -- Fix issue 42: --with-dshgroup sets DSHGROUP_PATH to "yes"
+ -- Fix issue 53: Add -P option to target SLURM partitions (Michael Fenn)
+ -- Fix issue 54: pdsh prints empty lines with -S
+ -- pdcp: Add more levels of directory recursion (Pythagoras Watson)
+
 * Changes in pdsh-2.28 (2011-10-19)
 ===================================
  -- Fix issue 39: ssh forces use of -l<user> option
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/config/ac_dshgroup.m4 
new/pdsh-2.29/config/ac_dshgroup.m4
--- old/pdsh-2.28/config/ac_dshgroup.m4 2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/config/ac_dshgroup.m4 2013-02-13 18:15:47.000000000 +0100
@@ -20,14 +20,15 @@
   # Check for whether to include the dshgroup module
   #
   AC_MSG_CHECKING([for whether to build dshgroup module])
-  ac_dshgroup_path="/etc/dshgroup";
+  ac_dshgroup_path="/etc/dsh/group";
 
   AC_ARG_WITH([dshgroups],
     AC_HELP_STRING([--with-dshgroups(=PATH)], 
          [Build dshgroup module for dsh group file support (with optional 
PATH)]),
     [ case "$withval" in
         no)  ac_with_dshgroup=no ;;
-        *) ac_with_dshgroup=yes; ac_dshgroup_path="$withval" ;;
+        yes) ac_with_dshgroup=yes ;;
+        *)   ac_with_dshgroup=yes; ac_dshgroup_path="$withval" ;;
       esac
     ]
   )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/configure new/pdsh-2.29/configure
--- old/pdsh-2.28/configure     2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/configure     2013-02-13 18:15:47.000000000 +0100
@@ -26598,7 +26598,7 @@
   #
   echo "$as_me:$LINENO: checking for whether to build dshgroup module" >&5
 echo $ECHO_N "checking for whether to build dshgroup module... $ECHO_C" >&6
-  ac_dshgroup_path="/etc/dshgroup";
+  ac_dshgroup_path="/etc/dsh/group";
 
 
 # Check whether --with-dshgroups or --without-dshgroups was given.
@@ -26606,7 +26606,8 @@
   withval="$with_dshgroups"
    case "$withval" in
         no)  ac_with_dshgroup=no ;;
-        *) ac_with_dshgroup=yes; ac_dshgroup_path="$withval" ;;
+        yes) ac_with_dshgroup=yes ;;
+        *)   ac_with_dshgroup=yes; ac_dshgroup_path="$withval" ;;
       esac
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/doc/pdsh.1.in new/pdsh-2.29/doc/pdsh.1.in
--- old/pdsh-2.28/doc/pdsh.1.in 2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/doc/pdsh.1.in 2013-02-13 18:15:47.000000000 +0100
@@ -321,6 +321,11 @@
 may be used multiple times to target multiple SLURM jobs. The special
 argument "all" can be used to target all nodes running SLURM jobs, e.g.
 \fI-j all\fR.
+.TP
+.I "-P partition[,partition,...]"
+Target list of nodes containing in the SLURM partition \fIpartition\fR.
+This option may be used multiple times to target multiple SLURM partitions
+and/or partitions may be given in a comma-delimited list.
 
 .SH "torque module options"
 The \fBtorque\fI module allows \fBpdsh\fR to target nodes based on
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/pdsh.spec new/pdsh-2.29/pdsh.spec
--- old/pdsh-2.28/pdsh.spec     2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/pdsh.spec     2013-02-13 18:15:47.000000000 +0100
@@ -1,5 +1,5 @@
 Name: pdsh
-Version: 2.28
+Version: 2.29
 Release: 1%{?dist}
 
 Summary: Parallel remote shell program
@@ -7,7 +7,7 @@
 License: GPL
 Url: http://sourceforge.net/projects/pdsh
 Group: System Environment/Base
-Source: http://dl.sourceforge.net/sourceforge/pdsh/pdsh-2.28.tar.bz2
+Source: http://dl.sourceforge.net/sourceforge/pdsh/pdsh-2.29.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: pdsh-rcmd
 
@@ -284,7 +284,7 @@
 ##############################################################################
 
 %prep
-%setup  -n pdsh-2.28
+%setup  -n pdsh-2.29
 ##############################################################################
 
 %build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/src/modules/dshgroup.c 
new/pdsh-2.29/src/modules/dshgroup.c
--- old/pdsh-2.28/src/modules/dshgroup.c        2011-10-19 19:38:23.000000000 
+0200
+++ new/pdsh-2.29/src/modules/dshgroup.c        2013-02-13 18:15:47.000000000 
+0100
@@ -29,7 +29,7 @@
 #endif
 
 #ifndef DSHGROUP_PATH
-#define DSHGROUP_PATH "/etc/dshgroup"
+#define DSHGROUP_PATH "/etc/dsh/group"
 #endif
 
 #include <unistd.h> /* access */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/src/modules/slurm.c 
new/pdsh-2.29/src/modules/slurm.c
--- old/pdsh-2.28/src/modules/slurm.c   2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/src/modules/slurm.c   2013-02-13 18:15:47.000000000 +0100
@@ -70,9 +70,11 @@
 static int mod_slurm_wcoll(opt_t *opt);
 static int mod_slurm_exit(void);
 static hostlist_t _slurm_wcoll(List jobids);
+static hostlist_t _slurm_wcoll_partition(List partitions);
 static int slurm_process_opt(opt_t *, int opt, char *arg);
 
 static List job_list = NULL;
+static List partition_list = NULL;
 
 /*
  *  Export generic pdsh module options
@@ -94,6 +96,10 @@
      "Run on nodes allocated to SLURM job(s) (\"all\" = all jobs)",
      DSH | PCP, (optFunc) slurm_process_opt
    },
+   { 'P', "partition,...",
+     "Run on nodes contained in SLURM partition",
+     DSH | PCP, (optFunc) slurm_process_opt
+   },
    PDSH_OPT_TABLE_END
  };
 
@@ -104,7 +110,7 @@
   "misc",
   "slurm",
   "Mark Grondona <[email protected]>",
-  "Attempt to read wcoll from SLURM_JOBID env var",
+  "Target nodes contained in SLURM jobs or partitions, read SLURM_JOBID by 
default",
   DSH | PCP, 
 
   &slurm_module_ops,
@@ -143,6 +149,9 @@
     case 'j':
         job_list = list_split_append (job_list, ",", arg);
         break;
+    case 'P':
+        partition_list = list_split_append (partition_list, ",", arg);
+        break;
     default:
         break;
     }
@@ -156,6 +165,9 @@
     if (job_list)
         list_destroy (job_list);
 
+    if (partition_list)
+        list_destroy (partition_list);
+
     return (0);
 }
 
@@ -169,6 +181,15 @@
     if (job_list && opt->wcoll)
         errx("%p: do not specify -j with any other node selection option.\n");
 
+    if (partition_list && opt->wcoll)
+        errx("%p: do not specify -P with any other node selection option.\n");
+
+    if (partition_list && job_list)
+        errx("%p: do not specify -j and -P together.\n");
+
+    if (partition_list)
+        opt->wcoll = _slurm_wcoll_partition (partition_list);
+
     if (!opt->wcoll) 
             opt->wcoll = _slurm_wcoll (job_list); 
 
@@ -200,6 +221,13 @@
     return (list_delete_all (l, (ListFindF)_find_id, &jobid));
 }
 
+static int _partition_requested (List l, char *partition)
+{
+    if (l == NULL)
+        return (0);
+    return (list_delete_all (l, (ListFindF)_find_str, partition));
+}
+
 static int _alljobids_requested (List l)
 {
     char *all = "all";
@@ -264,6 +292,48 @@
 
     if (hl)
         hostlist_uniq (hl);
+
+    return (hl);
+}
+
+static hostlist_t _slurm_wcoll_partition (List partitionlist)
+{
+    int i;
+    char * str;
+    hostlist_t hl = NULL;
+    partition_info_msg_t * msg;
+    partition_info_t * p;
+    ListIterator li;
+
+    if (slurm_load_partitions((time_t) NULL, &msg, 1) < 0)
+        errx ("Unable to contact slurm controller: %s\n",
+              slurm_strerror (errno));
+
+    for (i = 0; i < msg->record_count; i++){
+        p = &msg->partition_array[i];
+
+        if (_partition_requested (partitionlist, p->name)) {
+            hl = _hl_append (hl, p->nodes);
+            /*
+             * Exit when there is no more partitions to search
+             */
+            if (list_count (partitionlist) == 0)
+                break;
+        }
+    }
+
+    /*
+     *  Anything left in partitionlist wasn't found, emit a warning
+     */
+    li = list_iterator_create(partitionlist);
+    while ((str = list_next(li))){
+       err("%p: Warning - partition %s not found\n", str);
+    }
+
+    slurm_free_partition_info_msg (msg);
+
+    if (hl)
+        hostlist_uniq (hl);
 
     return (hl);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/src/pdsh/dsh.c new/pdsh-2.29/src/pdsh/dsh.c
--- old/pdsh-2.28/src/pdsh/dsh.c        2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/src/pdsh/dsh.c        2013-02-13 18:15:47.000000000 +0100
@@ -557,16 +557,18 @@
             }
             if (read_rc)
                 t->rc = _extract_rc (buf);
-            /*
-             *  We are careful to use a single call to write the line
-             *   to the output stream to avoid interleaved lines of
-             *   output.
-             */
-            if (t->labels)
-                outf ("%S: %s", t->host, buf);
-            else
-                outf ("%s", buf);
-            fflush (NULL);
+            if (strlen (buf) > 0) {
+                /*
+                 *  We are careful to use a single call to write the line
+                 *   to the output stream to avoid interleaved lines of
+                 *   output.
+                 */
+                if (t->labels)
+                    outf ("%S: %s", t->host, buf);
+                else
+                    outf ("%s", buf);
+                fflush (NULL);
+            }
         }
         Free ((void **)&buf);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/src/pdsh/pcp_server.c 
new/pdsh-2.29/src/pdsh/pcp_server.c
--- old/pdsh-2.28/src/pdsh/pcp_server.c 2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/src/pdsh/pcp_server.c 2013-02-13 18:15:47.000000000 +0100
@@ -180,6 +180,7 @@
         bp->buf = malloc(size);
         if (!bp->buf) {
             _error(s, "malloc: out of memory\n");
+            bp->cnt = 0;
             return NULL;
         }
     }
@@ -218,15 +219,20 @@
     BUF *bp;
     off_t i, j, size;
     char ch;
-    const char *why;
-    int amt, count, exists, first, mask, mode;
+    const char *why = "failed to set 'why' string";
+    int amt, count, exists, mask, mode;
     int ofd, setimes, targisdir, cursize = 0;
-    char *np, buf[BUFSIZ], *namebuf = NULL;
+    char *np, *buf = NULL, *namebuf = NULL;
 
 #define        atime   tv[0]
 #define        mtime   tv[1]
 #define        SCREWUP(str)    { why = str; goto screwup; }
 
+    if (!(buf = malloc(BUFSIZ))) {
+        _error(svr, "out of memory for buf: %m\n");
+        return;
+    }
+
     setimes = targisdir = 0;
     mask = umask(0);
     if (!svr->preserve)
@@ -241,14 +247,11 @@
     if (stat(targ, &stb) == 0 && (stb.st_mode & S_IFMT) == S_IFDIR)
         targisdir = 1;
 
-    for (first = 1;; first = 0) {
+    while (1) {
                int rc;
         cp = buf;
-        if ((rc = read(svr->infd, cp, 1)) <= 0) {
-            if (namebuf)
-                free(namebuf);
-            return;
-        }
+        if ((rc = read(svr->infd, cp, 1)) <= 0)
+            goto end_server;
         if (*cp++ == '\n')
             SCREWUP("unexpected <newline>");
 
@@ -267,9 +270,7 @@
 
         if (buf[0] == 'E') {
             (void)write(svr->outfd, "", 1);
-            if (namebuf)
-                free(namebuf);
-            return;
+            goto end_server;
         }
 
         if (ch == '\n')
@@ -333,6 +334,7 @@
               
                 if (!(namebuf = malloc(need))) { 
                     _error(svr, "out of memory\n");
+                    cursize = 0;
 
                     /* original rcp may not work with a continue here,
                      * but it will work with pdcp protocol.
@@ -437,12 +439,14 @@
         }
     }
 
-    return;
-
 screwup:
     _error(svr, "protocol screwup: %s\n", why);
 
 end_server:
+    if (buf)
+        free(buf);
+    if (namebuf)
+        free(namebuf);
     return;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/tests/t1003-slurm.sh 
new/pdsh-2.29/tests/t1003-slurm.sh
--- old/pdsh-2.28/tests/t1003-slurm.sh  2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/tests/t1003-slurm.sh  2013-02-13 18:15:47.000000000 +0100
@@ -114,6 +114,16 @@
        pdsh -j garbage 2>&1 | grep -q "invalid setting"
 '
 
+test_expect_success 'slurm -P option works' '
+       part=$(sinfo -ho %P | head -1)
+       O1=$(sinfo -ho %N -p $part)
+       O2=$(pdsh -P $part -q | tail -1)
+        if test "x$O1" != "x$O2"; then
+               say_color error "Error: pdsh -P $part selected nodes $O2 
expected $O1"
+               false
+       fi
+'
+
 #
 #  Clean up:
 #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/tests/t2000-exec.sh 
new/pdsh-2.29/tests/t2000-exec.sh
--- old/pdsh-2.28/tests/t2000-exec.sh   2011-10-19 19:38:23.000000000 +0200
+++ new/pdsh-2.29/tests/t2000-exec.sh   2013-02-13 18:15:47.000000000 +0100
@@ -5,7 +5,7 @@
 . ${srcdir:-.}/test-lib.sh
 
 if ! test_have_prereq MOD_RCMD_EXEC; then
-       skip_all='skipping ssh tests, ssh module not available'
+       skip_all='skipping exec tests, exec module not available'
        test_done
 fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pdsh-2.28/tests/t2002-mrsh.sh 
new/pdsh-2.29/tests/t2002-mrsh.sh
--- old/pdsh-2.28/tests/t2002-mrsh.sh   1970-01-01 01:00:00.000000000 +0100
+++ new/pdsh-2.29/tests/t2002-mrsh.sh   2013-02-13 18:15:47.000000000 +0100
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+test_description='pdsh mrsh module tests'
+
+. ${srcdir:-.}/test-lib.sh
+
+if ! test_have_prereq MOD_RCMD_MRSH; then
+       skip_all='skipping mrsh tests, mrsh module not available'
+       test_done
+fi
+
+if ! pdsh -SRmrsh -w localhost /bin/true 2>&1 >/dev/null; then
+       skip_all='skipping mrsh tests, mrsh server not available on localhost'
+       test_done
+fi
+
+test_expect_success 'mrsh module runs' '
+       OUTPUT=$(pdsh -Rmrsh -w localhost echo i am here)
+'
+test_debug '
+       echo Output: "$OUTPUT"
+'
+test_expect_success 'mrsh localhost works' '
+       echo "$OUTPUT" | grep "localhost: i am here"
+'
+test_expect_success  'mrsh: -S generates empty lines (Issue 54)' '
+       OUTPUT=$(pdsh -Rmrsh -w localhost -S cd ..)
+       [ -z "$OUTPUT" ]
+'
+test_debug '
+       echo Output: "$OUTPUT"
+'
+
+test_done

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to