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

[arch/fann] Install fann from AUR #121

merged 5 commits into from
Jul 31, 2024

Conversation

goldyfruit
Copy link
Member

@goldyfruit goldyfruit commented Jul 31, 2024

Fix #109

Summary by CodeRabbit

  • New Features

    • Added a new dependency for enhanced functionality with the kewlfft.aur collection.
    • Introduced a dedicated task for managing the fann package specifically from the Arch User Repository (AUR) for Archlinux systems.
    • Configured logging to a dedicated file path for improved traceability.
  • Improvements

    • Simplified playbook execution by removing the unbuffer command, potentially enhancing output visibility during execution.
    • Combined Ansible log and installer log for better log management.

@goldyfruit goldyfruit added the bug Something isn't working label Jul 31, 2024
@goldyfruit goldyfruit added this to the Descent milestone Jul 31, 2024
@goldyfruit goldyfruit requested a review from JarbasAl July 31, 2024 12:15
@goldyfruit goldyfruit self-assigned this Jul 31, 2024
Copy link
Contributor

coderabbitai bot commented Jul 31, 2024

Walkthrough

This update introduces a new dependency for an Ansible project by integrating the kewlfft.aur collection, enhancing functionality. It improves the management of the fann package for Archlinux users by removing it from traditional pacman usage and adding a dedicated task for installation via the AUR. Additionally, logging capabilities are enhanced for better traceability. These changes aim to streamline the installation process and resolve dependency issues on Archlinux.

Changes

Files Change Summary
ansible/requirements.yml Added kewlfft.aur collection (version 0.11.1).
ansible/roles/ovos_installer/tasks/virtualenv/packages.yml Removed fann management from pacman; added task for handling fann from AUR using kewlfft.aur.aur.
setup.sh Removed unbuffer from ansible-playbook command; added log concatenation at the end of execution.
ansible/ansible.cfg Added log_path for logging to /var/log/ovos-ansible.log.
utils/constants.sh Introduced ANSIBLE_LOG_FILE variable set to /var/log/ovos-ansible.log.

Assessment against linked issues

Objective Addressed Explanation
Require AUR package "fann" for Archlinux (#[109])

🐇 In the fields where bunnies play,
A dependency has found its way.
With kewlfft.aur to lend a hand,
And fann from AUR, we now can stand!
Hops of joy in code we see,
For Archlinux, wild and free! 🌿✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8a558f6 and dd689ab.

Files selected for processing (2)
  • ansible/requirements.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/virtualenv/packages.yml (2 hunks)
Files skipped from review due to trivial changes (1)
  • ansible/requirements.yml
Additional comments not posted (2)
ansible/roles/ovos_installer/tasks/virtualenv/packages.yml (2)

95-101: Verify the availability of the kewlfft.aur collection.

Ensure that the kewlfft.aur collection is installed and available in the Ansible environment.

Verification successful

The kewlfft.aur collection is correctly referenced in the ansible/requirements.yml file.

  • The kewlfft.aur collection is listed in ansible/requirements.yml, ensuring it will be installed as part of the Ansible environment setup.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the availability of the `kewlfft.aur` collection.

# Test: Check if the collection is installed. Expect: `kewlfft.aur` collection to be listed.
ansible-galaxy collection list | grep kewlfft.aur

Length of output: 133


Script:

#!/bin/bash
# Description: Search for references to the `kewlfft.aur` collection within the codebase.

# Search for `kewlfft.aur` in all YAML files to find references to the collection.
rg 'kewlfft.aur' --glob '*.yml' --glob '*.yaml' -A 3

Length of output: 475


97-97: Verify the correctness of the become_user directive.

Ensure that the user specified in become_user has the necessary permissions to build and install packages from AUR.

@goldyfruit goldyfruit added the enhancement New feature or request label Jul 31, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between dd689ab and 8adbd00.

Files selected for processing (1)
  • ansible/roles/ovos_installer/tasks/virtualenv/packages.yml (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • ansible/roles/ovos_installer/tasks/virtualenv/packages.yml

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8adbd00 and 59fd80d.

Files selected for processing (3)
  • ansible/requirements.yml (1 hunks)
  • ansible/roles/ovos_installer/tasks/virtualenv/packages.yml (2 hunks)
  • setup.sh (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • ansible/requirements.yml
  • ansible/roles/ovos_installer/tasks/virtualenv/packages.yml
Additional comments not posted (1)
setup.sh (1)

84-84: LGTM! But verify the impact on output handling.

The removal of unbuffer simplifies the command. Ensure that the output handling and buffering behavior are not adversely affected.

#!/bin/bash
# Description: Verify the impact of removing `unbuffer` on output handling and buffering behavior.

# Test: Check the output handling and buffering behavior.
# Expect: Output is handled correctly without `unbuffer`.
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}" \
  -e "ovos_installer_venv=${VENV_PATH}" \
  -e "ovos_installer_user_home=${RUN_AS_HOME}" \
  -e "ovos_installer_method=${METHOD}" \
  -e "ovos_installer_profile=${PROFILE}" \
  -e "ovos_installer_sound_server=$(echo "$SOUND_SERVER" | awk '{ print $1 }')" \
  -e "ovos_installer_raspberrypi='${RASPBERRYPI_MODEL}'" \
  -e "ovos_installer_channel=${CHANNEL}" \
  -e "ovos_installer_feature_gui=${FEATURE_GUI}" \
  -e "ovos_installer_feature_skills=${FEATURE_SKILLS}" \
  -e "ovos_installer_feature_extra_skills=${FEATURE_EXTRA_SKILLS}" \
  -e "ovos_installer_tuning=${TUNING}" \
  -e "ovos_installer_listener_host=${HIVEMIND_HOST}" \
  -e "ovos_installer_listener_port=${HIVEMIND_PORT}" \
  -e "ovos_installer_satellite_key=${SATELLITE_KEY}" \
  -e "ovos_installer_satellite_password=${SATELLITE_PASSWORD}" \
  -e "ovos_installer_cpu_is_capable=${CPU_IS_CAPABLE}" \
  -e "ovos_installer_cleaning=${ansible_cleaning}" \
  -e "ovos_installer_display_server=${DISPLAY_SERVER}" \
  -e "ovos_installer_telemetry=${SHARE_TELEMETRY}" \
  -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"

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 59fd80d and 0735fe4.

Files selected for processing (3)
  • ansible/ansible.cfg (1 hunks)
  • setup.sh (2 hunks)
  • utils/constants.sh (1 hunks)
Files skipped from review due to trivial changes (1)
  • ansible/ansible.cfg
Files skipped from review as they are similar to previous changes (1)
  • setup.sh
Additional comments not posted (1)
utils/constants.sh (1)

3-3: LGTM! Verify log directory existence and permissions.

The addition of the ANSIBLE_LOG_FILE environment variable is a good practice for logging Ansible operations.

Ensure that the /var/log/ directory exists and has the appropriate permissions to allow Ansible to write logs to ovos-ansible.log.

@goldyfruit goldyfruit merged commit d3b2bc6 into main Jul 31, 2024
4 checks passed
@goldyfruit goldyfruit deleted the fix/arch_fann branch July 31, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ovos-installer on archlinux requires an AUR package "fann"
1 participant