leamas / ddupdate

Update DNS Data for Dynamic IP Addresses
MIT License
40 stars 28 forks source link

dependency not installed #71

Closed atesin closed 1 year ago

atesin commented 1 year ago

on ddupdate installation via dnf, it shows no dependency

[root@neltharion ~]# dnf install ddupdate
Última comprobación de caducidad de metadatos hecha hace 0:56:14, el mar 02 ago 2022 21:33:05.
Dependencias resueltas.
=============================================================================================================================================================================
 Paquete                                  Arquitectura                           Versión                                       Repositorio                              Tam.
=============================================================================================================================================================================
Instalando:
 ddupdate                                 noarch                                 0.7.1-2.fc36                                  updates                                  91 k

Resumen de la transacción
=============================================================================================================================================================================
Instalar  1 Paquete

Tamaño total de la descarga: 91 k
Tamaño instalado: 244 k
¿Está de acuerdo [s/N]?:

but later when ddupdate installed and tried to run, it complains about python3-keyring not found and exits

[root@neltharion ~]# ddupdate
Traceback (most recent call last):
  File "/usr/bin/ddupdate", line 17, in <module>
    main.main()
  File "/usr/lib/python3.10/site-packages/ddupdate/main.py", line 500, in main
    get_plugins(opts, log, sections)
  File "/usr/lib/python3.10/site-packages/ddupdate/main.py", line 424, in get_plugins
    auths, getters, setters = load_plugins(path, log)
  File "/usr/lib/python3.10/site-packages/ddupdate/main.py", line 353, in load_plugins
    setters = load_plugin_dir(os.path.join(path, 'plugins'), ServicePlugin)
  File "/usr/lib/python3.10/site-packages/ddupdate/main.py", line 334, in load_plugin_dir
    module = load_module(plugpath)
  File "/usr/lib/python3.10/site-packages/ddupdate/main.py", line 315, in load_module
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/share/ddupdate/plugins/auth_keyring.py", line 25, in <module>
    raise AuthError(KEYRING_MISSING_MSG) from None
ddupdate.ddplugin.AuthError: '\npython keyring module not found. Please install python3-keyring\nusing package manager or the keyring package using pip.\n'

the message could confuse most users... but if an advanced user look and install the package manually the problem goes (but comes another)

[root@neltharion ~]# dnf install python3-keyring
# <snip>
Instalado:
  python3-cryptography-36.0.0-3.fc36.x86_64    python3-jeepney-0.7.1-2.fc36.noarch    python3-keyring-23.6.0-1.fc36.noarch    python3-secretstorage-3.3.1-4.fc36.noarch

¡Listo!
[root@neltharion ~]# ddupdate
WARNING - Cannot open config file '/etc/ddupdate.conf' for read
Traceback (most recent call last):
  File "/usr/bin/ddupdate", line 17, in <module>
    main.main()
  File "/usr/lib/python3.10/site-packages/ddupdate/main.py", line 498, in main
    config, sections = get_config(log)
  File "/usr/lib/python3.10/site-packages/ddupdate/main.py", line 153, in get_config
    config.read(path)
  File "/usr/lib64/python3.10/configparser.py", line 695, in read
    for filename in filenames:
TypeError: 'NoneType' object is not iterable
leamas commented 1 year ago

This indeed looks like a Fedora packaging problem. It has probably been under the radar since python3-keyring is such a common dependency. Actually, this issue is reveals three things:

All in all: good catch!

leamas commented 1 year ago

Pushed the R: python3-keyring to rawhide i. e., this change will land in F37.

Also made an update for F36, currently in testing: https://bodhi.fedoraproject.org/updates/FEDORA-2022-6ba1edf4a4

leamas commented 1 year ago

Hm... looking at the message, it actually provides the correct information at the end. One problem is that the newline is not properly expanded which makes it less readable. Fixed in 24c625e

Fixed in commits above. Thanks for reporting. Closing