From f4f4e3643b4abba17112d95ecac7e2c0620e9152 Mon Sep 17 00:00:00 2001 From: Tim Cuthbertson Date: Mon, 26 Aug 2013 20:54:35 +1000 Subject: [PATCH 1/5] 0install: update PGP key verification --- packager/0install/update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packager/0install/update b/packager/0install/update index 5cfc1031..a44cdbfc 100755 --- a/packager/0install/update +++ b/packager/0install/update @@ -16,7 +16,7 @@ wget "$url.sig" -O "${file}.sig" gpg -n --verify "${file}.sig" "${file}" 2>&1 | tee "${file}.gpglog" set +x KEYID="$(grep '^Primary key fingerprint:' "${file}.gpglog" | tr -d ' ' | cut -f 2 -d : )" -fingerprint="BE9CB49381DE3166A3BC66C12C6229E2FFFFFFF1" +fingerprint="CDA01A4208C4F74506107E7BD1AB451688888888" if [ "$KEYID" != "$fingerprint" ]; then echo "Signature verification FAILED:" cat "${file}.gpglog" From 11cbbf50cc2a8f4492f5194ebd8dbee08bbf5d73 Mon Sep 17 00:00:00 2001 From: Tim Cuthbertson Date: Mon, 26 Aug 2013 20:54:48 +1000 Subject: [PATCH 2/5] 0install: added version 20130822 --- packager/0install/parallel.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packager/0install/parallel.xml b/packager/0install/parallel.xml index 3ae3d108..fa7075cd 100644 --- a/packager/0install/parallel.xml +++ b/packager/0install/parallel.xml @@ -159,11 +159,15 @@ xargs or cat | sh. + + + + From 987f90d929b29d65c42e8185d3f9d195af93d29e Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 27 Aug 2013 10:58:41 +0200 Subject: [PATCH 3/5] niceload: When CTRL-C'ing niceload -p, the controlled PID should continue and not be killed. --- src/niceload | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/niceload b/src/niceload index 4830e0eb..2a48db11 100755 --- a/src/niceload +++ b/src/niceload @@ -397,8 +397,14 @@ sub kill_child_TSTP { sub kill_child_INT { my $self = $Global::process; - ::debug("SIGINT received. Killing $self->{'pid'} Exit\n"); - kill INT => $self->pgrp(); + ::debug("SIGINT received.\n"); + if(not @opt::pid) { + ::debug("Killing $self->{'pid'} Exit\n"); + kill INT => $self->pgrp(); + } else { + ::debug("Continue pids $self->{'pid'} Exit\n"); + kill CONT => $self->pgrp(); + } exit; } From 378ecf68313e87dd71f80bf007721b9a74eb50e8 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 27 Aug 2013 11:04:14 +0200 Subject: [PATCH 4/5] parallel.pod: Example of diff between all files in same dir. --- src/parallel.pod | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/parallel.pod b/src/parallel.pod index 11f04395..f81b541d 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -1975,6 +1975,18 @@ can be written like this: B +=head1 EXAMPLE: Finding the lowest difference between files + +B is good for finding differences in text files. B +gives an indication of the size of the difference. To find the +differences between all files in the current dir do: + +B + +This way it is possible to see if some files are closer to other +files. + + =head1 EXAMPLE: for-loops with column names When doing multiple nested for-loops it can be easier to keep track of From 06597f93950847b0f8935adc8f00baa4f28a40d8 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Thu, 12 Sep 2013 12:25:37 +0200 Subject: [PATCH 5/5] parallel: --nonall was incompatible with --joblog and --files. Fixed. --- src/niceload | 1 + src/parallel | 29 +++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/niceload b/src/niceload index 2a48db11..fea9fea6 100755 --- a/src/niceload +++ b/src/niceload @@ -367,6 +367,7 @@ sub start { } use POSIX ":sys_wait_h"; +use POSIX qw(:sys_wait_h); sub REAPER { my $stiff; diff --git a/src/parallel b/src/parallel index 38c23447..12689dd3 100755 --- a/src/parallel +++ b/src/parallel @@ -207,6 +207,15 @@ if($opt::filter_hosts and (@opt::sshlogin or @opt::sshloginfile)) { } if($opt::nonall or $opt::onall) { + sub tmp_joblog { + my $joblog = shift; + if(not defined $joblog) { + return undef; + } + my ($fh, $tmpfile) = ::tempfile(SUFFIX => ".log"); + close $fh; + return $tmpfile; + } # Copy all @fhlist into tempfiles my @argfiles = (); for my $fh (@fhlist) { @@ -234,7 +243,7 @@ if($opt::nonall or $opt::onall) { join(" ", ((defined $opt::u) ? "-u" : ""), ((defined $opt::group) ? "-g" : ""), - ((defined $opt::joblog) ? "--joblog $opt::joblog" : ""), + ((defined $opt::files) ? "--files" : ""), ((defined $opt::colsep) ? "--colsep ".shell_quote($opt::colsep) : ""), ((@opt::v) ? "-vv" : ""), ((defined $opt::D) ? "-D" : ""), @@ -247,8 +256,14 @@ if($opt::nonall or $opt::onall) { ::debug("| $0 $options\n"); open(my $parallel_fh, "|-", "$0 -j0 $options") || ::die_bug("This does not run GNU Parallel: $0 $options"); + my @joblogs; for my $sshlogin (values %Global::host) { - print $parallel_fh "$0 $suboptions -j1 ". + my $joblog = tmp_joblog($opt::joblog); + if($joblog) { + push @joblogs, $joblog; + $joblog = "--joblog $joblog"; + } + print $parallel_fh "$0 $suboptions -j1 $joblog ". ((defined $opt::tag) ? "--tagstring ".shell_quote_scalar($sshlogin->string()) : ""). " -S ". shell_quote_scalar($sshlogin->string())." ". @@ -259,6 +274,16 @@ if($opt::nonall or $opt::onall) { debug("--onall exitvalue ",$?); if(@opt::basefile) { cleanup_basefile(); } unlink(@argfiles); + my %seen; + for my $joblog (@joblogs) { + # Append to $joblog + open(my $fh, "<", $joblog) || ::die_bug("Cannot open tmp joblog $joblog"); + # Skip first line (header); + <$fh>; + print $Global::joblog (<$fh>); + close $fh; + unlink($joblog); + } wait_and_exit(min(undef_as_zero($Global::exitstatus),254)); }