The BuildFarm has migated to a new server, thus URLs needed updating.
$ENV{BFConfDir} in require have been replaced by $RealBin set by FileBin().
Google's reCAPTCHA replaced by home-written math challenge.
$default_host
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
my $content = "animal=$animal\&sysnotes=$sysnotes";
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
print "Content-Type: text/plain\n\n";
print "request was on:\n$content\n";
-
-
-
print "Content-Type: text/plain\n\n";
-print "Conf: $ENV{BFConfDir}\n";
+print "Conf: /home/farm/server\n";
print `pwd`;
use Time::ParseDate;
use Storable qw(thaw);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-my $buildlogs = "$ENV{BFConfDir}/buildlogs";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
+
+my $buildlogs = "/home/farm/server/buildlogs";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
use SOAP::Lite ;
my $obj = SOAP::Lite
- ->uri('http://eximbuild.mrball.net/EximBuildFarm')
- ->proxy('http://eximbuild.mrball.net/cgi-bin/show_status_soap.pl')
+ ->uri('http://buildfarm.exim.org/EximBuildFarm')
+ ->proxy('http://buildfarm.exim.org/cgi-bin/show_status_soap.pl')
;
my $data = $obj->get_status->result;
my $line = join (' | ', @{$datum}{@fields});
print $line,"\n";
}
-
use strict;
use Template;
-use Captcha::reCAPTCHA;
-use vars qw( $template_dir $captcha_pubkey );
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use vars qw( $template_dir );
-
-my $c = Captcha::reCAPTCHA->new;
-
-my $captcha = $c->get_html($captcha_pubkey);
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
my $template_opts = { INCLUDE_PATH => $template_dir };
my $template = new Template($template_opts);
print "Content-Type: text/html\n\n";
+my $argop = '+';
+$argop = '-' if time % 2;
+my $arg1 = int(rand(100));
+$arg1 += 11 if $arg1 < 12;
+my $arg2 = int(rand(10) + 1);
-$template->process('register-form.tt',{captcha => $captcha});
-
-
-
-
-
+$template->process('register-form.tt', {arg1 => $arg1, arg2 => $arg2, argop => $argop});
use Template;
use CGI;
use Template;
-use Captcha::reCAPTCHA;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport $notifyapp
- $captcha_pubkey $captcha_privkey $template_dir $default_host);
+ $template_dir $default_host);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
my $dsn="dbi:Pg:dbname=$dbname";
$dsn .= ";host=$dbhost" if $dbhost;
my $params = $query->Vars;
-my ($os, $osv, $comp, $compv, $arch, $email, $owner, $challenge, $response ) =
- @{$params}{
- qw(os osv comp compv arch email owner recaptcha_challenge_field
- recaptcha_response_field)};
-
-my $captcha = Captcha::reCAPTCHA->new;
-my $captcha_ok = $captcha->check_answer
- (
- $captcha_privkey,
- $ENV{'REMOTE_ADDR'},
- $challenge, $response
- );
+my ($os, $osv, $comp, $compv, $arch, $email, $owner, $arg1, $arg2, $argop, $res ) =
+ @{$params}{qw(os osv comp compv arch email owner arg1 arg2 op res)};
+$argop = '-' if !$argop or $argop ne '+';
+$arg1 = int($arg1 || 0);
+$arg2 = int($arg2 || 0);
+$res = int($res || 0);
+my $captcha_ok = ($arg1 and $argop and $arg2 and $res
+ and int(eval "$arg1 $argop $arg2") == $res) ? 1 : 0;
unless ($os && $osv && $comp && $compv && $arch && $email && $owner &&
- $captcha_ok->{is_valid})
+ $captcha_ok)
{
print "Content-Type: text/html\n\n";
$template->process('register-incomplete.tt');
"Comp: $comp: $compv\n",
"Owner: $owner <$email>\n";
$fh->close;
-
-
-
-
-
-
use vars qw($dbhost $dbname $dbuser $dbpass $dbport $template_dir);
-
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
my $query = new CGI;
my @members = grep {$_ ne "" } $query->param('member');
qstages => \@stages} );
exit;
-
use vars qw($dbhost $dbname $dbuser $dbpass $dbport $template_dir);
-
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-#require "BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
$template_dir @log_file_names $local_git_clone);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
my $template_opts = { INCLUDE_PATH => $template_dir, EVAL_PERL => 1};
my $template = new Template($template_opts);
}
return (\@changed_rows,\@commit_logs);
}
-
use vars qw($dbhost $dbname $dbuser $dbpass $dbport $template_dir $sort_by);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-#require "BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
my $query = new CGI;
my %sort_ok = ('name' => 'lower(name)' ,
{statrows=>$statrows});
exit;
-
use vars qw($dbhost $dbname $dbuser $dbpass $dbport @log_file_names);
-
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
-#require "BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
"-------------------------------------------------\n\n",
"Hosting for the Exim BuildFarm is generously ",
- "provided by: Todd Lyons";
+ "provided by: Host1";
}
print "Status: 460 bad parameters\n",
"Content-Type: text/plain\n\n";
}
-
use vars qw($dbhost $dbname $dbuser $dbpass $dbport $template_dir);
-
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
my $query = new CGI;
my @members = $query->param('member');
use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
use SOAP::Transport::HTTP;
}
1;
-
-
-
-
-
use vars qw($dbhost $dbname $dbuser $dbpass $dbport);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
my $dsn="dbi:Pg:dbname=$dbname";
$dsn .= ";host=$dbhost" if $dbhost;
$content .= "\&new_os=$os_version" if $os_version;
$content .= "\&new_compiler=$compiler_version" if $compiler_version;
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
print "Content-Type: text/plain\n\n";
print "request was on:\n$content\n";
-
-
-
--
CREATE VIEW build_status_recent_500 AS
- SELECT bs.sysname, bs.status, bs.snapshot, bs.stage, bs.conf_sum, bs.branch, bs.changed_this_run, bs.changed_since_success, bs.log_archive_filenames, bs.build_flags, bs.report_time, bs.log FROM build_status AS bs WHERE ((build_status.snapshot + '3 mons'::interval) > ('now'::text)::timestamp(6) with time zone);
+ SELECT bs.sysname, bs.status, bs.snapshot, bs.stage, bs.conf_sum, bs.branch, bs.changed_this_run, bs.changed_since_success, bs.log_archive_filenames, bs.build_flags, bs.report_time, bs.log FROM build_status AS bs WHERE ((bs.snapshot + '3 mons'::interval) > ('now'::text)::timestamp(6) with time zone);
ALTER TABLE public.build_status_recent_500 OWNER TO eximbuild;
$user_list_format
$default_host $mail_from
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
die $DBI::errstr unless $db;
my ($brhandle,@branches_of_interest);
-if (open($brhandle,"$ENV{BFConfDir}/htdocs/branches_of_interest.txt"))
+if (open($brhandle,"/home/farm/server/htdocs/branches_of_interest.txt"))
{
@branches_of_interest = <$brhandle>;
close($brhandle);
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
$user_list_format
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
$user_list_format
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
$del_sth->execute();
$del_recent_sth->execute();
-my $buildlogs = "$ENV{BFConfDir}/buildlogs";
+my $buildlogs = "/home/farm/server/buildlogs";
my @dirs = `find $buildlogs -mindepth 1 -type d -ctime +95`;
foreach my $dir (@dirs) {
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
$user_list_format
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
$user_list_format
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;