diff options
Diffstat (limited to 'wizard')
-rw-r--r-- | wizard/alarm.png | bin | 0 -> 1907 bytes | |||
-rw-r--r-- | wizard/index.php | 258 | ||||
-rw-r--r-- | wizard/info.png | bin | 0 -> 1817 bytes | |||
-rw-r--r-- | wizard/notice.png | bin | 0 -> 1770 bytes | |||
-rw-r--r-- | wizard/question.png | bin | 0 -> 1854 bytes |
5 files changed, 168 insertions, 90 deletions
diff --git a/wizard/alarm.png b/wizard/alarm.png Binary files differnew file mode 100644 index 00000000..e57cccb0 --- /dev/null +++ b/wizard/alarm.png diff --git a/wizard/index.php b/wizard/index.php index d1e01074..045cd9fd 100644 --- a/wizard/index.php +++ b/wizard/index.php @@ -8,23 +8,27 @@ <link rel="shortcut icon" href="/favicon.ico" /> </head> <?php -define('FC_EOL', 33); -define('FC_DEV', 37); +define('FC_EOL', 37); +define('FC_DEV', 40); define('EL_EOL', 6); define('EL_DEV', 10); +define('PHP_SEC', '8.1'); define('EPEL_DEV', 2); // 0 missing, 1 partially populated, 2 mostly full define('COUNTER', __DIR__ . "/counter.txt"); $osvers = [ - 'RHEL 9' => ['8.0'], - 'RHEL 8' => ['7.2','7.3', '7.4'], + 'RHEL 9' => ['8.0', '8.1'], + 'RHEL 8' => ['7.4', '8.0'], 'RHEL 7' => '5.4', - 'CentOS 9' => ['8.0'], - 'CentOS 8' => ['7.2','7.3', '7.4'], + 'CentOS 9' => ['8.0', '8.1', '8.2'], + 'CentOS 8' => ['7.4', '8.0', '8.2'], 'CentOS 7' => '5.4', - 'Fedora 36' => '8.1', - 'Fedora 35' => '8.0', - 'Fedora 34' => '7.4', + 'EL 9' => ['8.0', '8.1'], + 'EL 8' => ['7.4', '8.0'], + 'EL 7' => '5.4', + 'Fedora 40' => '8.3', + 'Fedora 39' => '8.2', + 'Fedora 38' => '8.2', ]; $osmin = [ 'RHEL 9' => '7.4', @@ -33,9 +37,12 @@ $osmin = [ 'CentOS 9' => '7.4', 'CentOS 8' => '5.6', 'CentOS 7' => '5.4', - 'Fedora 36' => '7.4', - 'Fedora 35' => '5.6', - 'Fedora 34' => '5.6', + 'EL 9' => '7.4', + 'EL 8' => '5.6', + 'EL 7' => '5.4', + 'Fedora 40' => '7.4', + 'Fedora 39' => '7.4', + 'Fedora 38' => '7.4', ]; $osminbase = [ 'RHEL 9' => '7.4', @@ -44,43 +51,60 @@ $osminbase = [ 'CentOS 9' => '7.4', 'CentOS 8' => '7.2', 'CentOS 7' => '5.4', - 'Fedora 36' => '7.4', - 'Fedora 35' => '7.4', - 'Fedora 34' => '7.4', + 'EL 9' => '7.4', + 'EL 8' => '7.2', + 'EL 7' => '5.4', + 'Fedora 40' => '7.4', + 'Fedora 39' => '7.4', + 'Fedora 38' => '7.4', ]; $osmax = [ - 'RHEL 9' => '8.2', - 'RHEL 8' => '8.2', - 'RHEL 7' => '8.2', - 'CentOS 9' => '8.2', - 'CentOS 8' => '8.2', - 'CentOS 7' => '8.2', - 'Fedora 36' => '8.2', - 'Fedora 35' => '8.2', - 'Fedora 34' => '8.1', + 'RHEL 9' => '8.3', + 'RHEL 8' => '8.3', + 'RHEL 7' => '8.3', + 'CentOS 9' => '8.3', + 'CentOS 8' => '8.3', + 'CentOS 7' => '8.3', + 'EL 9' => '8.3', + 'EL 8' => '8.3', + 'EL 7' => '8.3', + 'Fedora 40' => '8.3', + 'Fedora 39' => '8.3', + 'Fedora 38' => '8.3', ]; $osname = [ ':rhel' => 'Red Hat Enterprise Linux', - 'RHEL 9' => 'RHEL 9.0', - 'RHEL 8' => 'RHEL 8.6', - 'RHEL 7' => 'RHEL 7.9 (maintained until June 2024)', - ':centos' => 'CentOS Stream, CentOS Linux, Alma Linux, Rocky Linux and other clones', - 'CentOS 9' => 'EL 9', - 'CentOS 8' => 'EL 8', - 'CentOS 7' => 'EL 7 (maintained until June 2024)', + 'RHEL 9' => 'RHEL 9.4', // (maintained until May 31, 2032) + 'RHEL 8' => 'RHEL 8.9', // (maintained until May 31, 2029) + 'RHEL 7' => 'RHEL 7.9 (maintained until June 30, 2024)', + ':centos' => 'CentOS Stream, CentOS Linux', + 'CentOS 9' => 'CentOS Stream 9', // (maintained until May 31, 2027) + 'CentOS 8' => 'CentOS Stream 8 (maintained until May 31, 2024)', + 'CentOS 7' => 'CentOS 7 (maintained until June 30, 2024)', + ':clone' => 'Alma Linux, Rocky Linux and other clones', + 'EL 9' => 'EL 9', + 'EL 8' => 'EL 8', + 'EL 7' => 'EL 7 (maintained until June 30, 2024)', ':fedora' => 'Fedora Linux', - 'Fedora 36' => 'Fedora 36', - 'Fedora 35' => 'Fedora 35', - 'Fedora 34' => 'Fedora 34', -// 'Fedora 33' => 'Fedora 33 (End of life since November 2022)', + 'Fedora 40' => 'Fedora 40', + 'Fedora 39' => 'Fedora 39', + 'Fedora 38' => 'Fedora 38 (maintained until May 21, 2024)', +// 'Fedora 37' => 'Fedora 37 (End of Life since Dec 7, 2024)', ]; $types = [ 'base' => 'Default / Single version (simplest way)', 'scl' => 'Multiple versions simultaneously', ]; +$arches = [ + 'x86_64' => 'x86_64', + 'aarch64' => 'aarch64', + 'ppc64le' => 'ppc64le', + 's390x' => 's390x', +]; $phpvers = [ // use false when only SCL - '8.2' => false, + '8.3' => 'remi-php83', + '8.2' => 'remi-php82', '8.1' => 'remi-php81', '8.0' => 'remi-php80', '7.4' => 'remi-php74', @@ -93,14 +117,15 @@ $phpvers = [ '5.4' => 'remi-php54', ]; $phpname = [ - ':devel' => 'Development version, not ready for production', - '8.2' => '8.2.0-dev (GA planed for Nov/Dec 2022)', +// ':devel' => 'Development version, not ready for production', ':stable' => 'Stable versions - usage recommended', - '8.1' => '8.1.6 (active support until November 2023)', - '8.0' => '8.0.19 (active support until November 2022)', + '8.3' => '8.3.7 (active support until December 2025)', + '8.2' => '8.2.19 (active support until December 2024)', ':secure' => 'Security only versions', - '7.4' => '7.4.29 (security only support until November 2022)', + '8.1' => '8.1.28 (security only support until December 2025)', ':eol' => 'Deprecated versions - usage discouraged', + '8.0' => '8.0.30 (no upstream support since November 2023)', + '7.4' => '7.4.33 (no upstream support since November 2022)', '7.3' => '7.3.33 (no upstream support since December 2021)', '7.2' => '7.2.34 (no upstream support since November 2020)', '7.1' => '7.1.33 (no upstream support since December 2019)', @@ -112,6 +137,7 @@ $phpname = [ $php = (isset($_POST['php']) && isset($phpvers[$_POST['php']]) ? $_POST['php'] : false); $os = (isset($_POST['os']) && isset($osvers[$_POST['os']]) ? $_POST['os'] : false); $type = (isset($_POST['type']) && isset($types[$_POST['type']]) ? $_POST['type'] : false); +$arch = (isset($_POST['arch']) && isset($arches[$_POST['arch']]) ? $_POST['arch'] : 'x86_64'); ?> <body> @@ -176,6 +202,13 @@ $type = (isset($_POST['type']) && isset($types[$_POST['type']]) ? $_POST['type' ?> </select> </p></li> + <li><p>Architecture: + <select name='arch' onChange='submit()'> +<?php + foreach($arches as $archref => $name) printf("<option value='%s' %s>%s</option>", $archref, ($archref===$arch ? 'selected' : ''), $name); +?> + </select> + </p></li> </ul> </form> <h2>Wizard answer</h2> @@ -187,15 +220,28 @@ $counter = intval(@file_get_contents(COUNTER)); $err = false; if ($os) { list($dist, $ver) = explode(' ', $os, 2); - if ($ver == 6) { - $days = (int)((mktime(0,0,0,11,30,2020) - time()) / (60 * 60 * 24)); - printf("<li><b>WARNING: %s</b> will reach its <b>end of life</b> in November 2020, in <b>$days days</b>, upgrade is strongly recommended.</li><br />", $os); - } if (($dist == 'Fedora' && $ver<=FC_EOL) || ($dist != 'Fedora' && $ver<=EL_EOL)) { - printf("<li><b>%s</b> has reached its <b>end of life</b>, upgrade is strongly recommended.</li><br />", $os); - } - if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) { - printf("<li><b>WARNING: %s</b> is a <b>development</b> version, not ready for production.</li><br />", $os); + printf("<li><img src='alarm.png'> <b>%s</b> has reached its <b>end of life</b>, upgrade is strongly recommended.</li><br />", $os); + + } else if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) { + printf("<li><img src='notice.png'> <b>WARNING: %s</b> is a <b>development</b> version, not ready for production.</li><br />", $os); + + } else if ($ver == 7 || $ver == 38 || ($dist=="CentOS" && $ver == 8)) { + if ($ver == 38) $days = mktime(0,0,0,5,21,2024); + else if ($ver == 9) $days = mktime(0,0,0,5,31,2027); + else if ($ver == 8) $days = mktime(0,0,0,5,31,2024); + else /* 7 */ $days = mktime(0,0,0,6,30,2024); + $eol = date("F Y", $days); + $days = (int)(($days - time()) / (60 * 60 * 24)); + $weeks = round($days/7); + $months = round($days/30); + if ($months >= 6) { + printf("<li><img src='notice.png'> <b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$months months</b>, upgrade is heartily recommended.</li><br />", $os); + } else if ($weeks >= 8) { + printf("<li><img src='alarm.png'> <b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$weeks weeks</b>, upgrade is strongly recommended.</li><br />", $os); + } else { + printf("<li><img src='alarm.png'> <b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$days days</b>, upgrade is urgently recommended.</li><br />", $os); + } } } if ($php && $os) { @@ -203,10 +249,31 @@ if ($php && $os) { $os, is_array($osvers[$os]) ? implode(', ', $osvers[$os]) : $osvers[$os] ); - if (version_compare($php, '7.4', '<')) { - printf("<li><b>WARNING</b>, PHP version <b>%s</b> have reached its eod of life, despite packages have security fix, you should consider a maintained version.</li><br />", $php); + if (version_compare($php, PHP_SEC, '<')) { + printf("<li><img src='notice.png'> <b>WARNING</b>, PHP version <b>%s</b> have reached its end of life, despite packages have security fixes, you should consider a maintained version.</li><br />", $php); } + // else printf("<li>PHP %s is a maintained version (> %s).</li><br />", $php, PHP_SEC); +} + +if ($arch == 'ppc64le' || $arch == 's390x') { + printf("<li><b>$arch</b> is not planed for now</li><br />"); + $err =true; + +} else if ($arch == 'aarch64') { + if ($os && $dist === 'Fedora') { + if ($ver < 39) { + printf("<li><b>aarch64</b> for Fedora $ver is not planed for now</li><br />"); + $err =true; + } + } else if ($os && $ver < 8) { + printf("<li><b>aarch64</b> for Enterprise Linux $ver is not planed for now</li><br />"); + $err =true; + } else if ($os && $ver == 8) { + // no older SCLs + $osmin['RHEL 8'] = $osmin['CentOS 8'] = '7.2'; + } } + if ($php && $os && $type && !$err) { if ($dist == 'Fedora') { $mod = ($ver >= 29); @@ -222,11 +289,23 @@ if ($php && $os && $type && !$err) { } else { $yum = 'yum'; } + switch ($os) { + case 'RHEL 8': + case 'RHEL 9': + printf("<li>Command to enabled the <b>CRB</b> repository:"); + printf("<pre> subscription-manager repos --enable codeready-builder-for-rhel-%d-%s-rpms</pre></li><br />", $ver, $arch); + break; + case 'CentOS 8': + case 'CentOS 9': + printf("<li>Command to enabled the <b>CRB</b> repository:"); + printf("<pre> dnf config-manager --set-enabled %s</pre></li><br />", $ver < 9 ? 'powertools' : 'crb'); + break; + } if ($ver < EL_DEV || EPEL_DEV > 0) { - printf("<li>Command to install the EPEL repository configuration package:"); + printf("<li>Command to install the <b>EPEL</b> repository configuration package:"); printf("<pre> $yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-%d.noarch.rpm</pre></li><br />", $ver); } - printf("<li>Command to install the Remi repository configuration package:"); + printf("<li>Command to install the <b>Remi</b> repository configuration package:"); printf("<pre> $yum install https://rpms.remirepo.net/enterprise/remi-release-%d.rpm</pre>", $ver); printf("</li><br />"); @@ -281,43 +360,36 @@ if ($php && $os && $type && !$err) { printf("<pre> dnf config-manager --set-enabled remi</pre></li><br />"); } - //if ($dist == 'Fedora' || $yum == 'yum') { - if ($yum == 'yum') { + if ($mod) { + printf("<li>PHP version <b>%s</b> packages are available for <b>%s</b> in <b>remi-modular</b> repository</li><br />", $php, $os); + + printf("<li>You have to enable the module stream for $php, and update the old version if installed:"); + printf("<pre> dnf module switch-to php:remi-%s</pre>", $php); + printf("</li><br />"); + + printf("<li>If no version is installed, command to <b>install</b> the php stream default profile:"); + printf("<pre> dnf module install php:remi-%s</pre>", $php); + printf("</li><br />"); + } else { printf("<li>PHP version <b>%s</b> packages are available for <b>%s</b> in <b>%s</b> repository</li><br />", $php, $os, $repo); printf("<li>Command to enable the repository:"); - } - /* - if ($dist == 'Fedora') { - printf("<pre> dnf config-manager --set-enabled %s</pre></li><br />", $repo); - if ($mod) { - printf("<li>Command to disable the modular repository:"); - printf("<pre> dnf config-manager --set-disabled remi-modular</pre></li><br />"); - printf("<li>Alternatively, you may prefer the modern way, by enabling the module stream for $php:"); - } - } else - */ - if ($yum == 'yum') { // EL-6, 7 + printf("<pre> yum-config-manager --disable 'remi-php*'"); printf( "\n yum-config-manager --enable %s</pre></li><br />", $repo); printf("<li>You can check the list of the enabled repositories:"); printf("<pre> yum repolist</pre></li><br />"); printf("<li>If the <b>priorities</b> plugin is enabled, ensure %s have higher priority (a lower value) than %s</li><br />", $repo, ($dist == 'Fedora' ? 'fedora' : 'base and updates')); - } else { // EL-8, module only - printf("<li>You have to enable the module stream for $php:"); - } - - if ($mod) { - printf("<pre> dnf module reset php"); - printf( "\n dnf module install php:remi-%s</pre>", $php); - printf("</li><br />"); - } - printf("<li>Command to upgrade (the repository only provides PHP):"); - printf("<pre> $yum update</pre>"); - printf("</li><br />"); + printf("<li>If an old version is installed, command to <b>upgrade</b>:"); + printf("<pre> $yum update</pre>"); + printf("</li><br />"); - printf("<li>Command to install <b>additional</b> packages:"); + printf("<li>If no version is installed, command to <b>install</b> the php command:"); + printf("<pre> $yum install php-cli</pre>"); + printf("</li><br />"); + } + printf("<li>Command to install <b>additional</b> packages (xxx for SAPI or extension name):"); printf("<pre> $yum install php-xxx</pre>"); printf("</li><br />"); @@ -341,14 +413,17 @@ if ($php && $os && $type && !$err) { } else { printf("<li>You want <b>multiple versions </b> which means using a <a href='https://www.softwarecollections.org/en/'>Software Collection</a></li><br />"); $scl='php'.str_replace('.', '', $php); + + echo "<li><p><img src='info.png'> <b>Tips</b>: For Software Collection usage read: "; + echo "<a href='https://blog.remirepo.net/post/2022/02/17/My-PHP-Workstation'>My PHP Workstation</a></p><br /></li>"; if (version_compare($php, $osmax[$os], '>')) { - printf("<li>Sorry, but PHP version greater than <b>%s</b> are not available for <b>%s</b>.</li><br />", $osmax[$os], $os); + printf("<li>Sorry, but PHP version greater than <b>%s</b> are not available for <b>%s</b> (%s).</li><br />", $osmax[$os], $os, $arch); } else if (version_compare($php, $osmin[$os], '<')) { - printf("<li>Sorry, but PHP version older than <b>%s</b> are not available for <b>%s</b>.</li><br />", $osmin[$os], $os); + printf("<li>Sorry, but PHP version older than <b>%s</b> are not available for <b>%s</b> (%s).</li><br />", $osmin[$os], $os, $arch); } else { if (!$phpvers[$php]) { - printf("<li><b>WARNING</b>: PHP version <b>%s</b> is a <b>development</b> version, not ready for production.</li><br />", $php); + printf("<li><img src='alarm.png'> <b>WARNING</b>: PHP version <b>%s</b> is a <b>development</b> version, not ready for production.</li><br />", $php); } if ($dist=='Fedora') { $repo = 'remi'; //($phpvers[$php] ? 'remi' : 'remi-test'); // Dev version @@ -391,16 +466,16 @@ if ($php && $os && $type && !$err) { @file_put_contents(COUNTER, "$counter\n"); } } else if (!$os) { - echo "<li><p>Please select the operating system you are running.</p></li>"; - echo "<li><p><b>Tips</b>: check the content of /etc/redhat-release.</p></li>"; + echo "<li><p><img src='question.png'> Please select the operating system you are running.</p></li>"; + echo "<li><p><img src='info.png'> <b>Tips</b>: check the content of /etc/redhat-release.</p></li>"; } else if (!$php) { - echo "<li><p>Please select PHP version you want to use.</p></li>"; - echo "<li><p><b>Tips</b>: read: <a href='https://www.php.net/supported-versions.php'>PHP Supported Versions</a></li>"; + echo "<li><p><img src='question.png'> Please select PHP version you want to use.</p></li>"; + echo "<li><p><img src='info.png'> <b>Tips</b>: read: <a href='https://www.php.net/supported-versions.php'>PHP Supported Versions</a></li>"; } else if (!$err) { - echo "<li><p>Please select installation type</p></li>"; - echo "<li><p><b>Tips</b>: read the <a href='https://blog.remirepo.net/pages/English-FAQ#scl'>FAQ</a></p></li>"; + echo "<li><p><img src='question.png'> Please select installation type</p></li>"; + echo "<li><p><img src='info.png'> <b>Tips</b>: read the <a href='https://blog.remirepo.net/pages/English-FAQ#scl'>FAQ</a></p></li>"; } ?> </ul> @@ -415,8 +490,11 @@ if ($php && $os && $type && !$err) { <li><a href="https://github.com/remicollet/remirepo/issues" class="nlink" title="Bug tracker">Bug tracker</a></li> <li><a href="https://blog.remirepo.net/post/2021/05/20/remirepo-IRC-channel-on-Libera-network" class="nlink" title="IRC channel">IRC channel</a></li> <li><a href='https://twitter.com/RemiRepository'>Repository twitter account</a></li> + <li><a href='https://discord.gg/qwC6kM2dcE'>Discord server</a></li> <li><?php - printf("<b>%d answers</b> given", $counter); + $day = (time() - mktime(0,0,0,12,8,2015)) / 86400; + $rate = $counter / $day; + printf("<b>%d answers</b> given since Dec 2015<br><b>%d answers</b> per day", $counter, $rate); ?></li> </ul><br /><br /><br /> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><div> diff --git a/wizard/info.png b/wizard/info.png Binary files differnew file mode 100644 index 00000000..6f2911d1 --- /dev/null +++ b/wizard/info.png diff --git a/wizard/notice.png b/wizard/notice.png Binary files differnew file mode 100644 index 00000000..44262883 --- /dev/null +++ b/wizard/notice.png diff --git a/wizard/question.png b/wizard/question.png Binary files differnew file mode 100644 index 00000000..69929d0b --- /dev/null +++ b/wizard/question.png |