Hi On 23 September 2015 at 19:20, Thierry <sage-googlesu...@lma.metelu.net> wrote:
> Hi, > > > On Wed, Sep 23, 2015 at 06:56:41PM +0200, Jan Groenewald wrote: > [...] > > Basic question: What does it take to enable SSL? Do those commands work > on > > 1) source build > > On Debian/Ubuntu just install 'libssl-dev' before building, and 'openssl' > before running. > Building from source now to test this later. > > > 2) binary (LTS) > > Sage is compiled with ssl support, so just install 'openssl' before > running. > > Not out of the box. But with pyopenssl. This is from your binary: 0 jan@muizenberg:/srv/sysadm/t/thierry-sage-6.8-x86_64-Linux$./sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath Version 6.8, Release Date: 2015-07-26 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ The Sage installation tree has moved from /opt/sagemath_tmonteil-ubuntu-trusty-64/sage-6.8 to /srv/sysadm/t/thierry-sage-6.8-x86_64-Linux Updating various hardcoded paths... (Please wait at most a few minutes.) DO NOT INTERRUPT THIS. notebookDone updating paths. sage: sage: sage: sage: notebook(secure=True) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-1-3d6cf59ae321> in <module>() ----> 1 notebook(secure=True) /srv/sysadm/t/sage-6.8-x86_64-Linux/src/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (/opt/sagemath_tmonteil-ubuntu-trusty-64/sage-6.8/src/build/cythonized/sage/misc/lazy_import.c:3457)() 381 True 382 """ --> 383 return self._get_object()(*args, **kwds) 384 385 def __repr__(self): /srv/sysadm/t/sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/notebook/notebook_object.py in __call__(self, *args, **kwds) 237 """ 238 def __call__(self, *args, **kwds): --> 239 return self.notebook(*args, **kwds) 240 241 notebook = run_notebook.notebook_run /srv/sysadm/t/sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/notebook/run_notebook.py in notebook_run(self, directory, port, interface, port_tries, secure, reset, accounts, openid, server_pool, ulimit, timeout, doc_timeout, upload, automatic_login, start_path, fork, quiet, server, profile, subnets, require_login, open_viewer, address) 474 import OpenSSL 475 except ImportError: --> 476 raise RuntimeError("HTTPS cannot be used without pyOpenSSL" 477 " installed. See the Sage README for more information.") 478 RuntimeError: HTTPS cannot be used without pyOpenSSL installed. See the Sage README for more information. sage: 0 jan@muizenberg:/srv/sysadm/t/thierry-sage-6.8-x86_64-Linux$*./sage -pip install pyopenssl* You are using pip version 6.1.1, however version 7.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting pyopenssl Downloading pyOpenSSL-0.15.1-py2.py3-none-any.whl (102kB) 100% |████████████████████████████████| 106kB 168kB/s Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in ./local/lib/python2.7/site-packages/six-1.9.0-py2.7.egg (from pyopenssl) Collecting cryptography>=0.7 (from pyopenssl) Downloading cryptography-1.0.2.tar.gz (332kB) 100% |████████████████████████████████| 335kB 610kB/s Collecting idna>=2.0 (from cryptography>=0.7->pyopenssl) Downloading idna-2.0-py2.py3-none-any.whl (61kB) 100% |████████████████████████████████| 61kB 1.9MB/s Collecting pyasn1>=0.1.8 (from cryptography>=0.7->pyopenssl) Downloading pyasn1-0.1.9-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): setuptools in ./local/lib/python2.7/site-packages/setuptools-12.4-py2.7.egg (from cryptography>=0.7->pyopenssl) Collecting enum34 (from cryptography>=0.7->pyopenssl) Downloading enum34-1.0.4.tar.gz Collecting ipaddress (from cryptography>=0.7->pyopenssl) Downloading ipaddress-1.0.14-py27-none-any.whl Collecting cffi>=1.1.0 (from cryptography>=0.7->pyopenssl) Downloading cffi-1.2.1.tar.gz (335kB) 100% |████████████████████████████████| 335kB 658kB/s Collecting pycparser (from cffi>=1.1.0->cryptography>=0.7->pyopenssl) Downloading pycparser-2.14.tar.gz (223kB) 100% |████████████████████████████████| 225kB 880kB/s Installing collected packages: idna, pyasn1, enum34, ipaddress, pycparser, cffi, cryptography, pyopenssl Running setup.py install for enum34 Running setup.py install for pycparser Running setup.py install for cffi Running setup.py install for cryptography Successfully installed cffi-1.2.1 cryptography-1.0.2 enum34-1.0.4 idna-2.0 ipaddress-1.0.14 pyasn1-0.1.9 pycparser-2.14 pyopenssl-0.15.1 0 jan@muizenberg:/srv/sysadm/t/thierry-sage-6.8-x86_64-Linux$./sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath Version 6.8, Release Date: 2015-07-26 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ The Sage installation tree has moved from /opt/sagemath_tmonteil-ubuntu-trusty-64/sage-6.8 to /srv/sysadm/t/thierry-sage-6.8-x86_64-Linux Updating various hardcoded paths... (Please wait at most a few minutes.) DO NOT INTERRUPT THIS. Done updating paths. sage: notebook(secure=True) The notebook files are stored in: sage_notebook.sagenb ┌──────────────────────────────────────────────────┐ │ │ │ Open your web browser to https://localhost:8080 │ │ │ └──────────────────────────────────────────────────┘ There is an admin account. If you do not remember the password, quit the notebook and type notebook(reset=True). Executing twistd --pidfile="sage_notebook.sagenb/sagenb.pid" -ny "sage_notebook.sagenb/twistedconf.tac" /srv/sysadm/t/thierry-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. _warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) /srv/sysadm/t/thierry-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/internet/_sslverify.py:184: UserWarning: You do not have the service_identity module installed. Please install it from <https://pypi.python.org/pypi/service_identity>. Without the service_identity module and a recent enough pyOpenSSL tosupport it, Twisted can perform only rudimentary TLS client hostnameverification. Many valid certificate/hostname mappings may be rejected. verifyHostname, VerificationError = _selectVerifyImplementation() 2015-09-29 12:09:29+0200 [-] Log opened. 2015-09-29 12:09:29+0200 [-] twistd 14.0.2 (/srv/sysadm/t/thierry-sage-6.8-x86_64-Linux/local/bin/python 2.7.9) starting up. 2015-09-29 12:09:29+0200 [-] reactor class: twisted.internet.epollreactor.EPollReactor. 2015-09-29 12:09:29+0200 [-] QuietSite (TLS) starting on 8080 2015-09-29 12:09:29+0200 [-] Starting factory <__builtin__.QuietSite instance at 0x7f77a0abda28> (process:510): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Above gives me a working secure notebook. And the AIMS buildslave binary is the same initial pyopenssl error but a pip import error: 0 jan@muizenberg:/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux$./sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath Version 6.8, Release Date: 2015-07-26 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ The Sage installation tree has moved from /mnt/highperf/buildbot/slave/sage_git/build to /srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux Updating various hardcoded paths... (Please wait at most a few minutes.) DO NOT INTERRUPT THIS. Done updating paths. sage: notebook(secure=True) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-1-3d6cf59ae321> in <module>() ----> 1 notebook(secure=True) /srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/src/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (/mnt/highperf/buildbot/slave/sage_git/build/src/build/cythonized/sage/misc/lazy_import.c:3457)() 381 True 382 """ --> 383 return self._get_object()(*args, **kwds) 384 385 def __repr__(self): /srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/notebook/notebook_object.py in __call__(self, *args, **kwds) 237 """ 238 def __call__(self, *args, **kwds): --> 239 return self.notebook(*args, **kwds) 240 241 notebook = run_notebook.notebook_run /srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/notebook/run_notebook.py in notebook_run(self, directory, port, interface, port_tries, secure, reset, accounts, openid, server_pool, ulimit, timeout, doc_timeout, upload, automatic_login, start_path, fork, quiet, server, profile, subnets, require_login, open_viewer, address) 474 import OpenSSL 475 except ImportError: --> 476 raise RuntimeError("HTTPS cannot be used without pyOpenSSL" 477 " installed. See the Sage README for more information.") 478 RuntimeError: HTTPS cannot be used without pyOpenSSL installed. See the Sage README for more information. sage: And trying to install pyopenssl: 0 jan@muizenberg:/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux$*./sage -pip install pyopenssl* Traceback (most recent call last): File "/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/bin/pip", line 9, in <module> load_entry_point('pip==6.1.1', 'console_scripts', 'pip')() File "/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/setuptools-12.4-py2.7.egg/pkg_resources/__init__.py", line 521, in load_entry_point File "/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/setuptools-12.4-py2.7.egg/pkg_resources/__init__.py", line 2632, in load_entry_point File "/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/setuptools-12.4-py2.7.egg/pkg_resources/__init__.py", line 2312, in load File "/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/setuptools-12.4-py2.7.egg/pkg_resources/__init__.py", line 2318, in resolve File "/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/__init__.py", line 15, in <module> from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/vcs/mercurial.py", line 10, in <module> from pip.download import path_to_url File "/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/download.py", line 32, in <module> from pip._vendor import requests, six File "/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/_vendor/__init__.py", line 92, in load_module raise ImportError("No module named '%s'" % (name,)) *ImportError: No module named 'pip._vendor.requests'* 1 jan@muizenberg:/srv/sysadm/t/hetzner-sage-6.8-x86_64-Linux$ Did you do something to add pip to the other binary? > > 3) PPA > > It depends whether you use a binary that is built with or without > openssl. If yes, go to 2, if not: > > sage -i openssl > sage -i -f python2 > It is a copy of the binary in (2) so should work the same. It gives the same error now. I repackage the Hetzner/AIMS buildslave binary (AIMS does not do anything expect provide the platform) for the PPA, so no point looking at this until the binary with the pip import problem is fixed. Regards, Jan -- .~. /V\ Jan Groenewald /( )\ www.aims.ac.za ^^-^^ -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.