mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-25 10:04:43 +00:00
fix(isponsorblocktv): detect CPU capabilities to select compatible binary (#14677)
Instead of hard-failing when AVX is not present, detect whether the host CPU supports AVX + AVX2 + MOVBE (x86-64-v3 microarchitecture level) and select the appropriate upstream binary accordingly: - iSponsorBlockTV-x86_64-linux → modern CPUs (AVX/AVX2/MOVBE) - iSponsorBlockTV-x86_64-linux-v1 → any x86_64 CPU (fallback) The same detection logic is applied in update_script() so updates stay consistent with the initially installed binary type. Fixes: https://github.com/community-scripts/ProxmoxVE/issues/14660 Upstream: dmunozv04/iSponsorBlockTV#463
This commit is contained in:
committed by
GitHub
parent
639dc9efc4
commit
7cfa47d138
@@ -36,7 +36,11 @@ function update_script() {
|
|||||||
systemctl stop isponsorblocktv
|
systemctl stop isponsorblocktv
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-x86_64-linux"
|
ISBTV_BINARY="iSponsorBlockTV-x86_64-linux-v1"
|
||||||
|
if grep -q ' avx ' /proc/cpuinfo 2>/dev/null && grep -q ' avx2 ' /proc/cpuinfo 2>/dev/null && grep -q ' movbe ' /proc/cpuinfo 2>/dev/null; then
|
||||||
|
ISBTV_BINARY="iSponsorBlockTV-x86_64-linux"
|
||||||
|
fi
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "${ISBTV_BINARY}"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
systemctl start isponsorblocktv
|
systemctl start isponsorblocktv
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
if ! grep -q ' avx ' /proc/cpuinfo 2>/dev/null; then
|
ISBTV_BINARY="iSponsorBlockTV-x86_64-linux-v1"
|
||||||
msg_error "CPU does not support AVX instructions (required by iSponsorBlockTV/PyApp)"
|
if grep -q ' avx ' /proc/cpuinfo 2>/dev/null && grep -q ' avx2 ' /proc/cpuinfo 2>/dev/null && grep -q ' movbe ' /proc/cpuinfo 2>/dev/null; then
|
||||||
exit 106
|
ISBTV_BINARY="iSponsorBlockTV-x86_64-linux"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-x86_64-linux"
|
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "${ISBTV_BINARY}"
|
||||||
|
|
||||||
msg_info "Setting up iSponsorBlockTV"
|
msg_info "Setting up iSponsorBlockTV"
|
||||||
install -d /var/lib/isponsorblocktv
|
install -d /var/lib/isponsorblocktv
|
||||||
|
|||||||
Reference in New Issue
Block a user