From f68130ebba7fc46bc57e133402b827499627b50d Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Fri, 23 Mar 2012 00:29:46 +0100 Subject: [PATCH] Released as 20120322. --- NEWS | 14 ++++ configure | 20 ++--- configure.ac | 2 +- doc/release_new_version | 8 +- install-sh | 29 ++++--- missing | 53 +----------- .../obs/home:tange/parallel/parallel.spec | 82 +++++++++++++++++++ src/niceload | 2 +- src/parallel | 5 +- src/parallel.pod | 12 +-- src/parallel.texi | 24 +++--- src/sql | 2 +- 12 files changed, 159 insertions(+), 94 deletions(-) create mode 100644 packager/obs/home:tange/parallel/parallel.spec diff --git a/NEWS b/NEWS index b09eaf17..6b82c426 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +20120322 + +* Parallel Process Database Dumps. + http://blog.mattoates.co.uk/2012/02/parallel-process-database-dumps.html + +* Using GNU Parallel to process images from Mars. + http://lunokhod.org/?p=468 + +* Using GNU Parallel with bzgrep. + http://filip.rembialkowski.net/did-you-know-gnu-parallel/ + +* Bug fixes and man page updates. + + 20120222 * --workdir . will use the current working dir. If the current working diff --git a/configure b/configure index d5edd31a..2f4e0cc2 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for parallel 20120222. +# Generated by GNU Autoconf 2.68 for parallel 20120322. # # Report bugs to . # @@ -559,8 +559,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='parallel' PACKAGE_TARNAME='parallel' -PACKAGE_VERSION='20120222' -PACKAGE_STRING='parallel 20120222' +PACKAGE_VERSION='20120322' +PACKAGE_STRING='parallel 20120322' PACKAGE_BUGREPORT='bug-parallel@gnu.org' PACKAGE_URL='' @@ -1176,7 +1176,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures parallel 20120222 to adapt to many kinds of systems. +\`configure' configures parallel 20120322 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1242,7 +1242,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of parallel 20120222:";; + short | recursive ) echo "Configuration of parallel 20120322:";; esac cat <<\_ACEOF @@ -1309,7 +1309,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -parallel configure 20120222 +parallel configure 20120322 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1326,7 +1326,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by parallel $as_me 20120222, which was +It was created by parallel $as_me 20120322, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2141,7 +2141,7 @@ fi # Define the identity of the package. PACKAGE='parallel' - VERSION='20120222' + VERSION='20120322' cat >>confdefs.h <<_ACEOF @@ -2704,7 +2704,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by parallel $as_me 20120222, which was +This file was extended by parallel $as_me 20120322, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2766,7 +2766,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -parallel config.status 20120222 +parallel config.status 20120322 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index ffa99871..2651180b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([parallel], [20120222], [bug-parallel@gnu.org]) +AC_INIT([parallel], [20120322], [bug-parallel@gnu.org]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ diff --git a/doc/release_new_version b/doc/release_new_version index 81749c32..2e28a61f 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -181,9 +181,15 @@ for stable long-term use. New in this release: -* Using GNU Parallel to process images from Mars: +* Parallel Process Database Dumps. + http://blog.mattoates.co.uk/2012/02/parallel-process-database-dumps.html + +* Using GNU Parallel to process images from Mars. http://lunokhod.org/?p=468 +* Using GNU Parallel with bzgrep. + http://filip.rembialkowski.net/did-you-know-gnu-parallel/ + * Bug fixes and man page updates. diff --git a/install-sh b/install-sh index 6781b987..a9244eb0 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -200,7 +208,11 @@ if test $# -eq 0; then fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ fi for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ do echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ do case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ do for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff --git a/missing b/missing index 28055d2a..86a8fc31 100755 --- a/missing +++ b/missing @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ Supported PROGRAM values: help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ case $1 in # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ WARNING: \`$1' $msg. You should only need it if \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ WARNING: \`$1' is $msg. You should only need it if \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ WARNING: \`$1' is $msg. You should only need it if touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. diff --git a/packager/obs/home:tange/parallel/parallel.spec b/packager/obs/home:tange/parallel/parallel.spec new file mode 100644 index 00000000..434b7453 --- /dev/null +++ b/packager/obs/home:tange/parallel/parallel.spec @@ -0,0 +1,82 @@ +Summary: Shell tool for executing jobs in parallel +Name: parallel +Version: 20120322 +Release: 1 +License: GPL +Group: Productivity/File utilities +URL: ftp://ftp.gnu.org/gnu/parallel +Source0: %{name}-%{version}.tar.bz2 +BuildArch: noarch +BuildArchitectures: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot + +%description +GNU Parallel is a shell tool for executing jobs in parallel using one +or more computers. A job is typically a single command or a small +script that has to be run for each of the lines in the input. The +typical input is a list of files, a list of hosts, a list of users, or +a list of tables. + +If you use xargs today you will find GNU Parallel very easy to use. If +you write loops in shell, you will find GNU Parallel may be able to +replace most of the loops and make them run faster by running jobs in +parallel. If you use ppss or pexec you will find GNU Parallel will +often make the command easier to read. + +GNU Parallel also makes sure output from the commands is the same +output as you would get had you run the commands sequentially. This +makes it possible to use output from GNU Parallel as input for other +programs. + +%prep +if [ "${RPM_BUILD_ROOT}x" == "x" ]; then + echo "RPM_BUILD_ROOT empty, bad idea!" + exit 1 +fi +if [ "${RPM_BUILD_ROOT}" == "/" ]; then + echo "RPM_BUILD_ROOT is set to "/", bad idea!" + exit 1 +fi +%setup -q + +%build +./configure +make + +%install +rm -rf $RPM_BUILD_ROOT +make install prefix=$RPM_BUILD_ROOT%{_prefix} exec_prefix=$RPM_BUILD_ROOT%{_prefix} \ + datarootdir=$RPM_BUILD_ROOT%{_prefix} docdir=$RPM_BUILD_ROOT%{_docdir} \ + mandir=$RPM_BUILD_ROOT%{_mandir} + +rm $RPM_BUILD_ROOT%{_docdir}/parallel.html +rm $RPM_BUILD_ROOT%{_docdir}/niceload.html +rm $RPM_BUILD_ROOT%{_docdir}/sem.html +rm $RPM_BUILD_ROOT%{_docdir}/sql.html +rm $RPM_BUILD_ROOT%{_docdir}/parallel.texi +rm $RPM_BUILD_ROOT%{_docdir}/niceload.texi +rm $RPM_BUILD_ROOT%{_docdir}/sem.texi +rm $RPM_BUILD_ROOT%{_docdir}/sql.texi + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +/usr/bin/* +/usr/share/man/man1/* +%doc README NEWS src/parallel.html src/sem.html src/sql.html src/niceload.html + +%changelog +* Sat Jan 22 2011 Ole Tange +- Upgrade to 20110122 +* Wed Dec 22 2010 Ole Tange +- Upgrade to 20101222 +* Wed Sep 22 2010 Ole Tange +- Upgrade to 20100922 +* Mon Sep 06 2010 Ole Tange +- Upgrade to current git-version of source. Tested on build.opensuse.org +* Fri Aug 27 2010 Ole Tange +- Untested upgrade to current git-version of source. +* Sat Aug 08 2010 Markus Ammer +- Initial package setup. diff --git a/src/niceload b/src/niceload index 484fcf6a..c974de5a 100755 --- a/src/niceload +++ b/src/niceload @@ -24,7 +24,7 @@ use strict; use Getopt::Long; $Global::progname="niceload"; -$Global::version = 20120222; +$Global::version = 20120322; Getopt::Long::Configure("bundling","require_order"); get_options_from_array(\@ARGV) || die_usage(); if($::opt_version) { diff --git a/src/parallel b/src/parallel index 91f222ab..7675c57e 100755 --- a/src/parallel +++ b/src/parallel @@ -548,7 +548,7 @@ sub get_options_from_array { sub parse_options { # Returns: N/A # Defaults: - $Global::version = 20120224; + $Global::version = 20120322; $Global::progname = 'parallel'; $Global::infinity = 2**31; $Global::debug = 0; @@ -1022,8 +1022,9 @@ sub enough_file_handles { my %fh; my $enough_filehandles = 1; # We need a filehandle for STDOUT and STDERR + # perl uses 7 filehandles for something? # open3 uses 2 extra filehandles temporarily - for my $i (1..6) { + for my $i (1..8) { $enough_filehandles &&= open($fh{$i}," I (beta testing) +=item B<--header> I Use upto regexp as header. For normal usage the matched header (typically the first line: B<--header '\n'>) will be split using @@ -949,7 +949,7 @@ it to the command. Only used with B<--pipe>. -=item B<--resume> (beta testing) +=item B<--resume> Resumes from the last unfinished job. By reading B<--joblog> GNU B will figure out the last unfinished job and continue from @@ -1126,9 +1126,9 @@ B<--sshlogin> is often used with B<--transfer>, B<--return>, B<--cleanup>, and B<--trc>. -=item B<--sshloginfile> I (beta testing) +=item B<--sshloginfile> I -=item B<--slf> I (beta testing) +=item B<--slf> I File with sshlogins. The file consists of sshlogins on separate lines. Empty lines and lines starting with '#' are ignored. Example: @@ -1334,9 +1334,9 @@ Use B<-v> B<-v> to print the wrapping ssh command when running remotely. Print the version GNU B and exit. -=item B<--workdir> I (alpha testing) +=item B<--workdir> I (beta testing) -=item B<--wd> I (alpha testing) +=item B<--wd> I (beta testing) Files transferred using B<--transfer> and B<--return> will be relative to I on remote computers, and the command will be executed in diff --git a/src/parallel.texi b/src/parallel.texi index a4fc0a50..f811f960 100644 --- a/src/parallel.texi +++ b/src/parallel.texi @@ -544,8 +544,8 @@ status will be the exit status from the failing job. @end table -@item @strong{--header} @emph{regexp} (beta testing) -@anchor{@strong{--header} @emph{regexp} (beta testing)} +@item @strong{--header} @emph{regexp} +@anchor{@strong{--header} @emph{regexp}} Use upto regexp as header. For normal usage the matched header (typically the first line: @strong{--header '\n'}) will be split using @@ -1014,8 +1014,8 @@ it to the command. Only used with @strong{--pipe}. -@item @strong{--resume} (beta testing) -@anchor{@strong{--resume} (beta testing)} +@item @strong{--resume} +@anchor{@strong{--resume}} Resumes from the last unfinished job. By reading @strong{--joblog} GNU @strong{parallel} will figure out the last unfinished job and continue from @@ -1202,11 +1202,11 @@ The remote host must have GNU @strong{parallel} installed. @strong{--sshlogin} is often used with @strong{--transfer}, @strong{--return}, @strong{--cleanup}, and @strong{--trc}. -@item @strong{--sshloginfile} @emph{filename} (beta testing) -@anchor{@strong{--sshloginfile} @emph{filename} (beta testing)} +@item @strong{--sshloginfile} @emph{filename} +@anchor{@strong{--sshloginfile} @emph{filename}} -@item @strong{--slf} @emph{filename} (beta testing) -@anchor{@strong{--slf} @emph{filename} (beta testing)} +@item @strong{--slf} @emph{filename} +@anchor{@strong{--slf} @emph{filename}} File with sshlogins. The file consists of sshlogins on separate lines. Empty lines and lines starting with '#' are ignored. Example: @@ -1425,11 +1425,11 @@ Use @strong{-v} @strong{-v} to print the wrapping ssh command when running remot Print the version GNU @strong{parallel} and exit. -@item @strong{--workdir} @emph{mydir} (alpha testing) -@anchor{@strong{--workdir} @emph{mydir} (alpha testing)} +@item @strong{--workdir} @emph{mydir} (beta testing) +@anchor{@strong{--workdir} @emph{mydir} (beta testing)} -@item @strong{--wd} @emph{mydir} (alpha testing) -@anchor{@strong{--wd} @emph{mydir} (alpha testing)} +@item @strong{--wd} @emph{mydir} (beta testing) +@anchor{@strong{--wd} @emph{mydir} (beta testing)} Files transferred using @strong{--transfer} and @strong{--return} will be relative to @emph{mydir} on remote computers, and the command will be executed in diff --git a/src/sql b/src/sql index 50d80fc0..db5f65f8 100755 --- a/src/sql +++ b/src/sql @@ -556,7 +556,7 @@ $Global::Initfile && unlink $Global::Initfile; exit ($err); sub parse_options { - $Global::version = 20120222; + $Global::version = 20120322; $Global::progname = 'sql'; # This must be done first as this may exec myself