File:  [LON-CAPA] / doc / loncapafiles / rpmcheck.piml
Revision 1.64: download - view: text, annotated - select for diffs
Fri Nov 15 16:25:30 2024 UTC (6 days, 10 hours ago) by raeburn
Branches: MAIN
CVS tags: version_2_12_X, version_2_11_X, HEAD
- - Support Fedora 41

<!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
	"http://lpml.sourceforge.net/DTD/piml.dtd">
<!-- rpmcheck.piml -->
<!-- Matthew Hall -->

<!-- $Id: rpmcheck.piml,v 1.64 2024/11/15 16:25:30 raeburn Exp $ -->

<!--

This file is part of the LearningOnline Network with CAPA (LON-CAPA).

LON-CAPA is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

LON-CAPA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with LON-CAPA; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

/home/httpd/html/adm/gpl.txt

http://www.lon-capa.org/

-->

<piml>
<targetroot>/</targetroot>
<files>
<file>
<target dist="default">/home/httpd/lonUsers</target>
<perlscript dist="redhat7 fedora1 fedora2 fedora3 fedora4 suse9.2 suse9.3 sles9" mode="fg">
#
# Look for php packages that should not be installed
my @phprpms = `rpm -q -a|grep php`;
if (@phprpms) {
    print "**** WARNING: PHP packages are present on this system.\n".
        "There are known conflicts between PHP libraries and LON-CAPA.\n".
        "Use the following command to remove ".
        "the php packages from your system:\nrpm -e ";
    foreach (@phprpms) {
        chomp;
        print $_.' ';
    }
    print "\n";
}
#
# Look for mod_* that are thought to conflict with LON-CAPA
my @mod_rpms = `rpm -q -a | grep mod`;
foreach my $rpm (@mod_rpms) {
    if ($rpm =~ /mod_bandwidth/) {
        print "**** WARNING: it appears you have the mod_bandwidth ".
        "package installed.\n".
        "mod_bandwidth appears to conflict with LON-CAPA.\n".
        "Use the following command to remove it:\n".
        "rpm -e $rpm\n";
    }
    if ($rpm =~ /mod_throttle/) {
        print "**** WARNING: it appears you have the mod_throttle ".
        "package installed.\n".
        "mod_throttle appears to conflict with LON-CAPA.\n".
        "Use the following command to remove it:\n".
        "rpm -e $rpm\n";
    }
        
}
</perlscript>
<perlscript dist="redhat7" mode="fg">
#
# Look for packages which we need to be present
my @RPMS = `rpm -q -a`;
foreach my $rpm ('gnuplot-3.7.1-5','LON-CAPA-systemperl') {
    my @matching_rpms = grep(/$rpm/,@RPMS);
    if (! @matching_rpms) {
        print "**** WARNING: ".$rpm." does not appear to be installed.\n";
    }
}
</perlscript>
<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 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 fedora36 fedora37 fedora38 fedora39 fedora40 fedora41 rhes5 rhes6 rhes7 rhes8 centos5 scientific5 scientific6 centos6 oracle6 scientific7 centos7 oracle7 centos8 oracle8 rocky8 alma8 centos8-stream centos9-stream rhes9 oracle9 rocky9 alma9 suse9.2 suse9.3 suse10.1 suse10.2 suse10.3 sles9 sles10 sles11 sles12 sles15 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2" mode="fg">
my $hasprereqs = 0;
if (open(PIPE,"rpm -q LONCAPA-prerequisites|")) {
    my @lines = (&lt;PIPE&gt;);
    close(PIPE);
    chomp(@lines);
    foreach my $line (@lines) {
        if ($line =~ /^\QLONCAPA-prerequisites-\E[.\w\-]+$/) {
            $hasprereqs = 1;
            last;
        }
    }
}
if (!$hasprereqs) {
    print "**** WARNING: LONCAPA-prerequisites does not appear to be installed.\n";
}
</perlscript>
<perlscript dist="debian5 debian6 debian10 debian11 debian12 ubuntu8 ubuntu10 ubuntu12 ubuntu14 ubuntu16 ubuntu18 ubuntu20 ubuntu22 ubuntu24" mode="fg">
my $hasprereqs = 0;
if (open(PIPE,"dpkg -l loncapa-prerequisites|")) {
    my @lines = (&lt;PIPE&gt;);
    close(PIPE);
    chomp(@lines);
    foreach my $line (@lines) { 
        if ($line =~ /^ii\s+\Qloncapa-prerequisites\E\s+([.\d\-]+)/) {
            $hasprereqs = 1;
            last;
        }
    }
}
if (!$hasprereqs) { 
    print "**** WARNING: loncapa-prerequisites does not appear to be installed.\n";
}
</perlscript>
<perlscript dist="gentoo">
print &lt;&lt;END;
**** WARNING: We don't know much about your distribution.
    Check with the loncapa development team for help satisfying 
    the many dependencies of LON-CAPA.
END
</perlscript>
<perlscript mode="fg">
#
# Look for files which we need to be present
foreach my $file ('/usr/bin/pstops') {
    if (! -e $file) {
        print "**** WARNING: ".$file." does not appear to be installed.\n";
    }
}
</perlscript>
</file>
</files>
</piml>

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