File:  [LON-CAPA] / doc / loncapafiles / rpmcheck.piml
Revision 1.7: download - view: text, annotated - select for diffs
Wed Aug 11 14:12:47 2004 UTC (19 years, 8 months ago) by matthew
Branches: MAIN
CVS tags: version_1_1_99_5, version_1_1_99_4, HEAD
Fixed bug requiring specific version of systemperl be installed.

    1: <!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
    2: 	"http://lpml.sourceforge.net/DTD/piml.dtd">
    3: <!-- phpcheck.piml -->
    4: <!-- Matthew Hall -->
    5: 
    6: <!-- $Id: rpmcheck.piml,v 1.7 2004/08/11 14:12:47 matthew Exp $ -->
    7: 
    8: <!--
    9: 
   10: This file is part of the LearningOnline Network with CAPA (LON-CAPA).
   11: 
   12: LON-CAPA is free software; you can redistribute it and/or modify
   13: it under the terms of the GNU General Public License as published by
   14: the Free Software Foundation; either version 2 of the License, or
   15: (at your option) any later version.
   16: 
   17: LON-CAPA is distributed in the hope that it will be useful,
   18: but WITHOUT ANY WARRANTY; without even the implied warranty of
   19: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   20: GNU General Public License for more details.
   21: 
   22: You should have received a copy of the GNU General Public License
   23: along with LON-CAPA; if not, write to the Free Software
   24: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   25: 
   26: /home/httpd/html/adm/gpl.txt
   27: 
   28: http://www.lon-capa.org/
   29: 
   30: -->
   31: 
   32: <piml>
   33: <targetroot>/</targetroot>
   34: <files>
   35: <file>
   36: <target dist="default">/home/httpd/lonUsers</target>
   37: <perlscript mode="fg">
   38: my $rhversion = "7.3";
   39: if (-e '/etc/redhat-release') {
   40:     my $tmp = `cat /etc/redhat-release`;
   41:     if ($tmp =~ /fedora/i) {
   42:         $rhversion = 'fedora';
   43:     }
   44: }
   45: #
   46: # Look for php packages that should not be installed
   47: my @phprpms = `rpm -q -a|grep php`;
   48: if (@phprpms) {
   49:     print "WARNING: PHP packages are present on this system.\n".
   50:         "There are known conflicts between PHP libraries and LON-CAPA.\n".
   51:         "Use the following command to remove ".
   52:         "the php packages from your system:\nrpm -e ";
   53:     foreach (@phprpms) {
   54:         chomp;
   55:         print $_.' ';
   56:     }
   57:     print "\n";
   58: }
   59: #
   60: # Look for mod_* that are thought to conflict with LON-CAPA
   61: my @mod_rpms = `rpm -q -a | grep mod`;
   62: foreach my $rpm (@mod_rpms) {
   63:     if ($rpm =~ /mod_bandwidth/) {
   64:         print "WARNING: it appears you have the mod_bandwidth ".
   65:         "package installed.\n".
   66:         "mod_bandwidth appears to conflict with LON-CAPA.\n".
   67:         "Use the following command to remove it:\n".
   68:         "rpm -e $rpm\n";
   69:     }
   70:     if ($rpm =~ /mod_throttle/) {
   71:         print "WARNING: it appears you have the mod_throttle ".
   72:         "package installed.\n".
   73:         "mod_throttle appears to conflict with LON-CAPA.\n".
   74:         "Use the following command to remove it:\n".
   75:         "rpm -e $rpm\n";
   76:     }
   77:         
   78: }
   79: #
   80: # Look for packages which we need to be present
   81: my @RPMS = `rpm -q -a`;
   82: if ($rhversion eq "7.3") {
   83:     foreach my $rpm ('gnuplot-3.7.1-5','LON-CAPA-systemperl') {
   84:         my @matching_rpms = grep(/$rpm/,@RPMS);
   85:         if (! @matching_rpms) {
   86:             print "WARNING: ".$rpm." does not appear to be installed.\n";
   87:         }
   88:     }
   89: } else {
   90:     foreach my $rpm ('gnuplot-',
   91:                      'perl-IO-Socket-SSL',
   92:                      'perl-Net-SSLeay',
   93:                      'perl-Time-HiRes-1.59',
   94:                      'perl-GDGraph',
   95:                      'perl-GD',
   96:                      'perl-GD-Graph3d',
   97:                      'perl-GD-Barcode',
   98:                      'perl-GDTextUtil',
   99:                      'ImageMagick-5',
  100:                      'ImageMagick-perl',
  101:                      'perl-Algorithm-Diff',
  102:                      'perl-Authen-Krb4',
  103:                      'perl-Authen-Krb5',
  104:                      'perl-Authen-PAM',
  105:                      'perl-Crypt-DES',
  106:                      'perl-Crypt-IDEA',
  107:                      'perl-Crypt-SSLeay',
  108:                      'perl-Event',
  109:                      'perl-HTML-Tree',
  110:                      'perl-IO-stringy',
  111:                      'perl-MailTools',
  112:                      'perl-Math-Cephes',
  113:                      'perl-Math-FFT',
  114:                      'perl-Math-Random',
  115:                      'perl-Net-PH',
  116:                      'perl-Net-SNPP',
  117:                      'perl-Net-SSLeay',
  118:                      'perl-OLE-Storage_Lite',
  119:                      'perl-Parse-RecDescent',
  120:                      'perl-Pod-POM',
  121:                      'perl-PostScript-Simple',
  122:                      'perl-Safe-Hole',
  123:                      'perl-Spreadsheet-WriteExcel',
  124:                      'perl-String-Similarity',
  125:                      'perl-Text-Query',
  126:                      'perl-TimeDate',) {
  127:         my @matching_rpms = grep(/$rpm/,@RPMS);
  128:         if (! @matching_rpms) {
  129:             print "WARNING: ".$rpm." does not appear to be installed.\n";
  130:         }
  131:     }
  132: }
  133: 
  134: foreach my $rpm ('psutils','openssl-devel','perl-suidperl',
  135:                  'apache-1.3','mod_perl.1','^gzip','^zip-',
  136:                  '^bzip2-libs','^unzip','^bzip2','^tar-') {
  137:     my @matching_rpms = grep(/$rpm/,@RPMS);
  138:     if (! @matching_rpms) {
  139:         print "WARNING: ".$rpm." does not appear to be installed.\n";
  140:     }
  141: }
  142: 
  143: #
  144: # Look for files which we need to be present
  145: foreach my $file ('/usr/bin/pstops') {
  146:     if (! -e $file) {
  147:         print "WARNING: ".$file." does not appear to be installed.\n";
  148:     }
  149: }
  150: </perlscript>
  151: </file>
  152: </files>
  153: </piml>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>