Annotation of doc/loncapafiles/rpmcheck.piml, revision 1.7

1.1       matthew     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: 
1.7     ! matthew     6: <!-- $Id: rpmcheck.piml,v 1.6 2004/07/06 21:58:09 matthew Exp $ -->
1.1       matthew     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">
1.6       matthew    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: }
1.2       matthew    45: #
                     46: # Look for php packages that should not be installed
1.1       matthew    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: }
1.2       matthew    59: #
                     60: # Look for mod_* that are thought to conflict with LON-CAPA
1.1       matthew    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:     }
1.2       matthew    70:     if ($rpm =~ /mod_throttle/) {
1.1       matthew    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:         
1.2       matthew    78: }
                     79: #
                     80: # Look for packages which we need to be present
1.5       matthew    81: my @RPMS = `rpm -q -a`;
1.6       matthew    82: if ($rhversion eq "7.3") {
1.7     ! matthew    83:     foreach my $rpm ('gnuplot-3.7.1-5','LON-CAPA-systemperl') {
1.6       matthew    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: 
1.3       matthew   134: foreach my $rpm ('psutils','openssl-devel','perl-suidperl',
1.6       matthew   135:                  'apache-1.3','mod_perl.1','^gzip','^zip-',
                    136:                  '^bzip2-libs','^unzip','^bzip2','^tar-') {
1.5       matthew   137:     my @matching_rpms = grep(/$rpm/,@RPMS);
                    138:     if (! @matching_rpms) {
1.2       matthew   139:         print "WARNING: ".$rpm." does not appear to be installed.\n";
                    140:     }
                    141: }
1.6       matthew   142: 
1.2       matthew   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:     }
1.1       matthew   149: }
                    150: </perlscript>
                    151: </file>
                    152: </files>
                    153: </piml>

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