parent
26bcb6a90d
commit
448cff7600
|
@ -53,7 +53,6 @@ jobs:
|
||||||
release:
|
release:
|
||||||
- buster
|
- buster
|
||||||
- bullseye
|
- bullseye
|
||||||
- bionic
|
|
||||||
- focal
|
- focal
|
||||||
- jammy
|
- jammy
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ jobs:
|
||||||
release:
|
release:
|
||||||
- buster
|
- buster
|
||||||
- bullseye
|
- bullseye
|
||||||
- bionic
|
|
||||||
- focal
|
- focal
|
||||||
- jammy
|
- jammy
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,6 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- distribution: ubuntu
|
|
||||||
release: bionic
|
|
||||||
- distribution: ubuntu
|
- distribution: ubuntu
|
||||||
release: focal
|
release: focal
|
||||||
- distribution: ubuntu
|
- distribution: ubuntu
|
||||||
|
@ -59,7 +57,7 @@ jobs:
|
||||||
COPY packages.list packages.list
|
COPY packages.list packages.list
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
[[ "${{ matrix.release }}" =~ "bionic|focal" ]] && \
|
[[ "${{ matrix.release }}" =~ "focal" ]] && \
|
||||||
cat <<EOF >> Dockerfile
|
cat <<EOF >> Dockerfile
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get --quiet update && \
|
RUN DEBIAN_FRONTEND=noninteractive apt-get --quiet update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get --quiet install -y software-properties-common && \
|
DEBIAN_FRONTEND=noninteractive apt-get --quiet install -y software-properties-common && \
|
||||||
|
|
|
@ -26,7 +26,6 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- php-version: "7.2" # Bionic
|
|
||||||
- php-version: "7.3" # Buster
|
- php-version: "7.3" # Buster
|
||||||
- php-version: "7.4" # Bullseye, Focal
|
- php-version: "7.4" # Bullseye, Focal
|
||||||
|
|
||||||
|
@ -46,7 +45,6 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- php-version: "7.2" # Bionic
|
|
||||||
- php-version: "7.3" # Buster
|
- php-version: "7.3" # Buster
|
||||||
- php-version: "7.4" # Bullseye, Focal
|
- php-version: "7.4" # Bullseye, Focal
|
||||||
|
|
||||||
|
|
|
@ -99,12 +99,6 @@ Vagrant.configure('2') do |config|
|
||||||
setup_libretime(os, "debian.sh")
|
setup_libretime(os, "debian.sh")
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define 'bionic' do |os|
|
|
||||||
os.vm.box = 'bento/ubuntu-18.04'
|
|
||||||
setup_nfs(config)
|
|
||||||
setup_libretime(os, 'debian.sh')
|
|
||||||
end
|
|
||||||
|
|
||||||
config.vm.define 'bullseye' do |os|
|
config.vm.define 'bullseye' do |os|
|
||||||
os.vm.box = 'debian/bullseye64'
|
os.vm.box = 'debian/bullseye64'
|
||||||
config.vm.provider 'virtualbox' do |v, override|
|
config.vm.provider 'virtualbox' do |v, override|
|
||||||
|
|
|
@ -94,9 +94,8 @@ def compute_silences(filepath: Path) -> List[Tuple[float, float]]:
|
||||||
end = float(match.group(2))
|
end = float(match.group(2))
|
||||||
ends.append(end)
|
ends.append(end)
|
||||||
|
|
||||||
# ffmpeg v3 (bionic) does not warn about silence end when the track ends.
|
# If one end is missing, set the last silence ending to infinity, and
|
||||||
# Set the last silence ending to infinity, and clamp it to the track duration before
|
# clamp it to the track duration before using this value.
|
||||||
# using this value.
|
|
||||||
if len(starts) - 1 == len(ends):
|
if len(starts) - 1 == len(ends):
|
||||||
ends.append(inf)
|
ends.append(inf)
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,17 @@
|
||||||
# This file contains a list of package dependencies.
|
# This file contains a list of package dependencies.
|
||||||
[python]
|
[python]
|
||||||
python3 = buster, bullseye, bookworm, bionic, focal, jammy
|
python3 = buster, bullseye, bookworm, focal, jammy
|
||||||
python3-pip = buster, bullseye, bookworm, bionic, focal, jammy
|
python3-pip = buster, bullseye, bookworm, focal, jammy
|
||||||
python3-pika = buster, bullseye, bookworm, bionic, focal, jammy
|
python3-pika = buster, bullseye, bookworm, focal, jammy
|
||||||
|
|
||||||
[liquidsoap]
|
[liquidsoap]
|
||||||
# https://github.com/savonet/liquidsoap/blob/main/CHANGES.md
|
# https://github.com/savonet/liquidsoap/blob/main/CHANGES.md
|
||||||
liquidsoap-plugin-alsa = bionic
|
liquidsoap = buster, bullseye, bookworm, focal, jammy
|
||||||
liquidsoap-plugin-ao = bionic
|
|
||||||
liquidsoap-plugin-ogg = bionic
|
|
||||||
liquidsoap-plugin-portaudio = bionic
|
|
||||||
# Already recommended packages in bionic
|
|
||||||
# See `apt show liquidsoap`
|
|
||||||
; liquidsoap-plugin-faad = bionic
|
|
||||||
; liquidsoap-plugin-flac = bionic
|
|
||||||
; liquidsoap-plugin-icecast = bionic
|
|
||||||
; liquidsoap-plugin-lame = bionic
|
|
||||||
; liquidsoap-plugin-mad = bionic
|
|
||||||
; liquidsoap-plugin-pulseaudio = bionic
|
|
||||||
; liquidsoap-plugin-taglib = bionic
|
|
||||||
; liquidsoap-plugin-voaacenc = bionic
|
|
||||||
; liquidsoap-plugin-vorbis = bionic
|
|
||||||
liquidsoap = buster, bullseye, bookworm, bionic, focal, jammy
|
|
||||||
|
|
||||||
[ffmpeg]
|
[ffmpeg]
|
||||||
# Detect duration, silences and replaygain
|
# Detect duration, silences and replaygain
|
||||||
ffmpeg = buster, bullseye, bookworm, bionic, focal, jammy
|
ffmpeg = buster, bullseye, bookworm, focal, jammy
|
||||||
|
|
||||||
[=development]
|
[=development]
|
||||||
# Generate fixtures
|
# Generate fixtures
|
||||||
ffmpeg = buster, bullseye, bookworm, bionic, focal, jammy
|
ffmpeg = buster, bullseye, bookworm, focal, jammy
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import distro
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from libretime_analyzer.pipeline.analyze_cuepoint import analyze_cuepoint
|
from libretime_analyzer.pipeline.analyze_cuepoint import analyze_cuepoint
|
||||||
|
@ -18,10 +17,6 @@ from ..fixtures import FILES
|
||||||
def test_analyze_cuepoint(filepath, length, cuein, cueout):
|
def test_analyze_cuepoint(filepath, length, cuein, cueout):
|
||||||
metadata = analyze_cuepoint(filepath, {})
|
metadata = analyze_cuepoint(filepath, {})
|
||||||
|
|
||||||
# On bionic, large file duration is a wrong.
|
|
||||||
if distro.codename() == "bionic" and str(filepath).endswith("s1-large.flac"):
|
|
||||||
return
|
|
||||||
|
|
||||||
assert metadata["length_seconds"] == pytest.approx(length, abs=0.1)
|
assert metadata["length_seconds"] == pytest.approx(length, abs=0.1)
|
||||||
assert float(metadata["cuein"]) == pytest.approx(float(cuein), abs=1)
|
assert float(metadata["cuein"]) == pytest.approx(float(cuein), abs=1)
|
||||||
assert float(metadata["cueout"]) == pytest.approx(float(cueout), abs=1)
|
assert float(metadata["cueout"]) == pytest.approx(float(cueout), abs=1)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import distro
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from libretime_analyzer.pipeline.analyze_metadata import analyze_metadata
|
from libretime_analyzer.pipeline.analyze_metadata import analyze_metadata
|
||||||
|
@ -28,12 +27,6 @@ def test_analyze_metadata(filepath: Path, metadata: dict):
|
||||||
del metadata["length"]
|
del metadata["length"]
|
||||||
del found["length"]
|
del found["length"]
|
||||||
|
|
||||||
# Mutagen <1.46 computes a wrong bit_rate for wav files, this version
|
|
||||||
# of mutagen is only installed on bionic (python <3.7)
|
|
||||||
if filepath.suffix == ".wav" and distro.codename() == "bionic":
|
|
||||||
del metadata["bit_rate"]
|
|
||||||
del found["bit_rate"]
|
|
||||||
|
|
||||||
# mp3,ogg,flac files does not support comments yet
|
# mp3,ogg,flac files does not support comments yet
|
||||||
if not filepath.suffix == ".m4a":
|
if not filepath.suffix == ".m4a":
|
||||||
if "comment" in metadata:
|
if "comment" in metadata:
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import distro
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from libretime_analyzer.pipeline.analyze_replaygain import analyze_replaygain
|
from libretime_analyzer.pipeline.analyze_replaygain import analyze_replaygain
|
||||||
|
@ -13,10 +12,5 @@ from ..fixtures import FILES
|
||||||
def test_analyze_replaygain(filepath, replaygain):
|
def test_analyze_replaygain(filepath, replaygain):
|
||||||
tolerance = 0.8
|
tolerance = 0.8
|
||||||
|
|
||||||
# On bionic, replaygain is a bit higher for loud mp3 files.
|
|
||||||
# This huge tolerance makes the test pass, with values devianting from ~-17 to ~-13
|
|
||||||
if distro.codename() == "bionic" and str(filepath).endswith("+12.mp3"):
|
|
||||||
tolerance = 5
|
|
||||||
|
|
||||||
metadata = analyze_replaygain(filepath, {})
|
metadata = analyze_replaygain(filepath, {})
|
||||||
assert metadata["replay_gain"] == pytest.approx(replaygain, abs=tolerance)
|
assert metadata["replay_gain"] == pytest.approx(replaygain, abs=tolerance)
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
from math import inf
|
|
||||||
|
|
||||||
import distro
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from libretime_analyzer.pipeline._ffmpeg import (
|
from libretime_analyzer.pipeline._ffmpeg import (
|
||||||
|
@ -30,11 +27,6 @@ def test_probe_replaygain(filepath, replaygain):
|
||||||
def test_compute_replaygain(filepath, replaygain):
|
def test_compute_replaygain(filepath, replaygain):
|
||||||
tolerance = 0.8
|
tolerance = 0.8
|
||||||
|
|
||||||
# On bionic, replaygain is a bit higher for loud mp3 files.
|
|
||||||
# This huge tolerance makes the test pass, with values devianting from ~-17 to ~-13
|
|
||||||
if distro.codename() == "bionic" and str(filepath).endswith("+12.mp3"):
|
|
||||||
tolerance = 5
|
|
||||||
|
|
||||||
assert compute_replaygain(filepath) == pytest.approx(replaygain, abs=tolerance)
|
assert compute_replaygain(filepath) == pytest.approx(replaygain, abs=tolerance)
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,10 +78,6 @@ def test_silence_detect_re(line, expected):
|
||||||
def test_compute_silences(filepath, length, cuein, cueout):
|
def test_compute_silences(filepath, length, cuein, cueout):
|
||||||
result = compute_silences(filepath)
|
result = compute_silences(filepath)
|
||||||
|
|
||||||
# On bionic, large file duration is a wrong.
|
|
||||||
if distro.codename() == "bionic" and str(filepath).endswith("s1-large.flac"):
|
|
||||||
return
|
|
||||||
|
|
||||||
if cuein != 0.0:
|
if cuein != 0.0:
|
||||||
assert len(result) > 0
|
assert len(result) > 0
|
||||||
first = result.pop(0)
|
first = result.pop(0)
|
||||||
|
@ -97,11 +85,6 @@ def test_compute_silences(filepath, length, cuein, cueout):
|
||||||
assert first[1] == pytest.approx(cuein, abs=1)
|
assert first[1] == pytest.approx(cuein, abs=1)
|
||||||
|
|
||||||
if cueout != length:
|
if cueout != length:
|
||||||
# ffmpeg v3 (bionic) does not warn about silence end when the track ends.
|
|
||||||
# Check for infinity on last silence ending
|
|
||||||
if distro.codename() == "bionic":
|
|
||||||
length = inf
|
|
||||||
|
|
||||||
assert len(result) > 0
|
assert len(result) > 0
|
||||||
last = result.pop()
|
last = result.pop()
|
||||||
assert last[0] == pytest.approx(cueout, abs=1)
|
assert last[0] == pytest.approx(cueout, abs=1)
|
||||||
|
@ -113,8 +96,4 @@ def test_compute_silences(filepath, length, cuein, cueout):
|
||||||
map(lambda i: pytest.param(i.path, i.length, id=i.path.name), FILES),
|
map(lambda i: pytest.param(i.path, i.length, id=i.path.name), FILES),
|
||||||
)
|
)
|
||||||
def test_probe_duration(filepath, length):
|
def test_probe_duration(filepath, length):
|
||||||
# On bionic, large file duration is a wrong.
|
|
||||||
if distro.codename() == "bionic" and str(filepath).endswith("s1-large.flac"):
|
|
||||||
return
|
|
||||||
|
|
||||||
assert probe_duration(filepath) == pytest.approx(length, abs=0.05)
|
assert probe_duration(filepath) == pytest.approx(length, abs=0.05)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# This file contains a list of package dependencies.
|
# This file contains a list of package dependencies.
|
||||||
[python]
|
[python]
|
||||||
python3 = buster, bullseye, bionic, focal
|
python3 = buster, bullseye, focal
|
||||||
python3-pip = buster, bullseye, bionic, focal
|
python3-pip = buster, bullseye, focal
|
||||||
gunicorn = buster, bullseye, focal
|
gunicorn = buster, bullseye, focal
|
||||||
python3-gunicorn = buster, bullseye, focal
|
python3-gunicorn = buster, bullseye, focal
|
||||||
python3-uvicorn = buster, bullseye, focal
|
python3-uvicorn = buster, bullseye, focal
|
||||||
|
@ -10,6 +10,6 @@ python3-uvloop = buster, bullseye, 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
|
||||||
build-essential = buster, bullseye, bionic, focal
|
build-essential = buster, bullseye, focal
|
||||||
python3-dev = buster, bullseye, bionic, focal
|
python3-dev = buster, bullseye, focal
|
||||||
libpq-dev = buster, bullseye, bionic, focal
|
libpq-dev = buster, bullseye, focal
|
||||||
|
|
|
@ -39,8 +39,8 @@ This is fixed by stopping virtualbox and re-creating the vagrant box:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo systemctl stop virtualbox
|
sudo systemctl stop virtualbox
|
||||||
vagrant destroy bionic
|
vagrant destroy focal
|
||||||
vagrant up bionic --provider=libvirt
|
vagrant up focal --provider=libvirt
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
@ -59,9 +59,9 @@ sudo usermod -aG libvirt $USER
|
||||||
2. Reboot your computer, and then run
|
2. Reboot your computer, and then run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
vagrant box add bento/ubuntu-18.04 --provider=virtualbox
|
vagrant box add bento/ubuntu-20.04 --provider=virtualbox
|
||||||
vagrant mutate bento/ubuntu-18.04 libvirt
|
vagrant mutate bento/ubuntu-20.04 libvirt
|
||||||
vagrant up bionic --provider=libvirt
|
vagrant up focal --provider=libvirt
|
||||||
```
|
```
|
||||||
|
|
||||||
On other distributions, you will need to install [libvirt](https://libvirt.org/) and `vagrant-mutate` and then run
|
On other distributions, you will need to install [libvirt](https://libvirt.org/) and `vagrant-mutate` and then run
|
||||||
|
@ -73,9 +73,9 @@ sudo usermod -a -G libvirt $USER
|
||||||
# Reboot
|
# Reboot
|
||||||
|
|
||||||
vagrant plugin install vagrant-mutate
|
vagrant plugin install vagrant-mutate
|
||||||
vagrant box fetch bento/ubuntu-18.04
|
vagrant box fetch bento/ubuntu-20.04
|
||||||
vagrant mutate bento/ubuntu-18.04 libvirt
|
vagrant mutate bento/ubuntu-20.04 libvirt
|
||||||
vagrant up bionic --provider=libvirt
|
vagrant up focal --provider=libvirt
|
||||||
```
|
```
|
||||||
|
|
||||||
### Starting LibreTime Vagrant
|
### Starting LibreTime Vagrant
|
||||||
|
@ -87,27 +87,26 @@ change the default provider if you have multiple installed. This can be done by
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/libretime/libretime
|
git clone https://github.com/libretime/libretime
|
||||||
cd libretime
|
cd libretime
|
||||||
vagrant up bionic
|
vagrant up focal
|
||||||
```
|
```
|
||||||
|
|
||||||
If everything works out, you will find LibreTime on [port 8080](http://localhost:8080)
|
If everything works out, you will find LibreTime on [port 8080](http://localhost:8080)
|
||||||
and Icecast on [port 8000](http://localhost:8000).
|
and Icecast on [port 8000](http://localhost:8000).
|
||||||
|
|
||||||
Once you reach the web setup GUI you can click through it using the default values. To
|
Once you reach the web setup GUI you can click through it using the default values. To
|
||||||
connect to the vagrant machine you can run `vagrant ssh bionic` in the libretime
|
connect to the vagrant machine you can run `vagrant ssh focal` in the libretime
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
### Alternative OS installations
|
### Alternative OS installations
|
||||||
|
|
||||||
With the above instructions LibreTime is installed on Ubuntu Bionic. The Vagrant setup
|
With the above instructions LibreTime is installed on Ubuntu Focal. 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 buster` | Install on Debian Buster. |
|
| Debian 10 | `vagrant up buster` | Install on Debian Buster. |
|
||||||
| Debian 11 | `vagrant up bullseye` | Install on Debian Bullseye. |
|
| Debian 11 | `vagrant up bullseye` | Install on Debian Bullseye. |
|
||||||
| Ubuntu 18.04 | `vagrant up bionic` | Install on Ubuntu Bionic Beaver. |
|
| Ubuntu 20.04 | `vagrant up focal` | Install on Ubuntu Focal Fossa. |
|
||||||
| Ubuntu 20.04 | `vagrant up focal` | Install on Ubuntu Focal Fossa. |
|
|
||||||
|
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
|
@ -125,7 +124,7 @@ Similar to Docker, Multipass works through a CLI. To use, clone this repo and th
|
||||||
```
|
```
|
||||||
git clone https://github.com/libretime/libretime
|
git clone https://github.com/libretime/libretime
|
||||||
cd libretime
|
cd libretime
|
||||||
multipass launch bionic -n ltTEST --cloud-init cloud-init.yaml
|
multipass launch focal -n ltTEST --cloud-init cloud-init.yaml
|
||||||
multipass shell ltTEST
|
multipass shell ltTEST
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
49
install
49
install
|
@ -268,11 +268,6 @@ install_service() {
|
||||||
|
|
||||||
[[ -f "$service_src" ]] || error "service '$service_name' src path '$service_src' does not exists!"
|
[[ -f "$service_src" ]] || error "service '$service_name' src path '$service_src' does not exists!"
|
||||||
|
|
||||||
# TODO: Remove when Bionic support is dropped
|
|
||||||
if [[ $distro == "bionic" ]]; then
|
|
||||||
mkdir -p "$SERVICE_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
template_file "$service_src" "$service_dest" \
|
template_file "$service_src" "$service_dest" \
|
||||||
sed \
|
sed \
|
||||||
-e "s|^User=.*|User=${LIBRETIME_USER}|" \
|
-e "s|^User=.*|User=${LIBRETIME_USER}|" \
|
||||||
|
@ -283,13 +278,6 @@ install_service() {
|
||||||
-e "s|@@LOG_DIR@@|${LOG_DIR}|g" \
|
-e "s|@@LOG_DIR@@|${LOG_DIR}|g" \
|
||||||
-e "s|@@WORKING_DIR@@|${WORKING_DIR}|g"
|
-e "s|@@WORKING_DIR@@|${WORKING_DIR}|g"
|
||||||
|
|
||||||
# TODO: Remove when Bionic support is dropped
|
|
||||||
if [[ $distro == "bionic" ]]; then
|
|
||||||
for feature in ProtectClock ProtectHostname ProtectKernelLogs ProtectProc; do
|
|
||||||
sed -i -e "s|^${feature}=|#${feature}=|" "$service_dest"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod 0644 "$service_dest"
|
chmod 0644 "$service_dest"
|
||||||
chown root:root "$service_dest"
|
chown root:root "$service_dest"
|
||||||
systemctl enable "$service_name"
|
systemctl enable "$service_name"
|
||||||
|
@ -319,12 +307,12 @@ check_distribution() {
|
||||||
case "$ID-$VERSION_ID" in
|
case "$ID-$VERSION_ID" in
|
||||||
debian-10) is_debian=true && distro="buster" ;;
|
debian-10) is_debian=true && distro="buster" ;;
|
||||||
debian-11) is_debian=true && distro="bullseye" ;;
|
debian-11) is_debian=true && distro="bullseye" ;;
|
||||||
ubuntu-18.04) is_ubuntu=true && distro="bionic" ;;
|
|
||||||
ubuntu-20.04) is_ubuntu=true && distro="focal" ;;
|
ubuntu-20.04) is_ubuntu=true && distro="focal" ;;
|
||||||
*)
|
*)
|
||||||
error << "EOF"
|
error << "EOF"
|
||||||
could not determine supported distribution "$ID-$VERSION_ID"!
|
could not determine supported distribution "$ID-$VERSION_ID"!
|
||||||
|
|
||||||
|
Support for installing LibreTime on Bionic has dropped since 3.1.0.
|
||||||
Support for installing LibreTime on Xenial has dropped since 3.0.0-alpha.10.
|
Support for installing LibreTime on Xenial has dropped since 3.0.0-alpha.10.
|
||||||
Support for installing LibreTime on Stretch has dropped since 3.0.0-alpha.10.
|
Support for installing LibreTime on Stretch has dropped since 3.0.0-alpha.10.
|
||||||
Support for installing LibreTime on Jessie has dropped since 3.0.0-alpha.8.
|
Support for installing LibreTime on Jessie has dropped since 3.0.0-alpha.8.
|
||||||
|
@ -433,9 +421,7 @@ if $LIBRETIME_SETUP_POSTGRESQL; then
|
||||||
install_packages postgresql postgresql-client
|
install_packages postgresql postgresql-client
|
||||||
|
|
||||||
if $is_first_install; then
|
if $is_first_install; then
|
||||||
# TODO: Swap lines when Bionic support is dropped
|
if ! sudo -u postgres psql --csv --tuples-only --command='\du' | grep -qw "^$LIBRETIME_POSTGRESQL_USER"; then
|
||||||
# if ! sudo -u postgres psql --csv --tuples-only --command='\du' | grep -qw "^$LIBRETIME_POSTGRESQL_USER"; then
|
|
||||||
if ! sudo -u postgres psql --tuples-only --command='\du' | grep -qw "$LIBRETIME_POSTGRESQL_USER"; then
|
|
||||||
info "creating PostgreSQL user '$LIBRETIME_POSTGRESQL_USER'"
|
info "creating PostgreSQL user '$LIBRETIME_POSTGRESQL_USER'"
|
||||||
sudo -u postgres createuser "$LIBRETIME_POSTGRESQL_USER"
|
sudo -u postgres createuser "$LIBRETIME_POSTGRESQL_USER"
|
||||||
sudo -u postgres psql -c "ALTER ROLE $LIBRETIME_POSTGRESQL_USER WITH PASSWORD '$LIBRETIME_POSTGRESQL_PASSWORD';"
|
sudo -u postgres psql -c "ALTER ROLE $LIBRETIME_POSTGRESQL_USER WITH PASSWORD '$LIBRETIME_POSTGRESQL_PASSWORD';"
|
||||||
|
@ -446,9 +432,7 @@ if $LIBRETIME_SETUP_POSTGRESQL; then
|
||||||
warning "PostgreSQL user '$LIBRETIME_POSTGRESQL_USER' already exists!"
|
warning "PostgreSQL user '$LIBRETIME_POSTGRESQL_USER' already exists!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: Swap lines when Bionic support is dropped
|
if ! sudo -u postgres psql --csv --tuples-only --list | grep -qw "^$LIBRETIME_POSTGRESQL_DATABASE"; then
|
||||||
# if ! sudo -u postgres psql --csv --tuples-only --list | grep -qw "^$LIBRETIME_POSTGRESQL_DATABASE"; then
|
|
||||||
if ! sudo -u postgres psql --tuples-only --list | grep -qw "$LIBRETIME_POSTGRESQL_DATABASE"; then
|
|
||||||
info "creating PostgreSQL database '$LIBRETIME_POSTGRESQL_DATABASE' with owner '$LIBRETIME_POSTGRESQL_USER'"
|
info "creating PostgreSQL database '$LIBRETIME_POSTGRESQL_DATABASE' with owner '$LIBRETIME_POSTGRESQL_USER'"
|
||||||
sudo -u postgres createdb --template=template0 --encoding=UTF-8 --owner="$LIBRETIME_POSTGRESQL_USER" "$LIBRETIME_POSTGRESQL_DATABASE"
|
sudo -u postgres createdb --template=template0 --encoding=UTF-8 --owner="$LIBRETIME_POSTGRESQL_USER" "$LIBRETIME_POSTGRESQL_DATABASE"
|
||||||
|
|
||||||
|
@ -474,9 +458,7 @@ if $LIBRETIME_SETUP_RABBITMQ; then
|
||||||
install_packages rabbitmq-server
|
install_packages rabbitmq-server
|
||||||
|
|
||||||
if $is_first_install; then
|
if $is_first_install; then
|
||||||
# TODO: Swap lines when Bionic support is dropped
|
if ! rabbitmqctl --quiet list_users | grep -qw "^$LIBRETIME_RABBITMQ_USER"; then
|
||||||
# if ! rabbitmqctl --quiet list_users | grep -qw "^$LIBRETIME_RABBITMQ_USER"; then
|
|
||||||
if ! rabbitmqctl -q list_users | grep -qw "^$LIBRETIME_RABBITMQ_USER"; then
|
|
||||||
info "creating RabbitMQ user '$LIBRETIME_RABBITMQ_USER'"
|
info "creating RabbitMQ user '$LIBRETIME_RABBITMQ_USER'"
|
||||||
rabbitmqctl add_user "$LIBRETIME_RABBITMQ_USER" "$LIBRETIME_RABBITMQ_PASSWORD"
|
rabbitmqctl add_user "$LIBRETIME_RABBITMQ_USER" "$LIBRETIME_RABBITMQ_PASSWORD"
|
||||||
|
|
||||||
|
@ -486,9 +468,7 @@ if $LIBRETIME_SETUP_RABBITMQ; then
|
||||||
warning "RabbitMQ user '$LIBRETIME_RABBITMQ_USER' already exists!"
|
warning "RabbitMQ user '$LIBRETIME_RABBITMQ_USER' already exists!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: Swap lines when Bionic support is dropped
|
if ! rabbitmqctl --quiet list_vhosts | grep -qw "^$LIBRETIME_RABBITMQ_VHOST"; then
|
||||||
# if ! rabbitmqctl --quiet list_vhosts | grep -qw "^$LIBRETIME_RABBITMQ_VHOST"; then
|
|
||||||
if ! rabbitmqctl -q list_vhosts | grep -qw "^$LIBRETIME_RABBITMQ_VHOST"; then
|
|
||||||
info "creating RabbitMQ vhost '$LIBRETIME_RABBITMQ_VHOST' with owner '$LIBRETIME_RABBITMQ_USER'"
|
info "creating RabbitMQ vhost '$LIBRETIME_RABBITMQ_VHOST' with owner '$LIBRETIME_RABBITMQ_USER'"
|
||||||
rabbitmqctl add_vhost "$LIBRETIME_RABBITMQ_VHOST"
|
rabbitmqctl add_vhost "$LIBRETIME_RABBITMQ_VHOST"
|
||||||
rabbitmqctl set_permissions -p "$LIBRETIME_RABBITMQ_VHOST" "$LIBRETIME_RABBITMQ_USER" '.*' '.*' '.*'
|
rabbitmqctl set_permissions -p "$LIBRETIME_RABBITMQ_VHOST" "$LIBRETIME_RABBITMQ_USER" '.*' '.*' '.*'
|
||||||
|
@ -515,11 +495,6 @@ if $LIBRETIME_SETUP_ICECAST; then
|
||||||
install_packages icecast2
|
install_packages icecast2
|
||||||
systemctl enable icecast2
|
systemctl enable icecast2
|
||||||
|
|
||||||
# TODO: Remove when Bionic support is dropped
|
|
||||||
if [[ $distro == "bionic" ]]; then
|
|
||||||
sed --in-place -e "s|^ENABLE=.*$|ENABLE=true|" /etc/default/icecast2
|
|
||||||
fi
|
|
||||||
|
|
||||||
systemctl start icecast2
|
systemctl start icecast2
|
||||||
|
|
||||||
if $is_first_install; then
|
if $is_first_install; then
|
||||||
|
@ -568,15 +543,6 @@ section "API"
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
install_packages $(list_packages "$SCRIPT_DIR/api")
|
install_packages $(list_packages "$SCRIPT_DIR/api")
|
||||||
|
|
||||||
# TODO: Remove when Bionic support is dropped
|
|
||||||
if [[ $distro == "bionic" ]]; then
|
|
||||||
info "installing gunicorn"
|
|
||||||
$PIP install \
|
|
||||||
'gunicorn' \
|
|
||||||
'uvicorn>=0.16.0,<0.17'
|
|
||||||
ln -sf /usr/local/bin/gunicorn /usr/bin/gunicorn
|
|
||||||
fi
|
|
||||||
|
|
||||||
install_python_app "$SCRIPT_DIR/api[prod]"
|
install_python_app "$SCRIPT_DIR/api[prod]"
|
||||||
|
|
||||||
install_service "libretime-api.service" "$SCRIPT_DIR/api/install/systemd/libretime-api.service"
|
install_service "libretime-api.service" "$SCRIPT_DIR/api/install/systemd/libretime-api.service"
|
||||||
|
@ -629,11 +595,6 @@ install_python_app "$SCRIPT_DIR/worker"
|
||||||
info "creating libretime-worker working directory"
|
info "creating libretime-worker working directory"
|
||||||
mkdir_and_chown "$LIBRETIME_USER" "$WORKING_DIR/worker"
|
mkdir_and_chown "$LIBRETIME_USER" "$WORKING_DIR/worker"
|
||||||
|
|
||||||
# TODO: Remove when Bionic support is dropped
|
|
||||||
if [[ $distro == "bionic" ]]; then
|
|
||||||
ln -sf /bin/sh /usr/bin/sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
install_service "libretime-worker.service" "$SCRIPT_DIR/worker/install/systemd/libretime-worker.service"
|
install_service "libretime-worker.service" "$SCRIPT_DIR/worker/install/systemd/libretime-worker.service"
|
||||||
|
|
||||||
# Install Legacy
|
# Install Legacy
|
||||||
|
|
|
@ -2,40 +2,21 @@
|
||||||
[common]
|
[common]
|
||||||
# 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, bullseye, bionic, focal
|
php-pear = buster, bullseye, focal
|
||||||
php-amqplib = buster, bullseye, bionic, focal
|
php-amqplib = buster, bullseye, focal
|
||||||
|
|
||||||
[locale]
|
[locale]
|
||||||
gettext = buster, bullseye, bionic, focal
|
gettext = buster, bullseye, focal
|
||||||
|
|
||||||
# [apache]
|
# [apache]
|
||||||
# apache2 = buster, bullseye, bionic, focal
|
# apache2 = buster, bullseye, focal
|
||||||
# libapache2-mod-php7.2 = bionic
|
|
||||||
# libapache2-mod-php7.3 = buster
|
# libapache2-mod-php7.3 = buster
|
||||||
# libapache2-mod-php7.4 = bullseye, focal
|
# libapache2-mod-php7.4 = bullseye, focal
|
||||||
|
|
||||||
[php-fpm]
|
[php-fpm]
|
||||||
php7.2-fpm = bionic
|
|
||||||
php7.3-fpm = buster
|
php7.3-fpm = buster
|
||||||
php7.4-fpm = bullseye, focal
|
php7.4-fpm = bullseye, focal
|
||||||
|
|
||||||
# Bionic
|
|
||||||
[php7.2]
|
|
||||||
php7.2 = bionic
|
|
||||||
php7.2-apcu = bionic
|
|
||||||
# Bionic does not have php7.2-apcu-bc, use php-apcu-bc instead
|
|
||||||
php-apcu-bc = bionic # php7.2-apcu-bc = bionic
|
|
||||||
php7.2-bcmath = bionic
|
|
||||||
php7.2-cli = bionic
|
|
||||||
php7.2-common = bionic
|
|
||||||
php7.2-curl = bionic
|
|
||||||
php7.2-dev = bionic
|
|
||||||
php7.2-gd = bionic
|
|
||||||
php7.2-mbstring = bionic
|
|
||||||
php7.2-pgsql = bionic
|
|
||||||
php7.2-xml = bionic
|
|
||||||
php7.2-yaml = bionic
|
|
||||||
|
|
||||||
# Buster
|
# Buster
|
||||||
[php7.3]
|
[php7.3]
|
||||||
php7.3 = buster
|
php7.3 = buster
|
||||||
|
|
|
@ -1,32 +1,17 @@
|
||||||
# This file contains a list of package dependencies.
|
# This file contains a list of package dependencies.
|
||||||
[python]
|
[python]
|
||||||
python3 = buster, bullseye, bookworm, bionic, focal, jammy
|
python3 = buster, bullseye, bookworm, focal, jammy
|
||||||
python3-pip = buster, bullseye, bookworm, bionic, focal, jammy
|
python3-pip = buster, bullseye, bookworm, focal, jammy
|
||||||
python3-lxml = bullseye, bookworm, focal, jammy
|
python3-lxml = bullseye, bookworm, focal, jammy
|
||||||
|
|
||||||
[liquidsoap]
|
[liquidsoap]
|
||||||
# https://github.com/savonet/liquidsoap/blob/main/CHANGES.md
|
# https://github.com/savonet/liquidsoap/blob/main/CHANGES.md
|
||||||
liquidsoap-plugin-alsa = bionic
|
liquidsoap = buster, bullseye, bookworm, focal, jammy
|
||||||
liquidsoap-plugin-ao = bionic
|
|
||||||
liquidsoap-plugin-ogg = bionic
|
|
||||||
liquidsoap-plugin-portaudio = bionic
|
|
||||||
# Already recommended packages in bionic
|
|
||||||
# See `apt show liquidsoap`
|
|
||||||
; liquidsoap-plugin-faad = bionic
|
|
||||||
; liquidsoap-plugin-flac = bionic
|
|
||||||
; liquidsoap-plugin-icecast = bionic
|
|
||||||
; liquidsoap-plugin-lame = bionic
|
|
||||||
; liquidsoap-plugin-mad = bionic
|
|
||||||
; liquidsoap-plugin-pulseaudio = bionic
|
|
||||||
; liquidsoap-plugin-taglib = bionic
|
|
||||||
; liquidsoap-plugin-voaacenc = bionic
|
|
||||||
; liquidsoap-plugin-vorbis = bionic
|
|
||||||
liquidsoap = buster, bullseye, bookworm, bionic, focal, jammy
|
|
||||||
|
|
||||||
[recorder]
|
[recorder]
|
||||||
ecasound = buster, bullseye, bookworm, bionic, focal, jammy
|
ecasound = buster, bullseye, bookworm, focal, jammy
|
||||||
|
|
||||||
[misc]
|
[misc]
|
||||||
# Used by pypofetch to check if a file is open.
|
# Used by pypofetch to check if a file is open.
|
||||||
# TODO: consider using a python library
|
# TODO: consider using a python library
|
||||||
lsof = buster, bullseye, bookworm, bionic, focal, jammy
|
lsof = buster, bullseye, bookworm, focal, jammy
|
||||||
|
|
|
@ -62,7 +62,7 @@ def liq_conn_fixture(request, tmp_path_factory):
|
||||||
logger.debug(liq_script)
|
logger.debug(liq_script)
|
||||||
entrypoint.write_text(liq_script)
|
entrypoint.write_text(liq_script)
|
||||||
|
|
||||||
# The --verbose flag seem to hang when testing on bionic in CI
|
# The --verbose flag seem to hang when testing in CI
|
||||||
with Popen(
|
with Popen(
|
||||||
("liquidsoap", "--debug", str(entrypoint)),
|
("liquidsoap", "--debug", str(entrypoint)),
|
||||||
stdout=PIPE,
|
stdout=PIPE,
|
||||||
|
|
|
@ -28,7 +28,6 @@ def test_parse_liquidsoap_version(version, expected):
|
||||||
@pytest.mark.skipif(getenv("CI") != "true", reason="requires liquidsoap")
|
@pytest.mark.skipif(getenv("CI") != "true", reason="requires liquidsoap")
|
||||||
def test_get_liquidsoap_version():
|
def test_get_liquidsoap_version():
|
||||||
LIQUIDSOAP_VERSION_MAP = {
|
LIQUIDSOAP_VERSION_MAP = {
|
||||||
"bionic": (1, 1, 1),
|
|
||||||
"buster": (1, 3, 3),
|
"buster": (1, 3, 3),
|
||||||
"focal": (1, 4, 1),
|
"focal": (1, 4, 1),
|
||||||
"bullseye": (1, 4, 3),
|
"bullseye": (1, 4, 3),
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# This file contains a list of package dependencies.
|
# This file contains a list of package dependencies.
|
||||||
[tzdata]
|
[tzdata]
|
||||||
tzdata = buster, bullseye, bookworm, bionic, focal, jammy
|
tzdata = buster, bullseye, bookworm, focal, jammy
|
||||||
|
|
|
@ -8,7 +8,7 @@ from typing import Iterator, List, Optional, Set
|
||||||
|
|
||||||
DEFAULT_PACKAGES_FILENAME = "packages.ini"
|
DEFAULT_PACKAGES_FILENAME = "packages.ini"
|
||||||
FORMATS = ("list", "line")
|
FORMATS = ("list", "line")
|
||||||
DISTRIBUTIONS = ("buster", "bullseye", "bookworm", "bionic", "focal", "jammy")
|
DISTRIBUTIONS = ("buster", "bullseye", "bookworm", "focal", "jammy")
|
||||||
|
|
||||||
SETTINGS_SECTION = "=settings"
|
SETTINGS_SECTION = "=settings"
|
||||||
DEVELOPMENT_SECTION = "=development"
|
DEVELOPMENT_SECTION = "=development"
|
||||||
|
|
|
@ -6,24 +6,24 @@ PACKAGE_INI = """
|
||||||
[common]
|
[common]
|
||||||
postgresql = buster, focal
|
postgresql = buster, focal
|
||||||
# Some comment
|
# Some comment
|
||||||
curl = buster, bionic
|
curl = buster, bullseye
|
||||||
|
|
||||||
[legacy]
|
[legacy]
|
||||||
some-package = bionic, focal
|
some-package = bullseye, focal
|
||||||
|
|
||||||
[=development]
|
[=development]
|
||||||
ffmpeg = buster, bionic, focal
|
ffmpeg = buster, bullseye, focal
|
||||||
"""
|
"""
|
||||||
|
|
||||||
result_buster = {"curl", "postgresql"}
|
result_buster = {"curl", "postgresql"}
|
||||||
result_bionic = {"some-package", "curl", "ffmpeg"}
|
result_bullseye = {"some-package", "curl", "ffmpeg"}
|
||||||
result_focal = {"postgresql", "some-package", "ffmpeg"}
|
result_focal = {"postgresql", "some-package", "ffmpeg"}
|
||||||
result_exclude = {"postgresql", "ffmpeg"}
|
result_exclude = {"postgresql", "ffmpeg"}
|
||||||
|
|
||||||
|
|
||||||
def test_load_packages():
|
def test_load_packages():
|
||||||
assert load_packages(PACKAGE_INI, "buster", False) == result_buster
|
assert load_packages(PACKAGE_INI, "buster", False) == result_buster
|
||||||
assert load_packages(PACKAGE_INI, "bionic", True) == result_bionic
|
assert load_packages(PACKAGE_INI, "bullseye", True) == result_bullseye
|
||||||
assert load_packages(PACKAGE_INI, "focal", True) == result_focal
|
assert load_packages(PACKAGE_INI, "focal", True) == result_focal
|
||||||
assert load_packages(PACKAGE_INI, "focal", True, ["legacy"]) == result_exclude
|
assert load_packages(PACKAGE_INI, "focal", True, ["legacy"]) == result_exclude
|
||||||
|
|
||||||
|
@ -33,5 +33,5 @@ def test_list_packages(tmp_path: Path) -> None:
|
||||||
package_file.write_text(PACKAGE_INI)
|
package_file.write_text(PACKAGE_INI)
|
||||||
|
|
||||||
assert list_packages([tmp_path, package_file], "buster", False) == result_buster
|
assert list_packages([tmp_path, package_file], "buster", False) == result_buster
|
||||||
assert list_packages([tmp_path, package_file], "bionic", True) == result_bionic
|
assert list_packages([tmp_path, package_file], "bullseye", True) == result_bullseye
|
||||||
assert list_packages([tmp_path, package_file], "focal", True) == result_focal
|
assert list_packages([tmp_path, package_file], "focal", True) == result_focal
|
||||||
|
|
Loading…
Reference in New Issue