--- loncom/build/rpmparse.pl 2001/04/03 13:33:22 1.4 +++ loncom/build/rpmparse.pl 2001/05/03 15:19:34 1.9 @@ -1,16 +1,20 @@ #!/usr/bin/perl -my ($standard,$current)=@ARGV; +my ($standard,$current,$expected)=@ARGV; $standard=~s/[^\/\w\.]//g; $current=~s/[^\/\w\.]//g; +$expected=~s/[^\/\w\.]//g; my %svhash; my %sbhash; +my %chash; my @oldrpms; my @badversionrpms; my @newrpms; my @externalrpms; +my @barerpms; +my @developrpms; open IN, "<$standard"; while() { @@ -25,6 +29,7 @@ open IN, "<$current"; while() { chop; my ($name,$version,$buildtime)=split(/\s+/); + $chash{$name}=1; if ($svhash{$name}) { unless ($svhash{$name} eq $version) { push @badversionrpms,"$name is version $version, should be $svhash{$name}\n"; @@ -33,7 +38,7 @@ while() { push @newrpms,"$name was built ".localtime($buildtime)." when the expected build time was ".localtime($sbhash{$name})."\n"; } if ($sbhash{$name}>$buildtime) { - push @newrpms,"$name was built ".localtime($sbhash{$name})." when the expected build time was ".localtime($buildtime)."\n"; + push @oldrpms,"$name was built ".localtime($buildtime)." when the expected build time was ".localtime($sbhash{$name})."\n"; } } else { @@ -42,68 +47,135 @@ while() { } close IN; +open IN,"<$expected"; +while() { + chop; + next unless /^[YN] \w/; + /(.).(.*)/; + my $type=$1; + my $package=$2; + $package=~s/\-[^\-]*\-[^\-]*$//; + if (!$chash{$package}) { + push @barerpms,"$package is missing and is of basic necessity to a LON-CAPA system\n" if $type eq 'Y'; + push @developrpms,"$package is missing and may be useful for a LON-CAPA system\n" if $type eq 'N'; + } +} +close IN; + my $date=`date`; chop $date; my $hostname=`hostname`; chop $hostname; print < - -LON-CAPA Software RPM Status Page - - -LON-CAPA Software RPM Status Page (done on $date for $hostname) -
Michigan State University -
Learning Online with CAPA -
Contact korte\@lon-capa.org -
    -
  • About this file
  • -
  • Bad RPM Versions
  • -
  • Out-of-date RPMS
  • -
  • Newer than expected RPMS
  • -
  • RPMS external to LON-CAPA
  • -
-About this file -

+ + +LON-CAPA Software RPM Status Page + + +LON-CAPA Software RPM Status Page +(done on $date for $hostname) +
Michigan State University +
Learning Online with CAPA +
Contact korte\@lon-capa.org +

    +
  • Important warnings
  • +
  • About this file
  • +
  • Bad RPM Versions
  • +
  • Out-of-date RPMS
  • +
  • Newer than expected RPMS
  • +
  • RPMS external to LON-CAPA
  • +
  • RPMS from the "bare minimum" set that you are missing
  • +
  • RPMS from the "development" set that you are missing
  • +
+Important warnings +

+Never install LON-CAPA-setup on a running LON-CAPA machine. +This RPM package contains pre-installation files such as +/etc/group and /etc/passwd. You will lose all access to your +machine if you install this RPM. +

+

+If you are doing CVS-based upgrades of your LON-CAPA +software, then you do not need to upgrade your LON-CAPA-base +RPM. Upgrading with the LON-CAPA-base RPM +will cause you to lose many of your system-specific +configuration settings. +

+

+DO NOT UPGRADE YOUR KERNEL UNLESS YOU KNOW WHAT YOU ARE DOING. +Kernel upgrading involves packages beginning with the word +"kernel". +

+About this file +

This file is generated dynamically by make rpmstatuspost when this command is entered in the CVS:loncom/build directory. -

+

+

+Managing software packages on any system, testing different +sets of software packages, tracking their dependencies, and maintaining +configuration information is an inexact science. While the LON-CAPA +recommended set of RPMs is a tested set with no missing dependencies, +we still highly recommend that RPM upgrades are only performed +by those with significant knowledge about standard Linux operating +systems. +

END print <Bad RPM Versions -
+Differing RPM Versions
+
 END
 foreach my $rpminfo (@badversionrpms) {
     print $rpminfo;
 }
 print <
+
END print <Out-of-date RPMS -
+Out-of-date RPMS
+
 END
 foreach my $rpminfo (@oldrpms) {
     print $rpminfo;
 }
 print <
+
END print <Newer than expected RPMS -
+Newer than expected RPMS
+
 END
 foreach my $rpminfo (@newrpms) {
     print $rpminfo;
 }
 print <
+
END print <RPMS external to LON-CAPA -
+RPMS external to LON-CAPA
+
 END
 foreach my $rpminfo (@externalrpms) {
     print $rpminfo;
 }
 print <
+
+END +print <RPMS from the "bare minimum" set that you are missing +
+END
+foreach my $rpminfo (@barerpms) {
+    print $rpminfo;
+}
+print <
+END
+print <RPMS from the "development" set that you are missing
+
+END
+foreach my $rpminfo (@developrpms) {
+    print $rpminfo;
+}
+print <
 END