[LON-CAPA-cvs] cvs: loncom / lond /build Makefile distprobe /configuration Firewall.pm /debugging_tools modify_config_files.pl doc/install/linux install.pl doc/loncapafiles chkconfig.piml langcheck.piml loncapafiles.lpml modify_config_files.piml ntpcheck.piml picins_check.piml rpmcheck.piml wrap_setuid.piml

raeburn raeburn at source.lon-capa.org
Tue Dec 21 08:57:47 EST 2021


raeburn		Tue Dec 21 13:57:47 2021 EDT

  Modified files:              
    /doc/loncapafiles	chkconfig.piml langcheck.piml loncapafiles.lpml 
                     	modify_config_files.piml ntpcheck.piml 
                     	picins_check.piml rpmcheck.piml wrap_setuid.piml 
    /doc/install/linux	install.pl 
    /loncom	lond 
    /loncom/build	Makefile distprobe 
    /loncom/configuration	Firewall.pm 
    /loncom/debugging_tools	modify_config_files.pl 
  Log:
  - Support CentOS Stream 8 and 9.
  
  
-------------- next part --------------
Index: doc/loncapafiles/chkconfig.piml
diff -u doc/loncapafiles/chkconfig.piml:1.54 doc/loncapafiles/chkconfig.piml:1.55
--- doc/loncapafiles/chkconfig.piml:1.54	Mon Dec 20 03:13:28 2021
+++ doc/loncapafiles/chkconfig.piml	Tue Dec 21 13:57:46 2021
@@ -3,7 +3,7 @@
 <!-- checkconfig.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: chkconfig.piml,v 1.54 2021/12/20 03:13:28 raeburn Exp $ -->
+<!-- $Id: chkconfig.piml,v 1.55 2021/12/21 13:57:46 raeburn Exp $ -->
 
 <!--
 
@@ -65,7 +65,8 @@
          ('<DIST />' eq 'fedora34') || ('<DIST />' eq 'fedora35') || 
          ('<DIST />' eq 'centos8')  || ('<DIST />' eq 'rhes8')    || 
          ('<DIST />' eq 'oracle7')  || ('<DIST />' eq 'oracle8')  ||
-         ('<DIST />' eq 'rocky8')   || ('<DIST />' eq 'alma8')) {
+         ('<DIST />' eq 'rocky8')   || ('<DIST />' eq 'alma8')    ||
+         ('<DIST />' eq 'centos8-stream') || ('<DIST />' eq 'centos9-stream')) {
     $use_systemctl = 1;
     $systemctl_only = 1;
 }
Index: doc/loncapafiles/langcheck.piml
diff -u doc/loncapafiles/langcheck.piml:1.27 doc/loncapafiles/langcheck.piml:1.28
--- doc/loncapafiles/langcheck.piml:1.27	Mon Dec 20 03:13:28 2021
+++ doc/loncapafiles/langcheck.piml	Tue Dec 21 13:57:46 2021
@@ -70,7 +70,8 @@
          '<DIST />' eq 'fedora33' || '<DIST />' eq 'fedora34' || '<DIST />' eq 'fedora35' || 
          '<DIST />' eq 'rhes7'    || '<DIST />' eq 'centos7'  || '<DIST />' eq 'scientific7' ||
          '<DIST />' eq 'rhes8'    || '<DIST />' eq 'centos8'  || '<DIST />' eq 'oracle7'  ||
-         '<DIST />' eq 'oracle8'  || '<DIST />' eq 'rocky8'   || '<DIST />' eq 'alma8')  {
+         '<DIST />' eq 'oracle8'  || '<DIST />' eq 'rocky8'   || '<DIST />' eq 'alma8'    ||
+         '<DIST />' eq 'centos8-stream' || '<DIST />' eq 'centos9-stream')  {
     if (open(PIPE,"cat /etc/locale.conf |grep '^LANG' |")) {
         print "Checking OS language";
         if (<PIPE> =~ /^LANG="en/) {
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.1021 doc/loncapafiles/loncapafiles.lpml:1.1022
--- doc/loncapafiles/loncapafiles.lpml:1.1021	Mon Dec 20 03:13:28 2021
+++ doc/loncapafiles/loncapafiles.lpml	Tue Dec 21 13:57:46 2021
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.1021 2021/12/20 03:13:28 raeburn Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.1022 2021/12/21 13:57:46 raeburn Exp $ -->
 
 <!--
 
@@ -8781,7 +8781,7 @@
 <source>loncom/init.d/loncontrol</source>
 <target dist='default'>etc/rc.d/init.d/loncontrol</target>
 <target dist='suse9.2 suse9.3 sles9 sles10 sles11 sles12 suse10.1 suse10.2 suse10.3 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2 debian5 debian6 ubuntu6 ubuntu8 ubuntu10 ubuntu12 ubuntu14 ubuntu16'>etc/init.d/loncontrol</target>
-<target dist='fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8 rocky8 alma8'>home/httpd/perl/loncontrol</target>
+<target dist='fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8 rocky8 alma8 centos8-stream centos9-stream'>home/httpd/perl/loncontrol</target>
 <categoryname>root script</categoryname>
 <description>
 Controls the launching/halting of lonc, lond, and lonsql processes.
@@ -8790,7 +8790,7 @@
 <file>
 <source>loncom/init.d/loncontrol.service</source>
 <target dist='default'>home/httpd/perl/systemd/loncontrol.service</target>
-<target dist='fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8 rocky8 alma8'>etc/systemd/system/loncontrol.service</target>
+<target dist='fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8 rocky8 alma8 centos8-stream centos9-stream'>etc/systemd/system/loncontrol.service</target>
 <categoryname>static conf</categoryname>
 <description>
 Controls the launching/halting of lon-capa daemons by loncontrol in systemd
@@ -8844,13 +8844,13 @@
 loncom/init.d/loncontrol
   </dependencies>
 </file>
-<file dist="fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8 rocky8 alma8">
+<file dist="fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8 rocky8 alma8 centos8-stream centos9-stream">
 <source>loncom/init.d/loncontrol.service</source>
 <target>etc/systemd/system/loncontrol.service</target>
 <description>
 Controls the launching/halting of lon-capa daemons by loncontrol in systemd
 </description>
-  <installscript dist="fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 sles15 rhes8 centos8 oracle7 oracle8 rocky8 alma8">
+  <installscript dist="fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 sles15 rhes8 centos8 oracle7 oracle8 rocky8 alma8 centos8-stream centos9-stream">
 -c '/usr/bin/systemctl enable loncontrol.service'
   </installscript>
   <installscript dist="ubuntu18 ubuntu20">
Index: doc/loncapafiles/modify_config_files.piml
diff -u doc/loncapafiles/modify_config_files.piml:1.48 doc/loncapafiles/modify_config_files.piml:1.49
--- doc/loncapafiles/modify_config_files.piml:1.48	Mon Dec 20 03:13:28 2021
+++ doc/loncapafiles/modify_config_files.piml	Tue Dec 21 13:57:46 2021
@@ -3,7 +3,7 @@
 <!-- modify_config_files.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: modify_config_files.piml,v 1.48 2021/12/20 03:13:28 raeburn Exp $ -->
+<!-- $Id: modify_config_files.piml,v 1.49 2021/12/21 13:57:46 raeburn Exp $ -->
 
 <!--
 
@@ -63,7 +63,8 @@
          ('<DIST />' eq 'fedora35')    || ('<DIST />' eq 'centos8')  || 
          ('<DIST />' eq 'rhes8')       || ('<DIST />' eq 'oracle7')  ||
          ('<DIST />' eq 'oracle8')     || ('<DIST />' eq 'rocky8')   ||
-         ('<DIST />' eq 'alma8')) {
+         ('<DIST />' eq 'alma8')       || ('<DIST />' eq 'centos8-stream') ||
+         ('<DIST />' eq 'centos9-stream')) {
     $mysqlcmd = '/bin/systemctl restart mariadb.service';
 } elsif (('<DIST />' eq 'ubuntu18') || ('<DIST />' eq 'ubuntu20')) {
     $configfiles = 'Apt and MySQL';
Index: doc/loncapafiles/ntpcheck.piml
diff -u doc/loncapafiles/ntpcheck.piml:1.50 doc/loncapafiles/ntpcheck.piml:1.51
--- doc/loncapafiles/ntpcheck.piml:1.50	Mon Dec 20 03:13:28 2021
+++ doc/loncapafiles/ntpcheck.piml	Tue Dec 21 13:57:46 2021
@@ -3,7 +3,7 @@
 <!-- ntpcheck.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: ntpcheck.piml,v 1.50 2021/12/20 03:13:28 raeburn Exp $ -->
+<!-- $Id: ntpcheck.piml,v 1.51 2021/12/21 13:57:46 raeburn Exp $ -->
 
 <!--
 
@@ -45,7 +45,8 @@
     ('<DIST />' eq 'rhes8')    || ('<DIST />' eq 'oracle7')  ||
     ('<DIST />' eq 'oracle8')  || ('<DIST />' eq 'ubuntu18') ||
     ('<DIST />' eq 'ubuntu20') || ('<DIST />' eq 'rocky8')   ||
-    ('<DIST />' eq 'alma8')) {
+    ('<DIST />' eq 'alma8')    || ('<DIST />' eq 'centos8-stream') ||
+    ('<DIST />' eq 'centos9-stream')) {
     print "For more information on chronyd please see https://chrony.tuxfamily.org/\n";
 } else {
     print "For more information on ntpd please see http://www.ntp.org/\n";
@@ -71,7 +72,8 @@
     ('<DIST />' eq 'sles15')      || ('<DIST />' eq 'ubuntu18') || 
     ('<DIST />' eq 'ubuntu20')    || ('<DIST />' eq 'rhes8')    || 
     ('<DIST />' eq 'centos8')     || ('<DIST />' eq 'oracle8')  ||
-    ('<DIST />' eq 'rocky8')      || ('<DIST />' eq 'alma8')) {
+    ('<DIST />' eq 'rocky8')      || ('<DIST />' eq 'alma8')    ||
+    ('<DIST />' eq 'centos8-stream') || ('<DIST />' eq 'centos9-stream')) {
     $NTPD = 'ntpd';
     my $binname = $NTPD;
     if (('<DIST />' eq 'ubuntu18') || ('<DIST />' eq 'ubuntu20')) {
@@ -86,7 +88,8 @@
              ('<DIST />' eq 'sles15')   || ('<DIST />' eq 'rhes8')    || 
              ('<DIST />' eq 'centos8')  || ('<DIST />' eq 'oracle7')  ||
              ('<DIST />' eq 'oracle8')  || ('<DIST />' eq 'rocky8')   ||
-             ('<DIST />' eq 'alma8')) {
+             ('<DIST />' eq 'alma8')    || ('<DIST />' eq 'centos8-stream') ||
+             ('<DIST />' eq 'centos9-stream')) {
         $NTPD = 'chronyd';
         $name = $NTPD;
         $binname = $NTPD;
@@ -145,7 +148,8 @@
     ('<DIST />' eq 'sles15')      || ('<DIST />' eq 'ubuntu18') ||
     ('<DIST />' eq 'ubuntu20')    || ('<DIST />' eq 'rhes8')    ||
     ('<DIST />' eq 'centos8')     || ('<DIST />' eq 'oracle8')  ||
-    ('<DIST />' eq 'rocky8')      || ('<DIST />' eq 'alma8')) { 
+    ('<DIST />' eq 'rocky8')      || ('<DIST />' eq 'alma8')    ||
+    ('<DIST />' eq 'centos8-stream') || ('<DIST />' eq 'centos9-stream')) { 
     if (!-l "/etc/systemd/system/multi-user.target.wants/$NTPD.service") {  
         print "**** WARNING: $NTPD is not configured to run at boot.  To correct this run:\nsystemctl enable $NTPD.service\n";
     }
Index: doc/loncapafiles/picins_check.piml
diff -u doc/loncapafiles/picins_check.piml:1.49 doc/loncapafiles/picins_check.piml:1.50
--- doc/loncapafiles/picins_check.piml:1.49	Mon Dec 20 03:13:28 2021
+++ doc/loncapafiles/picins_check.piml	Tue Dec 21 13:57:46 2021
@@ -3,7 +3,7 @@
 <!-- picins_check.piml -->
 <!-- Stuart Raeburn -->
 
-<!-- $Id: picins_check.piml,v 1.49 2021/12/20 03:13:28 raeburn Exp $ -->
+<!-- $Id: picins_check.piml,v 1.50 2021/12/21 13:57:46 raeburn Exp $ -->
 
 <!--
 
@@ -32,7 +32,7 @@
 <piml>
 <files>
 <file>
-<perlscript mode="fg" dist="fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 fedora20 fedora21 fedora22 fedora 23 fedora24 fedora25 fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 rhes6 scientific6 centos6 oracle6 rhes7 scientific7 centos7 oracle7 rhes8 centos8 oracle8 rocky8 alma8 sles11 sles12 sles15 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2 debian5 debian6 ubuntu8 ubuntu10 ubuntu12 ubuntu14 ubuntu16 ubuntu18 ubuntu20">
+<perlscript mode="fg" dist="fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 fedora20 fedora21 fedora22 fedora 23 fedora24 fedora25 fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 rhes6 scientific6 centos6 oracle6 rhes7 scientific7 centos7 oracle7 rhes8 centos8 oracle8 rocky8 alma8 centos8-stream centos9-stream sles11 sles12 sles15 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2 debian5 debian6 ubuntu8 ubuntu10 ubuntu12 ubuntu14 ubuntu16 ubuntu18 ubuntu20">
     my $picinspath = '/usr/share/texmf/tex/latex/picins'; 
     my $file = 'picins.sty';
     if (!-e "$picinspath/$file") {
Index: doc/loncapafiles/rpmcheck.piml
diff -u doc/loncapafiles/rpmcheck.piml:1.54 doc/loncapafiles/rpmcheck.piml:1.55
--- doc/loncapafiles/rpmcheck.piml:1.54	Mon Dec 20 03:13:28 2021
+++ doc/loncapafiles/rpmcheck.piml	Tue Dec 21 13:57:46 2021
@@ -3,7 +3,7 @@
 <!-- phpcheck.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: rpmcheck.piml,v 1.54 2021/12/20 03:13:28 raeburn Exp $ -->
+<!-- $Id: rpmcheck.piml,v 1.55 2021/12/21 13:57:46 raeburn Exp $ -->
 
 <!--
 
@@ -81,7 +81,7 @@
     }
 }
 </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 rhes5 rhes6 rhes7 rhes8 centos5 scientific5 scientific6 centos6 oracle6 scientific7 centos7 oracle7 centos8 oracle8 rocky8 alma8 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">
+<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 rhes5 rhes6 rhes7 rhes8 centos5 scientific5 scientific6 centos6 oracle6 scientific7 centos7 oracle7 centos8 oracle8 rocky8 alma8 centos8-stream centos9-stream 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 = (<PIPE>);
Index: doc/loncapafiles/wrap_setuid.piml
diff -u doc/loncapafiles/wrap_setuid.piml:1.49 doc/loncapafiles/wrap_setuid.piml:1.50
--- doc/loncapafiles/wrap_setuid.piml:1.49	Mon Dec 20 03:13:28 2021
+++ doc/loncapafiles/wrap_setuid.piml	Tue Dec 21 13:57:46 2021
@@ -3,7 +3,7 @@
 <!-- wrap_setuid.piml -->
 <!-- Guy Albertelli -->
 
-<!-- $Id: wrap_setuid.piml,v 1.49 2021/12/20 03:13:28 raeburn Exp $ -->
+<!-- $Id: wrap_setuid.piml,v 1.50 2021/12/21 13:57:46 raeburn Exp $ -->
 
 <!--
 
@@ -37,7 +37,7 @@
 <perlscript mode="fg" dist="default">
 #print("Not wrapping setuid scripts\n");
 </perlscript>
-<perlscript mode="fg" dist="suse9.2 suse9.3 sles9 sles10 sles11 sles12 sles15 suse10.1 suse10.2 suse10.3 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 fedora20 fedora21 fedora22 fedora23 fedora24 fedora25 fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 ubuntu12 ubuntu14 ubuntu16 ubuntu18 ubuntu20 rhes7 centos7 scientific7 oracle7 rhes8 centos8 oracle8 rocky8 alma8">
+<perlscript mode="fg" dist="suse9.2 suse9.3 sles9 sles10 sles11 sles12 sles15 suse10.1 suse10.2 suse10.3 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 fedora20 fedora21 fedora22 fedora23 fedora24 fedora25 fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 fedora34 fedora35 ubuntu12 ubuntu14 ubuntu16 ubuntu18 ubuntu20 rhes7 centos7 scientific7 oracle7 rhes8 centos8 oracle8 rocky8 alma8 centos8-stream centos9-stream">
 
 $fslist='<TARGET />';
 open(FIND,  "find <TARGET /> -xdev -type f \\( -perm -04000 -o -perm -02000 \\) -print|");
Index: doc/install/linux/install.pl
diff -u doc/install/linux/install.pl:1.79 doc/install/linux/install.pl:1.80
--- doc/install/linux/install.pl:1.79	Mon Dec 20 03:13:29 2021
+++ doc/install/linux/install.pl	Tue Dec 21 13:57:46 2021
@@ -78,7 +78,7 @@
           &mt('Stopping execution.')."\n";
     exit;
 } else {
-    print LOG '$Id: install.pl,v 1.79 2021/12/20 03:13:29 raeburn Exp $'."\n";
+    print LOG '$Id: install.pl,v 1.80 2021/12/21 13:57:46 raeburn Exp $'."\n";
 }
 
 #
@@ -212,8 +212,11 @@
             $distro = 'rhes'.$1;
             $updatecmd = 'dnf install LONCAPA-prerequisites';
             $installnow = 'dnf -y install LONCAPA-prerequisites';
-        } elsif ($versionstring =~ /CentOS(?:| Linux| Stream) release (\d+)/) {
-            $distro = 'centos'.$1;
+        } elsif ($versionstring =~ /CentOS(| Linux| Stream) release (\d+)/) {
+            $distro = 'centos'.$2;
+            if ($1 eq ' Stream') {
+                $distro .= '-stream';
+            }
             $updatecmd = 'yum install LONCAPA-prerequisites';
             $installnow = 'yum -y install LONCAPA-prerequisites';
         } elsif ($versionstring =~ /Scientific Linux (?:SL )?release ([\d.]+) /) {
@@ -2237,7 +2240,7 @@
                   'ssh, http')."\n";
     } else {
         my $version;
-        if ($distro =~ /^(redhat|centos)(\d+)$/) {
+        if ($distro =~ /^(redhat|centos)(\d+)/) {
             $version = $1;
         }
         if ($version > 5) {
@@ -2318,7 +2321,7 @@
         if ($1 > 6) {
             $lc_uses_systemctl = 1;
         }
-    } elsif ($distro =~ /^(?:rhes|centos|rocky|alma)(\d+)$/) {
+    } elsif ($distro =~ /^(?:rhes|centos|rocky|alma)(\d+)/) {
         if ($1 > 7) {
             $lc_uses_systemctl = 1;
         }
@@ -2751,7 +2754,7 @@
 sub copy_httpd_conf {
     my ($instdir,$distro,$hostname) = @_;
     my $configfile = 'httpd.conf';
-    if ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)$/) {
+    if ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)/) {
         if ($1 >= 7) {
             $configfile = 'apache2.4/httpd.conf';
         } elsif ($1 > 5) {
@@ -2798,7 +2801,7 @@
         print_and_log("\n");
     } else {
         my $logfail;
-        if ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)$/) {
+        if ($distro =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)/) {
             if ($1 > 7) {
                 $logfail = 1;
             }
Index: loncom/lond
diff -u loncom/lond:1.570 loncom/lond:1.571
--- loncom/lond:1.570	Mon Dec 20 03:13:29 2021
+++ loncom/lond	Tue Dec 21 13:57:47 2021
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.570 2021/12/20 03:13:29 raeburn Exp $
+# $Id: lond,v 1.571 2021/12/21 13:57:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -65,7 +65,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.570 $'; #' stupid emacs
+my $VERSION='$Revision: 1.571 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -7802,7 +7802,7 @@
         &Authen::Krb5::init_context();
 
         my $no_ets;
-        if ($dist =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)$/) {
+        if ($dist =~ /^(?:centos|rhes|scientific|oracle|rocky|alma)(\d+)/) {
             if ($1 >= 7) {
                 $no_ets = 1;
             }
Index: loncom/build/Makefile
diff -u loncom/build/Makefile:1.222 loncom/build/Makefile:1.223
--- loncom/build/Makefile:1.222	Mon Dec 20 03:13:29 2021
+++ loncom/build/Makefile	Tue Dec 21 13:57:47 2021
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 
-# $Id: Makefile,v 1.222 2021/12/20 03:13:29 raeburn Exp $
+# $Id: Makefile,v 1.223 2021/12/21 13:57:47 raeburn Exp $
 
 # TYPICAL USAGE of this Makefile is primarily for two targets:
 # "make build" and "make install".
@@ -58,7 +58,8 @@
 	@echo "* ADJUSTABLE OPTIONS *"
 	@echo "(option) DIST can be centosN (N = 5, 6, 7 or 8), rhesN (N = 4, 5, 6, 7 or 8),"
 	@echo "         scientificN (N = 5, 6 or 7), oracleN (N = 6, 7 or 8), rockyN (N = 8),"
-	@echo "         almaN (N = 8) or slesN (N = 9, 10, 11, 12 or 15), or debianN (N = 5 or 6),"
+	@echo "         almaN (N = 8), centosN-stream (N = 8 or 9)," 
+	@echo "         or slesN (N = 9, 10, 11, 12 or 15), or debianN (N = 5 or 6),"
 	@echo "         or ubuntuN (N= 6, 8, 10, 12, 14, 16, 18 or 20), or fedoraN (N = 1 .. 35),"
 	@echo "         or suseN.M (N.M: 9.2 .. 13.2), or default."
 	@echo "         It is unlikely you would ever need to specify this,"
Index: loncom/build/distprobe
diff -u loncom/build/distprobe:1.25 loncom/build/distprobe:1.26
--- loncom/build/distprobe:1.25	Mon Dec 20 03:13:29 2021
+++ loncom/build/distprobe	Tue Dec 21 13:57:47 2021
@@ -2,7 +2,7 @@
 #
 # The LearningOnline Network with CAPA
 #
-# $Id: distprobe,v 1.25 2021/12/20 03:13:29 raeburn Exp $
+# $Id: distprobe,v 1.26 2021/12/21 13:57:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -64,8 +64,11 @@
         $dist = 'rhes'.$1;
     } elsif ($versionstring =~ /Red Hat Enterprise Linux release (\d+)/) {
         $dist = 'rhes'.$1;
-    } elsif ($versionstring =~ /CentOS(?:| Linux| Stream) release (\d+)/) {
-        $dist = 'centos'.$1;
+    } elsif ($versionstring =~ /CentOS(| Linux| Stream) release (\d+)/) {
+        $dist = 'centos'.$2;
+        if ($1 eq ' Stream') {
+            $dist .= '-stream';
+        }
     } elsif ($versionstring =~ /Scientific Linux (?:SL )?release ([\d.]+) /) {
         my $ver = $1;
         $ver =~ s/\.\d+$//;
Index: loncom/configuration/Firewall.pm
diff -u loncom/configuration/Firewall.pm:1.23 loncom/configuration/Firewall.pm:1.24
--- loncom/configuration/Firewall.pm:1.23	Mon Dec 20 03:13:29 2021
+++ loncom/configuration/Firewall.pm	Tue Dec 21 13:57:47 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Firewall configuration to allow internal LON-CAPA communication between servers   
 #
-# $Id: Firewall.pm,v 1.23 2021/12/20 03:13:29 raeburn Exp $
+# $Id: Firewall.pm,v 1.24 2021/12/21 13:57:47 raeburn Exp $
 #
 # The LearningOnline Network with CAPA
 #
@@ -655,7 +655,7 @@
     my $ubuntu_config = "/etc/ufw/ufw.conf";
     my $firewalld = &uses_firewalld($distro);
     if ($firewalld) {
-        my ($dist,$version) = ($distro =~ /^([\D]+)(\d+)$/);
+        my ($dist,$version) = ($distro =~ /^([\D]+)(\d+)(?:|\-stream)$/);
         if (((($dist eq 'rhes') || ($dist eq 'centos') || ($dist eq 'rocky') || ($dist eq 'alma')) &&
              ($version >= 8)) || (($dist eq 'oracle') && ($version >= 7))) {
             push(@fw_chains,'INPUT');
@@ -676,7 +676,7 @@
         } else {
             if ($distro =~ /^(debian|ubuntu|suse|sles)/) {
                 @posschains = ('INPUT'); 
-            } elsif ($distro =~ /^(fedora|rhes|centos|scientific|oracle|rocky|alma)(\d+)$/) {
+            } elsif ($distro =~ /^(fedora|rhes|centos|scientific|oracle|rocky|alma)(\d+)(?:|\-stream)$/) {
                 if ((($1 eq 'fedora') && ($2 > 15)) || (($1 ne 'fedora') && ($2 >= 7))) {
                     @posschains = ('INPUT');
                 } else {
@@ -689,7 +689,7 @@
                         print("Unable to find iptables file containing static definitions.\n");
                     }
                 }
-                if ($distro =~ /^(fedora|rhes|centos|scientific|oracle|rocky|alma)(\d+)$/) {
+                if ($distro =~ /^(fedora|rhes|centos|scientific|oracle|rocky|alma)(\d+){?:|\-stream)$/) {
                     unless ((($1 eq 'fedora') && ($2 > 15)) || (($1 ne 'fedora') && ($2 >= 7))) {
                         push(@fw_chains,'RH-Firewall-1-INPUT');
                     }
Index: loncom/debugging_tools/modify_config_files.pl
diff -u loncom/debugging_tools/modify_config_files.pl:1.21 loncom/debugging_tools/modify_config_files.pl:1.22
--- loncom/debugging_tools/modify_config_files.pl:1.21	Mon Dec 20 03:13:29 2021
+++ loncom/debugging_tools/modify_config_files.pl	Tue Dec 21 13:57:47 2021
@@ -2,7 +2,7 @@
 #
 # The LearningOnline Network
 #
-# $Id: modify_config_files.pl,v 1.21 2021/12/20 03:13:29 raeburn Exp $
+# $Id: modify_config_files.pl,v 1.22 2021/12/21 13:57:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -113,9 +113,10 @@
                key     => 'gpgkey=',
                value   => $gpg,
            }],$nobackup);
-} elsif ($dist =~ /^(rhes|centos|scientific|oracle|rocky|alma)(\d+)$/) {
+} elsif ($dist =~ /^(rhes|centos|scientific|oracle|rocky|alma)(\d+)(|\-stream)$/) {
     my $type = $1;
     my $ver = $2;
+    my $stream = $3;
     my $longver = $ver;
     my $nobackup;
     if ($type eq 'rhes') {
@@ -124,6 +125,8 @@
         } elsif ($ver == 5) {
             $longver = '5Server';
         }
+    } elsif ($type eq 'centos') {
+        $type .= $stream;
     }
     my %info = (
                  rhes => {
@@ -162,14 +165,25 @@
                              gpg => 'versions/alma/RPM-GPG-KEY-loncapa',
                              gpgchk => 1,
                           },
+                 centos-stream => {
+                                      title => 'CentOS Stream',
+                                      path  => 'centos/loncapa',
+                                      gpg => 'versions/centos/RPM-GPG-KEY-loncapa',
+                                      gpgchk => 1, 
+                                  },
                );
     if (ref($info{$type}) eq 'HASH') {
         if ($ver > 4) {
             my $file = '/etc/yum.conf';
-            if (($ver > 7) || ($type eq 'oracle') || ($type eq 'rocky') || ($type eq 'alma')) {
+            if (($ver > 7) || ($type eq 'oracle') || ($type eq 'rocky') || 
+                ($type eq 'alma') || ($type eq 'centos-stream')) {
                 $file = '/etc/yum.repos.d/loncapa.repo';
                 $nobackup = 1;
             }
+            my $release = '$releasever';
+            if ($type eq 'centos-stream') {
+                $release .= '-stream';
+            }
             $yum_status =
                 &update_file($file,
                      [{section => 'loncapa-updates-basearch',
@@ -177,7 +191,7 @@
                        value   => $info{$type}{title}.' $releasever LON-CAPA $basearch Updates',
                       }, {section => "loncapa-updates-basearch",
                           key     => 'baseurl=',
-                          value   => "$loninst/$info{$type}{path}/".'$releasever/$basearch',
+                          value   => "$loninst/$info{$type}{path}/$release/".'$basearch',
                       }, {section => 'loncapa-updates-basearch',
                           key     => 'gpgcheck=',
                           value   => $info{$type}{gpgchk},
@@ -189,7 +203,7 @@
                           value   => $info{$type}{title}.' $releasever LON-CAPA noarch Updates',
                       }, {section => 'loncapa-updates-noarch',
                           key     => 'baseurl=',
-                          value   => "$loninst/$info{$type}{path}/".'$releasever/noarch',
+                          value   => "$loninst/$info{$type}{path}/$release/noarch",
                       }, {section => 'loncapa-updates-noarch',
                           key     => 'gpgcheck=',
                           value   => $info{$type}{gpgchk},


More information about the LON-CAPA-cvs mailing list