feat: debian 11 support (#1292)

* Debian 11 Support

Run api ci test on bullseye as well

* Silan does not work for mp3 on bullseye

* Liquisoap does not fail with wma files on bullseye
This commit is contained in:
Jonas L 2021-11-09 10:21:40 +01:00 committed by GitHub
parent 452dd64970
commit 4057c88cf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 77 additions and 49 deletions

View File

@ -145,11 +145,15 @@ jobs:
strategy:
fail-fast: false
matrix:
context: [analyzer, api_client]
context:
- analyzer
- api_client
release:
- bionic
- buster
- bullseye
- bionic
- focal
container: ghcr.io/libretime/libretime-dev:${{ matrix.release }}
defaults:
run:
@ -174,11 +178,14 @@ jobs:
strategy:
fail-fast: false
matrix:
context: [api]
context:
- api
release:
- bionic
- buster
- bullseye
- bionic
- focal
services:
postgres:
image: postgres

9
Vagrantfile vendored
View File

@ -96,6 +96,15 @@ Vagrant.configure('2') do |config|
setup_libretime(os, 'debian.sh')
end
config.vm.define 'debian-bullseye' do |os|
os.vm.box = 'debian/bullseye64'
config.vm.provider 'virtualbox' do |v, override|
override.vm.box = 'bento/debian-11'
end
setup_nfs(config, 4)
setup_libretime(os, 'debian.sh')
end
config.vm.define 'debian-buster' do |os|
os.vm.box = 'debian/buster64'
config.vm.provider 'virtualbox' do |v, override|

View File

@ -19,8 +19,12 @@ def test_analyze(filepath, length, cuein, cueout):
if filepath.endswith("m4a"):
return
# Silan does not work with mp3 on debian buster or Ubuntu Focal
if filepath.endswith("mp3") and distro.codename() in ("buster", "focal"):
# Silan does not work with mp3 on buster, bullseye, focal
if filepath.endswith("mp3") and distro.codename() in (
"buster",
"bullseye",
"focal",
):
return
assert float(metadata["cuein"]) == pytest.approx(cuein, abs=0.5)

View File

@ -30,8 +30,8 @@ def test_analyze_invalid_filepath():
def test_analyze_invalid_wma():
# Liquisoap does not fail with wma files on debian buster or Ubuntu Focal
if distro.codename() in ("buster", "focal"):
# Liquisoap does not fail with wma files on buster, bullseye, focal
if distro.codename() in ("buster", "bullseye", "focal"):
return
with pytest.raises(UnplayableFileError):

View File

@ -1,14 +1,14 @@
# This file contains a list of package dependencies.
[common]
python3 = buster, bionic, focal
python3-pip = buster, bionic, focal
python3-venv = buster, bionic, focal
python3 = buster, bullseye, bionic, focal
python3-pip = buster, bullseye, bionic, focal
python3-venv = buster, bullseye, bionic, focal
[django]
uwsgi = buster, bionic, focal
uwsgi-plugin-python3 = buster, bionic, focal
uwsgi = buster, bullseye, bionic, focal
uwsgi-plugin-python3 = buster, bullseye, bionic, focal
[psycopg2]
# See https://www.psycopg.org/docs/install.html#install-from-source
python3-dev = buster, bionic, focal
libpq-dev = buster, bionic, focal
python3-dev = buster, bullseye, bionic, focal
libpq-dev = buster, bullseye, bionic, focal

View File

@ -92,10 +92,11 @@ With the above instructions LibreTime is installed on Ubuntu Bionic. The Vagrant
offers the option to choose a different operation system according to you needs.
| OS | Command | Comment |
| ------------ | -------------------------- | ----------------------------------------------------------- |
| ------------ | ---------------------------- | ----------------------------------------------------------- |
| Debian 10 | `vagrant up debian-buster` | Install on Debian Buster. |
| Ubuntu 20.04 | `vagrant up ubuntu-focal` | Install on Ubuntu Focal Fossa. |
| Debian 11 | `vagrant up debian-bullseye` | Install on Debian Bullseye. |
| Ubuntu 18.04 | `vagrant up ubuntu-bionic` | Install on Ubuntu Bionic Beaver. |
| Ubuntu 20.04 | `vagrant up ubuntu-focal` | Install on Ubuntu Focal Fossa. |
| CentOS | `vagrant up centos` | CentOS 8 with native systemd support and activated SELinux. |
## Troubleshooting

11
install
View File

@ -647,6 +647,7 @@ fi
# Validate the distribution and release is a supported one; set boolean flags.
is_debian_dist=false
is_debian_buster=false
is_debian_bullseye=false
is_ubuntu_dist=false
is_ubuntu_focal=false
is_ubuntu_bionic=false
@ -685,6 +686,11 @@ case "${dist}-${code}" in
is_debian_dist=true
is_debian_buster=true
;;
debian-11 | debian-bullseye)
code="bullseye"
is_debian_dist=true
is_debian_bullseye=true
;;
#Fix for Raspbian 9 (stretch)
raspbian-9)
echo -e "ERROR: Raspbian Stretch is archived and does not receive any security or other updates since 2020-06-06." >&2
@ -1081,13 +1087,14 @@ loud " * Configuring PHP in Apache * "
loud "-----------------------------------------------------"
# Test common locations for php conf directory
php_conf_dirs=(
"/etc/php/7.4/apache2/conf.d" # Ubuntu Focal
"/etc/php/7.4/apache2/conf.d" # Debian Bullseye, Ubuntu Focal
"/etc/php/7.3/apache2/conf.d" # Debian Buster
"/etc/php/7.2/apache2/conf.d" # Ubuntu Bionic
"/etc/php/7.0/apache2/conf.d" # Ubuntu Xenial
"/etc/php5/apache2/conf.d" # Debian Stretch, Debian Jessie, Ubuntu Trusty
"/etc/php.d" # CentOS 7
)
for php_conf in "${php_conf_dirs[@]}"; do
[[ -d $php_conf ]] && break
done
@ -1106,7 +1113,7 @@ else
fi
# Enable Apache modules
if $is_ubuntu_focal; then
if $is_debian_bullseye || $is_ubuntu_focal; then
loudCmd "a2enmod rewrite php7.4 proxy proxy_http"
elif $is_debian_buster; then
loudCmd "a2enmod rewrite php7.3 proxy proxy_http"

View File

@ -1,10 +1,10 @@
# This file contains a list of package dependencies.
[common]
apache2 = buster, bionic, focal
apache2 = buster, bullseye, bionic, focal
# The php-pear package depends on php-(cli|common|xml), be sure to
# install the dependencies with the right php version.
php-pear = buster, bionic, focal
php-amqplib = buster, bionic, focal
php-pear = buster, bullseye, bionic, focal
php-amqplib = buster, bullseye, bionic, focal
# Bionic
[php7.2]
@ -39,18 +39,18 @@ php7.3-mbstring = buster
php7.3-pgsql = buster
php7.3-xml = buster
# Focal
# Bullseye, Focal
[php7.4]
libapache2-mod-php7.4 = focal
php7.4 = focal
php7.4-apcu = focal
php7.4-apcu-bc = focal
php7.4-bcmath = focal
php7.4-cli = focal
php7.4-common = focal
php7.4-curl = focal
php7.4-dev = focal
php7.4-gd = focal
php7.4-mbstring = focal
php7.4-pgsql = focal
php7.4-xml = focal
libapache2-mod-php7.4 = bullseye, focal
php7.4 = bullseye, focal
php7.4-apcu = bullseye, focal
php7.4-apcu-bc = bullseye, focal
php7.4-bcmath = bullseye, focal
php7.4-cli = bullseye, focal
php7.4-common = bullseye, focal
php7.4-curl = bullseye, focal
php7.4-dev = bullseye, focal
php7.4-gd = bullseye, focal
php7.4-mbstring = bullseye, focal
php7.4-pgsql = bullseye, focal
php7.4-xml = bullseye, focal

View File

@ -1,16 +1,16 @@
# This file contains a list of package dependencies.
[common]
icecast2 = buster, bionic, focal
postgresql = buster, bionic, focal
postgresql-client = buster, bionic, focal
rabbitmq-server = buster, bionic, focal
icecast2 = buster, bullseye, bionic, focal
postgresql = buster, bullseye, bionic, focal
postgresql-client = buster, bullseye, bionic, focal
rabbitmq-server = buster, bullseye, bionic, focal
curl = buster, bionic, focal
curl = buster, bullseye, bionic, focal
# See https://github.com/Libretime/libretime/commits/71ce3082c5e0611f77eb423a15b4b36267ebfda4/installer/lib
unzip = buster, bionic, focal
zip = buster, bionic, focal
unzip = buster, bullseye, bionic, focal
zip = buster, bullseye, bionic, focal
[installer]
lsb-release = buster, bionic, focal
xmlstarlet = buster, bionic, focal
lsb-release = buster, bullseye, bionic, focal
xmlstarlet = buster, bullseye, bionic, focal