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

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

Closed
TurBoss opened this issue Jul 16, 2024 · 20 comments · Fixed by #121
Closed

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

TurBoss opened this issue Jul 16, 2024 · 20 comments · Fixed by #121
Assignees
Labels
bug Something isn't working
Milestone

Comments

@TurBoss
Copy link

TurBoss commented Jul 16, 2024

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

@JarbasAl JarbasAl added the bug Something isn't working label Jul 16, 2024
@goldyfruit
Copy link
Member

Some steps could be added:

  • Checking for yay helper
  • If yay helper detected then install fann via the helper
  • If yay helper not detected then stop the installer with a message

@goldyfruit goldyfruit self-assigned this Jul 18, 2024
@goldyfruit goldyfruit added this to the Descent milestone Jul 18, 2024
@TurBoss
Copy link
Author

TurBoss commented Jul 31, 2024

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
Copy link
Member

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

@JarbasAl
Copy link
Member

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
Copy link
Member

@JarbasAl @TurBoss Please try this PR #121

@TurBoss
Copy link
Author

TurBoss commented Jul 31, 2024

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
Copy link
Member

goldyfruit commented Jul 31, 2024

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
Copy link
Author

TurBoss commented Jul 31, 2024

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
Copy link
Member

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 kewlfft/ansible-aur#37

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

@TurBoss
Copy link
Author

TurBoss commented Jul 31, 2024

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
Copy link
Member

oh thats it!

Did it work?

@TurBoss
Copy link
Author

TurBoss commented Jul 31, 2024

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

@goldyfruit
Copy link
Member

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
Copy link
Author

TurBoss commented Jul 31, 2024

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
Copy link
Member

I pushed some changes, please try again.

@TurBoss
Copy link
Author

TurBoss commented Jul 31, 2024

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
Copy link
Member

goldyfruit commented Jul 31, 2024

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

@TurBoss
Copy link
Author

TurBoss commented Jul 31, 2024

it works! 🎉

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
Copy link
Member

Thanks @TurBoss for the help!

@goldyfruit
Copy link
Member

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants