zenhack / simp_le

Simple Let's Encrypt client
GNU General Public License v3.0
224 stars 38 forks source link

simp_le fails on Debian wheezy #50

Closed VojtechMyslivec closed 7 years ago

VojtechMyslivec commented 7 years ago

Hi, I use simp_le on several platforms but I have problem on Debian wheezy (I know, but still "oldstable").

simp_le fails with following Traceback:

Traceback (most recent call last):
  File "/usr/local/sbin/simp_le", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/opt/simp_le/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2707, in <module>
    working_set.require(__requires__)
  File "/opt/simp_le/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 686, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/opt/simp_le/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: mock

There are some errors during runing venv.sh as well, which I include in venv.sh.txt.

One of the problem is that the venv.sh sh script is returning "success" but it seems to fail – according to attached log. This is not suitable for automation installation 😞

I have fixed it once with installing system package python-six before installing simp_le, but it does not help at this time.

Thanks in advance

zenhack commented 7 years ago

I just pushed a patch that should prevent venv.sh from incorrectly reporting success in the future. Thanks for catching that.

Re: what to do, the library it's missing this time is 'mock' not 'six'; Maybe see about installing the system package for that?

What version of python are you using for this?

VojtechMyslivec commented 7 years ago

If you look at venv.sh log, the first error seems to be

    from six.moves import filter, map
ImportError: No module named six.moves

There are lot of other errors as well (like Failed building wheel for cryptography). So I have focused on these problems.

Default python on Wheezy is 2.7.3

After 2-3 hours of debugging, I have discovered that system package python-six breaks the simp_le installation :tired_face:

./venv.sh is failing anyway but when I run it at least twice, simp_le --help works as expected.

The process to install simp_le on Debian Wheezy:

  1. apt-get -y purge python-six
  2. ./bootstrap.sh
  3. ./venv.sh
  4. ./venv.sh

Anyway It is quite undeterministic, that the script is failing and when you run it twice, simp_le starts to work.

Thanks for the patch but it breaks this workaround actually.

Here is a log of running ./venv.sh and simp_le twice. I hope it will help you because I can't figure out the root of the problem. I have wrap each subcommand with debug message and return code.

EDIT: uploaded new another log version

zenhack commented 7 years ago

So, when I adopted this project the venv.sh script is one of a handful of things that I thought wasn't really the right way to approach the probem; I'm disinclined to spend a bunch of time debugging it, in favor of coming up with some reliable instructions and scrapping it.

What happens if, instead of running venv.sh, you cd into the source tree and do:

virtualenv venv
source venv/bin/activate
pip install -e .
simp_le --help
VojtechMyslivec commented 7 years ago

Still no luck. It ends with AttributeError: 'module' object has no attribute 'evaluate_marker' this time.

log

zenhack commented 7 years ago

@VojtechMyslivec, I set up a wheezy vm and think I've solved the problem; can you check out the distribute-fix branch and confirm that the venv.sh script there works for you? If so I'll merge it into master.

VojtechMyslivec commented 7 years ago

Perfect :tada: Works like a charm. Thanks a lot!

zenhack commented 7 years ago

Great! It's on master now; once travis finishes running I'll close this.

VojtechMyslivec commented 7 years ago

PS: I have tried it on Debian Jessie (8.7, stable) and Stretch (9.0-rc, future-stable). And it works on both as well.

Thank again.

zenhack commented 7 years ago

You're welcome! Travis passed as expected, so this has been merged into master. Also, there's a new tag/release on pypi. Closing.