Closed petegallagher closed 6 years ago
Just realised this is an issue with git-lfs rather than nassl specifically. So is it possible that you could provide a complete package for 1.1.0 on pypi containing the appropriate files (rather than references to lfs)?
Hello, I just pushed the 1.1.0 source package to pypi; should solve this problem.
This seems to be still an issue.
Collecting nassl<1.2.0,>=1.1.0 (from sslyze==1.4.1)
Could not find a version that satisfies the requirement nassl<1.2.0,>=1.1.0 (from sslyze==1.4.1) (from versions: 0.13.4.win32, 0.13.1, 0.13.2, 0.13.4, 0.13.5, 0.13.6, 0.13.7, 0.14.0, 0.14.1, 0.14.2, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.17.0, 1.0.1, 1.0.2, 1.0.3)
No matching distribution found for nassl<1.2.0,>=1.1.0 (from sslyze==1.4.1)
On alpine:
/ # pip search nassl
nassl (1.1.0) - Experimental OpenSSL wrapper for Python 2.7 / 3.4+ and SSLyze.
/ # pip install nassl==1.1.0
Collecting nassl==1.1.0
Could not find a version that satisfies the requirement nassl==1.1.0 (from versions: 0.13.4.win32, 0.13.1, 0.13.2, 0.13.4, 0.13.5, 0.13.6, 0.13.7, 0.14.0, 0.14.1, 0.14.2, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.17.0, 1.0.1, 1.0.2, 1.0.3)
No matching distribution found for nassl==1.1.0
/ # pip download nassl
Collecting nassl
Downloading nassl-1.0.3.tar.gz (30.0MB)
100% |████████████████████████████████| 30.1MB 36kB/s
Saved /nassl-1.0.3.tar.gz
Collecting enum34 (from nassl)
Downloading enum34-1.1.6-py2-none-any.whl
Saved /enum34-1.1.6-py2-none-any.whl
Collecting typing (from nassl)
Downloading typing-3.6.4-py2-none-any.whl
Saved /typing-3.6.4-py2-none-any.whl
Successfully downloaded nassl enum34 typing
Beside the download issue, the libssl.a:1: syntax error
still exists (at least when downloading nassl 1.1.0 from github). See build log build.log for more details.
@waja I made some progress toward building the latest nassl
from scratch on Alpine Linux. See here.
@waja The syntax error is due to Git LFS not being installed on your host.
@nabla-c0d3 thanks for the info. But even with git lfs installed same problem. The syntax error is caused by a problem one line before:
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-alpine-linux-musl/bin/ld:/tmp/pip-RLBNvB-build/bin/openssl-legacy/linux64/libssl.a: file format not recognized; treating as linker script
This can be found in the build.log beside some more interesting part earlier.
Could it be that https://github.com/pypa/pip/issues/3969 is the source of the issue that nassl isn't downloaded on alpine?
Could it be that pypa/pip#3969 is the source of the issue that nassl isn't downloaded on alpine?
After working around the issue with the fix used in https://github.com/xemuliam/docker-python/blob/9a0154a07a8c2499eff0ed1f83f9fe857369b82b/Dockerfile#L24 the installation of the binaries works, but there is a (new) runtime issue:
Traceback (most recent call last):
File "/usr/bin/sslyze", line 11, in <module>
load_entry_point('SSLyze==1.4.1', 'console_scripts', 'sslyze')()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
return ep.load()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.6/site-packages/sslyze/__main__.py", line 10, in <module>
from sslyze.plugins.plugin_base import PluginScanResult
File "/usr/lib/python3.6/site-packages/sslyze/plugins/plugin_base.py", line 12, in <module>
from sslyze.server_connectivity_info import ServerConnectivityInfo
File "/usr/lib/python3.6/site-packages/sslyze/server_connectivity_info.py", line 6, in <module>
from nassl.ssl_client import OpenSslVersionEnum
File "/usr/lib/python3.6/site-packages/nassl/ssl_client.py", line 7, in <module>
from nassl import _nassl # type: ignore
ImportError: Error relocating /usr/lib/python3.6/site-packages/nassl/_nassl.cpython-36m-x86_64-linux-gnu.so: __register_atfork: symbol not found
I guess this is related to the fact, that the nassl package is prebuild on a glibc system. Anyway ... it is still failing with the official Docker python image with the alpine tag (python:alpine and even python:alpine3.7). My build process there is just:
apk --no-cache update && apk --no-cache upgrade && \
apk --no-cache add openssl libstdc++ && \
echo "manylinux1_compatible = True" > /usr/local/lib/python3.6/_manylinux.py && \
pip install --upgrade sslyze==$SSLYZE_CLI_VERSION
Based on your link, the manylinux wheels will not work with alpine linux by default. I think the way to go is to build everything from scratch (#35).
Following on from #30 when trying to build nassl 1.1.0 on Alpine Linux I get the following error:
As a side-note pip is unable to get
1.1.0
from pypi becausenassl-1.1.0.tar.gz
is not available from https://pypi.python.org/simple/nassl/, so I had to provide the URL to github instead.