Skip to content

Commit bbd0c4e

Browse files
committed
Update OpenLiteSpeed custom binaries to v2.0.5 static builds
Updates binary checksums and URLs for OpenLiteSpeed custom builds with static linking support. Static-linked binaries provide cross-platform compatibility (Ubuntu 22/24, RHEL 8/9) by embedding libstdc++ and libgcc, eliminating version-specific crashes. Changes: - Updated all SHA256 checksums for static binary builds - Simplified URLs: removed /binaries/ subdirectory path - Added -static suffix to binary filenames - Added conditional module installation (RHEL 8 has no module) - Updated version references from v2.0.4 to v2.0.5 - Enhanced installation messages to indicate static linking Binary checksums (v2.0.5): - Ubuntu static: 89aaf66474e78cb3c1666784e0e7a417550bd317e6ab148201bdc318d36710cb - RHEL 9 static: 90468fb38767505185013024678d9144ae13100d2355097657f58719d98fbbc4 - RHEL 8 static: 6ce688a237615102cc1603ee1999b3cede0ff3482d31e1f65705e92396d34b3a - Ubuntu module: e7734f1e6226c2a0a8e00c1f6534ea9f577df9081b046736a774b1c52c28e7e5 - RHEL 9 module: 127227db81bcbebf80b225fc747b69cfcd4ad2f01cea486aa02d5c9ba6c18109 Benefits: - Cross-platform compatibility across OS versions - Automatic checksum verification for security - Graceful handling of platform-specific limitations - Simplified download URLs for easier maintenance Files modified: - install/installCyberPanel.py - plogical/upgrade.py
1 parent e1eefeb commit bbd0c4e

File tree

2 files changed

+99
-81
lines changed

2 files changed

+99
-81
lines changed

install/installCyberPanel.py

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -326,25 +326,25 @@ def installCustomOLSBinaries(self):
326326
platform = self.detectPlatform()
327327
InstallCyberPanel.stdOut(f"Detected platform: {platform}", 1)
328328

329-
# Platform-specific URLs and checksums (OpenLiteSpeed v1.8.4.1 - v2.0.4)
329+
# Platform-specific URLs and checksums (OpenLiteSpeed v1.8.4.1 - v2.0.5 Static Build)
330330
BINARY_CONFIGS = {
331331
'rhel8': {
332-
'url': 'https://cyberpanel.net/binaries/rhel8/openlitespeed-phpconfig-x86_64-rhel8',
333-
'sha256': 'a6e07671ee1c9bcc7f2d12de9e95139315cf288709fb23bf431eb417299ad4e9',
334-
'module_url': 'https://cyberpanel.net/binaries/rhel8/cyberpanel_ols_x86_64_rhel8.so',
335-
'module_sha256': '1cc71f54d8ae5937d0bd2b2dd27678b47f09f4f7afed2583bbd3493ddd05877f'
332+
'url': 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-rhel8-static',
333+
'sha256': '6ce688a237615102cc1603ee1999b3cede0ff3482d31e1f65705e92396d34b3a',
334+
'module_url': None, # RHEL 8 doesn't have module (use RHEL 9 if needed)
335+
'module_sha256': None
336336
},
337337
'rhel9': {
338-
'url': 'https://cyberpanel.net/binaries/rhel9/openlitespeed-phpconfig-x86_64-rhel9',
339-
'sha256': 'a6e07671ee1c9bcc7f2d12de9e95139315cf288709fb23bf431eb417299ad4e9',
340-
'module_url': 'https://cyberpanel.net/binaries/rhel9/cyberpanel_ols_x86_64_rhel9.so',
341-
'module_sha256': 'b5841fa6863bbd9dbac4017acfa946bd643268d6ca0cf16a0cd2f717cfb30330'
338+
'url': 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-rhel9-static',
339+
'sha256': '90468fb38767505185013024678d9144ae13100d2355097657f58719d98fbbc4',
340+
'module_url': 'https://cyberpanel.net/cyberpanel_ols_x86_64_rhel.so',
341+
'module_sha256': '127227db81bcbebf80b225fc747b69cfcd4ad2f01cea486aa02d5c9ba6c18109'
342342
},
343343
'ubuntu': {
344-
'url': 'https://cyberpanel.net/binaries/ubuntu/openlitespeed-phpconfig-x86_64-ubuntu',
345-
'sha256': 'c6a6b4dddd63a4e4ac9b1b51f6db5bd79230f3219e39397de173518ced198d36',
346-
'module_url': 'https://cyberpanel.net/binaries/ubuntu/cyberpanel_ols_x86_64_ubuntu.so',
347-
'module_sha256': 'd070952fcfe27fac2f2c95db9ae31252071bade2cdcff19cf3b3f7812fa9413a'
344+
'url': 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-ubuntu-static',
345+
'sha256': '89aaf66474e78cb3c1666784e0e7a417550bd317e6ab148201bdc318d36710cb',
346+
'module_url': 'https://cyberpanel.net/cyberpanel_ols_x86_64_ubuntu.so',
347+
'module_sha256': 'e7734f1e6226c2a0a8e00c1f6534ea9f577df9081b046736a774b1c52c28e7e5'
348348
}
349349
}
350350

@@ -386,11 +386,16 @@ def installCustomOLSBinaries(self):
386386
InstallCyberPanel.stdOut("Continuing with standard OLS", 1)
387387
return True # Not fatal, continue with standard OLS
388388

389-
# Download module with checksum verification
390-
if not self.downloadCustomBinary(MODULE_URL, tmp_module, MODULE_SHA256):
391-
InstallCyberPanel.stdOut("ERROR: Failed to download or verify module", 1)
392-
InstallCyberPanel.stdOut("Continuing with standard OLS", 1)
393-
return True # Not fatal, continue with standard OLS
389+
# Download module with checksum verification (if available)
390+
module_downloaded = False
391+
if MODULE_URL and MODULE_SHA256:
392+
if not self.downloadCustomBinary(MODULE_URL, tmp_module, MODULE_SHA256):
393+
InstallCyberPanel.stdOut("ERROR: Failed to download or verify module", 1)
394+
InstallCyberPanel.stdOut("Continuing with standard OLS", 1)
395+
return True # Not fatal, continue with standard OLS
396+
module_downloaded = True
397+
else:
398+
InstallCyberPanel.stdOut("Note: No CyberPanel module for this platform", 1)
394399

395400
# Install OpenLiteSpeed binary
396401
InstallCyberPanel.stdOut("Installing custom binaries...", 1)
@@ -404,31 +409,35 @@ def installCustomOLSBinaries(self):
404409
logging.InstallLog.writeToFile(str(e) + " [installCustomOLSBinaries - binary install]")
405410
return False
406411

407-
# Install module
408-
try:
409-
os.makedirs(os.path.dirname(MODULE_PATH), exist_ok=True)
410-
shutil.move(tmp_module, MODULE_PATH)
411-
os.chmod(MODULE_PATH, 0o644)
412-
InstallCyberPanel.stdOut("Installed CyberPanel module", 1)
413-
except Exception as e:
414-
InstallCyberPanel.stdOut(f"ERROR: Failed to install module: {e}", 1)
415-
logging.InstallLog.writeToFile(str(e) + " [installCustomOLSBinaries - module install]")
416-
return False
412+
# Install module (if downloaded)
413+
if module_downloaded:
414+
try:
415+
os.makedirs(os.path.dirname(MODULE_PATH), exist_ok=True)
416+
shutil.move(tmp_module, MODULE_PATH)
417+
os.chmod(MODULE_PATH, 0o644)
418+
InstallCyberPanel.stdOut("Installed CyberPanel module", 1)
419+
except Exception as e:
420+
InstallCyberPanel.stdOut(f"ERROR: Failed to install module: {e}", 1)
421+
logging.InstallLog.writeToFile(str(e) + " [installCustomOLSBinaries - module install]")
422+
return False
417423

418424
# Verify installation
419-
if os.path.exists(OLS_BINARY_PATH) and os.path.exists(MODULE_PATH):
420-
InstallCyberPanel.stdOut("=" * 50, 1)
421-
InstallCyberPanel.stdOut("Custom Binaries Installed Successfully", 1)
422-
InstallCyberPanel.stdOut("Features enabled:", 1)
423-
InstallCyberPanel.stdOut(" - Apache-style .htaccess support", 1)
424-
InstallCyberPanel.stdOut(" - php_value/php_flag directives", 1)
425-
InstallCyberPanel.stdOut(" - Enhanced header control", 1)
426-
InstallCyberPanel.stdOut(f"Backup: {backup_dir}", 1)
427-
InstallCyberPanel.stdOut("=" * 50, 1)
428-
return True
429-
else:
430-
InstallCyberPanel.stdOut("ERROR: Installation verification failed", 1)
431-
return False
425+
if os.path.exists(OLS_BINARY_PATH):
426+
if not module_downloaded or os.path.exists(MODULE_PATH):
427+
InstallCyberPanel.stdOut("=" * 50, 1)
428+
InstallCyberPanel.stdOut("Custom Binaries Installed Successfully", 1)
429+
InstallCyberPanel.stdOut("Features enabled:", 1)
430+
InstallCyberPanel.stdOut(" - Static-linked cross-platform binary", 1)
431+
if module_downloaded:
432+
InstallCyberPanel.stdOut(" - Apache-style .htaccess support", 1)
433+
InstallCyberPanel.stdOut(" - php_value/php_flag directives", 1)
434+
InstallCyberPanel.stdOut(" - Enhanced header control", 1)
435+
InstallCyberPanel.stdOut(f"Backup: {backup_dir}", 1)
436+
InstallCyberPanel.stdOut("=" * 50, 1)
437+
return True
438+
439+
InstallCyberPanel.stdOut("ERROR: Installation verification failed", 1)
440+
return False
432441

433442
except Exception as msg:
434443
logging.InstallLog.writeToFile(str(msg) + " [installCustomOLSBinaries]")

plogical/upgrade.py

Lines changed: 49 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -733,25 +733,25 @@ def installCustomOLSBinaries():
733733
platform = Upgrade.detectPlatform()
734734
Upgrade.stdOut(f"Detected platform: {platform}", 0)
735735

736-
# Platform-specific URLs and checksums (OpenLiteSpeed v1.8.4.1 - v2.0.4)
736+
# Platform-specific URLs and checksums (OpenLiteSpeed v1.8.4.1 - v2.0.5 Static Build)
737737
BINARY_CONFIGS = {
738738
'rhel8': {
739-
'url': 'https://cyberpanel.net/binaries/rhel8/openlitespeed-phpconfig-x86_64-rhel8',
740-
'sha256': 'a6e07671ee1c9bcc7f2d12de9e95139315cf288709fb23bf431eb417299ad4e9',
741-
'module_url': 'https://cyberpanel.net/binaries/rhel8/cyberpanel_ols_x86_64_rhel8.so',
742-
'module_sha256': '1cc71f54d8ae5937d0bd2b2dd27678b47f09f4f7afed2583bbd3493ddd05877f'
739+
'url': 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-rhel8-static',
740+
'sha256': '6ce688a237615102cc1603ee1999b3cede0ff3482d31e1f65705e92396d34b3a',
741+
'module_url': None, # RHEL 8 doesn't have module (use RHEL 9 if needed)
742+
'module_sha256': None
743743
},
744744
'rhel9': {
745-
'url': 'https://cyberpanel.net/binaries/rhel9/openlitespeed-phpconfig-x86_64-rhel9',
746-
'sha256': 'a6e07671ee1c9bcc7f2d12de9e95139315cf288709fb23bf431eb417299ad4e9',
747-
'module_url': 'https://cyberpanel.net/binaries/rhel9/cyberpanel_ols_x86_64_rhel9.so',
748-
'module_sha256': 'b5841fa6863bbd9dbac4017acfa946bd643268d6ca0cf16a0cd2f717cfb30330'
745+
'url': 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-rhel9-static',
746+
'sha256': '90468fb38767505185013024678d9144ae13100d2355097657f58719d98fbbc4',
747+
'module_url': 'https://cyberpanel.net/cyberpanel_ols_x86_64_rhel.so',
748+
'module_sha256': '127227db81bcbebf80b225fc747b69cfcd4ad2f01cea486aa02d5c9ba6c18109'
749749
},
750750
'ubuntu': {
751-
'url': 'https://cyberpanel.net/binaries/ubuntu/openlitespeed-phpconfig-x86_64-ubuntu',
752-
'sha256': 'c6a6b4dddd63a4e4ac9b1b51f6db5bd79230f3219e39397de173518ced198d36',
753-
'module_url': 'https://cyberpanel.net/binaries/ubuntu/cyberpanel_ols_x86_64_ubuntu.so',
754-
'module_sha256': 'd070952fcfe27fac2f2c95db9ae31252071bade2cdcff19cf3b3f7812fa9413a'
751+
'url': 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-ubuntu-static',
752+
'sha256': '89aaf66474e78cb3c1666784e0e7a417550bd317e6ab148201bdc318d36710cb',
753+
'module_url': 'https://cyberpanel.net/cyberpanel_ols_x86_64_ubuntu.so',
754+
'module_sha256': 'e7734f1e6226c2a0a8e00c1f6534ea9f577df9081b046736a774b1c52c28e7e5'
755755
}
756756
}
757757

@@ -793,11 +793,16 @@ def installCustomOLSBinaries():
793793
Upgrade.stdOut("Continuing with standard OLS", 0)
794794
return True # Not fatal, continue with standard OLS
795795

796-
# Download module with checksum verification
797-
if not Upgrade.downloadCustomBinary(MODULE_URL, tmp_module, MODULE_SHA256):
798-
Upgrade.stdOut("ERROR: Failed to download or verify module", 0)
799-
Upgrade.stdOut("Continuing with standard OLS", 0)
800-
return True # Not fatal, continue with standard OLS
796+
# Download module with checksum verification (if available)
797+
module_downloaded = False
798+
if MODULE_URL and MODULE_SHA256:
799+
if not Upgrade.downloadCustomBinary(MODULE_URL, tmp_module, MODULE_SHA256):
800+
Upgrade.stdOut("ERROR: Failed to download or verify module", 0)
801+
Upgrade.stdOut("Continuing with standard OLS", 0)
802+
return True # Not fatal, continue with standard OLS
803+
module_downloaded = True
804+
else:
805+
Upgrade.stdOut("Note: No CyberPanel module for this platform", 0)
801806

802807
# Install OpenLiteSpeed binary
803808
Upgrade.stdOut("Installing custom binaries...", 0)
@@ -810,30 +815,34 @@ def installCustomOLSBinaries():
810815
Upgrade.stdOut(f"ERROR: Failed to install binary: {e}", 0)
811816
return False
812817

813-
# Install module
814-
try:
815-
os.makedirs(os.path.dirname(MODULE_PATH), exist_ok=True)
816-
shutil.move(tmp_module, MODULE_PATH)
817-
os.chmod(MODULE_PATH, 0o644)
818-
Upgrade.stdOut("Installed CyberPanel module", 0)
819-
except Exception as e:
820-
Upgrade.stdOut(f"ERROR: Failed to install module: {e}", 0)
821-
return False
818+
# Install module (if downloaded)
819+
if module_downloaded:
820+
try:
821+
os.makedirs(os.path.dirname(MODULE_PATH), exist_ok=True)
822+
shutil.move(tmp_module, MODULE_PATH)
823+
os.chmod(MODULE_PATH, 0o644)
824+
Upgrade.stdOut("Installed CyberPanel module", 0)
825+
except Exception as e:
826+
Upgrade.stdOut(f"ERROR: Failed to install module: {e}", 0)
827+
return False
822828

823829
# Verify installation
824-
if os.path.exists(OLS_BINARY_PATH) and os.path.exists(MODULE_PATH):
825-
Upgrade.stdOut("=" * 50, 0)
826-
Upgrade.stdOut("Custom Binaries Installed Successfully", 0)
827-
Upgrade.stdOut("Features enabled:", 0)
828-
Upgrade.stdOut(" - Apache-style .htaccess support", 0)
829-
Upgrade.stdOut(" - php_value/php_flag directives", 0)
830-
Upgrade.stdOut(" - Enhanced header control", 0)
831-
Upgrade.stdOut(f"Backup: {backup_dir}", 0)
832-
Upgrade.stdOut("=" * 50, 0)
833-
return True
834-
else:
835-
Upgrade.stdOut("ERROR: Installation verification failed", 0)
836-
return False
830+
if os.path.exists(OLS_BINARY_PATH):
831+
if not module_downloaded or os.path.exists(MODULE_PATH):
832+
Upgrade.stdOut("=" * 50, 0)
833+
Upgrade.stdOut("Custom Binaries Installed Successfully", 0)
834+
Upgrade.stdOut("Features enabled:", 0)
835+
Upgrade.stdOut(" - Static-linked cross-platform binary", 0)
836+
if module_downloaded:
837+
Upgrade.stdOut(" - Apache-style .htaccess support", 0)
838+
Upgrade.stdOut(" - php_value/php_flag directives", 0)
839+
Upgrade.stdOut(" - Enhanced header control", 0)
840+
Upgrade.stdOut(f"Backup: {backup_dir}", 0)
841+
Upgrade.stdOut("=" * 50, 0)
842+
return True
843+
844+
Upgrade.stdOut("ERROR: Installation verification failed", 0)
845+
return False
837846

838847
except Exception as msg:
839848
Upgrade.stdOut(f"ERROR: {msg} [installCustomOLSBinaries]", 0)

0 commit comments

Comments
 (0)