OpenVoiceOS / ovos-installer

Open Voice OS and/or HiveMind installer using Ansible with an intuitive and easy Text-based User Interface
https://www.openvoiceos.org
61 stars 18 forks source link

ovos-installer on archlinux requires an AUR package "fann" #109

Closed TurBoss closed 1 month ago

TurBoss commented 1 month ago

Hello,

to get the installer working in had to install "fann" package from aur

the installer tries to use pacman and fails searching for the package, here the error:

TASK [ovos_installer : Handle virtualenv package requirements (ovos/hivemind)] ****************************************************************************************************************
Tuesday 16 July 2024  14:22:23 +0200 (0:00:00.030)       0:00:14.674 ********** 
fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": ["/usr/bin/pacman", "--upgrade", "--print-format", "%n", "fann"], "msg": "Failed to list package fann", "rc": 1, "stderr": "error: 'fann': could not find or read package\n", "stderr_lines": ["error: 'fann': could not find or read package"]}

PLAY RECAP ************************************************************************************************************************************************************************************
127.0.0.1                  : ok=13   changed=0    unreachable=0    failed=1    skipped=101  rescued=1    ignored=0   

since it needs aur i'm not sure how to fix this, replace pacman with aur may need yay to be installed

thanks

goldyfruit commented 1 month ago

Some steps could be added:

TurBoss commented 1 month ago

I think that a solution could be manually download the fann from aur using git then use makepkg to install it

sudo pacman -Syu
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/fann.git
cd fann
makepkg  -si
goldyfruit commented 1 month ago

What I'm confuse about is that fann got installed via pacman for many users. @JarbasAl any idea on that?

JarbasAl commented 1 month ago

What I'm confuse about is that fann got installed via pacman for many users. @JarbasAl any idea on that?

i think i just had it preinstalled and missed the error, afaik it was never available outside the AUR

goldyfruit commented 1 month ago

@JarbasAl @TurBoss Please try this PR https://github.com/OpenVoiceOS/ovos-installer/pull/121

TurBoss commented 1 month ago

Hello, thanks for the fixes!

I did run the uninstall, then installed in virtualenv mode again.

The script gets stuck at this task

TASK [ovos_installer : Handle fann package from AUR (Arch based only)] ************************************************************************************************************************
Wednesday 31 July 2024  14:49:13 +0200 (0:00:07.033)       0:00:20.415 ******** 
[sudo] password for turboss: "pasword is visible here when I type it"

Then nothing hapends, had to CTRL-C

edit:

that was for satelite install, the ovos full install gave this error:

TASK [ovos_installer : Handle fann package from AUR (Arch based only)] ************************************************************************************************************************
Wednesday 31 July 2024  15:12:22 +0200 (0:00:01.126)       0:00:11.244 ******** 
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TimeoutError: The read operation timed out
fatal: [127.0.0.1]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/var/tmp/ansible-tmp-1722431542.9003515-1009090-37528709489277/AnsiballZ_aur.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/var/tmp/ansible-tmp-1722431542.9003515-1009090-37528709489277/AnsiballZ_aur.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/var/tmp/ansible-tmp-1722431542.9003515-1009090-37528709489277/AnsiballZ_aur.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.kewlfft.aur.plugins.modules.aur', init_globals=dict(_module_fqn='ansible_collections.kewlfft.aur.plugins.modules.aur', _modlib_path=modlib_path),\n  File \"<frozen runpy>\", line 226, in run_module\n  File \"<frozen runpy>\", line 98, in _run_module_code\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 398, in <module>\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 394, in main\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 380, in apply_module\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 266, in install_packages\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 193, in install_with_makepkg\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible/module_utils/urls.py\", line 1686, in open_url\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible/module_utils/urls.py\", line 1578, in open\n  File \"/usr/lib/python3.12/urllib/request.py\", line 215, in urlopen\n    return opener.open(url, data, timeout)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/urllib/request.py\", line 515, in open\n    response = self._open(req, data)\n               ^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/urllib/request.py\", line 532, in _open\n    result = self._call_chain(self.handle_open, protocol, protocol +\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/urllib/request.py\", line 492, in _call_chain\n    result = func(*args)\n             ^^^^^^^^^^^\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible/module_utils/urls.py\", line 605, in https_open\n  File \"/usr/lib/python3.12/urllib/request.py\", line 1348, in do_open\n    r = h.getresponse()\n        ^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/http/client.py\", line 1428, in getresponse\n    response.begin()\n  File \"/usr/lib/python3.12/http/client.py\", line 331, in begin\n    version, status, reason = self._read_status()\n                              ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/http/client.py\", line 292, in _read_status\n    line = str(self.fp.readline(_MAXLINE + 1), \"iso-8859-1\")\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/socket.py\", line 708, in readinto\n    return self._sock.recv_into(b)\n           ^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/ssl.py\", line 1252, in recv_into\n    return self.read(nbytes, buffer)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/ssl.py\", line 1104, in read\n    return self._sslobj.read(len, buffer)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nTimeoutError: The read operation timed out\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
goldyfruit commented 1 month ago

Seems to be a network issue.

TASK [ovos_installer : Handle fann package from AUR (Arch based only)] ************************************************************************************************************************
Wednesday 31 July 2024  15:12:22 +0200 (0:00:01.126)       0:00:11.244 ******** 
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TimeoutError: The read operation timed out
fatal: [127.0.0.1]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/var/tmp/ansible-tmp-1722431542.9003515-1009090-37528709489277/AnsiballZ_aur.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/var/tmp/ansible-tmp-1722431542.9003515-1009090-37528709489277/AnsiballZ_aur.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/var/tmp/ansible-tmp-1722431542.9003515-1009090-37528709489277/AnsiballZ_aur.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.kewlfft.aur.plugins.modules.aur', init_globals=dict(_module_fqn='ansible_collections.kewlfft.aur.plugins.modules.aur', _modlib_path=modlib_path),\n  File \"<frozen runpy>\", line 226, in run_module\n  File \"<frozen runpy>\", line 98, in _run_module_code\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 398, in <module>\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 394, in main\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 380, in apply_module\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 266, in install_packages\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible_collections/kewlfft/aur/plugins/modules/aur.py\", line 193, in install_with_makepkg\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible/module_utils/urls.py\", line 1686, in open_url\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible/module_utils/urls.py\", line 1578, in open\n  File \"/usr/lib/python3.12/urllib/request.py\", line 215, in urlopen\n    return opener.open(url, data, timeout)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/urllib/request.py\", line 515, in open\n    response = self._open(req, data)\n               ^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/urllib/request.py\", line 532, in _open\n    result = self._call_chain(self.handle_open, protocol, protocol +\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/urllib/request.py\", line 492, in _call_chain\n    result = func(*args)\n             ^^^^^^^^^^^\n  File \"/tmp/ansible_kewlfft.aur.aur_payload_lgjikcf8/ansible_kewlfft.aur.aur_payload.zip/ansible/module_utils/urls.py\", line 605, in https_open\n  File \"/usr/lib/python3.12/urllib/request.py\", line 1348, in do_open\n    r = h.getresponse()\n        ^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/http/client.py\", line 1428, in getresponse\n    response.begin()\n  File \"/usr/lib/python3.12/http/client.py\", line 331, in begin\n    version, status, reason = self._read_status()\n                              ^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/http/client.py\", line 292, in _read_status\n    line = str(self.fp.readline(_MAXLINE + 1), \"iso-8859-1\")\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/socket.py\", line 708, in readinto\n    return self._sock.recv_into(b)\n           ^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/ssl.py\", line 1252, in recv_into\n    return self.read(nbytes, buffer)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/ssl.py\", line 1104, in read\n    return self._sslobj.read(len, buffer)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nTimeoutError: The read operation timed out\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Edit

These are the two HTTP requests made by the Ansible module:

  1. https://aur.archlinux.org/rpc/?v=5&type=info&arg=fann
  2. https://aur.archlinux.org/cgit/aur.git/snapshot/fann.tar.gz

Both work for me.

TurBoss commented 1 month ago

ok that was a network issue didn't show again, but I'm still stuck at the fann task its been there for 20 minutes now and no changes :(

i did uninstall it fann first to this tests

goldyfruit commented 1 month ago

ok that was a network issue didn't show again, but I'm still stuck at the fann task its been there for 20 minutes now and no changes :(

i did uninstall it fann first to this tests

Seems to be a sudo issue based on https://github.com/kewlfft/ansible-aur/issues/37

Does the makepkg -si has to happen as simple user or does root can run this command?

TurBoss commented 1 month ago

oh thats it!

sudo makepkg -si
==> ERROR: Running makepkg as root is not allowed as it can cause permanent,
catastrophic damage to your system.
goldyfruit commented 1 month ago

oh thats it!

Did it work?

TurBoss commented 1 month ago

oh sorry, I mean that makepkg has to be run as regular user not root or sudo... :(

goldyfruit commented 1 month ago

oh sorry, I mean that makepkg has to be run as regular user not root or sudo... :(

Isn't it waiting for a sudo password?

TurBoss commented 1 month ago

yes it asked for sudo password but the first attempt was already empty and like if I typed an empty password, then the second attempt allowed me to enter the password, it was visible, then hit enter and nothing happen

TASK [ovos_installer : Handle fann package from AUR (Arch based only)] ************************************************************************************************************************
Wednesday 31 July 2024  17:06:40 +0200 (0:00:01.154)       0:00:10.552 ******** 
[sudo] password for turboss: 
[sudo] password for turboss: -> password is visble here <- not posible to type in the previous line   

thanks!

goldyfruit commented 1 month ago

I pushed some changes, please try again.

TurBoss commented 1 month ago

hello,

I have tried but got the same issue, the first password field is shown empty and the seccond one doesn't accept enter :((

goldyfruit commented 1 month ago

Might be related to unbuffer & tee, try again please :)

TurBoss commented 1 month ago

it works! :tada:

TASK [ovos_installer : Handle fann package from AUR (Arch based only)] *********
Wednesday 31 July 2024  19:31:58 +0200 (0:00:01.898)       0:00:15.166 ******** 
[sudo] password for turboss: 
[sudo] password for turboss: 
changed: [127.0.0.1]

it still shows 2 prompts but completed all fine and the fann package shows installed

Awesome!! Thank you so much!!

goldyfruit commented 1 month ago

Thanks @TurBoss for the help!

goldyfruit commented 1 month ago

Merged.