[LON-CAPA-cvs] cvs: doc /loncapafiles axe_config_check.piml

raeburn raeburn at source.lon-capa.org
Sat Aug 1 07:21:29 EDT 2026


raeburn		Sat Aug  1 11:21:29 2026 EDT

  Modified files:              
    /doc/loncapafiles	axe_config_check.piml 
  Log:
  - Support Ubuntu 22, 24 & 26 where google-chrome-stable must be used instead
    of chromium (packaged with snap).
  - Prevent puppeteer postinstall scripts from installing its own browser.
  
  
Index: doc/loncapafiles/axe_config_check.piml
diff -u doc/loncapafiles/axe_config_check.piml:1.5 doc/loncapafiles/axe_config_check.piml:1.6
--- doc/loncapafiles/axe_config_check.piml:1.5	Thu Jul 23 19:32:13 2026
+++ doc/loncapafiles/axe_config_check.piml	Sat Aug  1 11:21:29 2026
@@ -2,7 +2,7 @@
 	"http://lpml.sourceforge.net/DTD/piml.dtd">
 <!-- axe_config_check.piml -->
 
-<!-- $Id: axe_config_check.piml,v 1.5 2026/07/23 19:32:13 raeburn Exp $ -->
+<!-- $Id: axe_config_check.piml,v 1.6 2026/08/01 11:21:29 raeburn Exp $ -->
 
 <!--
 
@@ -45,6 +45,9 @@
 if (('<DIST />' eq 'debian10') || ('<DIST />' eq 'debian11') ||
     ('<DIST />' eq 'debian12') || ('<DIST />' eq 'debian13')) {
     $path_to_chromium = '/usr/bin/chromium';
+} elsif (('<DIST />' eq 'ubuntu22') || ('<DIST />' eq 'ubuntu24') ||
+         ('<DIST />' eq 'ubuntu26')) {
+    $path_to_chromium = '/usr/bin/google-chrome-stable';
 }
 
 if (-e '/home/www/.bashrc') {
@@ -79,6 +82,8 @@
 
 my $original_dir = cwd();
 
+print "Using npm to install or update puppeteer, axe-code and dependencies for node.js.\n".
+      "Please be patient.  This make take a minute or two.\n";
 if (chdir '/home/httpd/node.js/axe') {
     my $pipe;
     my $pid = open($pipe, '-|');
@@ -92,7 +97,7 @@
         POSIX::setuid($wwwuid);
         # Verify that the switch was successful
         if ($) == $wwwgid && $> == $wwwuid) {
-            my @args = ('npm','install');
+            my @args = ('npm','install',--ignore-scripts');
             exec { $args[0] } @args;
         } else {
             print "Failed to switch to www:www in forked child process.\n";




More information about the LON-CAPA-cvs mailing list