basak / certbot-snap-build

0 stars 3 forks source link

Fix certbot part build in snap #26

Closed adferrand closed 4 years ago

adferrand commented 4 years ago

Since the changes in Certbot 1.0.0, the snap build is not doing what is supposed to do: indeed, since the certbot source code is now one folder down (/certbot/certbot instead of /certbot), the certbot part is actually empty, and certbot is taken from pypi during the certbot-apache and certbot-nginx part builds.

This PR fixes that.

basak commented 4 years ago

Thank you for this PR!

The change looks obviously correct, but any opinion on the failing CI? Does that mean that the other bug is not really fixed? And do you think I should merge this despite CI failing?

adferrand commented 4 years ago

The CI is failing because calling certbot --version errors with the following exception:

Traceback (most recent call last):
  File "/snap/certbot/x5/bin/certbot", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'certbot==1.3.0.dev0' distribution was not found and is required by the application

However, the upcoming snapcraft 3.10 (currently in the candidate channel), fixes that, and also removes the need to use the custom x-python plugin since the fix has been merged upstream.

Do you want me to temporarily install snapcraft from the candidate channel on this PR until 3.10 made its way to stable?

basak commented 4 years ago

Hi Adrien,

On Fri, Feb 21, 2020 at 12:25:02PM -0800, Adrien Ferrand wrote:

However, the upcoming snapcraft 3.10 (currently in the candidate channel), fixes that, and remove the need to use the custom x-python plugin since the fix has been merged upstream.

Thank you for investigating!

Do you want me to temporarily install snapcraft from the candidate channel on this PR until 3.10 made its way to stable?

I think that makes sense. Better than us have CI failing, and it would allow us to remove the custom plugin also.