From aedede4030eba1aea92af8cacd0f09dc8ec26169 Mon Sep 17 00:00:00 2001
From: Todd Lyons
Date: Mon, 21 Oct 2013 10:07:27 -0700
Subject: [PATCH] Minor adjustments
---
cgi-bin/eximstatus.pl | 17 +++++-----
delete_unlisted_branches.pl | 63 +++++++++++++++++++++++++++++++++++++
htdocs/index.html | 19 ++++++-----
templates/page.tt | 9 ++++--
4 files changed, 90 insertions(+), 18 deletions(-)
create mode 100755 delete_unlisted_branches.pl
diff --git a/cgi-bin/eximstatus.pl b/cgi-bin/eximstatus.pl
index 7e7b900..e911e6b 100755
--- a/cgi-bin/eximstatus.pl
+++ b/cgi-bin/eximstatus.pl
@@ -90,14 +90,15 @@ unless ($animal && $ts && $stage && $sig)
}
-unless ($branch =~ /^(HEAD|REL\d+_\d+_STABLE)$/)
-{
- print
- "Status: 492 bad branch parameter $branch\nContent-Type: text/plain\n\n",
- "bad branch parameter $branch\n";
- exit;
-
-}
+# Want to allow all kinds of named branches
+#unless ($branch =~ /^(HEAD|REL\d+_\d+_STABLE)$/)
+#{
+# print
+# "Status: 492 bad branch parameter $branch\nContent-Type: text/plain\n\n",
+# "bad branch parameter $branch\n";
+# exit;
+#
+#}
my $db = DBI->connect($dsn,$dbuser,$dbpass);
diff --git a/delete_unlisted_branches.pl b/delete_unlisted_branches.pl
new file mode 100755
index 0000000..03df796
--- /dev/null
+++ b/delete_unlisted_branches.pl
@@ -0,0 +1,63 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use DBI;
+use Data::Dumper;
+
+use vars qw($dbhost $dbname $dbuser $dbpass $dbport
+);
+require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+die "no dbname" unless $dbname;
+die "no dbuser" unless $dbuser;
+
+my $dsn="dbi:Pg:dbname=$dbname";
+$dsn .= ";host=$dbhost" if $dbhost;
+$dsn .= ";port=$dbport" if $dbport;
+
+my $db = DBI->connect($dsn,$dbuser,$dbpass);
+
+die $DBI::errstr unless $db;
+
+my ($brhandle,@branches_of_interest);
+if (open($brhandle,"$ENV{BFConfDir}/htdocs/branches_of_interest.txt"))
+{
+ @branches_of_interest = <$brhandle>;
+ close($brhandle);
+ chomp(@branches_of_interest);
+}
+
+my $sth = $db->prepare(q[
+ SELECT DISTINCT ON (sysname,branch)
+ sysname,branch
+ FROM build_status AS s
+ JOIN buildsystems AS b ON (s.sysname = b.name)
+ ORDER BY sysname, branch ASC
+ ]);
+$sth->execute();
+
+my $del_sth = $db->prepare(q[
+ DELETE FROM build_status
+ WHERE sysname = ?
+ AND branch = ?
+ ]);
+my $del_dash_sth = $db->prepare(q[
+ DELETE FROM dashboard_mat
+ WHERE sysname = ?
+ AND branch = ?
+ ]);
+
+while (my $row = $sth->fetchrow_hashref)
+{
+ my $sysname = $row->{sysname};
+ my $branch = $row->{branch};
+ print "Considering $sysname:$branch\n";
+ unless (grep {$_ eq $branch} @branches_of_interest)
+ {
+ print "** Delete branch $branch\n";
+ $del_sth->execute($sysname,$branch);
+ $del_dash_sth->execute($sysname,$branch);
+ }
+}
+$db->disconnect();
diff --git a/htdocs/index.html b/htdocs/index.html
index 8fc0a46..c3a3fa6 100644
--- a/htdocs/index.html
+++ b/htdocs/index.html
@@ -22,7 +22,7 @@
Failures
Members
Register
- GitHub
+ GitHub
@@ -48,10 +48,12 @@ the Registration Page.
We are particularly interested in unusual platforms or combinations of
architecture, operating system and compiler.
-To see what is involved in running a buildfarm member, please
-read http://wiki.exim.org/wiki/Exim_Buildfarm_Howto.
-The client code can be found at the
-downloads page.
+
To see what is involved in running a buildfarm member, please read the
+Client Installation instructions.
+Per the instructions, the client code should be checked out with git and
+run using the run_cron.sh wrapper script. This will allow
+auto-update of itself when changes are made to the Exim Build Farm Client
+software.
The build farm software should run on all platforms that can support Exim.
@@ -59,8 +61,11 @@ The client code can be found at the
- Hosting for the Exim Buildfarm is generously
- provided by:
+ The build farm client and server is derived from the excellent
+ PostgreSQL Build Farm.
+
+
+ Hosting for the Exim Buildfarm is provided by:
Todd Lyons
diff --git a/templates/page.tt b/templates/page.tt
index 50fe4cb..151e352 100644
--- a/templates/page.tt
+++ b/templates/page.tt
@@ -29,7 +29,7 @@ See accompanying License file for license details
Failures
Members
Register
- GitHub
+ GitHub
@@ -46,8 +46,11 @@ See accompanying License file for license details
- Hosting for the Exim Buildfarm is generously
- provided by:
+ The build farm client and server is derived from the excellent
+ PostgreSQL Build Farm.
+
+
+ Hosting for the Exim Buildfarm is provided by:
Todd Lyons
--
2.30.2