Skip to content

Commit 909dbc2

Browse files
Bump bazarr to Debian 13 (#8677)
* Bump bazarr to Debian 13 - Removes unnecessary python3 install - Use uv to create proper 3.12 venv (bazarr will give warnings about 3.13) * Improve bazarr update - setup_uv now versioned - graceful update from pre-venv install * chore: cosmetic --------- Co-authored-by: Tobias <[email protected]>
1 parent 3a1f1bf commit 909dbc2

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

ct/bazarr.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
1111
var_ram="${var_ram:-1024}"
1212
var_disk="${var_disk:-4}"
1313
var_os="${var_os:-debian}"
14-
var_version="${var_version:-12}"
14+
var_version="${var_version:-13}"
1515
var_unprivileged="${var_unprivileged:-1}"
1616

1717
header_info "$APP"
@@ -28,15 +28,28 @@ function update_script() {
2828
exit
2929
fi
3030
if check_for_gh_release "bazarr" "morpheus65535/bazarr"; then
31-
PYTHON_VERSION="3.13" setup_uv
31+
msg_info "Stopping Service"
32+
systemctl stop bazarr
33+
msg_ok "Stopped Service"
34+
35+
PYTHON_VERSION="3.12" setup_uv
3236
fetch_and_deploy_gh_release "bazarr" "morpheus65535/bazarr" "prebuild" "latest" "/opt/bazarr" "bazarr.zip"
3337

3438
msg_info "Setup Bazarr"
3539
mkdir -p /var/lib/bazarr/
3640
chmod 775 /opt/bazarr /var/lib/bazarr/
41+
if [[ ! -d /opt/bazarr/venv/ ]]; then
42+
$STD uv venv /opt/bazarr/venv --python 3.12
43+
sed -i "s|ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py|ExecStart=/opt/bazarr/venv/bin/python3 /opt/bazarr/bazarr.py|g" /etc/systemd/system/bazarr.service
44+
systemctl daemon-reload
45+
fi
3746
sed -i.bak 's/--only-binary=Pillow//g' /opt/bazarr/requirements.txt
38-
$STD uv pip install -r /opt/bazarr/requirements.txt --system
47+
$STD uv pip install -r /opt/bazarr/requirements.txt --python /opt/bazarr/venv/bin/python3
3948
msg_ok "Setup Bazarr"
49+
50+
msg_info "Starting Service"
51+
systemctl start bazarr
52+
msg_ok "Started Service"
4053
msg_ok "Updated Successfully"
4154
fi
4255
exit

frontend/public/json/bazarr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"ram": 1024,
2424
"hdd": 4,
2525
"os": "debian",
26-
"version": "12"
26+
"version": "13"
2727
}
2828
}
2929
],

install/bazarr-install.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,15 @@ setting_up_container
1313
network_check
1414
update_os
1515

16-
msg_info "Setup Python3"
17-
$STD apt-get install -y \
18-
python3 \
19-
python3-dev
20-
msg_ok "Setup Python3"
21-
22-
PYTHON_VERSION="3.13" setup_uv
16+
PYTHON_VERSION="3.12" setup_uv
2317
fetch_and_deploy_gh_release "bazarr" "morpheus65535/bazarr" "prebuild" "latest" "/opt/bazarr" "bazarr.zip"
2418

2519
msg_info "Installing Bazarr"
2620
mkdir -p /var/lib/bazarr/
2721
chmod 775 /opt/bazarr /var/lib/bazarr/
2822
sed -i.bak 's/--only-binary=Pillow//g' /opt/bazarr/requirements.txt
29-
$STD uv pip install -r /opt/bazarr/requirements.txt --system
23+
$STD uv venv /opt/bazarr/venv --python 3.12
24+
$STD uv pip install -r /opt/bazarr/requirements.txt --python /opt/bazarr/venv/bin/python3
3025
msg_ok "Installed Bazarr"
3126

3227
msg_info "Creating Service"
@@ -41,7 +36,7 @@ UMask=0002
4136
Restart=on-failure
4237
RestartSec=5
4338
Type=simple
44-
ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py
39+
ExecStart=/opt/bazarr/venv/bin/python3 /opt/bazarr/bazarr.py
4540
KillSignal=SIGINT
4641
TimeoutStopSec=20
4742
SyslogIdentifier=bazarr

0 commit comments

Comments
 (0)