#!/usr/bin/perl my ($standard,$current,$expected)=@ARGV; $standard=~s/[^\/\w\.]//g; # cd_rpms.txt $current=~s/[^\/\w\.]//g; # rpm -qa --queryformat \ # '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}' $expected=~s/[^\/\w\.]//g; # rpm_list.txt my %svhash; my %sbhash; my %chash; my @oldrpms; my @badversionrpms; my @newrpms; my @externalrpms; my @barerpms; my @developrpms; my %ignore=( 'LON-CAPA-setup' => 1, 'LON-CAPA-base' => 1, ); open IN, "<$standard"; while() { chop; my ($name,$version,$release,$buildtime,$arch)=split(/\s+/); next if $ignore{$name}; $download='[download]'; $version="$version-$release"; $svhash{$name}=$version; $sbhash{$name}=$buildtime; $dhash{$name}=$download; } close IN; open IN, "<$current"; while() { chop; my ($name,$version,$release,$buildtime)=split(/\s+/); next if $ignore{$name}; $version="$version-$release"; $chash{$name}=1; if ($svhash{$name}) { unless ($svhash{$name} eq $version) { push @badversionrpms,sprintf("$dhash{$name} %-25s %s",($name,"is version $version, should be $svhash{$name}"))."\n"; } if ($sbhash{$name}<$buildtime) { push @newrpms,sprintf("$dhash{$name} %-25s %s",($name,"was built ".localtime($buildtime)." when the expected build time was ".localtime($sbhash{$name})))."\n"; } if ($sbhash{$name}>$buildtime) { push @oldrpms,sprintf("$dhash{$name} %-25s %s",($name,"was built ".localtime($buildtime)." when the expected build time was ".localtime($sbhash{$name})))."\n"; } } else { push @externalrpms,sprintf("$dhash{$name} %-25s %s",($name,"(built ".localtime($buildtime).") is an RPM not expected to ever be on a LON-CAPA system"))."\n"; } } close IN; open IN,"<$expected"; while() { chop; next unless /^[YN] \w/; /(.).(.*)/; my $type=$1; my $package=$2; $package=~s/\-[^\-]*\-[^\-]*$//; next if $ignore{$package}; if (!$chash{$package}) { push @barerpms,sprintf("$dhash{$package} %-25s %s",($package,"is missing and is of basic necessity to a LON-CAPA system"))."\n" if $type eq 'Y'; push @developrpms,sprintf("$dhash{$package} %-25s %s",($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
  • 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 <Differing RPM Versions
END
foreach my $rpminfo (@badversionrpms) {
    print $rpminfo;
}
print <
END
print <Out-of-date RPMS
END
foreach my $rpminfo (@oldrpms) {
    print $rpminfo;
}
print <
END
print <Newer than expected RPMS
END
foreach my $rpminfo (@newrpms) {
    print $rpminfo;
}
print <
END
print <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