From aa78d2d42f9342c981a33262eeee8c9abd363c78 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 4 Jun 2023 09:46:04 +0200 Subject: [PATCH] parallel: Fixed bug #64237: --filter-hosts and VisualHostKey=yes. --- doc/release_new_version | 27 +++++-------------- src/env_parallel.ash | 2 +- src/env_parallel.bash | 2 +- src/env_parallel.dash | 2 +- src/env_parallel.ksh | 2 +- src/env_parallel.mksh | 2 +- src/env_parallel.sh | 2 +- src/env_parallel.zsh | 2 +- src/niceload | 2 +- src/parallel | 13 ++++++--- src/parsort | 2 +- src/sql | 2 +- testsuite/tests-to-run/parallel-local-ssh8.sh | 7 ++++- testsuite/wanted-results/parallel-local-ssh8 | 16 +++++++++++ 14 files changed, 49 insertions(+), 34 deletions(-) diff --git a/doc/release_new_version b/doc/release_new_version index 8492bc78..8a2d38b4 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -105,6 +105,7 @@ lbry://@GnuParallel#4/parallel-20210322.tar.bz2 . .last-doitag.txt file_path="`pwd`/parallel-$YYYYMMDD.tar.bz2" title="GNU Parallel $YYYYMMDD ('$SPCTAG') [stable]" + title="GNU Parallel $YYYYMMDD ('$SPCTAG')" name="GNU-Parallel-$YYYYMMDD-$TAG" author="Ole Tange" @@ -263,38 +264,24 @@ from:tange@gnu.org to:parallel@gnu.org, bug-parallel@gnu.org stable-bcc: Jesse Alama -Subject: GNU Parallel 20230522 ('Charles') released [stable] +Subject: GNU Parallel 20230622 ('Tina Turner/Odisha<<>>') released <<[stable]>> -GNU Parallel 20230522 ('Charles') has been released. It is available for download at: lbry://@GnuParallel:4 +GNU Parallel 20230622 ('<<>>') has been released. It is available for download at: lbry://@GnuParallel:4 Quote of the month: - Recently learned how to use GNU parallel (from ChatGPT, no less!) and I've gone mad with power - -- Mark, Anthropomorphic Anuran @reject_resubmit@twitter + <<>> New in this release: -* No new features. This is a candidate for a stable release. +<<>> * Bug fixes and man page updates. News about GNU Parallel: +http://blog.faucher.net/2023/05/building-evil-android-phone-bot-army.html -* Introduction to parallel computing https://youtu.be/fvrHXV8yqU4?t=2874 - -* Script for summarizing GNU parallel joblog file https://github.com/gavinmdouglas/parallel_joblog_summary - -* How to copy a single file to multiple directories in Linux or Unix https://www.cyberciti.biz/faq/linux-unix-copy-a-file-to-multiple-directories-using-cp-command/ - -* Search in your Jupyter notebooks from the CLI, fast. https://dev.to/attilavm/search-in-your-jupyter-notebooks-from-the-cli-fast-1408 - -* Parallel Job Orchestration with GNU Parallel https://www.youtube.com/watch?v=2tVpUfND3LI - -* Optional Individual Submission 4 Job Handling 20266001 - GNU Parallel https://www.youtube.com/watch?v=eC_RPuFCcU8 - -* DOE Cross-facility Workflows Training - April 12, 2023 https://www.youtube.com/watch?v=Ke3sirM-aQQ - -* How to run MiXCR 4.x on multiple patient samples using GNU Parallel https://www.youtube.com/watch?v=OXg-WHlB_dk +<<>> GNU Parallel - For people who live life in the parallel lane. diff --git a/src/env_parallel.ash b/src/env_parallel.ash index 605af275..032158e1 100755 --- a/src/env_parallel.ash +++ b/src/env_parallel.ash @@ -393,7 +393,7 @@ _parset_main() { fi if [ "$_parset_NAME" = "--version" ] ; then # shellcheck disable=SC2006 - echo "parset 20230522 (GNU parallel `parallel --minversion 1`)" + echo "parset 20230523 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.bash b/src/env_parallel.bash index d55512bf..1059810c 100755 --- a/src/env_parallel.bash +++ b/src/env_parallel.bash @@ -395,7 +395,7 @@ _parset_main() { fi if [ "$_parset_NAME" = "--version" ] ; then # shellcheck disable=SC2006 - echo "parset 20230522 (GNU parallel `parallel --minversion 1`)" + echo "parset 20230523 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.dash b/src/env_parallel.dash index 13df896b..23aaabad 100755 --- a/src/env_parallel.dash +++ b/src/env_parallel.dash @@ -393,7 +393,7 @@ _parset_main() { fi if [ "$_parset_NAME" = "--version" ] ; then # shellcheck disable=SC2006 - echo "parset 20230522 (GNU parallel `parallel --minversion 1`)" + echo "parset 20230523 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.ksh b/src/env_parallel.ksh index b6744571..06432d42 100755 --- a/src/env_parallel.ksh +++ b/src/env_parallel.ksh @@ -376,7 +376,7 @@ _parset_main() { fi if [ "$_parset_NAME" = "--version" ] ; then # shellcheck disable=SC2006 - echo "parset 20230522 (GNU parallel `parallel --minversion 1`)" + echo "parset 20230523 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.mksh b/src/env_parallel.mksh index e0b9b166..651cdad0 100644 --- a/src/env_parallel.mksh +++ b/src/env_parallel.mksh @@ -378,7 +378,7 @@ _parset_main() { fi if [ "$_parset_NAME" = "--version" ] ; then # shellcheck disable=SC2006 - echo "parset 20230522 (GNU parallel `parallel --minversion 1`)" + echo "parset 20230523 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.sh b/src/env_parallel.sh index 5a8ada0d..194bfd33 100755 --- a/src/env_parallel.sh +++ b/src/env_parallel.sh @@ -393,7 +393,7 @@ _parset_main() { fi if [ "$_parset_NAME" = "--version" ] ; then # shellcheck disable=SC2006 - echo "parset 20230522 (GNU parallel `parallel --minversion 1`)" + echo "parset 20230523 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.zsh b/src/env_parallel.zsh index 69a6a769..c6c0c0d7 100755 --- a/src/env_parallel.zsh +++ b/src/env_parallel.zsh @@ -368,7 +368,7 @@ _parset_main() { fi if [ "$_parset_NAME" = "--version" ] ; then # shellcheck disable=SC2006 - echo "parset 20230522 (GNU parallel `parallel --minversion 1`)" + echo "parset 20230523 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/niceload b/src/niceload index fc3626a2..38aa7606 100755 --- a/src/niceload +++ b/src/niceload @@ -26,7 +26,7 @@ use strict; use Getopt::Long; $Global::progname="niceload"; -$Global::version = 20230522; +$Global::version = 20230523; 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 782dc86a..da1577c7 100755 --- a/src/parallel +++ b/src/parallel @@ -2799,7 +2799,7 @@ sub check_invalid_option_combinations() { sub init_globals() { # Defaults: - $Global::version = 20230522; + $Global::version = 20230523; $Global::progname = 'parallel'; $::name = "GNU Parallel"; $Global::infinity = 2**31; @@ -5121,8 +5121,10 @@ sub parse_host_filtering() { next; } if(/\t(perl: warning:|LANGUAGE =|LC_ALL =|LANG =|are supported and installed|Disconnected from|Received disconnect from)/ - or - /\tWarning: / + or + /\tWarning: / + or + /\t(Host key fingerprint is|\+-.*-\+|\|.*\|)/ ) { # Skip these (from perl): # perl: warning: Setting locale failed. @@ -5137,6 +5139,11 @@ sub parse_host_filtering() { # Skip these (from ssh): # Warning: Permanently added * to the list of known hosts. # Warning: Identity file * not accessible: * + # (VisualHostKey=yes) + # Host key fingerprint is SHA256:... + # +--[ED25519 256]--+ + # | o | + # +----[SHA256]-----+ } elsif(not defined $nsockets{$col[0]}) { $nsockets{$col[0]} = $col[1]; } elsif(not defined $ncores{$col[0]}) { diff --git a/src/parsort b/src/parsort index 73fab1b9..c7eee557 100755 --- a/src/parsort +++ b/src/parsort @@ -137,7 +137,7 @@ GetOptions( "help" => \$opt::dummy, ) || exit(255); $Global::progname = ($0 =~ m:(^|/)([^/]+)$:)[1]; -$Global::version = 20230522; +$Global::version = 20230523; if($opt::version) { version(); exit 0; } # Remove -D and --parallel=N my @s = (grep { ! /^-D$|^--parallel=\S+$/ } diff --git a/src/sql b/src/sql index 5d59be42..4e6150f2 100755 --- a/src/sql +++ b/src/sql @@ -670,7 +670,7 @@ $Global::Initfile && unlink $Global::Initfile; exit ($err); sub parse_options { - $Global::version = 20230522; + $Global::version = 20230523; $Global::progname = 'sql'; # This must be done first as this may exec myself diff --git a/testsuite/tests-to-run/parallel-local-ssh8.sh b/testsuite/tests-to-run/parallel-local-ssh8.sh index fb6da2b1..a081aa0f 100644 --- a/testsuite/tests-to-run/parallel-local-ssh8.sh +++ b/testsuite/tests-to-run/parallel-local-ssh8.sh @@ -133,7 +133,12 @@ par_z_csh_environment_variables_set() { par_filter_host_noise() { echo '### bug #63296: --filter-hosts option gets confused by output from SSH command' parallel --ssh "ssh -i id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null " -S localhost --nonall --tag --filter-hosts echo OK - parallel --ssh "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null " -S localhost --nonall --tag --filter-hosts echo OK + parallel --ssh "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null " -S localhost --nonall --tag --filter-hosts echo OK + echo '### bug #64237: --filter-hosts and VisualHostKey=yes' + stdout parallel --ssh "ssh -o VisualHostKey=yes" -S localhost --nonall --tag --filter-hosts echo OK | + perl -pe 's/(Host key fingerprint is).*/$1/; s/\t(\+|\|).*\1/\t$1,,,,,,,,,,,,,,,,,$1/;' + parallel --ssh "ssh -o VisualHostKey=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null " -S localhost --nonall --tag --filter-hosts echo OK + } export -f $(compgen -A function | grep par_) diff --git a/testsuite/wanted-results/parallel-local-ssh8 b/testsuite/wanted-results/parallel-local-ssh8 index 7a1e3434..06c64cb0 100644 --- a/testsuite/wanted-results/parallel-local-ssh8 +++ b/testsuite/wanted-results/parallel-local-ssh8 @@ -4,6 +4,22 @@ par_filter_host_noise localhost Warning: Identity file id_rsa not accessible: No par_filter_host_noise localhost Warning: Permanently added 'localhost' (ED25519) to the list of known hosts. par_filter_host_noise localhost par_filter_host_noise localhost OK par_filter_host_noise localhost Warning: Permanently added 'localhost' (ED25519) to the list of known hosts. par_filter_host_noise localhost +par_filter_host_noise ### bug #64237: --filter-hosts and VisualHostKey=yes +par_filter_host_noise localhost OK +par_filter_host_noise localhost Host key fingerprint is +par_filter_host_noise localhost +,,,,,,,,,,,,,,,,,+ +par_filter_host_noise localhost |,,,,,,,,,,,,,,,,,| +par_filter_host_noise localhost |,,,,,,,,,,,,,,,,,| +par_filter_host_noise localhost |,,,,,,,,,,,,,,,,,| +par_filter_host_noise localhost |,,,,,,,,,,,,,,,,,| +par_filter_host_noise localhost |,,,,,,,,,,,,,,,,,| +par_filter_host_noise localhost |,,,,,,,,,,,,,,,,,| +par_filter_host_noise localhost |,,,,,,,,,,,,,,,,,| +par_filter_host_noise localhost |,,,,,,,,,,,,,,,,,| +par_filter_host_noise localhost |,,,,,,,,,,,,,,,,,| +par_filter_host_noise localhost +,,,,,,,,,,,,,,,,,+ par_filter_host_noise localhost +par_filter_host_noise localhost OK +par_filter_host_noise localhost Warning: Permanently added 'localhost' (ED25519) to the list of known hosts. par_filter_host_noise localhost par_load_csh ### Gave Word too long. par_load_csh a par_path_remote_bash bug #47695: How to set $PATH on remote? Bash