sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 481 forks source link

Upgrade sagenb to 0.10.x #13121

Closed kini closed 12 years ago

kini commented 12 years ago

This is a followup to #11080. During the review process of #11080, which stretched for quite a while, at some point we decided to have a feature freeze on the version of sagenb 0.9.x associated with #11080, just to simplify the review process. The purpose of this ticket is to incorporate some new features, bugfixes, code refactoring, etc. into the version of sagenb shipped with Sage, beyond what was reviewed in #11080. sagenb 0.10 contains the following (among other things):

Changes not in sagenb itself but in how sagenb is incorporated into sage:

Instructions for installing this and its dependencies into >=sage-5.2.beta0 :

cd $SAGE_ROOT

./sage --hg -R local/bin qimport -P https://github.com/sagemath/sage-prod/files/10650557/trac_9774-scripts-mathjax.patch.gz
./sage --hg -R local/bin qimport -P https://github.com/sagemath/sage-prod/files/10655778/trac_13121-scripts.patch.gz

./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10650563/trac_9774-mathjax-try7.patch.gz
./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10653851/trac_11913-sage.patch.gz
./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654503/trac_12299-all-in-one.patch.gz
./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654504/trac_12299_headless_java.patch.gz
./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654505/trac-12299_java_doctest_opt.patch.gz

./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.2.spkg
./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p2.spkg

./sage -b

Depends on #11080 Depends on #9774 Depends on #11913 Depends on #12299 Depends on #13384

CC: @jhpalmieri @gutow @sagetrac-jyeo @rbeezer

Component: notebook

Keywords: sagenb

Author: Keshav Kini

Reviewer: John Palmieri, Jonathan Gutow

Merged: sage-5.4.beta0

Issue created by migration from https://trac.sagemath.org/ticket/13121

kini commented 12 years ago

Changed work issues from create SAGE_ROOT/devel to wait for 0.10.1

kini commented 12 years ago
comment:41

Sorry for the delay, John.

I'm going to release a 0.10.1 with the fixes for #8473 and also hopefully a fix for Jason Yeo's javascript event shuffling (see comments at the bottom of PR #69 on github), so I'm leaving this ticket as needs_work.

kini commented 12 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,4 @@
-This is a followup to #11080. During the review process of #11080, which stretched for quite a while, at some point we decided to have a feature freeze on the version of sagenb 0.9.x associated with #11080, just to simplify the review process. The purpose of this ticket is to incorporate some new features, bugfixes, code refactoring, etc. into the version of sagenb shipped with Sage, beyond what was reviewed in #11080. sagenb 0.10.0 contains the following (among other things):
+This is a followup to #11080. During the review process of #11080, which stretched for quite a while, at some point we decided to have a feature freeze on the version of sagenb 0.9.x associated with #11080, just to simplify the review process. The purpose of this ticket is to incorporate some new features, bugfixes, code refactoring, etc. into the version of sagenb shipped with Sage, beyond what was reviewed in #11080. sagenb 0.10 contains the following (among other things):

 * refactoring of the startup code, uWSGI and Tornado added as possible WSGI servers
 * code allowing .sws files to be uploaded by supplying a URL pointing to the .sws as an argument to the upload page's URL
kini commented 12 years ago

Description changed:

--- 
+++ 
@@ -12,7 +12,7 @@

 * No repository will be installed with sagenb - developers will need to clone sagenb themselves and install the new clone into their Sage installation manually (which is not difficult).

-SPKG: http://wstein.org/home/keshav/files/sagenb-0.10.0.spkg (a comparatively svelte 13 MB)
+SPKG: http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg (a comparatively svelte 13 MB)

 Instructions after following the ones at #11080:
kini commented 12 years ago
comment:43

Anything else?

kini commented 12 years ago

Changed work issues from wait for 0.10.1 to none

jhpalmieri commented 12 years ago

Reviewer: John Palmieri

jhpalmieri commented 12 years ago
comment:44

I think this looks good now. The main parts have already been positively reviewed (as parts of the prerequisite tickets). The spkg-install script is in good shape, as is SPKG.txt. Let's merge it to get MathJax into Sage.

jdemeyer commented 12 years ago

Changed dependencies from #11080, #9774, #8473, #11913, #12299 to #11080, #9774, #11913, #12299

kcrisman commented 12 years ago
comment:46

Probably meaningless, but I do get the following weirdness on OS X PPC when upgrading from 5.2.alpha0 (not beta0!) by using just the latest 0.10.1 spkg.

Dasher-03:~/Desktop/sage-5.2.alpha0 student$ ./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg
Calling sage-spkg on 'http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg'
Attempting to download package sagenb-0.10.1
http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg --> sagenb-0.10.1.spkg
[..................................................]
sagenb-0.10.1
====================================================
Extracting package /Users/student/Desktop/sage-5.2.alpha0/spkg/optional/sagenb-0.10.1.spkg
-rw-r--r--   1 student  student  13506560 Jul 10 13:59 /Users/student/Desktop/sage-5.2.alpha0/spkg/optional/sagenb-0.10.1.spkg
Finished extraction
****************************************************
Host system:
Darwin Dasher-03.local 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Users/student/Desktop/sage-5.2.alpha0/local/libexec/gcc/powerpc-apple-darwin8.11.0/4.6.3/lto-wrapper
Target: powerpc-apple-darwin8.11.0
Configured with: ../src/configure --prefix=/Users/student/Desktop/sage-5.2.alpha0/local --with-local-prefix=/Users/student/Desktop/sage-5.2.alpha0/local --with-gmp=/Users/student/Desktop/sage-5.2.alpha0/local --with-mpfr=/Users/student/Desktop/sage-5.2.alpha0/local --with-mpc=/Users/student/Desktop/sage-5.2.alpha0/local --with-system-zlib --disable-multilib  
Thread model: posix
gcc version 4.6.3 (GCC) 
****************************************************
Processing Twisted-12.1.0.tar.bz2
Running Twisted-12.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-UaYpDr/Twisted-12.1.0/egg-dist-tmp-ywlzEJ
conftest.c:1:23: fatal error: sys/epoll.h: No such file or directory
compilation terminated.
twisted/python/_initgroups.c: In function 'initgroups_initgroups':
twisted/python/_initgroups.c:39:2: warning: implicit declaration of function 'initgroups' [-Wimplicit-function-declaration]
twisted/python/sendmsg.c: In function 'sendmsg_sendmsg':
twisted/python/sendmsg.c:243:13: warning: implicit declaration of function 'CMSG_SPACE' [-Wimplicit-function-declaration]
twisted/python/sendmsg.c:306:13: warning: implicit declaration of function 'CMSG_LEN' [-Wimplicit-function-declaration]
twisted/internet/_sigchld.c: In function 'got_signal':
twisted/internet/_sigchld.c:15:9: warning: variable 'ignored_result' set but not used [-Wunused-but-set-variable]
Removing Twisted 12.0.0 from easy-install.pth file
Adding Twisted 12.1.0 to easy-install.pth file

after which all proceeds normally. It just looks a lot like #11080 comment:314 so I wondered.

Edit:

./spkg-install: line 76: cd: sagenb: No such file or directory
python: can't open file 'setup.py': [Errno 2] No such file or directory
Error installing sagenb via setup.py develop

real    11m4.240s
user    3m0.371s
sys     2m27.994s
************************************************************************
Error installing package sagenb-0.10.1
************************************************************************

which is weird enough that I must have done something wrong. I'll try beta0 instead, sorry for the noise.

kcrisman commented 12 years ago
comment:47

Incidentally, are the instructions in the description correct for 5.2.beta0? I assume not, based on the presence of 0.10.0 and not 0.10.1. Thanks.

kini commented 12 years ago
comment:48

Oops, sorry. Indeed, the instructions are not correct for 5.2.beta0, but not just because of 0.10.0 vs. 0.10.1 - I need to remove the parts about adding patches that are already merged in 5.2.beta0.

kini commented 12 years ago
comment:49

OK, the only remaining instructions should now be correct for 5.2.beta0... can you try again, kcrisman?

kini commented 12 years ago

Description changed:

--- 
+++ 
@@ -14,7 +14,7 @@

 SPKG: http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg (a comparatively svelte 13 MB)

-Instructions after following the ones at #11080:
+Instructions for installing this and its dependencies into >=sage-5.2.beta0 :

cd $SAGE_ROOT @@ -26,38 +26,9 @@ ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10653851/trac_11913-sage.patch.gz ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654503/trac_12299-all-in-one.patch.gz

-./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.0.spkg +./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg ./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p0.spkg

./sage -b


-Or, instructions without #11080:
-
-```
-cd $SAGE_ROOT
-
-./sage --hg -R . qimport -P https://github.com/sagemath/sage-prod/files/10653764/trac-11874-remove-twisted.patch.gz
-./sage --hg -R . qimport -P https://github.com/sagemath/sage-prod/files/10653164/trac-11503-jmol-spkg.2.patch.gz
-
-./sage --hg -R local/bin qimport -P https://github.com/sagemath/sage-prod/files/10650557/trac_9774-scripts-mathjax.patch.gz
-./sage --hg -R local/bin qimport -P https://github.com/sagemath/sage-prod/files/10652518/trac_11080-scripts-hgignore-dulwich.patch.gz
-./sage --hg -R local/bin qimport -P https://github.com/sagemath/sage-prod/files/10655778/trac_13121-scripts.patch.gz
-
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10653765/sage-spkg-11874.patch.gz
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10652514/trac_11078.patch.gz
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10653161/trac-11503-jmol-commandline.patch.gz
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654419/trac_12229-sagenb-developer-doc.3.patch.gz
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654418/trac-12229-manifest.patch.gz
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10652516/trac-11080-notebook-docs.patch.gz
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10652517/trac_11080-openssl-in-installation-docs.patch.gz
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10650562/trac_9774-mathjax-try6.patch.gz
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10653851/trac_11913-sage.patch.gz
-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654503/trac_12299-all-in-one.patch.gz
-
-./sage -i openssl # optional if you have systemwide SSL dev headers installed
-./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.0.spkg
-./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p0.spkg
-
-./sage -b
-```
kini commented 12 years ago

Description changed:

--- 
+++ 
@@ -25,6 +25,7 @@
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10650562/trac_9774-mathjax-try6.patch.gz
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10653851/trac_11913-sage.patch.gz
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654503/trac_12299-all-in-one.patch.gz
+./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654504/trac_12299_headless_java.patch.gz

 ./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg
 ./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p0.spkg
kini commented 12 years ago
comment:51

Added a missing patch from #12299.

gutow commented 12 years ago
comment:53

The Jmol package has been updated to include more extensive version checking for the JVM.

gutow commented 12 years ago

Description changed:

--- 
+++ 
@@ -28,7 +28,7 @@
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654504/trac_12299_headless_java.patch.gz

 ./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg
-./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p0.spkg
+./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p1.spkg

 ./sage -b
ppurka commented 12 years ago

Description changed:

--- 
+++ 
@@ -22,7 +22,7 @@
 ./sage --hg -R local/bin qimport -P https://github.com/sagemath/sage-prod/files/10650557/trac_9774-scripts-mathjax.patch.gz
 ./sage --hg -R local/bin qimport -P https://github.com/sagemath/sage-prod/files/10655778/trac_13121-scripts.patch.gz

-./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10650562/trac_9774-mathjax-try6.patch.gz
+./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10650563/trac_9774-mathjax-try7.patch.gz
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10653851/trac_11913-sage.patch.gz
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654503/trac_12299-all-in-one.patch.gz
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654504/trac_12299_headless_java.patch.gz
ppurka commented 12 years ago
comment:54

Update mathjax patch

gutow commented 12 years ago

Description changed:

--- 
+++ 
@@ -28,7 +28,7 @@
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654504/trac_12299_headless_java.patch.gz

 ./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg
-./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p1.spkg
+./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p2.spkg

 ./sage -b
gutow commented 12 years ago
comment:55

update jmol package to match latest on #12299

novoselt commented 12 years ago
comment:57

I've installed this version on Sage-5.2.beta1 and it is still not possible to sign out.

Moreover, when I removed all cookies of the site and got to the login page, I was able to register as a new user and I am pretty sure I have never enabled it (I did add one user manually as admin). I can't reproduce it, however, so maybe I've done something wrong.

kini commented 12 years ago
comment:58

Jeroen: since 5.2.rc0 has been released, should I set this to the 5.3 milestone?

kini commented 12 years ago
comment:59

Never mind. For some reason I thought 5.2.rc0 had been released, but apparently it has not. Sorry for the noise.

jdemeyer commented 12 years ago
comment:60

sage-5.2.rc0 is as good as released (in the sense that I have decided which patches it will contain). So yes, this is going to be sage-5.3 or later.

gutow commented 12 years ago

Description changed:

--- 
+++ 
@@ -26,6 +26,8 @@
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10653851/trac_11913-sage.patch.gz
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654503/trac_12299-all-in-one.patch.gz
 ./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654504/trac_12299_headless_java.patch.gz
+./sage --hg -R devel/sage qimport -P https://github.com/sagemath/sage-prod/files/10654505/trac-12299_java_doctest_opt.patch.gz
+

 ./sage -i http://wstein.org/home/keshav/files/sagenb-0.10.1.spkg
 ./sage -i http://www.uwosh.edu/faculty_staff/gutow/jmol-12.3.27.p2.spkg
gutow commented 12 years ago
comment:61

Adding patch from #12299 to make java dependent doctests in jmoldata.py optional.

gutow commented 12 years ago
comment:62

Two issues:

  1. Evaluate button does not work for a cell until it loses focus to another (pull request 85 on git).
  2. Secure mode does not work even with system wide ssl-dev headers ( I have libcurl4-openssl-dev and libssl-dev installed). Either the specifications or install checking need to be more specific. I suggest that the spkg check for what is needed and prompts for a local install of openssl if what is needed is not available.

Error on launch of notebook in secure mode (this goes away after local openssl install):

/home/sage/sage-5.2.beta1/<ipython console> in <module>()

/home/sage/sage-5.2.beta1/devel/sagenb/sagenb/notebook/notebook_object.py in __call__(self, *args, **kwds)
    217     """
    218     def __call__(self, *args, **kwds):
--> 219         return self.notebook(*args, **kwds)
    220 
    221     notebook = run_notebook.notebook_run

/home/sage/sage-5.2.beta1/devel/sagenb/sagenb/notebook/run_notebook.py in notebook_run(self, directory, port, interface, port_tries, secure, reset, accounts, openid, server_pool, ulimit, timeout, upload, automatic_login, start_path, fork, quiet, server, profile, subnets, require_login, open_viewer, address)
    614     os.chdir(cwd)
    615     if e == 256:
--> 616         raise socket.error
    617 
    618 def get_admin_passwd():
gutow commented 12 years ago

Work Issues: evaluate button focus,openssl

gutow commented 12 years ago
comment:63

Another issue: New worksheets do not open empty. They now copy their content from one of the other worksheets.

gutow commented 12 years ago

Changed work issues from evaluate button focus,openssl to new worksheets should be empty,evaluate button focus,openssl

kcrisman commented 12 years ago
comment:64

Thank you for all this careful testing, Jonathan.

jasongrout commented 12 years ago
comment:65

Do new worksheets always copy their content? They only sporadically do that for me; maybe one in ten or twenty. If I open several new worksheets in succession, it eventually gets to a real blank worksheet and then things work okay from there.

I commented on https://github.com/sagemath/sagenb/issues/87

kini commented 12 years ago
comment:66

Thank you for all this careful testing, Jonathan.

+1, yes, thank you :)

About the SSL problem, is there any further output than what you've given? Can you in fact just run sage -bn on the command line and paste everything you get from then until the next command prompt?

gutow commented 12 years ago
comment:67

Replying to @kini:

Thank you for all this careful testing, Jonathan.

+1, yes, thank you :)

You're welcome. I was just updating my server so thought I would try to pile in all the notebook stuff we thought was working.

About the SSL problem, is there any further output than what you've given?

That's all the error output I get when I try to start a secure notebook on my system, without doing a local install of openssl. Note, that this doesn't happen on all my systems. I suspect that the way openssl is searched for is not working. Ubuntu 12.04 are the systems I'm having trouble with.

Can you in fact just run sage -bn on the command line and paste everything you get from then until the next command prompt?

I'll see what I can do. I think I saved the .tar so can make a clean copy to work with.

gutow commented 12 years ago
comment:68

This time I trapped a more complete error message when I started the server in secure mode. This is on Ubuntu 12.04 with the following openssl related pacakges installed: openssl,python-openssl, libssl0.9.8,ssl-cert,libssl-doc,libssl-dev.

----------------------------------------------------------------------
| Sage Version 5.2.rc0, Release Date: 2012-07-17                     |
| Type "notebook()" for the browser-based notebook interface.        |
| Type "help()" for help.                                            |
----------------------------------------------------------------------
**********************************************************************
*                                                                    *
* Warning: this is a prerelease version, and it may be unstable.     *
*                                                                    *
**********************************************************************
sage: notebook(secure=True,automatic_login=False)
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"
Unhandled Error
Traceback (most recent call last):
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/application/app.py", line 652, in run
    runApp(config)
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/application/app.py", line 386, in run
    self.application = self.createOrGetApplication()
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/application/app.py", line 451, in createOrGetApplication
    application = getApplication(self.config, passphrase)
--- <exception caught here> ---
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/application/app.py", line 462, in getApplication
    application = service.loadApplication(filename, style, passphrase)
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/application/service.py", line 405, in loadApplication
    application = sob.loadValueFromFile(filename, 'application', passphrase)
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/persisted/sob.py", line 210, in loadValueFromFile
    exec fileObj in d, d
  File "sage_notebook.sagenb/twistedconf.tac", line 83, in <module>
    s = strports.service('ssl:8080:interface=localhost:privateKey=/home/jonathan/.sage/notebook/private.pem:certKey=/home/jonathan/.sage/notebook/public.pem', site)
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/application/strports.py", line 77, in service
    endpoints._serverFromStringLegacy(reactor, description, default),
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/internet/endpoints.py", line 873, in _serverFromStringLegacy
    nameOrPlugin, args, kw = _parseServer(description, None, default)
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/internet/endpoints.py", line 864, in _parseServer
    return (endpointType.upper(),) + parser(factory, *args[1:], **kw)
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/internet/endpoints.py", line 671, in _parseSSL
    from twisted.internet import ssl
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-i686.egg/twisted/internet/ssl.py", line 23, in <module>
    from OpenSSL import SSL
  File "/media/Extra_Space/Sage_installs/sage-5.2.rc0/local/lib/python2.7/site-packages/pyOpenSSL-0.12-py2.7-linux-i686.egg/OpenSSL/__init__.py", line 36, in <module>
    from OpenSSL import crypto
exceptions.ImportError: cannot import name crypto

Failed to load application: cannot import name crypto

---------------------------------------------------------------------------
error                                     Traceback (most recent call last)

/media/Extra_Space/Sage_installs/sage-5.2.rc0/<ipython console> in <module>()

/media/Extra_Space/Sage_installs/sage-5.2.rc0/devel/sagenb/sagenb/notebook/notebook_object.pyc in __call__(self, *args, **kwds)
    217     """
    218     def __call__(self, *args, **kwds):
--> 219         return self.notebook(*args, **kwds)
    220 
    221     notebook = run_notebook.notebook_run

/media/Extra_Space/Sage_installs/sage-5.2.rc0/devel/sagenb/sagenb/notebook/run_notebook.pyc in notebook_run(self, directory, port, interface, port_tries, secure, reset, accounts, openid, server_pool, ulimit, timeout, upload, automatic_login, start_path, fork, quiet, server, profile, subnets, require_login, open_viewer, address)
    614     os.chdir(cwd)
    615     if e == 256:
--> 616         raise socket.error
    617 
    618 def get_admin_passwd():

error: 
sage:
kini commented 12 years ago
comment:69

OK, just checking, but did you install from source? If so, can you upload the output of easy_install pyopenssl inside a sage -sh session?

vbraun commented 12 years ago
comment:70

I tried this updated to see if it fixes #13318. I see that require_login is now renamed to automatic_login, but I still end up with the login screen.

dansme commented 12 years ago
comment:71

I have the same issue with PyOpenSSL on Debian/sid, already with sagenb 0.9.1:

daniel-mobile% sage -python
Python 2.7.3 (default, Aug  1 2012, 19:24:06) 
[GCC 4.7.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenSSL
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/sage-5.2.rc0/local/lib/python2.7/site-packages/pyOpenSSL-0.12-py2.7-linux-x86_64.egg/OpenSSL/__init__.py", line 41, in <module>
    from OpenSSL import rand, SSL
ImportError: /opt/sage-5.2.rc0/local/lib/python2.7/site-packages/pyOpenSSL-0.12-py2.7-linux-x86_64.egg/OpenSSL/SSL.so: undefined symbol: SSLv2_method

libssl1.0.0 is built with no-ssl2 on Debian/Ubuntu for security reasons. Therefore the symbol SSLv2_method is not defined. Older PyOpenSSL versions don't check for this, but >=0.13 should be fine.

(Aside: This also seems to cause funky segmentation faults on Debian/Ubuntu: https://groups.google.com/d/msg/sage-release/5TCe2JnV56o/QME2igZSF8YJ )

kini commented 12 years ago
comment:72

IIRC we made a conscious decision to use PyOpenSSL <0.13 because 0.13 breaks with libssl <1.0.0 ... (?) Obviously "<"-based version dependencies are not viable in the long run though so I'd like to use new PyOpenSSL in the notebook if possible, certainly.

kini commented 12 years ago
comment:73

I remembered correctly - #11080 comment:159

dansme commented 12 years ago
comment:74

Thanks, I did not realize that. It seems unfortunate that our PyOpenSSL is broken out of the box on recent Ubuntu / Debian installs (and messes with sys.setdlopenflags in the notebook process). I don't really know how this should be fixed. Is it reasonable, for example, to include 0.13 and not install it on systems with old OpenSSL (<0.9.8f) or use a patched version of either 0.12 or 0.13?

kini commented 12 years ago
comment:75

The best thing would be if pyOpenSSL 0.14 could be released to handle old OpenSSL versions...

Jeroen, can you try directly building pyOpenSSL on the OS X 10.4 PPC machine which caused the failure I linked a couple comments ago? That way we could submit a proper bug report to the pyOpenSSL devs.

dansme commented 12 years ago
comment:76

I found what seems to be an upstream bug report about this:

https://bugs.launchpad.net/pyopenssl/+bug/845445

Not much progress though.

kini commented 12 years ago
comment:77

Thanks for finding that.

kini commented 12 years ago
comment:78

I tested the patch there on a CentOS 5 machine I have access to. Hopefully the developer will consider that good enough to release the fix :)

kini commented 12 years ago

Changed dependencies from #11080, #9774, #11913, #12299 to #11080, #9774, #11913, #12299, #13384

kini commented 12 years ago
comment:80

I've made a pyOpenSSL SPKG so that we can use pyOpenSSL 0.13 + the patch daniels found. See #13384.

kini commented 12 years ago
comment:81

Actually, we might not even need OpenSSL at all. See #13385.