Solved Compatibility issue running certbot (letsencrypt)

jbo@

Developer
I installed security/py-certbot (which appears to be the new security/py-letsencrypt) using pkg(8):
pkg install py27-certbot
However, I am not able to run it:
Code:
root@medusa:~ # certbot
An unexpected error occurred:
VersionConflict: (parsedatetime 2.1 (/usr/local/lib/python2.7/site-packages), Requirement.parse('parsedatetime<2.0'))
Please see the logfile 'certbot.log' for more details.
The certbot.log file contains the following:
Code:
Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 9, in <module>
    load_entry_point('certbot==0.8.1', 'console_scripts', 'certbot')()
  File "/usr/local/lib/python2.7/site-packages/certbot/main.py", line 700, in main
    plugins = plugins_disco.PluginsRegistry.find_all()
  File "/usr/local/lib/python2.7/site-packages/certbot/plugins/disco.py", line 174, in find_all
    plugin_ep = PluginEntryPoint(entry_point)
  File "/usr/local/lib/python2.7/site-packages/certbot/plugins/disco.py", line 33, in __init__
    self.plugin_cls = entry_point.load()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2379, in load
    self.require(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2396, in require
    items = working_set.resolve(reqs, env, installer)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 833, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
VersionConflict: (parsedatetime 2.1 (/usr/local/lib/python2.7/site-packages), Requirement.parse('parsedatetime<2.0'))

According to pkg info py27-parsedatetime I have version 2.1 installed:
Code:
root@medusa:~ # pkg info py27-parsedatetime
py27-parsedatetime-2.1
Name           : py27-parsedatetime
Version        : 2.1
Installed on   : Wed Jul 27 16:39:23 2016 UTC
Origin         : devel/py-parsedatetime
Architecture   : freebsd:10:x86:64
Prefix         : /usr/local
Categories     : python devel
Licenses       : APACHE20
Maintainer     : lwhsu@FreeBSD.org
WWW            : https://github.com/bear/parsedatetime
Comment        : Python module for parsing 'human readable' date/time expressions
Annotations    :
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 347KiB
Description    :
Python module that is able to parse 'human readable' date/time expressions.

parsedatetime is able to parse, for example, the following:

    * August 25th, 2008
    * 25 Aug 2008
    * Aug 25 5pm
    * 5pm August 25
    * next Saturday
    * tomorrow
    * next Thursday at 4pm
    * at 4pm
    * eod
    * tomorrow eod
    * eod Tuesday
    * eoy
    * eom
    * in 5 minutes
    * 5 minutes from now
    * 5 hours before now
    * 2 hours before noon
    * 2 days from tomorrow

WWW: https://github.com/bear/parsedatetime

When I understand the situation correctly, the issue is that security/py-certbot is only able to run with a version of devel/py-parsedatetime that is less than 2.0. Is that correct?
If so, can somebody please tell me how I can downgrade to a version that works with security/py-certbot?
 
That's unnecessary nitpicking and quite rude too.

Of course he has py27-certbot installed as a package.
I haven't a clue how it's nitpicking or rude. If you go to ports and freshports.org, as I did, there is no such thing.

Other than installing it or reading the Makefile, how would one know otherwise?
 
I installed security/py-certbot (which appears to be the new security/py-letsencrypt) using pkg(8):
pkg install py27-certbot
However, I am not able to run it:
Code:
root@medusa:~ # certbot
An unexpected error occurred:
VersionConflict: (parsedatetime 2.1 (/usr/local/lib/python2.7/site-packages), Requirement.parse('parsedatetime<2.0'))
Please see the logfile 'certbot.log' for more details.
The certbot.log file contains the following:
Code:
Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 9, in <module>
    load_entry_point('certbot==0.8.1', 'console_scripts', 'certbot')()
  File "/usr/local/lib/python2.7/site-packages/certbot/main.py", line 700, in main
    plugins = plugins_disco.PluginsRegistry.find_all()
  File "/usr/local/lib/python2.7/site-packages/certbot/plugins/disco.py", line 174, in find_all
    plugin_ep = PluginEntryPoint(entry_point)
  File "/usr/local/lib/python2.7/site-packages/certbot/plugins/disco.py", line 33, in __init__
    self.plugin_cls = entry_point.load()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2379, in load
    self.require(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2396, in require
    items = working_set.resolve(reqs, env, installer)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 833, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
VersionConflict: (parsedatetime 2.1 (/usr/local/lib/python2.7/site-packages), Requirement.parse('parsedatetime<2.0'))

According to pkg info py27-parsedatetime I have version 2.1 installed:
Code:
root@medusa:~ # pkg info py27-parsedatetime
py27-parsedatetime-2.1
Name           : py27-parsedatetime
Version        : 2.1
Installed on   : Wed Jul 27 16:39:23 2016 UTC
Origin         : devel/py-parsedatetime
Architecture   : freebsd:10:x86:64
Prefix         : /usr/local
Categories     : python devel
Licenses       : APACHE20
Maintainer     : lwhsu@FreeBSD.org
WWW            : https://github.com/bear/parsedatetime
Comment        : Python module for parsing 'human readable' date/time expressions
Annotations    :
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 347KiB
Description    :
Python module that is able to parse 'human readable' date/time expressions.

parsedatetime is able to parse, for example, the following:

    * August 25th, 2008
    * 25 Aug 2008
    * Aug 25 5pm
    * 5pm August 25
    * next Saturday
    * tomorrow
    * next Thursday at 4pm
    * at 4pm
    * eod
    * tomorrow eod
    * eod Tuesday
    * eoy
    * eom
    * in 5 minutes
    * 5 minutes from now
    * 5 hours before now
    * 2 hours before noon
    * 2 days from tomorrow

WWW: https://github.com/bear/parsedatetime

When I understand the situation correctly, the issue is that security/py-certbot is only able to run with a version of devel/py-parsedatetime that is less than 2.0. Is that correct?
If so, can somebody please tell me how I can downgrade to a version that works with security/py-certbot?

The port is broken in this regard since it doesn't request a correct version of devel/py-parsedatetime and when built with the latest port it gets the incompatible version 2.1. Also there is no earlier <2.0 version of devel/py-parsedatetime in the ports tree so the only way to fix the problem is either to make security/py-certbot work with the latest devel/py-parsedatetime or go trough the hassle of adding a <2.0 version of it in the ports tree and make security/py-certbot to use the earlier version.
 
Thank you very much for your answers, guys!
Is there another way to get this up and running a bit quicker without modifying the program itself? My certificates will expire soon.
 
If you use svn(1) to update your ports tree you can use it to revert a single port to the specific revision that still had 2.0.
 
I am already using portsnap(8) to manage my ports collection.
Is it possible that I manually grab the files from here and just run make install clean on them or do they need to be part of the current version of the ports or some other dependency magic?
 
Haven't tested it but this port looks fairly simple. Just edit the Makefile, change 2.1 to 2.0. Then run make makesum. If that works you can try make install clean.
 
When I do that I get notified that I already have devel/py-parsedatetime version 2.0 installed:
Code:
====> Compressing man pages (compress-man)
===>  Installing for py27-parsedatetime-2.0
===>  Checking if py27-parsedatetime already installed
===>   py27-parsedatetime-2.0 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of py27-parsedatetime
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/py-parsedatetime
Also, when I understand the message I get when trying to run certbot correctly I have to provide a version that is less than 2.0:
Code:
VersionConflict: (parsedatetime 2.1 (/usr/local/lib/python2.7/site-packages), Requirement.parse('parsedatetime<2.0'))
Before I screw something up, can I just try what you just described with 1.4? I saw in the SVN history that the previous one was 1.4: https://svnweb.freebsd.org/ports/head/devel/py-parsedatetime/Makefile?view=log

Thank you for your help, I really appreciate it!
 
I got it working that way.
Step-by-step guide for people that face the same problem:
  • Get rid of any existing devel/py-parsedatetime installation.
  • Navigate to /usr/ports/devel/py-parsedatetime
  • Open the Makefile, set PORTVERSION to 1.4
  • Run make makesum
  • Run make install clean
  • Run pip list to verify that parsedatetime version 1.4 is installed
  • certbot / letsencrypt should now run successfully.
Of course you might encounter issues if you are using other software that relies on a more recent version of devel/py-parsedatetime so be sure to check that first.

Thank you very much for your help guys. Very appreciated!
 
joel.bodenmann I'm glad you solved that. I use letsencrypt for four small clients and was unaware of this change. Two of them are updating in a few weeks so I'd rather see any bugs ironed out by then. In the meantime, I know I have your work to fallback on. Thanks.
 
I had the same problem and was able to resolve it by removing the older pkg py27-letsencrypt that I had previously installed before it was changed to py27-certbot.

pkg remove py27-letsencrypt
 
Back
Top