Bug 11555 - python-scipy new security issue CVE-2013-4251
: python-scipy new security issue CVE-2013-4251
Status: RESOLVED FIXED
Product: Mageia
Classification: Unclassified
Component: Security
: 3
: i586 Linux
: Normal Severity: major
: ---
Assigned To: QA Team
: Sec team
: http://lwn.net/Vulnerabilities/571981/
: MGA2TOO has_procedure advisory mga2-3...
: validated_update
:
:
  Show dependency treegraph
 
Reported: 2013-10-28 22:34 CET by David Walser
Modified: 2013-11-20 21:58 CET (History)
3 users (show)

See Also:
Source RPM: python-scipy-0.12.0-5.mga4.src.rpm
CVE: CVE-2013-4251
Status comment:


Attachments

Description David Walser 2013-10-28 22:34:44 CET
Fedora has issued an advisory on October 18:
https://lists.fedoraproject.org/pipermail/package-announce/2013-October/119771.html

This was fixed in 0.12.1 upstream, as indicated in the RedHat bug:
https://lists.fedoraproject.org/pipermail/package-announce/2013-October/119771.html

Older versions may also be affected.

Reproducible: 

Steps to Reproduce:
Comment 1 Philippe Makowski 2013-10-29 19:39:17 CET
python-scipy-debug-0.9.0-3.1.mga2.x86_64
python-scipy-0.9.0-3.1.mga2.i586 
python-scipy-0.9.0-3.1.mga2.src 
python-scipy-debug-0.9.0-3.1.mga2.i586 
python-scipy-0.9.0-3.1.mga2.x86_64 

python-scipy-debuginfo-0.9.0-7.mga3.i586 
python-scipy-0.9.0-7.mga3.x86_64 
python-scipy-0.9.0-7.mga3.src 
python-scipy-0.9.0-7.mga3.i586 
python-scipy-debuginfo-0.9.0-7.mga3.x86_64 

are available with patch adapted from the Fedora one on el5

For Mga4, update was made to 0.13.0 as it also fix others bugs and integrate all the patches we had.
Comment 2 David Walser 2013-10-29 20:37:08 CET
Thanks Philippe!

Advisory:
========================

Updated python-scipy package fixes security vulnerability:

scipy.weave will use /tmp/[username] as persistent storage (cache), but it
does not check whether or not this directory already exists, does not check
whether it is a directory or a symlink, and also does not verify permissions
or ownership, which could allow someone to place code in this directory that
would be executed as the user running scipy.weave (CVE-2013-4251).

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4251
https://lists.fedoraproject.org/pipermail/package-announce/2013-October/119771.html
========================

Updated packages in core/updates_testing:
========================
python-scipy-0.9.0-3.1.mga2
python-scipy-0.9.0-7.mga3

from SRPMS:
python-scipy-0.9.0-3.1.mga2.src.rpm
python-scipy-0.9.0-7.mga3.src.rpm
Comment 3 claire robinson 2013-10-30 18:22:24 CET
Testing mga2 32

(Long comment, sorry. tl;dr; Some missing deps & potential regression.)

Some info for testing here: 
http://docs.scipy.org/doc/scipy/reference/tutorial/weave.html#testing

PoC:https://bugzilla.redhat.com/show_bug.cgi?id=916690#c10
import random, scipy.weave; a=1; scipy.weave.inline('printf("%%d\\n",a,%f);' % random.random(),['a'])


Seems to be missing a couple of dependencies. Not a regression.


Python 2.7.5 (default, Sep 20 2013, 19:00:24) 
[GCC 4.6.3] on linux2
Type "copyright", "credits" or "license()" for more information.
>>> import weave

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import weave
ImportError: No module named weave

>>> from scipy import weave

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    from scipy import weave
  File "/usr/lib/python2.7/site-packages/scipy/weave/__init__.py", line 13, in <module>
    from inline_tools import inline
  File "/usr/lib/python2.7/site-packages/scipy/weave/inline_tools.py", line 5, in <module>
    import ext_tools
  File "/usr/lib/python2.7/site-packages/scipy/weave/ext_tools.py", line 6, in <module>
    import build_tools
  File "/usr/lib/python2.7/site-packages/scipy/weave/build_tools.py", line 28, in <module>
    import platform_info
  File "/usr/lib/python2.7/site-packages/scipy/weave/platform_info.py", line 14, in <module>
    from numpy.distutils.ccompiler import new_compiler
ImportError: No module named distutils.ccompiler


After installing python-numpy-devel..


>>> from scipy import weave
>>> weave.test()
Running unit tests for scipy.weave
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/numpy/testing/nosetester.py", line 318, in test
    self._show_system_info()
  File "/usr/lib/python2.7/site-packages/numpy/testing/nosetester.py", line 187, in _show_system_info
    nose = import_nose()
  File "/usr/lib/python2.7/site-packages/numpy/testing/nosetester.py", line 69, in import_nose
    raise ImportError(msg)
ImportError: Need nose >= 0.10.0 for tests - see http://somethingaboutorange.com/mrl/projects/nose


After installing python-nose..


>>> weave.test()
Running unit tests for scipy.weave
NumPy version 1.6.1
NumPy is installed in /usr/lib/python2.7/site-packages/numpy
SciPy version 0.9.0
SciPy is installed in /usr/lib/python2.7/site-packages/scipy
Python version 2.7.5 (default, Sep 20 2013, 19:00:24) [GCC 4.6.3]
nose version 1.0.0
........................................................................................................................................
----------------------------------------------------------------------
Ran 136 tests in 3.654s

OK
<nose.result.TextTestResult run=136 errors=0 failures=0>



Testing the CVE..

Before
------

>>> import random, scipy.weave; a=1; scipy.weave.inline('printf("%%d\\n",a,%f);' % random.random(),['a'])
creating /tmp/claire/python27_intermediate/compiler_4d9e612f42b72224747c0ffd4907e492
/home/claire/.python27_compiled/sc_ee844ef4d4cc1491847e6d62062c70f70.cpp: In function ‘PyObject* compiled_func(PyObject*, PyObject*)’:
/home/claire/.python27_compiled/sc_ee844ef4d4cc1491847e6d62062c70f70.cpp:673:29: warning: too many arguments for format [-Wformat-extra-args]
1
>>> 

$ rm -rf /tmp/claire

# mkdir /tmp/claire

>>> import random, scipy.weave; a=1; scipy.weave.inline('printf(%%d\n,a,%f);' % random.random(),['a'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/scipy/weave/inline_tools.py", line 355, in inline
    **kw)
  File "/usr/lib/python2.7/site-packages/scipy/weave/inline_tools.py", line 482, in compile_function
    verbose=verbose, **kw)
  File "/usr/lib/python2.7/site-packages/scipy/weave/ext_tools.py", line 363, in compile
    temp = catalog.intermediate_dir()
  File "/usr/lib/python2.7/site-packages/scipy/weave/catalog.py", line 229, in intermediate_dir
    create_dir(path)
  File "/usr/lib/python2.7/site-packages/scipy/weave/catalog.py", line 129, in create_dir
    os.mkdir(p)
OSError: [Errno 13] Permission denied: '/tmp/claire/python27_intermediate'


Running under strace, it doesn't check for ownership of /tmp/[username] before trying to create a subdir in it...

stat64("/tmp/claire/python27_intermediate", 0xbf93a7ec) = -1 ENOENT (No such file or directory)
stat64("/tmp/claire/python27_intermediate", 0xbf93a6fc) = -1 ENOENT (No such file or directory)
mkdir("/tmp/claire/python27_intermediate", 0777) = -1 EACCES (Permission denied)
stat64("/tmp/claire", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
mkdir("/tmp/claire/python27_intermediate", 0777) = -1 EACCES (Permission denied)


After
-----
Seems to fail.

# rm -rf /tmp/claire

>>> import random, scipy.weave; a=1; scipy.weave.inline('printf(%%d\n,a,%f);' % random.random(),['a'])

/home/claire/.cache/scipy/python27_compiled/sc_97d1abf7bddfdb5673c04e7a681a7e2d0.cpp: In function ‘PyObject* compiled_func(PyObject*, PyObject*)’:
/home/claire/.cache/scipy/python27_compiled/sc_97d1abf7bddfdb5673c04e7a681a7e2d0.cpp:673:12: error: expected primary-expression before ‘%’ token
/home/claire/.cache/scipy/python27_compiled/sc_97d1abf7bddfdb5673c04e7a681a7e2d0.cpp:673:13: error: ‘d’ was not declared in this scope
/home/claire/.cache/scipy/python27_compiled/sc_97d1abf7bddfdb5673c04e7a681a7e2d0.cpp: In function ‘PyObject* compiled_func(PyObject*, PyObject*)’:
/home/claire/.cache/scipy/python27_compiled/sc_97d1abf7bddfdb5673c04e7a681a7e2d0.cpp:673:12: error: expected primary-expression before ‘%’ token
/home/claire/.cache/scipy/python27_compiled/sc_97d1abf7bddfdb5673c04e7a681a7e2d0.cpp:673:13: error: ‘d’ was not declared in this scope
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/scipy/weave/inline_tools.py", line 355, in inline
    **kw)
  File "/usr/lib/python2.7/site-packages/scipy/weave/inline_tools.py", line 482, in compile_function
    verbose=verbose, **kw)
  File "/usr/lib/python2.7/site-packages/scipy/weave/ext_tools.py", line 367, in compile
    verbose = verbose, **kw)
  File "/usr/lib/python2.7/site-packages/scipy/weave/build_tools.py", line 272, in build_extension
    setup(name = module_name, ext_modules = [ext],verbose=verb)
  File "/usr/lib/python2.7/site-packages/numpy/distutils/core.py", line 186, in setup
    return old_setup(**new_attr)
  File "/usr/lib/python2.7/distutils/core.py", line 169, in setup
    raise SystemExit, "error: " + str(msg)
scipy.weave.build_tools.CompileError: error: Command "g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/ncursesw -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -g -fPIC -I/usr/lib/python2.7/site-packages/scipy/weave -I/usr/lib/python2.7/site-packages/scipy/weave/scxx -I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c /home/claire/.cache/scipy/python27_compiled/sc_97d1abf7bddfdb5673c04e7a681a7e2d0.cpp -o /tmp/scipy-claire-F8UKQh/python27_intermediate/compiler_4d9e612f42b72224747c0ffd4907e492/home/claire/.cache/scipy/python27_compiled/sc_97d1abf7bddfdb5673c04e7a681a7e2d0.o" failed with exit status 1
>>>


Can see under strace it is using an unpredictable dir name now though and does seem to check for it before creating it and check perms.

stat64("/tmp/scipy-claire-F8UKQh", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
uname({sys="Linux", node="laptop", ...}) = 0
open("/tmp/scipy-claire-F8UKQh/dummy_laptop_3931_xkiVva", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE|O_NOFOLLOW, 0600) = 3

then

stat64("/tmp/scipy-claire-F8UKQh", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/tmp/scipy-claire-F8UKQh", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
getuid32()                              = 500
lstat64("/tmp/scipy-claire-F8UKQh", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/tmp/scipy-claire-F8UKQh/python27_intermediate", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/tmp/scipy-claire-F8UKQh/python27_intermediate", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
access("/tmp/scipy-claire-F8UKQh/python27_intermediate", W_OK) = 0
access("/tmp/scipy-claire-F8UKQh/python27_intermediate", W_OK) = 0
Comment 4 Philippe Makowski 2013-10-30 21:11:37 CET
Please try with 

python -c "import scipy.weave ; b=256 ; scipy.weave.inline('printf(\"%d\\\\n\",b);', ['b'], verbose=2)"

seems that :
import random, scipy.weave; a=1; scipy.weave.inline('printf(%%d\n,a,%f);' % random.random(),['a'])

is for another bug https://bugzilla.redhat.com/show_bug.cgi?id=916695
(but I can't access it now)
Comment 5 claire robinson 2013-10-31 08:59:34 CET
Ahh yes indeed, it's something noticed during testing and still embargoed.

Your example doesn't cause scipy.weave to create or use /tmp/[username]. If you can create one which will i'll gladly test again. I'll check with the self-test though too.


Testing mga3 64

It's also missing deps on python-numpy-devel and python-nose

It won't import without python-numpy-devel and the tests below fail without python-nose

>>> from scipy import weave
>>> weave.test()

or

>>> import scipy.weave
>>> scipy.weave.test()


Before
------

Using the previous example to trigger /tmp use, it fails in the same way so no regression in mga3 but can be seen to use and then create /tmp/claire without checking owner/perms, which is what this CVE relates to.

$ strace -o strace.txt python -c "import random, scipy.weave; a=1; scipy.weave.inline('printf("%%d\\n",a,%f);' % random.random(),['a'])"

Examining strace.txt..

stat("/tmp/claire/python27_intermediate", 0x7fff11a75fe0) = -1 ENOENT (No such file or directory)
stat("/tmp/claire/python27_intermediate", 0x7fff11a75de0) = -1 ENOENT (No such file or directory)
mkdir("/tmp/claire/python27_intermediate", 0777) = -1 ENOENT (No such file or directory)
stat("/tmp/claire", 0x7fff11a75be0)    = -1 ENOENT (No such file or directory)
mkdir("/tmp/claire", 0777)             = 0
mkdir("/tmp/claire/python27_intermediate", 0777) = 0
stat("/tmp/claire/python27_intermediate", {st_mode=S_IFDIR|0755, st_size=40, ...}) = 0
access("/tmp/claire/python27_intermediate", W_OK) = 0
access("/tmp/claire/python27_intermediate", W_OK) = 0



After
-----
It checks existing directories in /tmp before creating one with a randomised name.

openat(AT_FDCWD, "/tmp", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 33 entries */, 32768)    = 1192
getdents(3, /* 0 entries */, 32768)     = 0
close(3) 
mkdir("/tmp/scipy-claire-JtUHgA", 0700) = 0
mkdir("/tmp/scipy-claire-JtUHgA/python27_intermediate", 0700) = 0
stat("/tmp/scipy-claire-JtUHgA/python27_intermediate", {st_mode=S_IFDIR|0700, st_size=40, ...}) = 0
access("/tmp/scipy-claire-JtUHgA/python27_intermediate", W_OK) = 0
access("/tmp/scipy-claire-JtUHgA/python27_intermediate", W_OK) = 0

Confirmed it re-uses this directory with successive executions and checks it can write to it.

openat(AT_FDCWD, "/tmp", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 34 entries */, 32768)    = 1232
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
stat("/tmp/scipy-claire-JtUHgA", {st_mode=S_IFDIR|0700, st_size=60, ...}) = 0
uname({sys="Linux", node="localhost", ...}) = 0
open("/tmp/scipy-claire-JtUHgA/dummy_localhost_30714_5s6EcQ", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 3
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
unlink("/tmp/scipy-claire-JtUHgA/dummy_localhost_30714_5s6EcQ") = 0
fcntl(3, F_GETFL)                       = 0x28002 (flags O_RDWR|O_LARGEFILE|O_NOFOLLOW)
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff613196000
lseek(3, 0, SEEK_CUR)                   = 0
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
close(3)                                = 0
munmap(0x7ff613196000, 4096)            = 0
stat("/tmp/scipy-claire-JtUHgA", {st_mode=S_IFDIR|0700, st_size=60, ...}) = 0
stat("/tmp/scipy-claire-JtUHgA", {st_mode=S_IFDIR|0700, st_size=60, ...}) = 0
getuid()                                = 500
lstat("/tmp/scipy-claire-JtUHgA", {st_mode=S_IFDIR|0700, st_size=60, ...}) = 0
stat("/tmp/scipy-claire-JtUHgA/python27_intermediate", {st_mode=S_IFDIR|0700, st_size=60, ...}) = 0
stat("/tmp/scipy-claire-JtUHgA/python27_intermediate", {st_mode=S_IFDIR|0700, st_size=60, ...}) = 0
access("/tmp/scipy-claire-JtUHgA/python27_intermediate", W_OK) = 0
access("/tmp/scipy-claire-JtUHgA/python27_intermediate", W_OK) = 0


So although the PoC itself fails before and after the update in the same way, due to another issue, the CVE appears closed with the update. The self-test also completes without issue. It is still missing requires though.

To summarise:

In mga2 the update introduces a regression when tested with the PoC and is missing requires. CVE-2013-4251 appears closed by the update.

In mga3 the PoC fails before & after the update so no regression and is also missing the same requires. CVE-2013-4251 appears closed by the update.

How do you want to proceed Philippe?
Comment 6 claire robinson 2013-10-31 09:14:59 CET
If it helps any, issuing the g++ command it uses on it's own..

$ g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/ncursesw -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -g -fPIC -I/usr/lib64/python2.7/site-packages/scipy/weave -I/usr/lib64/python2.7/site-packages/scipy/weave/scxx -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c /home/claire/.cache/scipy/python27_compiled/sc_aad3e81e6dc149fa16bfd257efc7b6040.cpp -o /tmp/scipy-claire-JtUHgA/python27_intermediate/compiler_afe66097fc0dbc49670ddc15acde33d8/home/claire/.cache/scipy/python27_compiled/sc_aad3e81e6dc149fa16bfd257efc7b6040.o

/home/claire/.cache/scipy/python27_compiled/sc_aad3e81e6dc149fa16bfd257efc7b6040.cpp: In function ‘PyObject* compiled_func(PyObject*, PyObject*)’:
/home/claire/.cache/scipy/python27_compiled/sc_aad3e81e6dc149fa16bfd257efc7b6040.cpp:673:12: error: expected primary-expression before ‘%’ token
/home/claire/.cache/scipy/python27_compiled/sc_aad3e81e6dc149fa16bfd257efc7b6040.cpp:673:13: error: ‘d’ was not declared in this scope

The path of -o looks suspect, but I know nothing about this stuff.
Comment 7 claire robinson 2013-10-31 09:30:27 CET
Oops strike that! The quoting is messed up.

When the proper PoC script is run in a python shell it shows the following, it completes without the g++ error and as shown on the rhbz report. So working as expected. So on mga3 at least, just the missing requires to fix.

I'll retest this on mga2 32 also to check if it's a wetware error there too.

$ python
Python 2.7.5 (default, Aug 12 2013, 12:12:07) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information
.
>>> import random, scipy.weave; a=1; scipy.weave.inline('printf("%%d\\n",a,%f);' % random.random(),['a'])

/home/claire/.cache/scipy/python27_compiled/sc_ce4f412f9f878594259c9af1ffdac7ba0.cpp: In function ‘PyObject* compiled_func(PyObject*, PyObject*)’:
/home/claire/.cache/scipy/python27_compiled/sc_ce4f412f9f878594259c9af1ffdac7ba0.cpp:673:29: warning: too many arguments for format [-Wformat-extra-args]
1

>>>
Comment 8 claire robinson 2013-10-31 10:36:21 CET
Mga2 32 is also as expected when the correct PoC script is used.

Sorry for the confusion. There is just the issue of missing requires on both.
We should really fix those before pushing.
Comment 9 Philippe Makowski 2013-10-31 16:19:17 CET
ok I will provide new update with missing requires
Comment 10 David Walser 2013-10-31 17:36:06 CET
python-scipy-0.13.0-1.mga4 has been uploaded for Cauldron.
Comment 11 claire robinson 2013-10-31 18:50:57 CET
The requires might need to be added there too.
Comment 12 Philippe Makowski 2013-11-01 13:38:25 CET
Updated packages in core/updates_testing:
========================
python-scipy-0.9.0-3.2.mga2
python-scipy-0.9.0-7.1.mga3

from SRPMS:
python-scipy-0.9.0-3.2.mga2.src.rpm
python-scipy-0.9.0-7.1.mga3.src.rpm

I added requires for python-numpy-devel
not python-nose because it is need only for tests

same done in Cauldron
Comment 13 claire robinson 2013-11-13 12:43:42 CET
On a system without g++ installed it fails, so it appears to be missing a require on that too..

>>> import random, scipy.weave; a=1; scipy.weave.inline('printf("%%d\\n",a,%f);' % random.random(),['a'])
creating /tmp/scipy-claire-8oSwcC/python27_intermediate/compiler_4d9e612f42b72224747c0ffd4907e492
sh: g++: command not found
sh: g++: command not found
Traceback (most recent call last):
etc..
Comment 14 claire robinson 2013-11-13 12:45:02 CET
Adding 'feedback' marker for now.

Sorry for the delay in retesting we've been busy with beta1.
Comment 15 Philippe Makowski 2013-11-13 13:42:24 CET
(In reply to claire robinson from comment #13)
> On a system without g++ installed it fails, so it appears to be missing a
> require on that too..

Thanks Claire, you are right : http://docs.scipy.org/doc/scipy/reference/tutorial/weave.html#requirements
Comment 16 Philippe Makowski 2013-11-13 20:38:46 CET
Updated packages in core/updates_testing:
========================
python-scipy-0.9.0-3.3.mga2
python-scipy-0.9.0-7.2.mga3

from SRPMS:
python-scipy-0.9.0-3.3.mga2.src.rpm
python-scipy-0.9.0-7.2.mga3.src.rpm

I added requires for g++

same done in Cauldron
Comment 17 claire robinson 2013-11-13 20:46:29 CET
Thanks Philippe, could you let us know when it's been pushed in Cauldron please.
Comment 18 claire robinson 2013-11-13 20:47:56 CET
or were you able to do this yourself?
Comment 19 David Walser 2013-11-13 20:49:03 CET
It's not a new version, so he pushed it himself.  It's still building.
Comment 20 Philippe Makowski 2013-11-13 21:20:00 CET
uploaded
Comment 21 claire robinson 2013-11-18 11:40:13 CET
Testing complete mga2 64

Same test & result as comment 7
Comment 22 claire robinson 2013-11-18 11:48:22 CET
Testing complete mga2 32
Comment 23 claire robinson 2013-11-18 11:55:18 CET
advisory uploaded
Comment 24 claire robinson 2013-11-18 12:18:47 CET
This is failing on mga3 but I can't tell if it's a problem with python-scipy or the gcc in updates testing :\
Comment 25 Philippe Makowski 2013-11-18 19:40:23 CET
[root@localhost ~]# urpmi  python-scipy                 
Pour satisfaire les dépendances, les paquetages suivants vont être installés :
  Paquetage                      Version      Révision      Arch    
(média « Core Release2 »)
  python-numpy-devel             1.6.2        2.mga3        x86_64  
(média « Core Updates Testing »)
  gcc                            4.7.2        8.mga3        x86_64  
  gcc-c++                        4.7.2        8.mga3        x86_64  
  gcc-cpp                        4.7.2        8.mga3        x86_64  
  gcc-gfortran                   4.7.2        8.mga3        x86_64  
  libgfortran3                   4.7.2        8.mga3        x86_64  
  libquadmath-devel              4.7.2        8.mga3        x86_64  
  libquadmath0                   4.7.2        8.mga3        x86_64  
  python-scipy                   0.9.0        7.2.mga3      x86_64  
un espace additionnel de 148Mo sera utilisé.
35Mo de paquets seront récupérés.
Procéder à l'installation des 9 paquetages ? (O/n) 


    $MIRRORLIST: media/core/release/python-numpy-devel-1.6.2-2.mga3.x86_64.rpm
    $MIRRORLIST: media/core/updates_testing/libquadmath0-4.7.2-8.mga3.x86_64.rpm                                                          
    $MIRRORLIST: media/core/updates_testing/gcc-4.7.2-8.mga3.x86_64.rpm                                                                   
    $MIRRORLIST: media/core/updates_testing/libquadmath-devel-4.7.2-8.mga3.x86_64.rpm                                                     
    $MIRRORLIST: media/core/updates_testing/gcc-gfortran-4.7.2-8.mga3.x86_64.rpm                                                          
    $MIRRORLIST: media/core/updates_testing/gcc-cpp-4.7.2-8.mga3.x86_64.rpm                                                               
    $MIRRORLIST: media/core/updates_testing/gcc-c++-4.7.2-8.mga3.x86_64.rpm                                                               
    $MIRRORLIST: media/core/updates_testing/libgfortran3-4.7.2-8.mga3.x86_64.rpm                                                          
installation de python-numpy-devel-1.6.2-2.mga3.x86_64.rpm gcc-gfortran-4.7.2-8.mga3.x86_64.rpm libquadmath-devel-4.7.2-8.mga3.x86_64.rpm libgfortran3-4.7.2-8.mga3.x86_64.rpm gcc-4.7.2-8.mga3.x86_64.rpm libquadmath0-4.7.2-8.mga3.x86_64.rpm gcc-cpp-4.7.2-8.mga3.x86_64.rpm gcc-c++-4.7.2-8.mga3.x86_64.rpm depuis /var/cache/urpmi/rpms
Préparation...                   ########################################################################################################
      1/9: gcc-cpp               ########################################################################################################
      2/9: gcc                   ########################################################################################################
      3/9: libquadmath0          ########################################################################################################
      4/9: libgfortran3          ########################################################################################################
      5/9: libquadmath-devel     ########################################################################################################
      6/9: gcc-gfortran          ########################################################################################################
      7/9: gcc-c++               ########################################################################################################
      8/9: python-numpy-devel    ########################################################################################################
      1/3: désinstallation de libgfortran3-4.7.2-7.mga3.x86_64
                                 ########################################################################################################
      2/3: désinstallation de libquadmath0-4.7.2-7.mga3.x86_64
                                 ########################################################################################################
      3/3: désinstallation de gcc-cpp-4.7.2-7.mga3.x86_64
                                 ########################################################################################################


    $MIRRORLIST: media/core/updates_testing/python-scipy-0.9.0-7.2.mga3.x86_64.rpm
installation de python-scipy-0.9.0-7.2.mga3.x86_64.rpm depuis /var/cache/urpmi/rpms                                                       
Préparation...                   ########################################################################################################
      9/9: python-scipy          ########################################################################################################
[philippe@localhost ~]$ python -c "import scipy.weave ; b=256 ; scipy.weave.inline('printf(\"%d\\\\n\",b);', ['b'], verbose=2)"
<weave: compiling>
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49
running build_ext
running build_src
build_src
building extension "sc_e928b03c49294ee0e27579273b08e7430" sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'sc_e928b03c49294ee0e27579273b08e7430' extension
compiling C++ sources
C compiler: g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/ncursesw -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -g -fPIC

creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/home
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/home/philippe
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/home/philippe/.cache
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/home/philippe/.cache/scipy
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/home/philippe/.cache/scipy/python27_compiled
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/usr
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/usr/lib64
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/usr/lib64/python2.7
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/usr/lib64/python2.7/site-packages
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/usr/lib64/python2.7/site-packages/scipy
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/usr/lib64/python2.7/site-packages/scipy/weave
creating /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/usr/lib64/python2.7/site-packages/scipy/weave/scxx
compile options: '-I/usr/lib64/python2.7/site-packages/scipy/weave -I/usr/lib64/python2.7/site-packages/scipy/weave/scxx -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'
g++: /usr/lib64/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp
g++: /home/philippe/.cache/scipy/python27_compiled/sc_e928b03c49294ee0e27579273b08e7430.cpp
g++ -pthread -shared -Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/home/philippe/.cache/scipy/python27_compiled/sc_e928b03c49294ee0e27579273b08e7430.o /tmp/scipy-philippe-eL6EzP/python27_intermediate/compiler_0487de900befa22c0a6cd118d5993d49/usr/lib64/python2.7/site-packages/scipy/weave/scxx/weave_imp.o -L/usr/lib64 -lpython2.7 -o /home/philippe/.cache/scipy/python27_compiled/sc_e928b03c49294ee0e27579273b08e7430.so
running scons
256
[philippe@localhost ~]$ python /usr/lib64/python2.7/site-packages/scipy/weave/examples/md5_speed.py 
md5 build(len,sec,per): 100 0.000544786453247 5.44786453247e-06
md5 retrv(len,sec,per): 100 0.000691890716553 6.91890716553e-06
std build(len,sec,per): 100 0.000741958618164 7.41958618164e-06
std retrv(len,sec,per): 100 1.47819519043e-05 1.47819519043e-07

[root@localhost ~]# urpmi python-nose
...
[philippe@localhost ~]$ python                
Python 2.7.5 (default, Aug 12 2013, 12:12:07) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy import weave
>>> weave.test()
Running unit tests for scipy.weave
NumPy version 1.6.2
NumPy is installed in /usr/lib64/python2.7/site-packages/numpy
SciPy version 0.9.0
SciPy is installed in /usr/lib64/python2.7/site-packages/scipy
Python version 2.7.5 (default, Aug 12 2013, 12:12:07) [GCC 4.7.2]
nose version 1.0.0
........................................................................................................................................
----------------------------------------------------------------------
Ran 136 tests in 2.254s

OK
<nose.result.TextTestResult run=136 errors=0 failures=0>
>>> exit()
Comment 26 claire robinson 2013-11-19 10:07:24 CET
Seems to need lib{64}python-devel too.

Testing mga3 32

$ python -c "import scipy.weave ; b=256 ; scipy.weave.inline('printf(\"%d\\\\n\",b);', ['b'], verbose=2)"
<weave: compiling>
running build_ext
running build_src
build_src
building extension "sc_e928b03c49294ee0e27579273b08e7431" sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'sc_e928b03c49294ee0e27579273b08e7431' extension
compiling C++ sources
C compiler: g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/ncursesw -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -g -fPIC

compile options: '-I/usr/lib/python2.7/site-packages/scipy/weave -I/usr/lib/python2.7/site-packages/scipy/weave/scxx -I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'
g++: /usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp
In file included from /usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp:7:0:
/usr/lib/python2.7/site-packages/scipy/weave/scxx/object.h:11:20: fatal error: Python.h: No such file or directory
compilation terminated.
In file included from /usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp:7:0:
/usr/lib/python2.7/site-packages/scipy/weave/scxx/object.h:11:20: fatal error: Python.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/scipy/weave/inline_tools.py", line 355, in inline
    **kw)
  File "/usr/lib/python2.7/site-packages/scipy/weave/inline_tools.py", line 482, in compile_function
    verbose=verbose, **kw)
  File "/usr/lib/python2.7/site-packages/scipy/weave/ext_tools.py", line 367, in compile
    verbose = verbose, **kw)
  File "/usr/lib/python2.7/site-packages/scipy/weave/build_tools.py", line 272, in build_extension
    setup(name = module_name, ext_modules = [ext],verbose=verb)
  File "/usr/lib/python2.7/site-packages/numpy/distutils/core.py", line 186, in setup
    return old_setup(**new_attr)
  File "/usr/lib/python2.7/distutils/core.py", line 169, in setup
    raise SystemExit, "error: " + str(msg)
scipy.weave.build_tools.CompileError: error: Command "g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/ncursesw -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -g -fPIC -I/usr/lib/python2.7/site-packages/scipy/weave -I/usr/lib/python2.7/site-packages/scipy/weave/scxx -I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c /usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp -o /tmp/scipy-claire-dAr7XC/python27_intermediate/compiler_1a535d95b1c5d3051d7ed5b0a57d8f34/usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.o" failed with exit status 1



Running g++ separately..

$ g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/ncursesw -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -g -fPIC -I/usr/lib/python2.7/site-packages/scipy/weave -I/usr/lib/python2.7/site-packages/scipy/weave/scxx -I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c /usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp -o /tmp/scipy-claire-dAr7XC/python27_intermediate/compiler_1a535d95b1c5d3051d7ed5b0a57d8f34/usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.o
In file included from /usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp:7:0:
/usr/lib/python2.7/site-packages/scipy/weave/scxx/object.h:11:20: fatal error: Python.h: No such file or directory
compilation terminated.


$ su -c "urpmi libpython-devel" -

installing libpython-devel-2.7.5-1.2.mga3.i586.rpm from /var/cache/urpmi/rpms
Preparing...                     ##########################
      1/1: libpython-devel       ##########################


$ python -c "import scipy.weave ; b=256 ; scipy.weave.inline('printf(\"%d\\\\n\",b);', ['b'], verbose=2)"<weave: compiling>
running build_ext
running build_src
build_src
building extension "sc_e928b03c49294ee0e27579273b08e7432" sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'sc_e928b03c49294ee0e27579273b08e7432' extension
compiling C++ sources
C compiler: g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/ncursesw -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -g -fPIC

compile options: '-I/usr/lib/python2.7/site-packages/scipy/weave -I/usr/lib/python2.7/site-packages/scipy/weave/scxx -I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'
g++: /home/claire/.cache/scipy/python27_compiled/sc_e928b03c49294ee0e27579273b08e7432.cpp
g++: /usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp
g++ -pthread -shared -Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags /tmp/scipy-claire-dAr7XC/python27_intermediate/compiler_1a535d95b1c5d3051d7ed5b0a57d8f34/home/claire/.cache/scipy/python27_compiled/sc_e928b03c49294ee0e27579273b08e7432.o /tmp/scipy-claire-dAr7XC/python27_intermediate/compiler_1a535d95b1c5d3051d7ed5b0a57d8f34/usr/lib/python2.7/site-packages/scipy/weave/scxx/weave_imp.o -L/usr/lib -lpython2.7 -o /home/claire/.cache/scipy/python27_compiled/sc_e928b03c49294ee0e27579273b08e7432.so
running scons
256
Comment 27 Philippe Makowski 2013-11-19 16:54:53 CET
Updated packages in core/updates_testing:
========================
python-scipy-0.9.0-3.4.mga2
python-scipy-0.9.0-7.3.mga3

from SRPMS:
python-scipy-0.9.0-3.4.mga2.src.rpm
python-scipy-0.9.0-7.3.mga3.src.rpm

I added requires for python-devel

same done in Cauldron

hope it is the last one, sorry
Comment 28 claire robinson 2013-11-19 16:58:53 CET
Advisory updated.
Comment 29 claire robinson 2013-11-20 14:29:15 CET
Testing complete mga2 32 & 64 and mga3 32 & 64

Confirmed the added require.

python -c "import scipy.weave ; b=256 ; scipy.weave.inline('printf(\"%d\\\\n\",b);', ['b'], verbose=2)"

Now completes without error.

Validating. Thanks Philippe.

Could sysadmin please push from 2&3 core/updates_testing to updates

Thanks!
Comment 30 Thomas Backlund 2013-11-20 21:58:45 CET
Update pushed:
http://advisories.mageia.org/MGASA-2013-0330.html

Note You need to log in before you can comment on or make changes to this bug.