Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
354895e0e8 fix(isponsorblocktv): detect CPU capabilities to select compatible binary
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
2026-05-23 22:49:31 +02:00
4 changed files with 10 additions and 15 deletions

View File

@@ -42,13 +42,6 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball"
local required_ruby current_ruby
required_ruby=$(grep -m1 '^ruby ' /opt/docuseal/Gemfile | grep -oP '[0-9]+\.[0-9]+\.[0-9]+')
current_ruby=$(PATH="/root/.rbenv/bin:/root/.rbenv/shims:${PATH}" rbenv global 2>/dev/null || true)
if [[ -n "$required_ruby" && "$required_ruby" != "$current_ruby" ]]; then
RUBY_VERSION="${required_ruby}" RUBY_INSTALL_RAILS="false" HOME=/root setup_ruby
fi
msg_info "Restoring Data" msg_info "Restoring Data"
mv /opt/docuseal.env.bak /opt/docuseal/.env mv /opt/docuseal.env.bak /opt/docuseal/.env
[[ -d /opt/docuseal_data.bak ]] && mv /opt/docuseal_data.bak /opt/docuseal/data [[ -d /opt/docuseal_data.bak ]] && mv /opt/docuseal_data.bak /opt/docuseal/data

View File

@@ -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

View File

@@ -31,6 +31,7 @@ $STD apt install -y \
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
RUBY_VERSION="4.0.1" RUBY_INSTALL_RAILS="false" HOME=/root setup_ruby
PG_VERSION="17" setup_postgresql PG_VERSION="17" setup_postgresql
PG_DB_NAME="docuseal" PG_DB_USER="docuseal" setup_postgresql_db PG_DB_NAME="docuseal" PG_DB_USER="docuseal" setup_postgresql_db
@@ -55,9 +56,6 @@ msg_ok "Downloaded Fonts and PDFium"
fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball" fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball"
RUBY_VERSION=$(grep -m1 '^ruby ' /opt/docuseal/Gemfile | grep -oP '[0-9]+\.[0-9]+\.[0-9]+')
RUBY_VERSION="${RUBY_VERSION}" RUBY_INSTALL_RAILS="false" HOME=/root setup_ruby
msg_info "Downloading Field Detection Model" msg_info "Downloading Field Detection Model"
mkdir -p /opt/docuseal/tmp mkdir -p /opt/docuseal/tmp
curl -fsSL -o /opt/docuseal/tmp/model.onnx \ curl -fsSL -o /opt/docuseal/tmp/model.onnx \

View File

@@ -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