FS#77046 - [certbot] Missing dependencies python-zope-interface and python-mock

Attached to Project: Community Packages
Opened by Daenney (daenney) - Sunday, 08 January 2023, 15:27 GMT
Last edited by Toolybird (Toolybird) - Sunday, 08 January 2023, 20:58 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: After installing certbot on a clean system it fails to run.


Additional info:
* package version(s): certbot 2.1.0-1

Steps to reproduce:
* install certbot
* run certbot -h

$ certbot -v
An unexpected error occurred:
pkg_resources.DistributionNotFound: The 'zope.interface' distribution was not found and is required by the application

$ pacman -S python-zope-interface

$ certbot -v
An unexpected error occurred:
pkg_resources.DistributionNotFound: The 'mock' distribution was not found and is required by the application

$ pacman -S python-mock

Now it works:

$ certbot -v
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Certbot doesn't know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run "certbot certonly" to do so. You'll need to manually configure your web server to use the resulting certificate

This dependency was removed with version 2.0.0 but re-added in 2.1.0 for compatibility with some DNS plugins: https://github.com/certbot/certbot/releases/tag/v2.1.0. I'm not sure why it wants python-mock. That feels like something that should be for tests only and not affect runtime.
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 08 January 2023, 20:58 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by Toolybird (Toolybird) - Sunday, 08 January 2023, 20:14 GMT
Cannot repro. Works fine for me in a clean install. Something messed up with your python env?
Comment by Daenney (daenney) - Sunday, 08 January 2023, 20:48 GMT
Ah no, it's caused by having an external plugin installed. Because 1.x has python-zope-interface as a dependency the lack of that dependency on the plugin didn't trigger the error. Now it does.

You can see the diff between 1.x and 2.0 here which correctly removed python-zope-interface. But it seems that what needs to happen instead is for external authenticator plugins, the ones available in AUR as certbot-dns-*, to explicitly state they now need python-zope-interface.
Comment by Toolybird (Toolybird) - Sunday, 08 January 2023, 20:58 GMT
Ah, makes sense now. Thanks for clarifying.

Loading...