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

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.8     ! matthew     6: <!-- $Id: rpmcheck.piml,v 1.7 2004/08/11 14:12:47 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) {
1.8     ! matthew    49:     print "**** WARNING: PHP packages are present on this system.\n".
1.1       matthew    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/) {
1.8     ! matthew    64:         print "**** WARNING: it appears you have the mod_bandwidth ".
1.1       matthew    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.8     ! matthew    71:         print "**** WARNING: it appears you have the mod_throttle ".
1.1       matthew    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) {
1.8     ! matthew    86:             print "**** WARNING: ".$rpm." does not appear to be installed.\n";
1.6       matthew    87:         }
                     88:     }
                     89: } else {
1.8     ! matthew    90:     foreach my $rpm ('LONCAPA-prerequisites',
        !            91:                      'gnuplot-',
1.6       matthew    92:                      'perl-IO-Socket-SSL',
                     93:                      'perl-Net-SSLeay',
                     94:                      'perl-Time-HiRes-1.59',
                     95:                      'perl-GDGraph',
                     96:                      'perl-GD',
                     97:                      'perl-GD-Graph3d',
                     98:                      'perl-GD-Barcode',
                     99:                      'perl-GDTextUtil',
                    100:                      'ImageMagick-5',
                    101:                      'ImageMagick-perl',
                    102:                      'perl-Algorithm-Diff',
                    103:                      'perl-Authen-Krb4',
                    104:                      'perl-Authen-Krb5',
                    105:                      'perl-Authen-PAM',
                    106:                      'perl-Crypt-DES',
                    107:                      'perl-Crypt-IDEA',
                    108:                      'perl-Crypt-SSLeay',
                    109:                      'perl-Event',
                    110:                      'perl-HTML-Tree',
                    111:                      'perl-IO-stringy',
                    112:                      'perl-MailTools',
                    113:                      'perl-Math-Cephes',
                    114:                      'perl-Math-FFT',
                    115:                      'perl-Math-Random',
                    116:                      'perl-Net-PH',
                    117:                      'perl-Net-SNPP',
                    118:                      'perl-Net-SSLeay',
                    119:                      'perl-OLE-Storage_Lite',
                    120:                      'perl-Parse-RecDescent',
                    121:                      'perl-Pod-POM',
                    122:                      'perl-PostScript-Simple',
                    123:                      'perl-Safe-Hole',
                    124:                      'perl-Spreadsheet-WriteExcel',
                    125:                      'perl-String-Similarity',
                    126:                      'perl-Text-Query',
                    127:                      'perl-TimeDate',) {
                    128:         my @matching_rpms = grep(/$rpm/,@RPMS);
                    129:         if (! @matching_rpms) {
1.8     ! matthew   130:             print "**** WARNING: ".$rpm." does not appear to be installed.\n";
1.6       matthew   131:         }
                    132:     }
                    133: }
                    134: 
1.3       matthew   135: foreach my $rpm ('psutils','openssl-devel','perl-suidperl',
1.6       matthew   136:                  'apache-1.3','mod_perl.1','^gzip','^zip-',
                    137:                  '^bzip2-libs','^unzip','^bzip2','^tar-') {
1.5       matthew   138:     my @matching_rpms = grep(/$rpm/,@RPMS);
                    139:     if (! @matching_rpms) {
1.8     ! matthew   140:         print "**** WARNING: ".$rpm." does not appear to be installed.\n";
1.2       matthew   141:     }
                    142: }
1.6       matthew   143: 
1.2       matthew   144: #
                    145: # Look for files which we need to be present
                    146: foreach my $file ('/usr/bin/pstops') {
                    147:     if (! -e $file) {
1.8     ! matthew   148:         print "**** WARNING: ".$file." does not appear to be installed.\n";
1.2       matthew   149:     }
1.1       matthew   150: }
                    151: </perlscript>
                    152: </file>
                    153: </files>
                    154: </piml>

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