Minor adjustments
authorTodd Lyons <tlyons@exim.org>
Mon, 21 Oct 2013 17:07:27 +0000 (10:07 -0700)
committerTodd Lyons <tlyons@exim.org>
Mon, 21 Oct 2013 17:07:27 +0000 (10:07 -0700)
cgi-bin/eximstatus.pl
delete_unlisted_branches.pl [new file with mode: 0755]
htdocs/index.html
templates/page.tt

index 7e7b900fcb6babf61d4743a93a487ade7561f4ff..e911e6bedc03b471c0fcd0098c4c53bdf84add25 100755 (executable)
@@ -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 (executable)
index 0000000..03df796
--- /dev/null
@@ -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();
index 8fc0a46b8068c541782e84b41723f4b553b492be..c3a3fa688ea839390110e4e2529b6433429ee024 100644 (file)
@@ -22,7 +22,7 @@
            <li id="failures"><a href="/cgi-bin/show_failures.pl" title="Recent Failures">Failures</a></li>
            <li id="members"><a href="/cgi-bin/show_members.pl" title="Platforms tested">Members</a></li>
            <li id="register"><a href="/cgi-bin/register-form.pl" title="Join Exim BuildFarm">Register</a></li>
-           <li id="github"><a href="https://github.com/PGBuildFarm/client-code">GitHub</a></li>
+           <li id="github"><a href="https://github.com/mrballcb/exim-build-farm-client">GitHub</a></li>
            <!--
            <li id="lists"><a href="http://pgfoundry.org/mail/?group_id=1000040">Email lists and status archives</a></li>
            -->
@@ -48,10 +48,12 @@ the <a href="/cgi-bin/register-form.pl" title="Register">Registration Page</a>.
 We are particularly interested in unusual platforms or combinations of
 architecture, operating system and compiler.
 </p>
-<p>To see what is involved in running a buildfarm member, please 
-read <a href="http://wiki.exim.org/wiki/Exim_Buildfarm_Howto">http://wiki.exim.org/wiki/Exim_Buildfarm_Howto</a>.
-The client code can be found at the
-<a href="http://eximbuildfarm.mrball.net/downloads/">downloads page</a>.
+<p>To see what is involved in running a buildfarm member, please read the
+<a href="https://github.com/mrballcb/exim-build-farm-client/wiki/Installation">Client Installation</a> instructions.
+Per the instructions, the client code should be checked out with git and
+run using the <strong>run_cron.sh</strong> wrapper script.  This will allow
+auto-update of itself when changes are made to the Exim Build Farm Client
+software.
 </p>
 <p>The build farm software should run on all platforms that can support Exim.
 </p>
@@ -59,8 +61,11 @@ The client code can be found at the
       </div><!-- main -->
       <hr />
       <p style="text-align: center;">
-       Hosting for the Exim Buildfarm is generously 
-       provided by: 
+       The build farm client and server is derived from the excellent
+       <a href="http://buildfarm.postgresql.org">PostgreSQL Build Farm</a>.
+      </p>
+      <p style="text-align: center;">
+       Hosting for the Exim Buildfarm is provided by: 
        <a href="http://www.mrball.net">Todd Lyons</a>
       </p>
     </div><!-- wrapper -->
index 50fe4cb86994a5817c5788fba1c95f8e67bc9d4d..151e3525f2a22f88dd974ead0e465af5557dc368 100644 (file)
@@ -29,7 +29,7 @@ See accompanying License file for license details
            <li id="failures"><a href="/cgi-bin/show_failures.pl" title="Recent Failures">Failures</a></li>
            <li id="members"><a href="/cgi-bin/show_members.pl" title="Platforms tested">Members</a></li>
            <li id="register"><a href="/cgi-bin/register-form.pl" title="Join Exim BuildFarm">Register</a></li>
-           <li id="github"><a href="https://github.com/PGBuildFarm/client-code">GitHub</a></li>
+           <li id="github"><a href="https://github.com/mrballcb/exim-build-farm-client">GitHub</a></li>
             <!--
            <li id="lists"><a href="http://pgfoundry.org/mail/?group_id=1000040">Email lists and status archives</a></li>
             -->
@@ -46,8 +46,11 @@ See accompanying License file for license details
       </div><!-- main -->
       <hr />
       <p style="text-align: center;">
-       Hosting for the Exim Buildfarm is generously 
-       provided by: 
+       The build farm client and server is derived from the excellent
+       <a href="http://buildfarm.postgresql.org">PostgreSQL Build Farm</a>.
+      </p>
+      <p style="text-align: center;">
+       Hosting for the Exim Buildfarm is provided by: 
        <a href="http://www.mrball.net">Todd Lyons</a>
       </p>
     </div><!-- wrapper -->