diff --git a/Build.PL b/Build.PL index f25dd8c..2c9b17f 100644 --- a/Build.PL +++ b/Build.PL @@ -82,6 +82,19 @@ EOF $self->SUPER::ACTION_dist; } + + sub ACTION_clean { + my ($self, @args) = @_; + + for my $file (keys %{ $self->script_files } ) { + if( -e $file) { + print "Removing '$file'",$/; + unlink $file; + } + } + + $self->SUPER::ACTION_clean; + } }, ); @@ -89,7 +102,8 @@ my $build = $class->new( meta_merge => { resources => { Repository => [ - 'http://clusterssh.git.sourceforge.net/', + + #'http://clusterssh.git.sourceforge.net/', $project_info{repository}, ], bugtracker => $project_info{tracker}, @@ -126,23 +140,29 @@ my $build = $class->new( 'CPAN::Changes' => 0.27, 'File::Slurp' => 0, 'Test::PerlTidy' => 0, - 'Perl::Tidy' => 20171214, + 'Perl::Tidy' => 20180220, }, recommends => { 'Sort::Naturally' => 0, }, configure_requires => { 'Module::Build' => 0, }, add_to_cleanup => ['App-ClusterSSH-*'], create_makefile_pl => 'traditional', script_files => [ - 'bin/cssh', 'bin/csftp', - 'bin/ccon', 'bin/crsh', - 'bin/ctel', 'bin/clusterssh_bash_completion.dist' + 'bin/cssh', + 'bin/csftp', + 'bin/ccon', + 'bin/crsh', + 'bin/ctel', + 'bin/clusterssh_bash_completion.dist' ], get_options => { changes => { type => '=s' }, }, PL_files => { 'bin_PL/_build_docs' => [ - 'bin/cssh', 'bin/csftp', - 'bin/ccon', 'bin/crsh', - 'bin/ctel', 'bin/clusterssh_bash_completion.dist' + 'bin/cssh', + 'bin/csftp', + 'bin/ccon', + 'bin/crsh', + 'bin/ctel', + 'bin/clusterssh_bash_completion.dist' ], }, ); diff --git a/Changes b/Changes index 74998ba..6ac60a3 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,13 @@ -4.13_01 0000-00-00 Duncan Ferguson +4.14_01 0000-00-00 Duncan Ferguson - Move all Tk code into its own module as-is +4.13.2 2018-03-14 Duncan Ferguson +- Fix for running builds in parallel +- Improvements to SUPPORT and REPORTING BUGS sections in documentation + +4.13.1 2018-03-05 Duncan Ferguson +- Minor update to fix failing tests due to 3rd party perltidy changes + 4.13 2017-12-27 Duncan Ferguson - Ensure ssh_args is keep unset if it is emptied in the configuration file - Obey configured console position (Debian bug 758215) (Github issue #100) diff --git a/META.json b/META.json index 55c86ba..db44bff 100644 --- a/META.json +++ b/META.json @@ -20,7 +20,7 @@ "File::Slurp" : "0", "File::Temp" : "0", "File::Which" : "0", - "Perl::Tidy" : "20171214", + "Perl::Tidy" : "20180220", "Readonly" : "0", "Test::Differences" : "0", "Test::DistManifest" : "0", @@ -49,6 +49,7 @@ "Try::Tiny" : "0", "X11::Protocol" : "0.56", "X11::Protocol::WM" : "0", + "perl" : "v5.8.4", "version" : "0.77" } } @@ -56,7 +57,7 @@ "provides" : { "App::ClusterSSH" : { "file" : "lib/App/ClusterSSH.pm", - "version" : "4.13" + "version" : "4.14_01" }, "App::ClusterSSH::Base" : { "file" : "lib/App/ClusterSSH/Base.pm", @@ -90,9 +91,17 @@ }, "App::ClusterSSH::Range" : { "file" : "lib/App/ClusterSSH/Range.pm" + }, + "App::ClusterSSH::Window" : { + "file" : "lib/App/ClusterSSH/Window.pm", + "version" : "0.01" + }, + "App::ClusterSSH::Window::Tk" : { + "file" : "lib/App/ClusterSSH/Window/Tk.pm", + "version" : "0.01" } }, - "release_status" : "stable", + "release_status" : "testing", "resources" : { "bugtracker" : { "web" : "https://github.com/duncs/clusterssh/issues" @@ -102,11 +111,10 @@ "http://dev.perl.org/licenses/" ], "x_Repository" : [ - "http://clusterssh.git.sourceforge.net/", "http://github.com/duncs/clusterssh" ], "x_coverage" : "https://coveralls.io/github/duncs/clusterssh" }, - "version" : "4.13", + "version" : "4.14_01", "x_serialization_backend" : "JSON::PP version 2.94" } diff --git a/META.yml b/META.yml index 3244e79..5a1d495 100644 --- a/META.yml +++ b/META.yml @@ -7,7 +7,7 @@ build_requires: File::Slurp: '0' File::Temp: '0' File::Which: '0' - Perl::Tidy: '20171214' + Perl::Tidy: '20180220' Readonly: '0' Test::Differences: '0' Test::DistManifest: '0' @@ -27,7 +27,7 @@ name: App-ClusterSSH provides: App::ClusterSSH: file: lib/App/ClusterSSH.pm - version: '4.13' + version: 4.14_01 App::ClusterSSH::Base: file: lib/App/ClusterSSH/Base.pm version: '0.02' @@ -52,6 +52,12 @@ provides: file: lib/App/ClusterSSH/L10N/en.pm App::ClusterSSH::Range: file: lib/App/ClusterSSH/Range.pm + App::ClusterSSH::Window: + file: lib/App/ClusterSSH/Window.pm + version: '0.01' + App::ClusterSSH::Window::Tk: + file: lib/App/ClusterSSH/Window/Tk.pm + version: '0.01' recommends: Sort::Naturally: '0' requires: @@ -64,14 +70,14 @@ requires: Try::Tiny: '0' X11::Protocol: '0.56' X11::Protocol::WM: '0' + perl: v5.8.4 version: '0.77' resources: Coverage: https://coveralls.io/github/duncs/clusterssh Repository: - - http://clusterssh.git.sourceforge.net/ - http://github.com/duncs/clusterssh bugtracker: https://github.com/duncs/clusterssh/issues homepage: http://github.com/duncs/clusterssh/wiki license: http://dev.perl.org/licenses/ -version: '4.13' +version: 4.14_01 x_serialization_backend: 'CPAN::Meta::YAML version 0.016' diff --git a/Makefile.PL b/Makefile.PL index 95ddb5c..3e55061 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,5 @@ # Note: this file was auto-generated by Module::Build::Compat version 0.4224 +require 5.008004; use ExtUtils::MakeMaker; WriteMakefile ( @@ -14,7 +15,7 @@ WriteMakefile 'File::Which' => 0, 'Getopt::Long' => 0, 'Locale::Maketext' => 0, - 'Perl::Tidy' => 20171214, + 'Perl::Tidy' => 20180220, 'Readonly' => 0, 'Test::Differences' => 0, 'Test::DistManifest' => 0, diff --git a/README b/README index 5e746e9..0946c73 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME cssh - Cluster administration tool VERSION - This documentation is for version: 4.13 + This documentation is for version: 4.14_01 SYNOPSIS cssh [-a ''] [-K ] [-q] [-c ''] [-x ] @@ -640,52 +640,52 @@ KNOWN BUGS tell the difference between the two events, there is no fix (apart from rewriting everything directly in X). -REPORTING BUGS - * If you have issues running cssh, first try: +TROUBLESHOOTING + If you have issues running cssh, first try: - "cssh -e [user@][:port]" + "cssh -e [user@][:port]" - This performs two tests to confirm cssh is able to work properly - with the settings provided within the $HOME/.clusterssh/config file - (or internal defaults). + This performs two tests to confirm cssh is able to work properly with + the settings provided within the $HOME/.clusterssh/config file (or + internal defaults). - 1 Test the terminal window works with the options provided + 1 Test the terminal window works with the options provided - 2 Test ssh works to a host with the configured arguments + 2 Test ssh works to a host with the configured arguments - Configuration options to watch for in ssh are + Configuration options to watch for in ssh are: - SSH doesn't understand "-o ConnectTimeout=10" - remove the option + * SSH doesn't understand "-o ConnectTimeout=10" - remove the option from the $HOME/.clusterssh/config file - OpenSSH-3.8 using untrusted ssh tunnels - use "-Y" instead of "-X" + + * OpenSSH-3.8 using untrusted ssh tunnels - use "-Y" instead of "-X" or use "ForwardX11Trusted yes" in $HOME/.ssh/ssh_config (if you change the default ssh options from "-x" to "-X") - * If you require support, please run the following commands and post - it on the web site in the support/problems forum: +SUPPORT AND REPORTING BUGS + A web site for comments, requests, bug reports and bug fixes/patches is + available at: + + If you require support, please run the following commands and create an + issue via: - "perl -V" + "perl -V" - "perl -MTk -e 'print $Tk::VERSION,$/'" + "perl -MTk -e 'print $Tk::VERSION,$/'" - "perl -MX11::Protocol -e 'print $X11::Protocol::VERSION,$/'" + "perl -MX11::Protocol -e 'print $X11::Protocol::VERSION,$/'" - "cat /etc/csshrc $HOME/.clusterssh/config" + "cat /etc/csshrc $HOME/.clusterssh/config" - * Using the debug option (--debug) will turn on debugging output. - Repeat the option to increase the amount of debug. However, if - possible please only use this option with one host at a time, e.g. - "cssh --debug " due to the amount of output produced (in both - main and child windows). + Using the debug option (--debug) will turn on debugging output. Repeat + the option to increase the amount of debug. However, if possible please + only use this option with one host at a time, e.g. "cssh --debug " + due to the amount of output produced (in both main and child windows). SEE ALSO - , "ssh", Tk::overview, + , "ssh", Tk::overview, X11::Protocol, "perl" -CREDITS - A web site for comments, requests, bug reports and bug fixes/patches is - available at: - AUTHOR Duncan Ferguson, "" diff --git a/bin_PL/_build_docs b/bin_PL/_build_docs index 4cabf3f..b149b26 100755 --- a/bin_PL/_build_docs +++ b/bin_PL/_build_docs @@ -4,10 +4,9 @@ use strict; use warnings; use FindBin qw($Bin $Script); +use File::Basename; -chdir $Bin || die "Unable to chdir into $Bin: $!"; - -my $bindir="$Bin/../bin"; +my $bindir="bin"; if(! -d $bindir) { mkdir $bindir || die "Could not mkdir $bindir: $!"; @@ -16,8 +15,8 @@ if(! -d $bindir) { print "Using perl binary: $^X",$/; print "Using perl version $^V",$/; -for my $source (glob("*")) { - my $dest="$bindir/$source"; +for my $dest (@ARGV) { + my $source=$Bin.'/'.basename($dest); next if($source =~ m/$Script/); next if($source =~ m/\.x$/); @@ -33,10 +32,10 @@ for my $source (glob("*")) { print $dfh $_ while(<$sfh>); close($sfh); - if($source ne "clusterssh_bash_completion.dist") { + if($source !~ m/clusterssh_bash_completion.dist/) { print $dfh "\n\n__END__\n\n"; - my $pod= qx{ $^X ./$source --generate-pod }; + my $pod= qx{ $^X $source --generate-pod }; die "Failed to generate pod" if($?); print $dfh $pod; } diff --git a/lib/App/ClusterSSH.pm b/lib/App/ClusterSSH.pm index 303c83f..c2a7440 100644 --- a/lib/App/ClusterSSH.pm +++ b/lib/App/ClusterSSH.pm @@ -3,7 +3,7 @@ package App::ClusterSSH; use 5.008.004; use warnings; use strict; -use version; our $VERSION = version->new('4.13_01'); +use version; our $VERSION = version->new('4.14_01'); use Carp qw/cluck :DEFAULT/; diff --git a/lib/App/ClusterSSH/Getopt.pm b/lib/App/ClusterSSH/Getopt.pm index d6547ec..59397ab 100644 --- a/lib/App/ClusterSSH/Getopt.pm +++ b/lib/App/ClusterSSH/Getopt.pm @@ -1014,9 +1014,8 @@ B Any "generic" change to the method (e.g., specifying the ssh port to us ); output '=back'; - output '=head1 ', $self->loc('REPORTING BUGS'); - output '=over'; - output '=item *'; + output '=head1 ', $self->loc('TROUBLESHOOTING'); + output $self->loc( q{If you have issues running [_1], first try: @@ -1037,16 +1036,16 @@ This performs two tests to confirm cssh is able to work properly with the settin $self->parent->config->{comms} ); output '=back'; - output $self->loc(q{Configuration options to watch for in ssh are}); + output $self->loc(q{Configuration options to watch for in ssh are:}); output '=over'; - output '=item ', - $self->loc( + output '=item *'; + output $self->loc( q{SSH doesn't understand [_1] - remove the option from the [_2] file}, 'C<-o ConnectTimeout=10>', 'F<$HOME/.clusterssh/config>' - ); - output '=item ', - $self->loc( + ); + output '=item *'; + output $self->loc( q{OpenSSH-3.8 using untrusted ssh tunnels - use [_1] instead of [_2] or use [_3] in [_4] (if you change the default ssh options from [_5] to [_6])}, 'C<-Y>', 'C<-X>', @@ -1054,12 +1053,19 @@ This performs two tests to confirm cssh is able to work properly with the settin 'F<$HOME/.ssh/ssh_config>', 'C<-x>', 'C<-X>' - ); + ); output '=back'; - output '=item *'; + output '=head1 ', $self->loc('SUPPORT AND REPORTING BUGS'); + + output $self->loc( + q{A web site for comments, requests, bug reports and bug fixes/patches is available at: [_1]}, + 'L' + ); + output $self->loc( - q{If you require support, please run the following commands and post it on the web site in the support/problems forum:} + q{If you require support, please run the following commands and create an issue via: [_1]}, + 'L', ); output 'C<< perl -V >>'; output q{C<< perl -MTk -e 'print $Tk::VERSION,$/' >>}; @@ -1067,28 +1073,20 @@ This performs two tests to confirm cssh is able to work properly with the settin q{C<< perl -MX11::Protocol -e 'print $X11::Protocol::VERSION,$/' >>}; output 'C<< cat /etc/csshrc $HOME/.clusterssh/config >>'; - output '=item *'; output $self->loc( q{Using the debug option (--debug) will turn on debugging output. Repeat the option to increase the amount of debug. However, if possible please only use this option with one host at a time, e.g. [_1] due to the amount of output produced (in both main and child windows).}, 'C<< cssh --debug >>' ); - output '=back'; output '=head1 ', $self->loc('SEE ALSO'); output $self->loc( - q{L, + q{L, C, L, L, C} ); - output '=head1 ', $self->loc('CREDITS'); - output $self->loc( - 'A web site for comments, requests, bug reports and bug fixes/patches is available at: [_1]', - 'L' - ); - output '=head1 ', $self->loc('AUTHOR'); output 'Duncan Ferguson, C<< >>'; diff --git a/lib/App/ClusterSSH/Window/Tk.pm b/lib/App/ClusterSSH/Window/Tk.pm index 734abd1..d0c87c1 100644 --- a/lib/App/ClusterSSH/Window/Tk.pm +++ b/lib/App/ClusterSSH/Window/Tk.pm @@ -446,7 +446,7 @@ sub load_keyboard_map() { # YES! current keycode have priority over old one (phew!) $keyboardmap{ $keycodetosym{ $keyboard[$i][$modifier] - } } + } } = $keyboard_stringlike_modifiers{$modifier} . ( $i + $min ); } @@ -1594,12 +1594,12 @@ sub create_menubar() { -menuitems => [ [ "command", "Show History", - -command => sub { $self->show_history; }, + -command => sub { $self->show_history; }, -accelerator => $self->config->{key_history}, ], [ "command", "Exit", - -command => sub { $self->parent->exit_prog }, + -command => sub { $self->parent->exit_prog }, -accelerator => $self->config->{key_quit}, ] ], @@ -1609,7 +1609,7 @@ sub create_menubar() { my $host_menu_items = [ [ "command", "Retile Windows", - -command => sub { $self->retile_hosts }, + -command => sub { $self->retile_hosts }, -accelerator => $self->config->{key_retilehosts}, ], @@ -1632,7 +1632,7 @@ sub create_menubar() { ], [ "command", "Add Host(s) or Cluster(s)", - -command => sub { $self->add_host_by_name, }, + -command => sub { $self->add_host_by_name, }, -accelerator => $self->config->{key_addhost}, ], [ "command", diff --git a/t/05getopts.t b/t/05getopts.t index 8db8b10..d7be6bf 100644 --- a/t/05getopts.t +++ b/t/05getopts.t @@ -425,4 +425,15 @@ TODO: { is( $trap->die, undef, 'Expecting no die message' ); } +@ARGV = ( '--rows', 5, '--cols', 10 ); +$getopts = App::ClusterSSH::Getopt->new( parent => $mock_object, ); +trap { + $getopts->getopts; +}; + +$trap->did_return(" ... returned"); +$trap->quiet(" ... quietly"); +is( $mock_object->{cols}, 10, 'cols set correctly' ); +is( $mock_object->{rows}, 5, 'rows set correctly' ); + done_testing;