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

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.41    ! raeburn     6: <!-- $Id: rpmcheck.piml,v 1.40 2017/10/23 23:57:46 raeburn 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>
1.12      albertel   37: <perlscript dist="redhat7 fedora1 fedora2 fedora3 fedora4 suse9.2 suse9.3 sles9" mode="fg">
1.2       matthew    38: #
                     39: # Look for php packages that should not be installed
1.1       matthew    40: my @phprpms = `rpm -q -a|grep php`;
                     41: if (@phprpms) {
1.8       matthew    42:     print "**** WARNING: PHP packages are present on this system.\n".
1.1       matthew    43:         "There are known conflicts between PHP libraries and LON-CAPA.\n".
                     44:         "Use the following command to remove ".
                     45:         "the php packages from your system:\nrpm -e ";
                     46:     foreach (@phprpms) {
                     47:         chomp;
                     48:         print $_.' ';
                     49:     }
                     50:     print "\n";
                     51: }
1.2       matthew    52: #
                     53: # Look for mod_* that are thought to conflict with LON-CAPA
1.1       matthew    54: my @mod_rpms = `rpm -q -a | grep mod`;
                     55: foreach my $rpm (@mod_rpms) {
                     56:     if ($rpm =~ /mod_bandwidth/) {
1.8       matthew    57:         print "**** WARNING: it appears you have the mod_bandwidth ".
1.1       matthew    58:         "package installed.\n".
                     59:         "mod_bandwidth appears to conflict with LON-CAPA.\n".
                     60:         "Use the following command to remove it:\n".
                     61:         "rpm -e $rpm\n";
                     62:     }
1.2       matthew    63:     if ($rpm =~ /mod_throttle/) {
1.8       matthew    64:         print "**** WARNING: it appears you have the mod_throttle ".
1.1       matthew    65:         "package installed.\n".
                     66:         "mod_throttle appears to conflict with LON-CAPA.\n".
                     67:         "Use the following command to remove it:\n".
                     68:         "rpm -e $rpm\n";
                     69:     }
                     70:         
1.2       matthew    71: }
1.9       matthew    72: </perlscript>
                     73: <perlscript dist="redhat7" mode="fg">
1.2       matthew    74: #
                     75: # Look for packages which we need to be present
1.5       matthew    76: my @RPMS = `rpm -q -a`;
1.9       matthew    77: foreach my $rpm ('gnuplot-3.7.1-5','LON-CAPA-systemperl') {
                     78:     my @matching_rpms = grep(/$rpm/,@RPMS);
                     79:     if (! @matching_rpms) {
                     80:         print "**** WARNING: ".$rpm." does not appear to be installed.\n";
1.6       matthew    81:     }
                     82: }
1.9       matthew    83: </perlscript>
1.41    ! raeburn    84: <perlscript dist="fedora1 fedora2 fedora3 fedora4 fedora5 fedora6 fedora7 fedora8 fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 fedora20 fedora21 fedora22 fedora23 fedora24 fedora25 fedora26 fedora27 fedora28 rhes5 rhes6 rhes7 centos5 scientific5 scientific6 centos6 scientific7 centos7 suse9.2 suse9.3 suse10.1 suse10.2 suse10.3 sles9 sles10 sles11 sles12 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2" mode="fg">
1.23      raeburn    85: my $hasprereqs = 0;
                     86: if (open(PIPE,"rpm -q LONCAPA-prerequisites|")) {
                     87:     my @lines = (&lt;PIPE&gt;);
                     88:     close(PIPE);
                     89:     chomp(@lines);
                     90:     foreach my $line (@lines) {
1.24      raeburn    91:         if ($line =~ /^\QLONCAPA-prerequisites-\E[.\w\-]+$/) {
1.23      raeburn    92:             $hasprereqs = 1;
                     93:             last;
                     94:         }
                     95:     }
                     96: }
                     97: if (!$hasprereqs) {
                     98:     print "**** WARNING: LONCAPA-prerequisites does not appear to be installed.\n";
                     99: }
                    100: </perlscript>
                    101: <perlscript dist="debian5 debian6 ubuntu8 ubuntu10" mode="fg">
                    102: my $hasprereqs = 0;
                    103: if (open(PIPE,"dpkg -l loncapa-prerequisites|")) {
                    104:     my @lines = (&lt;PIPE&gt;);
                    105:     close(PIPE);
                    106:     chomp(@lines);
                    107:     foreach my $line (@lines) { 
                    108:         if ($line =~ /^ii\s+\Qloncapa-prerequisites\E\s+([.\d\-]+)/) {
                    109:             $hasprereqs = 1;
                    110:             last;
                    111:         }
1.2       matthew   112:     }
                    113: }
1.23      raeburn   114: if (!$hasprereqs) { 
                    115:     print "**** WARNING: loncapa-prerequisites does not appear to be installed.\n";
                    116: }
1.9       matthew   117: </perlscript>
1.23      raeburn   118: <perlscript dist="gentoo">
1.9       matthew   119: print &lt;&lt;END;
                    120: **** WARNING: We don't know much about your distribution.
                    121:     Check with the loncapa development team for help satisfying 
                    122:     the many dependencies of LON-CAPA.
                    123: END
                    124: </perlscript>
                    125: <perlscript mode="fg">
1.2       matthew   126: #
                    127: # Look for files which we need to be present
                    128: foreach my $file ('/usr/bin/pstops') {
                    129:     if (! -e $file) {
1.8       matthew   130:         print "**** WARNING: ".$file." does not appear to be installed.\n";
1.2       matthew   131:     }
1.1       matthew   132: }
                    133: </perlscript>
                    134: </file>
                    135: </files>
                    136: </piml>

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