Backport to correct #1243590 and #1238341

This commit is contained in:
pcpa 2015-07-25 19:45:47 -03:00
parent d27dab46a5
commit 66bc672795
2 changed files with 66 additions and 2 deletions

54
sagemath-qepcad.patch Normal file
View file

@ -0,0 +1,54 @@
diff -up src/sage/interfaces/qepcad.py.orig src/sage/interfaces/qepcad.py
--- src/sage/interfaces/qepcad.py.orig 2015-07-25 19:41:13.149677325 -0300
+++ src/sage/interfaces/qepcad.py 2015-07-25 19:42:52.372681124 -0300
@@ -519,9 +519,8 @@ TESTS:
Check the qepcad configuration file::
- sage: from sage.misc.misc import SAGE_LOCAL
- sage: open('%s/default.qepcadrc'%SAGE_LOCAL).readlines()[-1]
- 'SINGULAR .../local/bin\n'
+ sage: open('/usr/share/qepcad/default.qepcadrc').readlines()[-1]
+ 'SINGULAR /usr/bin\n'
AUTHORS:
@@ -548,6 +547,8 @@ from sage.misc.preparser import implicit
from expect import Expect, ExpectFunction, AsciiArtString
+QEPCAD_LOCAL = "/usr/share/qepcad"
+
def _qepcad_cmd(memcells=None):
r"""
Construct a QEPCAD command line. Optionally set the
@@ -558,17 +559,17 @@ def _qepcad_cmd(memcells=None):
sage: from sage.interfaces.qepcad import _qepcad_cmd
sage: from sage.misc.misc import SAGE_LOCAL
sage: s = _qepcad_cmd()
- sage: s == 'env qe=%s qepcad '%SAGE_LOCAL
+ sage: s == 'env qe=/usr/share/qepcad qepcad '
True
sage: s = _qepcad_cmd(memcells=8000000)
- sage: s == 'env qe=%s qepcad +N8000000'%SAGE_LOCAL
+ sage: s == 'env qe=/usr/share/qepcad qepcad +N8000000'
True
"""
if memcells is not None:
memcells_arg = '+N%s' % memcells
else:
memcells_arg = ''
- return "env qe=%s qepcad %s"%(sage.misc.misc.SAGE_LOCAL, memcells_arg)
+ return "env qe=%s qepcad %s"%(QEPCAD_LOCAL, memcells_arg)
_command_info_cache = None
@@ -590,7 +591,7 @@ def _update_command_info():
cache = {}
- with open('%s/bin/qepcad.help'%sage.misc.misc.SAGE_LOCAL) as help:
+ with open('%s/bin/qepcad.help'%QEPCAD_LOCAL) as help:
assert(help.readline().strip() == '@')
while True:

View file

@ -39,7 +39,7 @@ Name: sagemath
Group: Applications/Engineering
Summary: A free open-source mathematics software system
Version: 6.3
Release: 5%{?dist}
Release: 6%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name
# before files with that license
@ -160,6 +160,10 @@ Patch26: %{name}-pari2.7.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1091442
Patch27: %{name}-CVE-2012-4230.patch
# Correct unable to start QEPCAD within sage
# https://bugzilla.redhat.com/show_bug.cgi?id=1243590
Patch28: %{name}-qepcad.patch
BuildRequires: 4ti2
BuildRequires: atlas-devel
BuildRequires: cddlib-tools
@ -277,6 +281,7 @@ Requires: python-twisted-mail
Requires: python-twisted-web
Requires: python-twisted-web2
Requires: python-ZODB3
Requires: qepcad-B
Requires: R
Requires: rpy
Requires: %{name}-core
@ -341,7 +346,7 @@ Small database of Conway polynomials for sagemath.
#------------------------------------------------------------------------
%package data-elliptic_curves
Summary: Databases of elliptic curves
Summary: Databases of elliptic curve
Group: Applications/Engineering
Requires: %{name}-data = %{version}-%{release}
BuildArch: noarch
@ -628,6 +633,7 @@ popd
%patch26
%patch27
%patch28
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \
-e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \
@ -1346,6 +1352,10 @@ exit 0
########################################################################
%changelog
* Sun Jul 25 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 6.3-6
- Correct unable to start QEPCAD within sage (#1243590)
- Use interactive bash on wrappers to work with other login shells (#1238341)
* Sat Dec 6 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 6.3-5
- Add patch for CVE-2012-4230 (#1091442)