From: Dirk Koopman Date: Sun, 12 Dec 2021 21:29:10 +0000 (+0000) Subject: Git and Version string changes X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f6d0b05b25a61cb6d3aa671b7a8f5d4a69817b1c;p=spider.git Git and Version string changes 1. Removed dependency on perl Git package. 2. Force code to change directory to $DXSPIDER_ROOT || '/spider'. Also force git -C $root describe. 3. Change git commands AGAIN to work on old perls (which mojo won't work on, but it makes my life easier). 4. Change version strings to include the perl version in use. --- diff --git a/Changes b/Changes index a139b629..f072ce67 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,9 @@ 1. Removed dependency on perl Git package. 2. Force code to change directory to $DXSPIDER_ROOT || '/spider'. Also force git -C $root describe. +3. Change git commands AGAIN to work on old perls (which mojo won't work on, + but it makes my life easier). +4. Change version strings to include the perl version in use. 10Dec21======================================================================= 1. Fix the output of set/dxgrid, set/usstate and set/dxcq or set/dxitu to how it was always supposed to be since 2003. diff --git a/cmd/show/version.pl b/cmd/show/version.pl index 0b0f0cfb..5707504a 100644 --- a/cmd/show/version.pl +++ b/cmd/show/version.pl @@ -23,7 +23,7 @@ if ($self->priv > 5 && @in) { } else { my ($year) = (gmtime($main::systime))[5]; $year += 1900; - push @out, "DX Spider Cluster version $main::version (build $main::build git: $main::gitbranch/$main::gitversion) on \u$^O"; + push @out, "DXSpider v$main::version (build $main::build git: $main::gitbranch/$main::gitversion) using perl $^V on \u$^O"; push @out, "Copyright (c) 1998-$year Dirk Koopman G1TLH"; } diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index c4344339..6d3c09de 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -719,6 +719,8 @@ sub handle_18 sub check_add_node { my $call = shift; + my $type = shift; + # add this station to the user database, if required (don't remove SSID from nodes) my $user = DXUser::get_current($call); @@ -728,7 +730,7 @@ sub check_add_node $user->lockout(1); $user->homenode($call); $user->node($call); - $user->sort('A'); + $user->sort($type || 'A'); $user->lastin($main::systime); # this make it last longer than just this invocation $user->put; # just to make sure it gets written away!!! } @@ -1560,6 +1562,7 @@ sub _add_thingy } } else { dbg("ROUTE: added user $call to $ncall") if isdbg('routelow'); + my $user = check_add_node($call, 'U'); @rout = $parent->add_user($call, Route::here($here), $ip); $dxchan->tell_buddies('loginb', $call, $ncall) if $dxchan; my $r = Route::User::get($call); diff --git a/perl/Msg.pm b/perl/Msg.pm index 13833962..087c0f26 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -291,7 +291,8 @@ sub disconnect dbg("Buffer empty, just close $call") if $dbg; _close_it($conn); } - } else { + } + else { dbg((ref $conn) . " socket missing on $conn->{call}") if $dbg; _close_it($conn); } diff --git a/perl/Route/Node.pm b/perl/Route/Node.pm index 193fb8de..02c8b341 100644 --- a/perl/Route/Node.pm +++ b/perl/Route/Node.pm @@ -270,6 +270,7 @@ sub calc_config_changes return (\@dnodes, \@dusers, \@nnodes, \@nusers); } + sub new { my $pkg = shift; diff --git a/perl/cluster.pl b/perl/cluster.pl index c04f1dbd..919c59db 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -428,7 +428,7 @@ sub cease $l->close_server; } - LogDbg('cluster', "DXSpider V$version, build $build (git: $gitbranch/$gitversion) on $^O ended"); + LogDbg('cluster', "DXSpider v$version build $build (git: $gitbranch/$gitversion) using perl $^V on $^O ended"); dbg("bye bye everyone - bye bye"); dbgclose(); Logclose(); @@ -522,7 +522,7 @@ sub setup_start # determine the real Git build number and branch my $desc; - eval {$desc = `git -C $root describe --long`}; + eval {$desc = `git --git-dir=$root/.git describe --long`}; if (!$@ && $desc) { my ($v, $s, $b, $g) = $desc =~ /^([\d\.]+)(?:\.(\d+))?-(\d+)-g([0-9a-f]+)/; $version = $v; @@ -532,8 +532,8 @@ sub setup_start } if (!$@) { my @branch; - - eval {@branch = `git -C $root branch`}; + + eval {@branch = `git --git-dir=$root/.git branch`}; unless ($@) { for (@branch) { my ($star, $b) = split /\s+/; @@ -560,7 +560,7 @@ sub setup_start # banner my ($year) = (gmtime)[5]; $year += 1900; - LogDbg('cluster', "DXSpider V$version, build $build (git: $gitbranch/$gitversion) on $^O started"); + LogDbg('cluster', "DXSpider v$version build $build (git: $gitbranch/$gitversion) using perl $^V on $^O started"); dbg("Copyright (c) 1998-$year Dirk Koopman G1TLH"); # load Prefixes