[LON-CAPA-cvs] cvs: doc /loncapafiles loncapafiles.lpml loncom dns_checksums.tab lonchksums.tab loncron loncom/cgi lonauthcgi.pm lonmodulecheck.pl loncom/configuration Checksumming.pm loncom/cron loncapa loncom/interface domainprefs.pm domainstatus.pm loncom/lonnet/perl londns.pm lonnet.pm loncom/misc checkforupdates.pl

raeburn raeburn at source.lon-capa.org
Fri Feb 1 19:22:59 EST 2013


raeburn		Sat Feb  2 00:22:59 2013 EDT

  Added files:                 
    /loncom	dns_checksums.tab lonchksums.tab 
    /loncom/cgi	lonmodulecheck.pl 
    /loncom/misc	checkforupdates.pl 
    /loncom/configuration	Checksumming.pm 

  Modified files:              
    /loncom	loncron 
    /loncom/cgi	lonauthcgi.pm 
    /loncom/lonnet/perl	lonnet.pm londns.pm 
    /loncom/interface	domainprefs.pm domainstatus.pm 
    /loncom/cron	loncapa 
    /doc/loncapafiles	loncapafiles.lpml 
  Log:
  - Utilities to checksum LON-CAPA modules to verify integrity of 
    LON-CAPA installation, and also to check the availibility of new
    LON-CAPA releases.
  
  
-------------- next part --------------
Index: loncom/loncron
diff -u loncom/loncron:1.95 loncom/loncron:1.96
--- loncom/loncron:1.95	Mon Nov 14 17:27:34 2011
+++ loncom/loncron	Sat Feb  2 00:22:30 2013
@@ -2,7 +2,7 @@
 
 # Housekeeping program, started by cron, loncontrol and loncron.pl
 #
-# $Id: loncron,v 1.95 2011/11/14 17:27:34 raeburn Exp $
+# $Id: loncron,v 1.96 2013/02/02 00:22:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -32,6 +32,7 @@
 
 use lib '/home/httpd/lib/perl/';
 use LONCAPA::Configuration;
+use LONCAPA::Checksumming;
 use LONCAPA;
 use Apache::lonnet;
 use Apache::loncommon;
@@ -270,12 +271,7 @@
 
     &log($fh,"<h3>distprobe</h3>");
     &log($fh,"<pre>");
-    open(DSH,"$perlvar{'lonDaemons'}/distprobe |");
-    while (my $line=<DSH>) { 
-	&log($fh,&encode_entities($line,'<>&"')); 
-	$psproc++;
-    }
-    close(DSH);
+    &get_distro($perlvar{'lonDaemons'},$fh);
     &log($fh,"</pre>");
 
     &errout($fh);
@@ -755,6 +751,27 @@
     return;
 }
 
+sub write_checksums {
+    my ($perlvar) = @_;
+    return unless (ref($perlvar) eq 'HASH');
+    my $distro = &get_distro($perlvar->{'lonDaemons'});
+    if ($distro) {
+        print "Retrieving file version and checksumming.\n";
+        my ($chksumsref,$versionsref) =
+            &LONCAPA::Checksumming::get_checksums($distro,$perlvar->{'lonDaemons'},
+                                                  $perlvar->{'lonLib'},
+                                                  $perlvar->{'lonIncludes'},
+                                                  $perlvar->{'lonTabDir'});
+        if (ref($chksumsref) eq 'HASH') {
+            $numchksums = scalar(keys(%{$chksumsref}));
+        }
+        print "File version retrieved and checksumming completed for $numchksums files.\n";
+    } else {
+        print "File version retrieval and checksumming skipped - could not determine Linux distro.\n"; 
+    }
+    return'
+}
+
 sub send_mail {
     print "sending mail\n";
     my $defdom = $perlvar{'lonDefDomain'};
@@ -772,6 +789,21 @@
     }
 }
 
+sub get_distro {
+    my ($dir,$fh) = @_;
+    my $distro;
+    if (open(my $disth,"$dir/distprobe |")) {
+        while (my $line=<$disth>) {
+            if ($fh) {
+                &log($fh,&encode_entities($line,'<>&"'));
+            }
+            $distro .= $line;
+        }
+        close($disth);
+    }
+    return $distro;
+}
+
 sub usage {
     print(<<USAGE);
 loncron - housekeeping program that checks up on various parts of Lon-CAPA
@@ -905,7 +937,7 @@
 	&log_simplestatus();
         &write_loncaparevs();
         &write_serverhomeIDs();
-	
+	&write_checksums(\%perlvar);
 	if ($totalcount>200 && !$noemail) { &send_mail(); }
     }
 }
@@ -913,10 +945,3 @@
 &main();
 1;
 
-
-
-
-
-
-
-
Index: loncom/cgi/lonauthcgi.pm
diff -u loncom/cgi/lonauthcgi.pm:1.9 loncom/cgi/lonauthcgi.pm:1.10
--- loncom/cgi/lonauthcgi.pm:1.9	Fri Oct 21 20:00:30 2011
+++ loncom/cgi/lonauthcgi.pm	Sat Feb  2 00:22:34 2013
@@ -1,7 +1,7 @@
 #
 # LON-CAPA authorization for cgi-bin scripts
 #
-# $Id: lonauthcgi.pm,v 1.9 2011/10/21 20:00:30 raeburn Exp $
+# $Id: lonauthcgi.pm,v 1.10 2013/02/02 00:22:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -377,6 +377,7 @@
                    'loncron'           => 'Generate Detailed Report',
                    'server-status'     => 'Apache Status Page',
                    'codeversions'      => 'LON-CAPA Module Versions',
+                   'checksums'         => 'LON-CAPA Module Checking',
                    'clusterstatus'     => 'Domain status',
                    'metadata_keywords' => 'Display Metadata Keywords',
                    'metadata_harvest'  => 'Harvest Metadata Searches',
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1209 loncom/lonnet/perl/lonnet.pm:1.1210
--- loncom/lonnet/perl/lonnet.pm:1.1209	Thu Jan  3 19:58:32 2013
+++ loncom/lonnet/perl/lonnet.pm	Sat Feb  2 00:22:47 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1209 2013/01/03 19:58:32 raeburn Exp $
+# $Id: lonnet.pm,v 1.1210 2013/02/02 00:22:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -11556,12 +11556,12 @@
 }
 
 sub get_dns {
-    my ($url,$func,$ignore_cache) = @_;
+    my ($url,$func,$ignore_cache,$nocache,$hashref) = @_;
     if (!$ignore_cache) {
 	my ($content,$cached)=
 	    &Apache::lonnet::is_cached_new('dns',$url);
 	if ($cached) {
-	    &$func($content);
+	    &$func($content,$hashref);
 	    return;
 	}
     }
@@ -11586,8 +11586,10 @@
         delete($alldns{$dns});
 	next if ($response->is_error());
 	my @content = split("\n",$response->content);
-	&Apache::lonnet::do_cache_new('dns',$url,\@content,30*24*60*60);
-	&$func(\@content);
+	unless ($nocache) {
+	    &Apache::lonnet::do_cache_new('dns',$url,\@content,30*24*60*60);
+	}
+	&$func(\@content,$hashref);
 	return;
     }
     close($config);
@@ -11595,9 +11597,62 @@
     &logthis("unable to contact DNS defaulting to on disk file dns_$which.tab\n");
     open($config,"<$perlvar{'lonTabDir'}/dns_$which.tab");
     my @content = <$config>;
-    &$func(\@content);
+    &$func(\@content,$hashref);
+    return;
+}
+
+# ------------------------------------------------------Get DNS checksums file
+sub write_dns_checksums_tab {
+    my ($lines,$hashref) = @_;
+    my $machine_dom = &Apache::lonnet::host_domain($perlvar{'lonHostID'});
+    my $loncaparev = &get_server_loncaparev($machine_dom);
+    my ($release,$timestamp) = split(/\-/,$loncaparev);
+    my (%chksum,%revnum);
+    if (ref($lines) eq 'ARRAY') {
+        chomp(@{$lines});
+        my $versions = shift(@{$lines});
+        my %supported;
+        if ($versions =~ /^VERSIONS\:([\w\.\,]+)$/) {
+            my $releaseslist = $1;
+            if ($releaseslist =~ /,/) {
+                map { $supported{$_} = 1; } split(/,/,$releaseslist);
+            } elsif ($releaseslist) {
+                $supported{$releaseslist} = 1;
+            }
+        }
+        if ($supported{$release}) {  
+            my $matchthis = 0;
+            foreach my $line (@{$lines}) {
+                if ($line =~ /^(\d[\w\.]+)$/) {
+                    if ($matchthis) {
+                        last;
+                    } elsif ($1 eq $release) {
+                        $matchthis = 1;
+                    }
+                } elsif ($matchthis) {
+                    my ($file,$version,$shasum) = split(/,/,$line);
+                    $chksum{$file} = $shasum;
+                    $revnum{$file} = $version;
+                }
+            }
+            if (ref($hashref) eq 'HASH') {
+                %{$hashref} = (
+                                sums     => \%chksum,
+                                versions => \%revnum,
+                              );
+            }
+        }
+    }
     return;
 }
+
+sub fetch_dns_checksums {
+    my %checksums; 
+        &get_dns('/adm/dns/checksums',\&write_dns_checksums_tab,1,1,
+                 \%checksums);
+    return \%checksums;
+}
+
 # ------------------------------------------------------------ Read domain file
 {
     my $loaded;
Index: loncom/lonnet/perl/londns.pm
diff -u loncom/lonnet/perl/londns.pm:1.1 loncom/lonnet/perl/londns.pm:1.2
--- loncom/lonnet/perl/londns.pm:1.1	Wed Mar 28 00:12:59 2007
+++ loncom/lonnet/perl/londns.pm	Sat Feb  2 00:22:47 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # A debugging harness.
 #
-# $Id: londns.pm,v 1.1 2007/03/28 00:12:59 albertel Exp $
+# $Id: londns.pm,v 1.2 2013/02/02 00:22:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -53,6 +53,8 @@
 	return &serve_file($r,'dns_hosts.tab','loncapa/hosts');
     } elsif ($command eq 'domain') {
 	return &serve_file($r,'dns_domain.tab','loncapa/domain');
+    } elsif ($command eq 'checksums') {
+        return &serve_file($r,'dns_checksums.tab','loncapa/versions');
     }
     return FORBIDDEN;
 }
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.188 loncom/interface/domainprefs.pm:1.189
--- loncom/interface/domainprefs.pm:1.188	Fri Jan 11 17:35:03 2013
+++ loncom/interface/domainprefs.pm	Sat Feb  2 00:22:51 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.188 2013/01/11 17:35:03 raeburn Exp $
+# $Id: domainprefs.pm,v 1.189 2013/02/02 00:22:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4210,7 +4210,7 @@
 
 sub serverstatus_pages {
     return ('userstatus','lonstatus','loncron','server-status','codeversions',
-            'clusterstatus','metadata_keywords','metadata_harvest',
+            'checksums','clusterstatus','metadata_keywords','metadata_harvest',
             'takeoffline','takeonline','showenv','toggledebug','ping','domconf');
 }
 
Index: loncom/interface/domainstatus.pm
diff -u loncom/interface/domainstatus.pm:1.4 loncom/interface/domainstatus.pm:1.5
--- loncom/interface/domainstatus.pm:1.4	Wed May 26 16:24:41 2010
+++ loncom/interface/domainstatus.pm	Sat Feb  2 00:22:51 2013
@@ -2,7 +2,7 @@
 # Generate a menu page containing links to server status pages accessible
 # to user. 
 #
-# $Id: domainstatus.pm,v 1.4 2010/05/26 16:24:41 bisitz Exp $
+# $Id: domainstatus.pm,v 1.5 2013/02/02 00:22:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -154,6 +154,15 @@
                  linktitle => $titles->{'codeversions'},
              },
              {
+                 linktext => $linknames->{'checksums'},
+                 icon => '',
+                 alttext => '',
+                 #help => 'Domain_Coordination_Code_Checksums',
+                 url => '/cgi-bin/lonmodulecheck.pl',
+                 permission => $candisplay->{'checksums'},
+                 linktitle => $titles->{'checksums'},
+             },
+             {
                  linktext => $linknames->{'showenv'},
                  icon => '',
                  alttext => '',
@@ -223,6 +232,7 @@
                     'server-status' => 'Apache Server Status',
                     'clusterstatus' => 'Domain Status',
                     'codeversions' => 'LON-CAPA Modules',
+                    'checksums'    => 'Check for LON-CAPA Module changes',   
                     'showenv' => 'User Environment for current log-in',
                     'loncron' => 'Update Connections and Refresh Status Information',
                     'takeoffline' => 'Replace log-in page with offline notice',
Index: loncom/cron/loncapa
diff -u loncom/cron/loncapa:1.20 loncom/cron/loncapa:1.21
--- loncom/cron/loncapa:1.20	Tue May 11 13:38:31 2010
+++ loncom/cron/loncapa	Sat Feb  2 00:22:55 2013
@@ -7,6 +7,10 @@
 # Re-evaluate loncapa network connections.
 10 5 * * *    www    /home/httpd/perl/loncron
 
+# Retrieve checksums for loncapa modules from DNS for numbered release
+# and compare with installed modules
+10 4 * * *    www    /home/httpd/perl/checkforupdates.pl 
+
 # Check whether the RPMS are up-to-date and e-mail the system admins.
 # (It is very important to keep a loncapa system running with all applicable
 #  security patches.)
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.822 doc/loncapafiles/loncapafiles.lpml:1.823
--- doc/loncapafiles/loncapafiles.lpml:1.822	Fri Jan 11 21:26:50 2013
+++ doc/loncapafiles/loncapafiles.lpml	Sat Feb  2 00:22:58 2013
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.822 2013/01/11 21:26:50 raeburn Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.823 2013/02/02 00:22:58 raeburn Exp $ -->
 
 <!--
 
@@ -1302,6 +1302,16 @@
 </description>
 </file>
 <file>
+<source>loncom/cgi/lonmodulecheck.pl</source>
+<target dist='default'>home/httpd/cgi-bin/lonmodulecheck.pl</target>
+<categoryname>script</categoryname>
+<description>
+utility cgi script to check for differences between currently 
+installed versions of LON-CAPA modules and those expected for the 
+LON-CAPA release installed on the server.
+</description>
+</file>
+<file>
 <source>loncom/cgi/ping.pl</source>
 <target dist='default'>home/httpd/cgi-bin/ping.pl</target>
 <categoryname>script</categoryname>
@@ -1693,6 +1703,17 @@
   </description>
 </file>
 
+<file type="private">
+  <source>loncom/dns_checksums.tab</source>
+  <target dist='default'>home/httpd/lonTabs/dns_checksums.tab</target>
+  <categoryname>www static conf</categoryname>
+  <description>
+File containing version numbers and checksums for most LON-CAPA perl modules,
+perl scripts, cgi scripts, daemons, and a configuration file in each 
+LON-CAPA release, starting with 2.11.0.RC1
+  </description>
+</file>
+
 <file>
   <source>loncom/loncaparevs.tab</source>
   <target dist='default'>home/httpd/lonTabs/loncaparevs.tab</target>
@@ -1713,6 +1734,17 @@
 </file>
 
 <file>
+  <source>loncom/lonchksums.tab</source>
+  <target dist='default'>home/httpd/lonTabs/lonchksums.tab</target>
+  <categoryname>www conf</categoryname>
+  <description>
+File containing version numbers and checksums for most LON-CAPA perl modules,
+perl scripts, cgi scripts, daemons, and a configuration file for current
+server. Updated by loncron.
+  </description>
+</file>
+
+<file>
 <source>loncom/spare.tab</source>
 <target dist='default'>home/httpd/lonTabs/spare.tab</target>
 <categoryname>conf</categoryname>
@@ -1818,6 +1850,17 @@
 </description>
 </file>
 <file>
+<source>loncom/misc/checkforupdates.pl</source>
+<target dist='default'>home/httpd/perl/checkforupdates.pl</target>
+<categoryname>script</categoryname>
+<description>
+Perl script run by cron to check:
+(a) for differences between currently installed versions of LON-CAPA modules
+and those expected for the particular LON-CAPA release
+(b) if an updated LON-CAPA release is available from install.loncapa.org  
+</description>
+</file>
+<file>
 <source>loncom/debugging_tools/seed_accesscount.pl</source>
 <target dist='default'>home/httpd/perl/seed_accesscount.pl</target>
 <categoryname>script</categoryname>
@@ -6964,6 +7007,16 @@
 <status>works/unverified</status>
 </file>
 <file>
+<source>loncom/configuration/Checksumming.pm</source>
+<target dist='default'>home/httpd/lib/perl/LONCAPA/Checksumming.pm</target>
+<categoryname>system file</categoryname>
+<description>
+Provides routine to checksum perl modules, perl scripts, cgi scripts,
+language lexicons, and static configuration file on current server
+</description>
+<status>works/unverified</status>
+</file>
+<file>
 <source>loncom/ConfigFileEdit.pm</source>
 <target dist='default'>home/httpd/lib/perl/LONCAPA/ConfigFileEdit.pm</target>
 <categoryname>system file</categoryname>

Index: loncom/dns_checksums.tab
+++ loncom/dns_checksums.tab
VERSIONS:2.11.0.RC1
2.11.0.RC1
/etc/httpd/conf/loncapa_apache.conf,1.215.2.6,5a0966d1afaff5322244ae37871694cb49a09d03
/etc/httpd/conf/startup.pl,1.41.2.1,3055a5a50b9a2d95d443fd37c024f3c4c6e98397
/home/httpd/cgi-bin/barcode.png,1.12,57bb6c59faa8f28283e9a33fb978d96b076a1ecb
/home/httpd/cgi-bin/clusterstatus.pl,1.27,c614444ed78bc4c3b5a5ab9a377214feffdf158e
/home/httpd/cgi-bin/convertjme.pl,1.16,354e3ecc2fa1359a8469367d32396636b86b5703
/home/httpd/cgi-bin/decompress.pl,1.19,0a21ffb9d299f5e73449e21f0564f703599ddf19
/home/httpd/cgi-bin/gradesubmission.pl,1.2,074dafb6e227a9bbd16974b0ee9c92d0fd4dda04
/home/httpd/cgi-bin/graph.png,1.35,da6d261cc74007bd3455c1e9460ec0c951baedf7
/home/httpd/cgi-bin/imagechoice.pl,1.4,6ac898517eb16c8e1a04b520b402b541f548c791
/home/httpd/cgi-bin/listdomconfig.pl,1.1,e52fc1bb8f4c5661208da446ee61ad0f3b556e2f
/home/httpd/cgi-bin/loncron.pl,1.7,03a1a7449621d189fa1667fd3f773551a1b57222
/home/httpd/cgi-bin/lonmodulecheck.pl,1.1,c2f0699529d2592052245f4f638b90410fa11003
/home/httpd/cgi-bin/lonversions.pl,1.9,ef3028a2bef4b3dd797f6a0ee5406164707153cb
/home/httpd/cgi-bin/metadata_harvest.pl,1.5,df5d7dfd5a393f849786ee21bb6416d026224dd7
/home/httpd/cgi-bin/metadata_keywords.pl,1.9,7bb64b80cea7ed879c47aa16999af3d2f79a6a18
/home/httpd/cgi-bin/multidownload.pl,1.39,fc543ad370db6cd68653ff07291b8f587826643a
/home/httpd/cgi-bin/perltest.pl,1.12,b07a9ac628b880f2f6d0bbe1de2e76c8a9fe36c0
/home/httpd/cgi-bin/ping.pl,1.9,a5e1b6c063cd9efe98bcb6fbbc995ffcb35622e2
/home/httpd/cgi-bin/plot.png,1.13,733769f532d2c1145ae43a27943a1f1fd306f273
/home/httpd/cgi-bin/printout.pl,1.152,0e09f607bf82a4ff08b8613eceb8963688f4fd91
/home/httpd/cgi-bin/takeoffline.pl,1.6,768ecf0916ada5c1a2887513667c4f89240ce773
/home/httpd/cgi-bin/takeonline.pl,1.4,acc1d3251acffbcd56d32c325a483d0e41bf3d76
/home/httpd/cgi-bin/translator.pl,1.1,f4cfdc404b86637c962b437733578a03ebbe504e
/home/httpd/cgi-bin/userstatus.pl,1.20,b5d8240dac9c315e278a19ab9ebf457e04fa1db6
/home/httpd/html/res/adm/includes/default_homework.lcpm,1.163,1395339ce67e77d6ef0f1c487b29a0a3150f4535
/home/httpd/html/res/adm/includes/lectureonline.lcpm,1.2,842fe84059dc1f6dc982d550caf92c979b0fedc1
/home/httpd/lib/perl/AlgParser.pm,1.18,b28c4ff2ce23a8be6f821ca15e8a3f156edd73ca
/home/httpd/lib/perl/Apache/Spreadsheet.pm,1.81,b0fd78bcd2ea3a834e5f22098cf7ce647d4845fa
/home/httpd/lib/perl/Apache/admannotations.pm,1.35,42ea6cce1fba22bd8cae3aafeeb41f5cc15458dd
/home/httpd/lib/perl/Apache/admbookmarks.pm,1.38,8db2910381345e61e11777f12539c84ee87b6e34
/home/httpd/lib/perl/Apache/assesscalc.pm,1.59,cb65851bc42bdd2244d26174e1fd5db38a71f975
/home/httpd/lib/perl/Apache/blockedaccess.pm,1.4,2900e8a51e2f6db30a475f5495d69b88ca3f2113
/home/httpd/lib/perl/Apache/bridgetask.pm,1.261,6488dd2745cd8524771cbb45bdf79b3fa2640de0
/home/httpd/lib/perl/Apache/caparesponse.pm,1.254,fe21bd298894b9e1d677e419e0218c8e0575c803
/home/httpd/lib/perl/Apache/checkauthen.pm,1.13,4a31325417b9196434f025a68a41f8dfc1c291cb
/home/httpd/lib/perl/Apache/chemresponse.pm,1.91,fceab4082552430f276f5645b7ba0156ce3b4c76
/home/httpd/lib/perl/Apache/classcalc.pm,1.31,aad53ea851a22e4f498f26adcabe9ab99bef7b33
/home/httpd/lib/perl/Apache/coursecatalog.pm,1.72,0e26150f621e322582d971a0d73b1fdf5555478b
/home/httpd/lib/perl/Apache/courseclassifier.pm,1.14,1f2a8074cef646f33b1cb35f0d1be4ae2bd93786
/home/httpd/lib/perl/Apache/courseprefs.pm,1.49.2.5,419cb3d333af7549d4e570c3065eeed30fc53c29
/home/httpd/lib/perl/Apache/createaccount.pm,1.54,27bee4e138d4d6d126e4f62e5b5ec02f91ff4510
/home/httpd/lib/perl/Apache/domainprefs.pm,1.160.6.14,e216389729d51e7bee7cc888d346b0ac2029ff82
/home/httpd/lib/perl/Apache/domainstatus.pm,1.5,856aa41131d462f59af7051399b12cfaad7d6c5c
/home/httpd/lib/perl/Apache/drawimage.pm,1.10,cee975e8248e9159994c823391b4615aa350e9d9
/home/httpd/lib/perl/Apache/edit.pm,1.142,01755063e9ad2350b6e35486e853023e17427651
/home/httpd/lib/perl/Apache/entities.pm,1.19,54a653f8a1c8c011b491de63039afba5562b37be
/home/httpd/lib/perl/Apache/essayresponse.pm,1.117,e716aea61f643f1ca2ca2fd8bfe2c733b9f40c70
/home/httpd/lib/perl/Apache/externalresponse.pm,1.19,6c75093451c4e3d4f7434417c17406ac31397064
/home/httpd/lib/perl/Apache/functionplotresponse.pm,1.101,f56d18054139548ef1af4c71dc61934e3242de62
/home/httpd/lib/perl/Apache/grades.pm,1.596.2.12.2.12,331cd10b12fe1b84b8ee28d451242773dd0e36f0
/home/httpd/lib/perl/Apache/groupboards.pm,1.16,aba74b7193c80f7b051f64c06ce2991fb5bef561
/home/httpd/lib/perl/Apache/grouproster.pm,1.8,71dfb3f443aa759b2271d0a0826bfec1046c6e81
/home/httpd/lib/perl/Apache/groupsort.pm,1.68.6.5,a6894034c3183102d26f318ba8d0adef468ba07a
/home/httpd/lib/perl/Apache/hint.pm,1.78,1fd1a737d44993ededca7ca2401a1ac06c295609
/home/httpd/lib/perl/Apache/imagechoice.pm,1.17,8dc26d32e072d86802d71efd0947002727c14126
/home/httpd/lib/perl/Apache/imageresponse.pm,1.104,2f0c1fdecffd8ec8e7a2196241c5d7e505ed4a38
/home/httpd/lib/perl/Apache/imsexport.pm,1.10,5f8c851b3e17c16bb9aa96ed7ae1b52888c0e53a
/home/httpd/lib/perl/Apache/imsimport.pm,1.38,c9ab829f8713e1bedb0bac46bb90bc53fb537798
/home/httpd/lib/perl/Apache/imsimportdocs.pm,1.30,9a51e6ceb32f8ddbba6d1c75c6d9f699b1450f1d
/home/httpd/lib/perl/Apache/imsprocessor.pm,1.51,7e2d1b7f09cdfe24a4946f84f4c953fd713a632f
/home/httpd/lib/perl/Apache/inputtags.pm,1.314,0b0b767904264e24eded320e616709a13dde59ed
/home/httpd/lib/perl/Apache/languagetags.pm,1.2,2c251b3611c40b600250b78764e11e1b995606ee
/home/httpd/lib/perl/Apache/localize.pm,1.2,5412e40c084a5b91ecb30c2d44b9f99c0647c9e1
/home/httpd/lib/perl/Apache/localize/ar.pm,1.22,345a171e56f2e1796fdd3b65c1e3ef177fe1206c
/home/httpd/lib/perl/Apache/localize/de.pm,1.463.2.7,b2b44686246f2f8a1126b8d02c429443bf8a556a
/home/httpd/lib/perl/Apache/localize/en.pm,1.5,88e515f0037884c3091bc5773d20dd1a2979a36c
/home/httpd/lib/perl/Apache/localize/es.pm,1.72,1622b607e995e6c2377f5d3887ca9b6cbcaef3f9
/home/httpd/lib/perl/Apache/localize/fa.pm,1.20,757db06859c28692b94f561a72612f7d871f5091
/home/httpd/lib/perl/Apache/localize/fr.pm,1.24,329f3bb111d38f76f0a12d9929c389421ef8c98e
/home/httpd/lib/perl/Apache/localize/he.pm,1.15,fc63432fdf472054d4819a18d4393389c1148383
/home/httpd/lib/perl/Apache/localize/ja.pm,1.27,af14e9d52674ef357b03afaf540d670d13375a9e
/home/httpd/lib/perl/Apache/localize/pt.pm,1.61,11c0d1b5e357e7b7ee525a9315f192181acac5d1
/home/httpd/lib/perl/Apache/localize/ru.pm,1.65,abf6a6660104ad74d6f2513979321c787afd21f9
/home/httpd/lib/perl/Apache/localize/tr.pm,1.20,2cfb4f98bb68a3f3d556624bcb4ef5b8f602b943
/home/httpd/lib/perl/Apache/localize/x_chef.pm,1.5,cf549a68355f46cd33aecbe8cbc086769255ab26
/home/httpd/lib/perl/Apache/localize/zh.pm,1.108,2a942a477e39a414bb428ec9c10fdcecc69d5286
/home/httpd/lib/perl/Apache/lonaboutme.pm,1.153,10e7887ffc9a3d5d929be20c231cda6bec2c07e6
/home/httpd/lib/perl/Apache/lonacc.pm,1.141,ec27737354911f903135ec30997684393a5dc491
/home/httpd/lib/perl/Apache/lonambiguous.pm,1.24,1f4add552c4409bb7c58acc97f28fe781d2aa15a
/home/httpd/lib/perl/Apache/lonannounce.pm,1.85,73262e356e7662a86ef985b7677af557b0fdbab2
/home/httpd/lib/perl/Apache/lonauth.pm,1.121.2.3,df650d59d0c82a6391f7830ee299a63e934e5003
/home/httpd/lib/perl/Apache/lonblockingmenu.pm,1.9,df743965ae25818ae58763d053516cfd3f0c49a6
/home/httpd/lib/perl/Apache/lonblockingstatus.pm,1.12,6984ef64172b8e9e8044d3f13f7dd5d37e2ff1a6
/home/httpd/lib/perl/Apache/lonbulletin.pm,1.66,3edd60564cc9457013ebccbf816cde24739e3772
/home/httpd/lib/perl/Apache/loncacc.pm,1.60,8e28906ec1f8d48005701488ab6e6f62d8864bc0
/home/httpd/lib/perl/Apache/loncapagrade.pm,1.7,e7af8cc5693608812a8d1260f40f388924586ad2
/home/httpd/lib/perl/Apache/loncfile.pm,1.117,fdfcbd9fdeb5dc9abc6f1ad2dbf799727d1780b8
/home/httpd/lib/perl/Apache/lonchat.pm,1.20,6847c9b7bdec6861dee47288bdefb0d5ad746418
/home/httpd/lib/perl/Apache/lonchatfetch.pm,1.38,2b1661e96a388710b4e5f4d3ad98795c6b0ded6b
/home/httpd/lib/perl/Apache/loncleanup.pm,1.19,9e4c37a5ce742c429702365f22071daafa7ffcf8
/home/httpd/lib/perl/Apache/lonclonecourse.pm,1.9,98c1d2666539fa4b3d50b80c6f41b7d0b8fef450
/home/httpd/lib/perl/Apache/loncommon.pm,1.1075.2.30,face4b92404e4e194a085b0abf050ae40b2d628b
/home/httpd/lib/perl/Apache/loncommunicate.pm,1.47,596a9fcc00dd7901ab0c6d9b303637542aecf25c
/home/httpd/lib/perl/Apache/lonconfigsettings.pm,1.21.4.2,248e9a214d98e7fc39bc2f4d1274843962177a1d
/home/httpd/lib/perl/Apache/lonconstruct.pm,1.35,1b80b2e3ab6874d3b77a980f753afb5e9d8a4aba
/home/httpd/lib/perl/Apache/loncorrectproblemplot.pm,1.28.2.1,fc3b683a9c9467b84de2d3ad178e5553787b590c
/home/httpd/lib/perl/Apache/loncoursedata.pm,1.193,5845ffa790669753fc6edaddf2c9136703fbcc57
/home/httpd/lib/perl/Apache/loncoursegroups.pm,1.115,ccbde5365090e0d2dea9a23e81722238efeeb534
/home/httpd/lib/perl/Apache/loncoursequeueadmin.pm,1.34,4c1d92f1e0aff861eb18d0aadb51478edf467fff
/home/httpd/lib/perl/Apache/loncourserespicker.pm,1.5,f651b5cd7d2950e07551dea42b093bb358079065
/home/httpd/lib/perl/Apache/loncreatecourse.pm,1.146,a91814b836b6094b074aee0c8d0927454b7170da
/home/httpd/lib/perl/Apache/loncreateuser.pm,1.372,8d506ab95866e09dfa4212dd0262574a3f0000d5
/home/httpd/lib/perl/Apache/loncss.pm,1.9,9cddcb9422ad7d4e78a33783205600cd48526159
/home/httpd/lib/perl/Apache/londatecheck.pm,1.13,092e63ba952968ae7cfad4c32d6025e2b55cf41f
/home/httpd/lib/perl/Apache/londefdef.pm,1.442,44a5caae93c3397755e6314070d8c743689258bd
/home/httpd/lib/perl/Apache/londependencies.pm,1.3,e87206c4d8f6913b36d8e353fba26424ae16e47a
/home/httpd/lib/perl/Apache/londiff.pm,1.36,ce08c4777d6350ad7814157783b0c7d4c6861066
/home/httpd/lib/perl/Apache/londns.pm,1.1,7de94417d2cf9dfe209c7ed8414c84ea13fe290d
/home/httpd/lib/perl/Apache/londocs.pm,1.484.2.25,c2fc47a7662bbe2cefbf142ea7c255e0786911c9
/home/httpd/lib/perl/Apache/lonenc.pm,1.25,449c1f19b558b5b041bd1f2ca0339dc4b00a9ccf
/home/httpd/lib/perl/Apache/lonencurl.pm,1.5,02843c29a4c945e508e62b925b3761380a52580a
/home/httpd/lib/perl/Apache/lonerrorhandler.pm,1.23,fc9bb05cd2760f8c709fb8bdec96006b0b0e0305
/home/httpd/lib/perl/Apache/lonevaluate.pm,1.29,63c64d2209cd054a160f1e3e555679073c7dc170
/home/httpd/lib/perl/Apache/lonextresedit.pm,1.4,ef1057a68f9d0f8d347ea58edcf2149b94c6093d
/home/httpd/lib/perl/Apache/lonfeedback.pm,1.363,63e8facd61445197f62f0a189a21bcb3898d9eb1
/home/httpd/lib/perl/Apache/longradinganalysis.pm,1.11,94b0a5ab86385fee28113cab628521ec1a28d12f
/home/httpd/lib/perl/Apache/longroup.pm,1.29,aecdf1153d466422dca53e1473792dfa2b3b75bb
/home/httpd/lib/perl/Apache/longroupchat.pm,1.10,807c82307804fe1a16cc32a74ac9485131b924e1
/home/httpd/lib/perl/Apache/lonhelp.pm,1.40,b5c68d0962c9174e7944efa5802032477628016a
/home/httpd/lib/perl/Apache/lonhelper.pm,1.190,8ca135c5764678e2313cc6894cb0d1e8eaeb2164
/home/httpd/lib/perl/Apache/lonhelpmenu.pm,1.40,9b59f27a18e7084da05e32e3c651e1c36c0c61f2
/home/httpd/lib/perl/Apache/lonhomework.pm,1.336,be14605f5292b78dfe0071daed80cc3bb6559fd7
/home/httpd/lib/perl/Apache/lonhtmlcommon.pm,1.340,f4ae7e790496632028f10b2ff8fc09449343e57f
/home/httpd/lib/perl/Apache/lonindexer.pm,1.213.4.3,69c22ccc3ef70fa8807ff07a48b05885c5ddfd3c
/home/httpd/lib/perl/Apache/lonipcheck.pm,1.1,f946bff2aaa26a2563fade3da19d61cb110a6203
/home/httpd/lib/perl/Apache/lonlatextable.pm,1.4,b3e1cabbddcb2a63a57d00f08bfdca9202f826f5
/home/httpd/lib/perl/Apache/lonlocal.pm,1.64,49e8e59415b91a6cd28fa3a41f02222652faf627
/home/httpd/lib/perl/Apache/lonlocalize.pm,1.1,afff37cbe9d42bb25d6f098eb9d17b68000958cf
/home/httpd/lib/perl/Apache/lonlogin.pm,1.155,8d6485f4fefbb124319d51776a896e01aec0df8b
/home/httpd/lib/perl/Apache/lonlogout.pm,1.45.2.1,da18c5a397e18f27f4dcb737279d9e38ce461c0f
/home/httpd/lib/perl/Apache/lonmainmenu.pm,1.8,048f1099ebf7409bf180fff22e0a33b98233d07e
/home/httpd/lib/perl/Apache/lonmanagekeys.pm,1.25,8dc3416218cc4a52b4183c5eaa4679ad0f3e98ce
/home/httpd/lib/perl/Apache/lonmap.pm,1.9,68c5fa712c31728ef14ab76ea41968e786751905
/home/httpd/lib/perl/Apache/lonmaxima.pm,1.30,bba519f6e69b61bd4d10034365b1bd32a4ec5335
/home/httpd/lib/perl/Apache/lonmenu.pm,1.369.2.37,4bcd7067541dac0443072340bf2dae7bb8fcab2e
/home/httpd/lib/perl/Apache/lonmeta.pm,1.248,e660aa49aaef2869ebfabbcb1075cca32b78851e
/home/httpd/lib/perl/Apache/lonmodifycourse.pm,1.59,b04661a13c8c8963ace6b05c0f2a1ed2563007e6
/home/httpd/lib/perl/Apache/lonmsg.pm,1.234,0eb0f0976aece688edc5d828e05c95dc3ec2fa64
/home/httpd/lib/perl/Apache/lonmsgdisplay.pm,1.161,40bf3c3ea06ac135445e13ef4354d779c828a249
/home/httpd/lib/perl/Apache/lonmysql.pm,1.39,f03ed6ec05489a20a0e8a6188f71b6169beccd31
/home/httpd/lib/perl/Apache/lonnavdisplay.pm,1.22.4.1,6d91e4303cfa5a2a9da8b9936a414617ffdd0252
/home/httpd/lib/perl/Apache/lonnavmaps.pm,1.493,6f547c70877dacd0301cc4cdee424ff8f1766da3
/home/httpd/lib/perl/Apache/lonnet.pm,1.1172.2.16,2490006cb3e316d4a8512ae50fd73fd04f1e8241
/home/httpd/lib/perl/Apache/lonnoshib.pm,1.1,333834f9aeae740d3049d9caf5046e56febfb34d
/home/httpd/lib/perl/Apache/lonnotify.pm,1.39,3b5f90e0983c89c3b698547c57ac034bab71c4a9
/home/httpd/lib/perl/Apache/lonpage.pm,1.100,6e527f12b41d3d1344f07614c007bc8b9a17725b
/home/httpd/lib/perl/Apache/lonpageflip.pm,1.80.8.1,51802f3d96b57d884e05c1658f585be2430974ab
/home/httpd/lib/perl/Apache/lonparmset.pm,1.522.2.5,dfc39d5e318b9139077ada644910cdd62e6b7ffa
/home/httpd/lib/perl/Apache/lonpdfupload.pm,1.22,577aca54ccc2157e35f4f954407f2a9e02ebccb8
/home/httpd/lib/perl/Apache/lonpercentage.pm,1.12,0548f3ee8cde877a5472ce4fa46530ae9e76b75d
/home/httpd/lib/perl/Apache/lonpickauthor.pm,1.3,f55f754b7e02af84861af3216d61e4c24ac7e3db
/home/httpd/lib/perl/Apache/lonpickcode.pm,1.15,059c2d7f98ab50e1af5e99eb4e7ba5479c8392d8
/home/httpd/lib/perl/Apache/lonpickcourse.pm,1.103,e2dde76e48a0752b6525eb087148ac22211b7355
/home/httpd/lib/perl/Apache/lonpickstudent.pm,1.30,2b65b99b271f49922b027e956181abad60fb7fc5
/home/httpd/lib/perl/Apache/lonpickuser.pm,1.5,c47f5081194ae82d75a64170a95d02accf1fb00b
/home/httpd/lib/perl/Apache/lonplot.pm,1.171,48992e87798cf60b25f38d9fbb259c6a5c43d824
/home/httpd/lib/perl/Apache/lonpopulate.pm,1.73,76dcacbe16c085cc70d42eae9c873ba9d92e5c5a
/home/httpd/lib/perl/Apache/lonpreferences.pm,1.196.4.9,f5dae3db3764a0708b03ca404fe03dd7cbe55f92
/home/httpd/lib/perl/Apache/lonprintout.pm,1.627.2.3,ebbec5578750cb0e900487041f4ac09c2974ccdb
/home/httpd/lib/perl/Apache/lonproblemanalysis.pm,1.142.2.2,bdc3f2f277d94e2358c8d9e64119eb782e3bcc8b
/home/httpd/lib/perl/Apache/lonproblemstatistics.pm,1.122.2.1,550c91a9b167f17a6e2f17eb390cb58add85a086
/home/httpd/lib/perl/Apache/lonpubdir.pm,1.144,19c5454aced0aeaa8e2ca83fb8b31c980a54e9c3
/home/httpd/lib/perl/Apache/lonpublisher.pm,1.281,49fbd82c95664cf4681bf76d01fe4ba22aa2c86c
/home/httpd/lib/perl/Apache/lonquickgrades.pm,1.49,9b6a498614c29a7b438f70e0bbcdd986bb1750d0
/home/httpd/lib/perl/Apache/lonr.pm,1.10,286ceb503dd26ef05624cdb34a7d5402d5a2b6f6
/home/httpd/lib/perl/Apache/lonracc.pm,1.23,0ff0df41aa604f2cd02eff52658533c525d463b2
/home/httpd/lib/perl/Apache/lonratedt.pm,1.105.2.4,c5adfbc5c650057681a10aebab1932461777f63f
/home/httpd/lib/perl/Apache/lonratmenu.pm,1.18.8.2,8a9e045263225122ad1350653b97469c76d17ae2
/home/httpd/lib/perl/Apache/lonratparms.pm,1.29,f515e150682300bade7f5d0042287e31e22db63b
/home/httpd/lib/perl/Apache/lonratsrv.pm,1.42,5ed20af763a2fbc7f9af0f78b4a48c8c467862d4
/home/httpd/lib/perl/Apache/lonremote.pm,1.34,71db2975d2831e2016b235bd49d9c3f50a5ad1a8
/home/httpd/lib/perl/Apache/lonrep.pm,1.14,51213be6624cdbe1ab65aca25e536962c4158bdb
/home/httpd/lib/perl/Apache/lonrequestcourse.pm,1.65,0c33b7412df2ac2d0afcf3737bdc78e5dd4a1833
/home/httpd/lib/perl/Apache/lonretrieve.pm,1.50,6b6ea20f0c49b0dbc8040815432ab085a700ff12
/home/httpd/lib/perl/Apache/lonrights.pm,1.34,a23e3de85f0ed509cbcbea8b38bbf158a8b392c5
/home/httpd/lib/perl/Apache/lonroles.pm,1.269.2.7,bbd25699c8812fd085e320dddb5da710e60f4c51
/home/httpd/lib/perl/Apache/lonrss.pm,1.50,a622480ab29b7efc34f7cff8d70f29eeaa934cc2
/home/httpd/lib/perl/Apache/lonsearchcat.pm,1.331.4.4,bf993a3bd95b2a24d822795aa8e55d2111b36464
/home/httpd/lib/perl/Apache/lonsearchcourse.pm,1.4,fb879197bc0d09ce4fe4ec8154c54332db5f2cf3
/home/httpd/lib/perl/Apache/lonselstudent.pm,1.14,17f5558ca9bd2f50a75e08de8ea23bd81664cec6
/home/httpd/lib/perl/Apache/lonsequence.pm,1.43,4c34db82005999f8546593166dec8c49e6b0e4aa
/home/httpd/lib/perl/Apache/lonshibacc.pm,1.1,715aacd1c0d60af9b3c56a02628774c09627f1ee
/home/httpd/lib/perl/Apache/lonshibauth.pm,1.2,0454caf785c96ba265699adc1a625688422d1629
/home/httpd/lib/perl/Apache/lonsimplepage.pm,1.101,fa345c16ae0009315bf29d67ef26d97688070eb4
/home/httpd/lib/perl/Apache/lonsimpleproblemedit.pm,1.34,e50b995a0a282935c2daa14f048e8914b7b31bf5
/home/httpd/lib/perl/Apache/lonsource.pm,1.29,b38be8402485411a26dc970eb6b1eab500b567e7
/home/httpd/lib/perl/Apache/lonspeller.pm,1.17,2b55f6309d4ca0a9f7140fd037c59674d17b0894
/home/httpd/lib/perl/Apache/lonspreadsheet.pm,1.61.6.1,6acf56126945f0a186ac75150411a776972aae3a
/home/httpd/lib/perl/Apache/lonstathelpers.pm,1.70,b2af89577145cfb55a0c488a013d6e660a894537
/home/httpd/lib/perl/Apache/lonstatistics.pm,1.156.2.1,cf02bdeec65210e9e4b6a3cf552c8769b843e38c
/home/httpd/lib/perl/Apache/lonstatusacc.pm,1.7,ee624c2ceb31260df343a4c7dfe2d81bd976584c
/home/httpd/lib/perl/Apache/lonstudentassessment.pm,1.169.2.2,49a006c4e54bc9c6ddc937844c90cce431055245
/home/httpd/lib/perl/Apache/lonstudentsubmissions.pm,1.68.2.2,2ebb9f60ebb95cd5bf7f6620c1c4b5d6c98944e0
/home/httpd/lib/perl/Apache/lonsubmissiontimeanalysis.pm,1.35.2.2,f4d23b06e6bda9a55e7ff154086c7a7e7fcf8781
/home/httpd/lib/perl/Apache/lonsupportreq.pm,1.72,dd1fd712c331b8fbce7d87b4bcf24a63eff58b0f
/home/httpd/lib/perl/Apache/lonsurveyreports.pm,1.26.4.1,1846636d70032ea3ed46d8fac042fbf24867c287
/home/httpd/lib/perl/Apache/lonsyllabus.pm,1.116,02a4ea50cfebf65b7487355f4ddbe0a671a83bfa
/home/httpd/lib/perl/Apache/lontable.pm,1.21,e0bc923b98a5c86e1d763cf59fd6fe3a80b7cf4f
/home/httpd/lib/perl/Apache/lontemplate.pm,1.45.6.3,08d919662db9437eb05b85d15ff01ec2ad550436
/home/httpd/lib/perl/Apache/lontest.pm,1.22,b3ef6b9060d3769b482c937724444e0a58a0efdf
/home/httpd/lib/perl/Apache/lontex.pm,1.13,7a82161facdf9f037adcbfe5960a4be3aaebf43a
/home/httpd/lib/perl/Apache/lontexconvert.pm,1.112.2.2,69d8dec5339b4361d2f3d930dbd566eae190ae11
/home/httpd/lib/perl/Apache/lontokacc.pm,1.19,1357274f5bf030dc9ef647c841f0e662299c8b0e
/home/httpd/lib/perl/Apache/lontrackstudent.pm,1.35,107538b6e4f65f697090abe22d9ae666d46a80ad
/home/httpd/lib/perl/Apache/lontrans.pm,1.14,dbea9454eb78e05b6550dd31ab25f7d689f0367c
/home/httpd/lib/perl/Apache/lonunauthorized.pm,1.15,534a6430b79090a479b8c6063e1303abf70001ef
/home/httpd/lib/perl/Apache/lonupload.pm,1.61,3d01dcd16abcb15c99277833453c370a61660113
/home/httpd/lib/perl/Apache/lonuploadedacc.pm,1.15,36cc7c95ca48fc6c74e317f4d949ba63f831dd49
/home/httpd/lib/perl/Apache/lonuploadrep.pm,1.11,326e9ff09afb940a9a38114c9ad107f2bc7fc33c
/home/httpd/lib/perl/Apache/lonuserstate.pm,1.144,29fabe3740c03d530d1046a8218edad2520f8013
/home/httpd/lib/perl/Apache/lonuserutils.pm,1.146,9491a5aaf2f1bc66bcc69099e26604c95ff01f56
/home/httpd/lib/perl/Apache/lonviewclasslist.pm,1.14,a1729ef8d4be38ae3e3281dbea1eda63bb4320b5
/home/httpd/lib/perl/Apache/lonwebdavacc.pm,1.1,ce3a3cc1b8443896bbe75f63e2085ce3c5b9c57d
/home/httpd/lib/perl/Apache/lonwebdavauth.pm,1.2,3ed22710f779d43284f6c7aa7c1562a9a6cf3c06
/home/httpd/lib/perl/Apache/lonwhatsnew.pm,1.105.2.4,042d5899c8361c7ebcc84214103da06209695576
/home/httpd/lib/perl/Apache/lonwishlist.pm,1.16,bf1e591f77f18dc25723436a3a27a17cfc2d1ad9
/home/httpd/lib/perl/Apache/lonwishlistdisplay.pm,1.4,cc1df3b6d78c5ba43f48a983e3230faab5562712
/home/httpd/lib/perl/Apache/lonwrapper.pm,1.43,b45272fcc6643f6a67d6ef2ff880c90ac5dd5ad7
/home/httpd/lib/perl/Apache/lonxml.pm,1.531.2.5,538329fb3605e20c3da8ce144ec2af2abc718091
/home/httpd/lib/perl/Apache/matchresponse.pm,1.87,8e3beffdb85557d89e8dd9f04c7e6199d1b2acd6
/home/httpd/lib/perl/Apache/migrateuser.pm,1.16,fcd894dcf7a1a7b04a768be05d143592639a1889
/home/httpd/lib/perl/Apache/optionresponse.pm,1.189,53b6697541f3a70c077a8e3e6795c883d04edf81
/home/httpd/lib/perl/Apache/outputtags.pm,1.57,54fe6c69670778c5c8586dc9c208d580efea57e2
/home/httpd/lib/perl/Apache/portfolio.pm,1.239,8132a55c326cf239dbcae8372c9ee7bee6ec82b2
/home/httpd/lib/perl/Apache/publiccheck.pm,1.19,8b97465c9d9486d799a7cbb0b4e63bc6876db667
/home/httpd/lib/perl/Apache/radiobuttonresponse.pm,1.155,81bd75a237a38ed3f3a5fd9decd7e13d29dd410b
/home/httpd/lib/perl/Apache/randomlabel.pm,1.96,aa7e1464b732a87d868b3ba4a1b9e7439495ddcc
/home/httpd/lib/perl/Apache/randomlylabel.pm,1.31,f028fe7b84580d866337c6be7d4c8cb545fa4e0c
/home/httpd/lib/perl/Apache/rankresponse.pm,1.68,acdc5c35c4377a641b92a7022ac18d8a67ac6d68
/home/httpd/lib/perl/Apache/resetpw.pm,1.28,7804ac96c0f80518bf31c162e8e383ceab99f7bc
/home/httpd/lib/perl/Apache/response.pm,1.232,dcc5d2715bc3ea82d959be2c9fd0d2fefaf651d6
/home/httpd/lib/perl/Apache/restrictedaccess.pm,1.8,77b8a6e54fb1cbd5c111077ece2a44110df948fe
/home/httpd/lib/perl/Apache/run.pm,1.61,3c09653a130a002b14676828a147aa192aa5084d
/home/httpd/lib/perl/Apache/scripttag.pm,1.166,940b7309f6db97bb8f340eed68b3de9078c51a11
/home/httpd/lib/perl/Apache/selfenroll.pm,1.27.2.1,6106ce309a10cb3a931526f6754bb6ce4c5fd43d
/home/httpd/lib/perl/Apache/simpleauthen.pm,1.2,c7aaab641b31ec23392cc59000c06ae9017daf3a
/home/httpd/lib/perl/Apache/slotrequest.pm,1.116,71e9bd79264357ba3f0f5ff4586580546005a018
/home/httpd/lib/perl/Apache/spellcheck.pm,1.4,941818711e91b9c990273d3929fbcb8b21726c31
/home/httpd/lib/perl/Apache/structuretags.pm,1.508,e06d8092b1cbbfde83eb680d9a3231f6e27010df
/home/httpd/lib/perl/Apache/studentcalc.pm,1.45,56c8c19ea92af3874c7c0b180faa0f25929698cd
/home/httpd/lib/perl/Apache/style.pm,1.22,4b89903ace9c562726614abbcaff408fc12987d4
/home/httpd/lib/perl/Apache/switchserver.pm,1.31,921700bf5234c80453365ae78a4644d1afc55431
/home/httpd/lib/perl/Apache/testbankimport.pm,1.37,acc06e80af188893bfb05f75cd12044aa983c653
/home/httpd/lib/perl/HTML/LCParser.pm,1.2,d8c80dca68c300254d162dc159c4c31739affd20
/home/httpd/lib/perl/LONCAPA.pm,1.33,3b1d2a24167eff43d6dc9be52f2b73ac2ff434ac
/home/httpd/lib/perl/LONCAPA/Checksumming.pm,1.1,4bf089c853d0b4e798b16d28e285b01de27772fe
/home/httpd/lib/perl/LONCAPA/ConfigFileEdit.pm,1.4,557c8df56791147bf1cbf46670da0b46bef5f279
/home/httpd/lib/perl/LONCAPA/Configuration.pm,1.14,e2e2fd9bd1e36310a6672c4cef1fb112d144ff29
/home/httpd/lib/perl/LONCAPA/Enrollment.pm,1.43,575c87ceadc3532c0193cd27168c4828654a32a3
/home/httpd/lib/perl/LONCAPA/Firewall.pm,1.11,3bede51e0d212b0faaf7115e50035172d41464d4
/home/httpd/lib/perl/LONCAPA/HashIterator.pm,1.2,b7f8eee1af94c1a30b0d3f75f759808b9b8a7687
/home/httpd/lib/perl/LONCAPA/LondConnection.pm,1.53,83dbb1c52e3895cc53668063fc03d69878ec40a5
/home/httpd/lib/perl/LONCAPA/LondTransaction.pm,1.9,b3bdce763bbcc98bdacf4ef63075335b380c486d
/home/httpd/lib/perl/LONCAPA/Queue.pm,1.4,9a96f28d4843cd12e45c0f10e87cc7bb005c2de9
/home/httpd/lib/perl/LONCAPA/Stack.pm,1.4,d6c0c4d6a25143fd2bbc5538824aa51574059c11
/home/httpd/lib/perl/LONCAPA/batchcreatecourse.pm,1.37,79a88ef4ad350a3dccf3353771e8be8726125768
/home/httpd/lib/perl/LONCAPA/lonauthcgi.pm,1.10,02c81eefb6175ac51cbf86f7131d2546e41a2cf5
/home/httpd/lib/perl/LONCAPA/loncgi.pm,1.12,f578ba74ffa03f8a1010690ee77ce82bd9ef1efa
/home/httpd/lib/perl/LONCAPA/lonlocal.pm,1.7,2c29fe15e28ae2826a90d5b34ec90b25ec3a29b1
/home/httpd/lib/perl/LONCAPA/lonmetadata.pm,1.38,ea481496c58cf707e8e1c747aa1d62498fa4af20
/home/httpd/lib/perl/LONCAPA/lonssl.pm,1.10,719b9399ebfab8065730bb989a5762aaf9ff3a36
/home/httpd/lib/perl/LONCAPA/map.pm,1.14,c257813fbda27e97a2d51c8491b1bf2bc8f7336c
/home/httpd/lib/perl/Safe.pm,1.9,bc686b10767ff4a6a31df6ed11055c87266e186e
/home/httpd/lib/perl/localauth-std.pm,1.7,f4ffd24e54ee67e4c052982acffdd54ad097327d
/home/httpd/lib/perl/localenroll-std.pm,1.43,5b71403ee8715164ac5cfad37cfc8c9affc23fd0
/home/httpd/lib/perl/localstudentphoto-std.pm,1.7,1f527d7bdc33f13d18aad49b3cef1a1696b4f97a
/home/httpd/perl/Autocreate.pl,1.19,a0136164912faf2f0cc21dc5f4aefa392eb7bf4f
/home/httpd/perl/Autoenroll.pl,1.32,2204ff41969632c1f829abb7d983145f18cb8d7e
/home/httpd/perl/Autoupdate.pl,1.22,020e48cd397f228d9acf115e6dc0cdb575b49347
/home/httpd/perl/CrGenerate.pl,1.9,a20f78db3e189011d02772a0f1301e19698b50e8
/home/httpd/perl/CrGrant.pl,1.6,251f41bd3e53d04a6f0a13b3201c7b78c755a93f
/home/httpd/perl/apachereload,1.7,921aa672a63598caee9a8855347cf13369fedc33
/home/httpd/perl/archive_old_files.pl,1.4,9d3be8e4a69b470fc884d50632f90a5305ac30d6
/home/httpd/perl/checkforupdates.pl,1.1,95219268ffdab348df8587582e08b677b892a320
/home/httpd/perl/cleanup_database.pl,1.7,f6a55bfc0230c531d41869e136faf56a0b7895ee
/home/httpd/perl/cleanup_file_caches.pl,1.5,d41fa8557ef4064b15270a1f695c896f16d19a69
/home/httpd/perl/debug/archive_coursedata_tables.pl,1.1,e06a8ec7de53c546314fd89fdbc6788fe95035ff
/home/httpd/perl/debug/clean_db.pl,1.5,a6d96c1efe9d6732ce48f397288ff154ac0ad63c
/home/httpd/perl/debug/dump_db.pl,1.8,f880a5d61c5e899d71d5485e7c942bd32d203bdc
/home/httpd/perl/debug/escape.pl,1.2,e4b1fba5595e5e38ef34e1b4404cd81752d3ea59
/home/httpd/perl/debug/excise_from_db.pl,1.3,b0e10251e46bebef3461636fe1147fda548a5362
/home/httpd/perl/debug/login_count.pl,1.9,cd27518c0709a98a4fc1520bd48064dc9bf9e117
/home/httpd/perl/debug/modify_config_files.pl,1.12,b3373e5dc6a86100004e08a738e0909308155b0e
/home/httpd/perl/debug/move_construction_spaces.pl,1.9,796d72c8ef4e2c7d1a96d8f668be58b814d6a657
/home/httpd/perl/debug/rebuild_db_from_hist.pl,1.6,0f8d50173cab41a34db0841c46f784ac749c91b3
/home/httpd/perl/debug/seed_accesscount.pl,1.5,1b95da57d87bf4a42cc4c43335a0cfc7263c8ef1
/home/httpd/perl/debug/testkerberos.pl,1.2,0be61b6f6ecff6487d12370ccce2e21b5532d772
/home/httpd/perl/debug/unescape.pl,1.2,4be0a49f5af8714b2b3caf349fdc44617817f837
/home/httpd/perl/debug/updateclasslist.pl,1.3,81014516cf39355a3ef806c45ddddfca75af8195
/home/httpd/perl/debug/user_login_count.pl,1.3,0a3a8441aaa1bdf8bd340f91674d8489a6df1aec
/home/httpd/perl/distprobe,1.20,b5ba9c841e8dbc36dcbce2299d76476ceb4e078b
/home/httpd/perl/lchtmldir,1.22,d1dee750fc1a5e90b0cf9b0abf329d594b5efcb3
/home/httpd/perl/lchttpdlogs,1.1,705ba1dd9dc5c05c4ac3cba4ae8d57a0848dba0b
/home/httpd/perl/lcinstallfile,1.5,cf0424c319dcdc376256616539ab74b8afa62fa6
/home/httpd/perl/lciptables,1.6,db2f8ba4b4faca106a31269f6ca98bba20f9f53e
/home/httpd/perl/lcnfsoff,1.4,e8ac95e6b8e63ebf5966a6adcd61b4c7746d143c
/home/httpd/perl/lcnfson,1.6,819c1df52787008f043bc5d4355aa437a9168614
/home/httpd/perl/lcpasswd,1.22,8177b5e14048233385ce3aa533557c315b3e4161
/home/httpd/perl/lcuseradd,1.41,ec2487665940c312557778011078670e96c4773f
/home/httpd/perl/lcuserdel,1.16,6882842c8e034f3a11fd7fa3d1b95c3c44a56036
/home/httpd/perl/loncnew,1.100,1ea735502c435d7fa9eefdcc5bc6483548a6e092
/home/httpd/perl/loncron,1.95,a70e578ee13f0a9861d58889b05fdda9cbce1751
/home/httpd/perl/lond,1.489.2.2,5983f3ec7e6ce904f2cfeda5a683c0d4d486994c
/home/httpd/perl/lonmaxima,1.41,2d6896bd319a8c0b756e2a906b203df85b49dd70
/home/httpd/perl/lonmemcached,1.7,1aa57476b2bbc326f2b2af402a5f63ef627f38dc
/home/httpd/perl/lonr,1.6,114de8a26ccd7bc2141ef922803a8efe20289b22
/home/httpd/perl/lonsql,1.91,57fe5792d51f7393e5eb89046c7006b2b5a942d5
/home/httpd/perl/modify_config_files.pl,1.12,b3373e5dc6a86100004e08a738e0909308155b0e
/home/httpd/perl/parse_activity_log.pl,1.24,5472f1c046b7b9ab032bfd03b131e50f6ec7f76e
/home/httpd/perl/pwchange,1.10,2782dc0cf53d5ffb5a616479ae5e1ae9a22468af
/home/httpd/perl/refresh_courseids_db.pl,1.13,e5572c317d67bc366f1c7a3247af1c309f6ea394
/home/httpd/perl/searchcat.pl,1.78,233a56699a47dc1ea2b9ba65ac7f80e59325dd72
/home/httpd/perl/seed_accesscount.pl,1.5,1b95da57d87bf4a42cc4c43335a0cfc7263c8ef1

Index: loncom/lonchksums.tab
+++ loncom/lonchksums.tab

Index: loncom/cgi/lonmodulecheck.pl
+++ loncom/cgi/lonmodulecheck.pl
#!/usr/bin/perl
$|=1;
# Compares checksums for most installed files with expected values
# and reports discrepancies.
#
# $Id: lonmodulecheck.pl,v 1.1 2013/02/02 00:22:34 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#

use strict;

use lib '/home/httpd/lib/perl/';
use Apache::lonnet();
use Apache::lonlocal();
use LONCAPA::Configuration();
use LONCAPA::loncgi();
use LONCAPA::lonauthcgi();
use LONCAPA::Checksumming();

my $perlvar=&LONCAPA::Configuration::read_conf('loncapa.conf');
my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost);
if (ref($perlvar) eq 'HASH') {
    $londaemons = $perlvar->{'lonDaemons'};
    $lonlib = $perlvar->{'lonLib'};
    $lonincludes = $perlvar->{'lonIncludes'};
    $lontabdir = $perlvar->{'lonTabDir'};
    $lonhost = $perlvar->{'lonHostID'}; 
}
undef($perlvar);

print &LONCAPA::loncgi::cgi_header('text/html',1);
if ($londaemons ne '' && $lonlib ne '' && $lonincludes ne '' && 
    $lontabdir ne '' && $lonhost ne '') {
    &main($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost);
}

sub main {
    my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost) = @_;
    if (!&LONCAPA::lonauthcgi::check_ipbased_access('checksums')) {
        if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
            &Apache::lonlocal::get_language_handle();
            print(&LONCAPA::loncgi::missing_cookie_msg());
            return;
        }

        if (!&LONCAPA::lonauthcgi::can_view('checksums')) {
            &Apache::lonlocal::get_language_handle();
            print(&LONCAPA::lonauthcgi::unauthorized_msg('checksums'));
            return;
        }
    }

    &Apache::lonlocal::get_language_handle();
    &print_differences($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost);
    return;
}

sub print_differences {
    my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost) = @_;
    my $machine_dom = &Apache::lonnet::host_domain($lonhost);
    my $loncaparev = &Apache::lonnet::get_server_loncaparev($machine_dom);
    my ($version,$timestamp) = split(/\-/,$loncaparev);
    print(&Apache::loncommon::start_page('LON-CAPA code integrity checking'));
    if ($loncaparev =~ /CVS_HEAD/) {
        print(&Apache::lonlocal::mt('Code checking unavailable for LON-CAPA CVS HEAD').
              "\n");
    } else {
        print('<h2>'.
              &Apache::lonlocal::mt('Code integrity check -- LONCAPA version: [_1]',
                                    $version).
              '</h2>');
        my $distro;
        if (open(my $disth,"$londaemons/distprobe |")) {
            $distro = <$disth>;
            close($disth);
        }
        if ($distro) {
            my ($serversums,$serverversions) =
                &LONCAPA::Checksumming::get_checksums($distro,$londaemons,$lonlib,
                                                      $lonincludes,$lontabdir);
            if ((ref($serversums) eq 'HASH') && (ref($serverversions) eq 'HASH')) {
                if (keys(%{$serversums}) > 0) {
                    my ($result,$numchg) =
                        &LONCAPA::Checksumming::compare_checksums('web',$lonhost,
                                                                  $version,
                                                                  $serversums,
                                                                  $serverversions);
                    print($result);
                } else {
                    print(&Apache::lonlocal::mt('No comparison attempted - failed to retrieve checksums for installed files.'));
                }
            } else {
                print(&Apache::lonlocal::mt('No comparison attempted - failed to retrieve checksums for installed files.'));
            }
        } else {
            print(&Apache::lonlocal::mt('No comparison attempted - unable to determine Linux distribution.'));
        }
    }
    print(&Apache::loncommon::end_page());
    return;
}


Index: loncom/misc/checkforupdates.pl
+++ loncom/misc/checkforupdates.pl
#!/usr/bin/perl
# The LearningOnline Network
#
# $Id: checkforupdates.pl,v 1.1 2013/02/02 00:22:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#
#################################################

=pod

=head1 NAME

checkforupdates.pl

=head1 SYNOPSIS

checkforupdates.pl gathers version numbers and computes checksums
for LON-CAPA modules, scripts, and a couple of configuration files,
and compares them with those expected for the version of LON-CAPA
installed on the server.

=head1 DESCRIPTION

If there are discrepancies in checksums between the installed modules
and those expected, or if there are problems performing the update check,
or if a newer stable release of LON-CAPA is available, an e-mail will be
sent to the e-mail address configured to receive these types of alert.

Run as www.

=cut

#################################################

use strict;
use lib '/home/httpd/lib/perl/';
use Apache::lonnet();
use Apache::lonlocal();
use LONCAPA::Configuration;
use LONCAPA::Checksumming;
use Apache::loncommon();

my $tmpfile = '/tmp/checkLONCAPA.'.$$;
my $perlvar= LONCAPA::Configuration::read_conf('loncapa.conf');

my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost,$defdom,$origmail,
    $docroot);
if (ref($perlvar) eq 'HASH') {
    $londaemons = $perlvar->{'lonDaemons'};
    $lonlib = $perlvar->{'lonLib'};
    $lonincludes = $perlvar->{'lonIncludes'};
    $lontabdir = $perlvar->{'lonTabDir'};
    $lonhost = $perlvar->{'lonHostID'};
    $defdom = $perlvar->{'lonDefDomain'};
    $origmail = $perlvar->{'lonAdmEMail'};
    $docroot = $perlvar->{'lonDocRoot'};
}
undef($perlvar);

&Apache::lonlocal::get_language_handle();

my ($distro,$send,$message);

my $loncaparev = &Apache::lonnet::get_server_loncaparev($defdom);
my ($version,$timestamp) = split(/\-/,$loncaparev);
if ($loncaparev =~ /CVS_HEAD/) {
    $message = &Apache::lonlocal::mt('Code checking unavailable for LON-CAPA CVS HEAD.')."\n";
} else {
    # Get Linux distro
    if (open(PIPE, "$londaemons/distprobe |")) {
        $distro = <PIPE>;
        close(PIPE);
    }

    if ($distro) {
        my ($serversums,$serverversions) =
            &LONCAPA::Checksumming::get_checksums($distro,$londaemons,$lonlib,
                                                  $lonincludes,$lontabdir);
        if ((ref($serversums) eq 'HASH') && (ref($serverversions) eq 'HASH')) {
            if (keys(%{$serversums}) > 0) {
                my ($result,$numchg) =
                    &LONCAPA::Checksumming::compare_checksums('mail',$lonhost,
                                                              $version,
                                                              $serversums,
                                                              $serverversions);
                if ($numchg) {  
                    $send = 1;
                }
                $message = $result;
            } else {
                $message = &Apache::lonlocal::mt('No comparison attempted - failed to retrieve checksums for installed files.');
            }
        } else {
            $message = &Apache::lonlocal::mt('No comparison attempted - failed to retrieve checksums for installed files.');
        }
    } else {
        $message = &Apache::lonlocal::mt('No comparison attempted - unable to determine Linux distribution.');
    }

    my ($update_toprod,$update_totest);
    my ($smajor,$sminor,$sdecimal,$smodifier) =
        ($version =~ /^(\d+)\.(\d+)\.(\d+)\.?(\w*)$/);
    my ($production,$proddate,$testing,$testdate) = &latest_release();
    my ($pmajor,$pminor,$pdecimal,$pmodifier) =
       ($production =~ /^(\d+)\.(\d+)\.(\d+)\.?(\w*)$/);
    if ($smodifier =~ /^RC(\d+)$/) {
        my $scand = $1;
        my ($tmajor,$tminor,$tdecimal,$tmodifier) =
            ($testing =~ /^(\d+)\.(\d+)\.(\d+)\.?(\w*)$/);
        my $tcand;
        if ($tmodifier =~ /^RC(\d+)$/) {
            $tcand = $1; 
        }
        if (($smajor < $tmajor ) ||
            (($smajor == $tmajor) && ($sminor < $tminor)) ||
            (($smajor == $tmajor) && ($sminor == $tminor) && 
             ($sdecimal < $tdecimal)) ||
            ((($smajor == $tmajor) && ($sminor == $tminor) &&
              ($sdecimal == $tdecimal) &&
              (($scand && $tcand) && ($scand < $tcand))))) { 
            $update_totest = $testing;
        }
    }
    if (($smajor < $pmajor ) ||
        (($smajor == $pmajor) && ($sminor < $pminor)) ||
        (($smajor == $pmajor) && ($sminor == $pminor) && 
         ($sdecimal < $pdecimal))) {
        $update_toprod = $production;           
    }
    if ($update_totest) {
        $message .= 
            "\n\n".
            &Apache::lonlocal::mt('A newer testing version of LON-CAPA: [_1]'.
                                  ' is available from: [_2]',
                                  $testing.'-'.$testdate,
                                  "\n http://install.loncapa.org/\n");
    }
    if ($update_toprod) {
        $message .= 
            "\n\n".
            &Apache::lonlocal::mt('A newer version of LON-CAPA: [_1]'.
                                  ' is available from: [_2]',
                                  $production.'-'.$proddate,
                                  "\n http://install.loncapa.org/\n");
    }
    if (open(my $tmpfh,">$tmpfile")) {
        print $tmpfh 
             &Apache::lonlocal::mt('Update check result -- [_1]',
                                   &Apache::lonlocal::locallocaltime(time)).
             "\n\n".
             $message;
        close($tmpfh);
    }
}

if ($docroot ne '') {
    system("cat $tmpfile > $docroot/lon-status/checkLCupdates.txt");
    if ($< == 0) {
        system("chown www:www $docroot/lon-status/checkLCupdates.txt");
    }
    chmod(0600,"$docroot/lon-status/checkLCupdates.txt");
}

# Determine who receives the e-mail
my $emailto =
    &Apache::loncommon::build_recipient_list(undef,'updatesmail',
                                             $defdom,$origmail);
if ($emailto) {
    if ($send) {
        my $subj = "LON-CAPA module check -- $lonhost"; 
        system(qq{mail -s '$subj' "$emailto" < $tmpfile});
    }
}

exit;

sub latest_release {
    my ($production,$proddate,$testing,$testdate);
    if (-e "/tmp/latestLCrelease.txt") {
         unlink("/tmp/latestLCrelease.txt");
    }
    my $rtncode = system("wget -O /tmp/latestLCrelease.txt ".
                         "http://install.loncapa.org/versions/latest.txt ".
                         "> /dev/null 2>&1");
    if (!$rtncode) {
        if (open(my $fh,"</tmp/latestLCrelease.txt")) {
            my @info = <$fh>;
            close($fh);
            foreach my $line (@info) {
                chomp($line);
                if ($line =~ /^\QLATEST-IS: \E([\w\-.]+):\d+$/) {
                    $production = $1;
                } elsif ($line =~ /^\QLASTRELPROD: \E(\d+)$/) {
                    $proddate = $1; 
                } elsif ($line =~ /^\QLATEST-TESTING-IS: \E([\w\-.]+):\d+$/) {
                    $testing = $1;
                } elsif ($line =~ /^\QLASTRELTEST: \E(\d+)$/) {
                    $testdate = $1;
                } 
            }
        }
    }
    return ($production,$proddate,$testing,$testdate);
}


Index: loncom/configuration/Checksumming.pm
+++ loncom/configuration/Checksumming.pm
# The LearningOnline Network with CAPA
# Checksum installed LON-CAPA modules and some configuration files
#
# $Id: Checksumming.pm,v 1.1 2013/02/02 00:22:43 raeburn Exp $
#
# The LearningOnline Network with CAPA
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#

package LONCAPA::Checksumming;

use strict;
use lib '/home/httpd/lib/perl/';
use Apache::lonlocal();
use Apache::loncommon();

sub get_checksums {
    my ($distro,$londaemons,$lonlib,$lonincludes,$lontabdir) = @_;
    my $output;
    my (%versions,%chksums);
    my $dirh;
    my $revtag = '$Id:';
    my @paths;
    if ($londaemons) {
        push(@paths,($londaemons.'/*',
                     $londaemons.'/debug/*.pl'));
    }
    if ($lonlib) {
        push(@paths,($lonlib.'/perl/Apache/*.pm',
                     $lonlib.'/perl/Apache/localize/*.pm',
                     $lonlib.'/perl/LONCAPA/*.pm',
                     $lonlib.'/perl/AlgParser.pm',
                     $lonlib.'/perl/LONCAPA.pm',
                     $lonlib.'/perl/Safe.pm',
                     $lonlib.'/perl/*-std.pm',
                     $lonlib.'/perl/HTML/*.pm',
                     $lonlib.'/perl/Safe.pm'));
    }
    if ($lonincludes) {
        push(@paths,$lonincludes.'/*.lcpm');
    }
    push(@paths,('/home/httpd/cgi-bin/*.pl','/home/httpd/cgi-bin/*.png'));
    my $confdir = '/etc/httpd/conf';
    my $sha = 'SHA1';
    if ($distro =~ /^(ubuntu|debian)(\d+)$/) {
        $confdir = '/etc/apache2';
        if (($1 eq 'ubuntu') && ($2 >= 12)) {
            $sha = 'SHA';
        }
    } elsif ($distro =~ /^sles(\d+)$/) {
        if ($1 >= 10) {
            $confdir = '/etc/apache2';
        }
    } elsif ($distro =~ /^suse(\d+\.\d+)$/) {
        if ($1 >= 10.0) {
            $confdir = '/etc/apache2';
        }
    }
    push(@paths,("$confdir/loncapa_apache.conf","$confdir/startup.pl"));
    if ($sha eq 'SHA1') {
        require Digest::SHA1;
    } else {
        require Digest::SHA;
    }
    if (@paths) {
        my $pathstr = join (' ', at paths);
        if (open($dirh,"grep '$revtag' $pathstr |")) {
            while (my $line=<$dirh>) {
                if ($line =~ m{^([^#]+):#\s\$Id:\s[\w.]+,v\s([\d.]+)\s}) {
                    $versions{$1} = $2;
                }
            }
            close($dirh);
        }
        foreach my $key (sort(keys(%versions))) {
            next if ($key =~ /\.lpmlsave$/);
            my $sum;
            if (open(my $fh,"<$key")) {
                binmode $fh;
                my $sha_obj;
                if ($sha eq 'SHA') {
                    $sha_obj = Digest::SHA->new();
                } else {
                    $sha_obj = Digest::SHA1->new();
                }
                $sha_obj->addfile($fh);
                $sum = $sha_obj->hexdigest;
                close($fh);
                $chksums{$key} = $sum; 
            }
            $output .= "$key,$versions{$key},$sum\n";
        }
    }
    if ($lontabdir ne '') {
        if (open(my $tabfh,">$lontabdir/lonchksums.tab")) {
            print $tabfh '# Last written: '.localtime(time)."\n";
            print $tabfh "$output\n";
            close($tabfh);
        }
    }
    return (\%chksums,\%versions);
}

sub compare_checksums {
    my ($target,$lonhost,$version,$serversums,$serverversions) = @_;
    my ($message,$numchg);
    if ((ref($serversums) eq 'HASH') && (keys(%{$serversums}))) {
        my $checksums = &Apache::lonnet::fetch_dns_checksums();
        my (%extra,%missing,%diffs,%stdsums,%stdversions);
        if (ref($checksums) eq 'HASH') {
            if (ref($checksums->{'sums'}) eq 'HASH') {
                %stdsums = %{$checksums->{'sums'}};
            }
            if (ref($checksums->{'versions'}) eq 'HASH') {
                %stdversions = %{$checksums->{'versions'}};
            }
            if (keys(%stdsums)) {
                foreach my $key (keys(%stdsums)) {
                    if (exists($serversums->{$key})) {
                        if ($serversums->{$key} ne $stdsums{$key}) {
                            $diffs{$key} = 1;
                            $numchg ++;
                        }
                    } else {
                        $missing{$key} = 1;
                        $numchg ++;
                    }
                }
                foreach my $key (keys(%{$serversums})) {
                    unless (exists($stdsums{$key})) {
                        $extra{$key} = 1;
                        $numchg ++;
                    }
                }
            }
            if ($numchg) {
                $message = 
                    &Apache::lonlocal::mt('[quant,_1,difference was,differences were] found'.
                                          ' between LON-CAPA modules installed on your server ([_2])'.
                                          ' and those expected for the LON-CAPA version ([_3])'.
                                          ' which you are running.',$numchg,$lonhost,$version);
                if ($target eq 'web') {
                    $message = '<p>'.$message.'</p>';
                } else {
                    $message .= "\n\n";
                }
                my (@diffversion, at modified);
                if (keys(%diffs) > 0) {
                    foreach my $file (sort(keys(%diffs))) {
                        if ($serverversions->{$file} ne $stdversions{$file}) {
                            push(@diffversion,$file);
                        } else {
                            push(@modified,$file);
                        }
                    }
                    if (@diffversion > 0) {
                        my $text = 
                            &Apache::lonlocal::mt('The following [quant,_1,local file is a,local files are]'.
                                                  ' different version(s) from that expected for LON-CAPA [_2]:',
                                                  scalar(@diffversion),$version);
                        if ($target eq 'web') {
                            $message .= '<p>'.$text.'</p>'.
                                        &Apache::loncommon::start_data_table().
                                        &Apache::loncommon::start_data_table_header_row()."\n".
                                        '<th>'.&Apache::lonlocal::mt('File').'</th>'."\n".
                                        '<th>'.&Apache::lonlocal::mt('Server version').'</th>'."\n".
                                        '<th>'.&Apache::lonlocal::mt('Expected version').'</th>'."\n".
                                        &Apache::loncommon::end_data_table_header_row()."\n";
                        } else {
                            $message .= "$text\n";
                        }
                        foreach my $file (sort(@diffversion)) {
                            my $revnum = $stdversions{$file};
                            if ($target eq 'web') {
                                $message .=  &Apache::loncommon::start_data_table_row().
                                             '<td>'.$file.'<td>'."\n".
                                             '<td>'.$serverversions->{$file}.'</td>'."\n".
                                             '<td>'.$revnum.'</td>'."\n".
                                             &Apache::loncommon::end_data_table_row()."\n";
                            } else {
                                $message .= $file.' '.
                                            &Apache::lonlocal::mt('(local rev: [_1])',
                                                                  $serverversions->{$file});
                                if ($revnum) {
                                    $message .= '; '.
                                                &Apache::lonlocal::mt('(expected rev: [_1])',
                                                                      $revnum);
                                }
                                $message .= "\n";
                            }
                        }
                    }
                    if (@modified > 0) {
                        my $text = 
                            &Apache::lonlocal::mt('The following [quant,_1,file appears,files appear]'.
                                                  ' to have been modified locally:',scalar(@modified));
                        if ($target eq 'web') {
                            $message .= '<p>'.$text.'</p>'.
                                        &Apache::loncommon::start_data_table().
                                        &Apache::loncommon::start_data_table_header_row()."\n".
                                        '<th>'.&Apache::lonlocal::mt('File').'</th>'."\n".
                                        '<th>'.&Apache::lonlocal::mt('Version').'</th>'."\n".
                                        &Apache::loncommon::end_data_table_header_row()."\n";
                        } else {
                            $message .= "$text\n";
                        }
                        foreach my $file (sort(@modified)) {
                            if ($target eq 'web') {
                                $message .= &Apache::loncommon::start_data_table_row()."\n".
                                            '<td>'.$file.'</td>'."\n".
                                            '<td>'.$serverversions->{$file}.'</td>'."\n".
                                            &Apache::loncommon::end_data_table_row()."\n";
                            } else {
                                $message .= $file.' '.
                                            &Apache::lonlocal::mt('(local rev: [_1])',
                                                                  $serverversions->{$file}).
                                            "\n";
                            }
                        }
                    }
                }
                if (keys(%missing) > 0) {
                    my $text = 
                        &Apache::lonlocal::mt('The following [quant,_1,local file appears,local files appear]'.
                                              ' to be missing:',scalar(keys(%missing))); 
                    if ($target eq 'web') {
                        $message .= '<p>'.$text.'</p>'.
                                    &Apache::loncommon::start_data_table().
                                    &Apache::loncommon::start_data_table_header_row()."\n".
                                    '<th>'.&Apache::lonlocal::mt('File').'</th>'."\n".
                                    '<th>'.&Apache::lonlocal::mt('Expected version').'</th>'."\n".
                                    &Apache::loncommon::end_data_table_header_row()."\n";
                    } else {
                        $message .= "$text\n";
                    }
                    foreach my $file (sort(keys(%missing))) {
                        my $revnum = $stdversions{$file};
                        if ($target eq 'web') {
                            $message .= '<td>'.$file.'<td>'."\n".
                                        '<td>'.$revnum.'</td>'."\n".
                                        &Apache::loncommon::end_data_table_row()."\n";
                        } else {
                            $message .= $file;
                            if ($revnum) {
                                $message .= ' '.
                                            &Apache::lonlocal::mt('(expected rev: [_1])',
                                                                  $revnum);
                            }
                            $message .= "\n";
                        }
                    }
                }
                if (keys(%extra) > 0) {
                    my $text = 
                        &Apache::lonlocal::mt('The following [quant,_1,file is,files are]'.
                                              ' not required by the release you have installed:',
                                              scalar(keys(%extra)));
                    if ($target eq 'web') {
                        $message .= '<p>'.$text.'</p>'.
                                    &Apache::loncommon::start_data_table().
                                    &Apache::loncommon::start_data_table_header_row()."\n".
                                    '<th>'.&Apache::lonlocal::mt('File').'</th>'."\n".
                                    '<th>'.&Apache::lonlocal::mt('Version').'</th>'."\n".
                                    &Apache::loncommon::end_data_table_header_row()."\n";
                    } else {
                        $message .= "$text\n";
                    }
                    foreach my $file (sort(keys(%extra))) {
                        if ($target eq 'web') {
                            $message .= '<td>'.$file.'<td>'."\n".
                                        '<td>'.$serverversions->{$file}.'</td>'."\n".
                                        &Apache::loncommon::end_data_table_row()."\n";
                        } else {
                            $message .= $file.' '.
                                        &Apache::lonlocal::mt('(local rev: [_1])',
                                                              $serverversions->{$file}).
                                        "\n";
                        }
                    }
                }
            } else {
                $message = &Apache::lonlocal::mt('No differences detected between installed files and files expected for LON-CAPA [_1]',$version);
            }
        } else {
            $message = &Apache::lonlocal::mt('No comparison attempted - failed to retrieve checksums for installed files.');
        }
    } else {
        $message = &Apache::lonlocal::mt('No comparison attempted - failed to retrieve checksums for installed files.');
    }
    unless ($message) {
        $message = &Apache::lonlocal::mt('LON-CAPA module check found no file changes.')."\n";
    }
    return ($message,$numchg);
}

1;



More information about the LON-CAPA-cvs mailing list