Skip to content

Commit

Permalink
Support Debian 12 (bookworm)
Browse files Browse the repository at this point in the history
  • Loading branch information
hnimminh committed Sep 14, 2024
1 parent 0b8ef8f commit 9438a58
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

i.e. `<Major version>.<Minor version>.<Patch version>`

## [v0.8.0] - 2024-09-14
- Support Debian 12 (bookworm)

## [v0.7.2] - 2024-09-14
- Support call recovery capability (HA) #140
- Support config build as var for kamailio/freeswitch
Expand Down
13 changes: 13 additions & 0 deletions build/ansible/roles/libre/tasks/liberator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,23 @@
- reload logrotate
- restart rsyslog

## BOOKWORM
- name: variable libre_python_binary
set_fact:
libre_python_binary: "{% if ansible_distribution_major_version|int >= 12 %}{{dstdir}}/venv/bin/python3{% else %}/usr/bin/python3{% endif %}"
- name: Update python lib/package for venv
pip:
requirements: "{{dstdir}}/liberator/requirements.txt"
virtualenv: "{{dstdir}}/venv"
virtualenv_command: /usr/bin/python3 -m venv
when: ansible_distribution_major_version|int >= 12
## BOOKWORM

- name: Install specified python requirements
pip:
requirements: "{{dstdir}}/liberator/requirements.txt"
executable: pip3
when: ansible_distribution_major_version|int < 12

- name: Create a directory if it does not exist
file:
Expand Down
9 changes: 8 additions & 1 deletion build/ansible/roles/platform/tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,18 @@
- python3-pip
- python3
- python3-dev
- python-setuptools
- python3-venv
- liblua5.2-dev
- lua5.2
- luarocks
state: latest

- name: Install essential/extend packages
apt:
pkg:
- python-setuptools
state: latest
when: libre_debian_version != "bookworm"

- name: Enable and start chronyd
systemd:
Expand Down
10 changes: 5 additions & 5 deletions liberator/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
requests==2.32.2
fastapi==0.110.3
requests==2.32.3
fastapi==0.114.2
typing==3.7.4.1
pydantic==1.10.15
uvicorn==0.11.7
uvicorn==0.30.6
Jinja2==3.1.4
aiofiles==0.5.0
redis==4.4.4
redis==5.0.8
contextvars==2.4
schedule==0.6.0
redfs==0.0.4rc0
validators==0.18.2
validators==0.34.0
2 changes: 1 addition & 1 deletion liberator/system/systemd/liberator.service
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ User=root
Group=root
EnvironmentFile={{dstdir}}/libre.env
WorkingDirectory={{dstdir}}/liberator
ExecStart=/usr/bin/python3 {{dstdir}}/liberator/main.py
ExecStart={{libre_python_binary}} {{dstdir}}/liberator/main.py

SyslogIdentifier=libresbc
SyslogFacility=5
Expand Down

0 comments on commit 9438a58

Please sign in to comment.