Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[arch/fann] Install fann from AUR #121

Merged
merged 5 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ansible/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ host_key_checking = False
localhost_warning = False
callbacks_enabled = ansible.posix.profile_tasks
force_handlers = True
log_path = /var/log/ovos-ansible.log

[ssh_connection]
pipelining = True
Expand Down
2 changes: 2 additions & 0 deletions ansible/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ collections:
version: 3.7.0
- name: community.general
version: 8.3.0
- name: kewlfft.aur
version: 0.11.1
11 changes: 8 additions & 3 deletions ansible/roles/ovos_installer/tasks/virtualenv/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,11 @@
state: "{{ ovos_installer_uninstall }}"
when: ansible_os_family == "Suse"

# Package on Archlinux OS family will not be uninstalled as it might
# break the system...
- name: Handle virtualenv package requirements (ovos/hivemind)
community.general.pacman:
name:
- base-devel
- swig
- fann
- alsa-lib
- portaudio
- mpg123
Expand All @@ -94,3 +91,11 @@
- openblas
state: "{{ ovos_installer_uninstall }}"
when: ansible_os_family == "Archlinux"

- name: Handle fann package from AUR (Arch based only)
become: true
become_user: "{{ ovos_installer_user }}"
kewlfft.aur.aur:
name: fann
use: makepkg
when: ansible_os_family == "Archlinux"
7 changes: 5 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ echo "➤ Starting Ansible playbook... ☕🍵🧋"
export ANSIBLE_CONFIG=ansible/ansible.cfg
export ANSIBLE_PYTHON_INTERPRETER="$VENV_PATH/bin/python3"
export ANSIBLE_NOCOWS=1
unbuffer ansible-playbook -i 127.0.0.1, ansible/site.yml \
ansible-playbook -i 127.0.0.1, ansible/site.yml \
-e "ovos_installer_user=${RUN_AS}" \
-e "ovos_installer_group=$(id -ng "$RUN_AS")" \
-e "ovos_installer_uid=${RUN_AS_UID}" \
Expand All @@ -107,7 +107,10 @@ unbuffer ansible-playbook -i 127.0.0.1, ansible/site.yml \
-e "ovos_installer_locale=${LOCALE:-en-us}" \
-e "ovos_installer_i2c_devices=$(jq -c -n '$ARGS.positional' --args "${DETECTED_DEVICES[@]}")" \
-e "ovos_installer_reboot_file_path=${REBOOT_FILE_PATH}" \
"${ansible_tags[@]}" "${ansible_debug[@]}" | tee -a "$LOG_FILE"
"${ansible_tags[@]}" "${ansible_debug[@]}"

# Concatenate Ansible log with installer log
cat $ANSIBLE_LOG_FILE >>$LOG_FILE

# Retrieve the ansible-playbook status code before tee command and check for success or failure
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
Expand Down
1 change: 1 addition & 0 deletions utils/constants.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/env bash

export ANSIBLE_LOG_FILE=/var/log/ovos-ansible.log
export ATMEGA328P_SIGNATURE=":030000001E950F3B"
export AVRDUDE_BINARY_PATH=/usr/local/bin/avrdude
export AVRDUDE_BINARY_URL="https://artifacts.smartgic.io/avrdude/avrdude-aarch64"
Expand Down
Loading