Skip to content

Commit

Permalink
Merge pull request #82 from suvanbanerjee/zorinos_support
Browse files Browse the repository at this point in the history
Zorinos support
  • Loading branch information
goldyfruit authored May 11, 2024
2 parents 40e895f + 65c564a commit 3058478
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Then follow the instructions display on screen.
| Rocky Linux | `>=8` |
| Ubuntu | `>=20.04` |
| WSL2 | `N/A` |
| Zorin OS | `>= 16` |

## Update

Expand Down
3 changes: 2 additions & 1 deletion ansible/roles/ovos_installer/tasks/sound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
_distribution_version: "{{ '99' if ansible_distribution == 'Debian' and ansible_distribution_version == 'n/a' else ansible_distribution_version }}"
ansible.builtin.package:
name:
- "{{ 'pipewire-alsa' if ansible_distribution != 'Linux Mint' else 'pipewire' }}"
- "{{ 'pipewire-alsa' if ansible_distribution not in ['Linux Mint', 'Zorin OS'] else 'pipewire' }}"
- alsa-utils
register: _pipewire_install
when:
Expand Down Expand Up @@ -46,6 +46,7 @@
- ansible_os_family != "Suse"
- ansible_os_family != "Archlinux"
- ansible_distribution != "Linux Mint"
- ansible_distribution != "Zorin OS"

- name: Enable lingering for {{ ovos_installer_user }}
ansible.builtin.file:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/ovos_installer/tasks/virtualenv/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- qtvirtualkeyboard-plugin
- libqt5multimedia5
- libqt5virtualkeyboard5
when: ansible_os_family == "Debian"
when: ansible_os_family in ['Debian', 'Zorin OS']

- name: Install package requirements for ovos-gui
ansible.builtin.dnf:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/ovos_installer/tasks/virtualenv/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- portaudio19-dev
install_recommends: false
state: "{{ ovos_installer_uninstall }}"
when: ansible_os_family == "Debian"
when: ansible_os_family in ['Debian', 'Zorin OS']

- name: Handle virtualenv package requirements (ovos/hivemind)
ansible.builtin.dnf:
Expand Down
18 changes: 18 additions & 0 deletions tests/bats/packages.bats
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ EOF
assert_success
}

@test "function_required_packages_zorin"{
DISTRO_NAME="zorin"
function apt-get() {
exit 0
}
run required_packages
assert_success
}

@test "function_required_packages_debian_fail" {
DISTRO_NAME="debian"
function apt-get() {
Expand Down Expand Up @@ -211,6 +220,15 @@ EOF
assert_failure
}

@test "function_required_packages_zorin_fail" {
DISTRO_NAME="zorin"
function apt-get() {
exit 1
}
run required_packages
assert_failure
}

@test "function_required_packages_unknown" {
DISTRO_NAME="unknown"
run required_packages
Expand Down
2 changes: 1 addition & 1 deletion utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function required_packages() {
fi

case "$DISTRO_NAME" in
debian | ubuntu | raspbian | linuxmint)
debian | ubuntu | raspbian | linuxmint | zorin)
[ "$DISTRO_VERSION_ID" == "11" ] && export PYTHON_VERSION="3"
apt-get update &>>"$LOG_FILE"
apt-get install --no-install-recommends -y "python${PYTHON_VERSION}" "python${PYTHON_VERSION}-dev" python3-pip "python${PYTHON_VERSION}-venv" whiptail expect jq "${extra_packages[@]}" &>>"$LOG_FILE"
Expand Down

0 comments on commit 3058478

Please sign in to comment.