fix(tools): handle flat repositories in setup_deb822_repo

Flat repositories (where suite is './' or an absolute path) must not
include a Components line in deb822 format. APT rejects sources files
with 'absolute Suite Component' when Components is specified for flat repos.

This fixes UrBackup Server installation on Debian 13 which uses the
OpenSUSE Build Service flat repository format.

Closes #9958
This commit is contained in:
CanbiZ
2025-12-15 16:57:25 +01:00
parent 126b0c339a
commit cd3f41239c

View File

@ -1249,7 +1249,10 @@ setup_deb822_repo() {
echo "Types: deb"
echo "URIs: $repo_url"
echo "Suites: $suite"
echo "Components: $component"
# Flat repositories (suite="./" or absolute path) must not have Components
if [[ "$suite" != "./" && -n "$component" ]]; then
echo "Components: $component"
fi
[[ -n "$architectures" ]] && echo "Architectures: $architectures"
echo "Signed-By: /etc/apt/keyrings/${name}.gpg"
} >/etc/apt/sources.list.d/${name}.sources