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

9
Vagrantfile vendored
View File

@ -96,6 +96,15 @@ Vagrant.configure('2') do |config|
setup_libretime(os, 'debian.sh') setup_libretime(os, 'debian.sh')
end 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| config.vm.define 'debian-buster' do |os|
os.vm.box = 'debian/buster64' os.vm.box = 'debian/buster64'
config.vm.provider 'virtualbox' do |v, override| config.vm.provider 'virtualbox' do |v, override|

View File

@ -19,8 +19,12 @@ def test_analyze(filepath, length, cuein, cueout):
if filepath.endswith("m4a"): if filepath.endswith("m4a"):
return return
# Silan does not work with mp3 on debian buster or Ubuntu Focal # Silan does not work with mp3 on buster, bullseye, focal
if filepath.endswith("mp3") and distro.codename() in ("buster", "focal"): if filepath.endswith("mp3") and distro.codename() in (
"buster",
"bullseye",
"focal",
):
return return
assert float(metadata["cuein"]) == pytest.approx(cuein, abs=0.5) 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(): def test_analyze_invalid_wma():
# Liquisoap does not fail with wma files on debian buster or Ubuntu Focal # Liquisoap does not fail with wma files on buster, bullseye, focal
if distro.codename() in ("buster", "focal"): if distro.codename() in ("buster", "bullseye", "focal"):
return return
with pytest.raises(UnplayableFileError): with pytest.raises(UnplayableFileError):

View File

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

View File

@ -91,12 +91,13 @@ directory.
With the above instructions LibreTime is installed on Ubuntu Bionic. The Vagrant setup With the above instructions LibreTime is installed on Ubuntu Bionic. The Vagrant setup
offers the option to choose a different operation system according to you needs. offers the option to choose a different operation system according to you needs.
| OS | Command | Comment | | OS | Command | Comment |
| ------------ | -------------------------- | ----------------------------------------------------------- | | ------------ | ---------------------------- | ----------------------------------------------------------- |
| Debian 10 | `vagrant up debian-buster` | Install on Debian Buster. | | 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 18.04 | `vagrant up ubuntu-bionic` | Install on Ubuntu Bionic Beaver. |
| CentOS | `vagrant up centos` | CentOS 8 with native systemd support and activated SELinux. | | 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 ## Troubleshooting

11
install
View File

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

View File

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

View File

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