Bug 13750 - error due to missing rpm dependency to python-pkg-resources in python-xattr
Summary: error due to missing rpm dependency to python-pkg-resources in python-xattr
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: mga4-32-ok mga4-64-ok advisory
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2014-07-16 01:44 CEST by Xavier Matz
Modified: 2014-08-06 11:18 CEST (History)
5 users (show)

See Also:
Source RPM: python-xattr-0.7.2-3.mga4.src.rpm
CVE:
Status comment:


Attachments

Description Xavier Matz 2014-07-16 01:44:36 CEST
Description of problem:
after installing python-xattr via urpmi, 
running the xattr executable without any arguments leads to the following error:
------------
$ xattr 
Traceback (most recent call last):
  File "/bin/xattr", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
------------
this problem disappears after installing python-pkg-resources via urpmi.

Reproducible: 

Steps to Reproduce:
David Walser 2014-07-16 23:37:46 CEST

Assignee: bugsquad => makowski.mageia

Comment 1 Philippe Makowski 2014-07-17 20:27:53 CEST
Thanks for the report
python-xattr-0.7.2-3.1.mga4 is in update testing
at the same time, i updated python-setuptools-1.3-1.1.mga4 to correct python3-pkg-resources that add a wrong files list .

Assignee: makowski.mageia => qa-bugs

Comment 2 David GEIGER 2014-07-18 18:01:06 CEST
Tested mga4_32,

new update of python-xattr-0.7.2-3.1.mga4 doesn't work properly :

Before:
# LC_ALL=C urpmi python-xattr
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Release (distrib1)")
  python-cffi                    0.7.2        3.mga4        i586    
  python-ply                     3.4          5.mga4        noarch  
  python-pycparser               2.10         3.mga4        noarch  
  python-xattr                   0.7.2        3.mga4        i586    
1.9MB of additional disk space will be used.
379KB of packages will be retrieved.
Proceed with the installation of the 4 packages? (Y/n) y

$ xattr
Traceback (most recent call last):
  File "/usr/bin/xattr", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

--------------------------------------------------------------------------
After:
# LC_ALL=C urpmi python-xattr
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Updates Testing (distrib5)")
  python-pkg-resources           1.3          1.1.mga4      noarch  
  python-xattr                   0.7.2        3.1.mga4      i586    
311KB of additional disk space will be used.
74KB of packages will be retrieved.
Proceed with the installation of the 2 packages? (Y/n) y

$ xattr
Traceback (most recent call last):
  File "/usr/bin/xattr", line 9, in <module>
    load_entry_point('xattr==0.7.2', 'console_scripts', 'xattr')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2108, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/xattr/__init__.py", line 12, in <module>
    from .lib import (XATTR_NOFOLLOW, XATTR_CREATE, XATTR_REPLACE,
  File "/usr/lib/python2.7/site-packages/xattr/lib.py", line 592, in <module>
    """, ext_package='xattr')
  File "/usr/lib/python2.7/site-packages/cffi/api.py", line 312, in verify
    lib = self.verifier.load_library()
  File "/usr/lib/python2.7/site-packages/cffi/verifier.py", line 68, in load_library
    self.compile_module()
  File "/usr/lib/python2.7/site-packages/cffi/verifier.py", line 55, in compile_module
    self._write_source()
  File "/usr/lib/python2.7/site-packages/cffi/verifier.py", line 117, in _write_source
    file = open(self.sourcefilename, 'w')
IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/xattr/__pycache__/_cffi__x2654de55x6ee6f75.c'

CC: (none) => geiger.david68210

Comment 3 David Remy 2014-07-18 20:04:51 CEST
Having troubles reproducing the original error in mga4-64 however after upgrade I do now have an error.

Mageia release 4 (Official) for x86_64
Linux localhost 3.12.20-desktop-1.mga4 #1 SMP Fri May 16 15:47:33 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

root@localhost (bash) /home/user
# xattr
root@localhost (bash) /home/user
# urpmi python-xattr
Package python-xattr-0.7.2-3.mga4.x86_64 is already installed

-- upgrade --

# urpmi python-xattr
Package python-xattr-0.7.2-3.1.mga4.x86_64 is already installed
root@localhost (bash) /home/user
# xattr
/usr/lib64/python2.7/site-packages/xattr/__pycache__/_cffi__x2654de55x6ee6f75.c:2:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
                    ^
compilation terminated.
Traceback (most recent call last):
  File "/usr/bin/xattr", line 9, in <module>
    load_entry_point('xattr==0.7.2', 'console_scripts', 'xattr')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2108, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib64/python2.7/site-packages/xattr/__init__.py", line 12, in <module>
    from .lib import (XATTR_NOFOLLOW, XATTR_CREATE, XATTR_REPLACE,
  File "/usr/lib64/python2.7/site-packages/xattr/lib.py", line 592, in <module>
    """, ext_package='xattr')
  File "/usr/lib64/python2.7/site-packages/cffi/api.py", line 312, in verify
    lib = self.verifier.load_library()
  File "/usr/lib64/python2.7/site-packages/cffi/verifier.py", line 68, in load_library
    self.compile_module()
  File "/usr/lib64/python2.7/site-packages/cffi/verifier.py", line 56, in compile_module
    self._compile_module()
  File "/usr/lib64/python2.7/site-packages/cffi/verifier.py", line 131, in _compile_module
    outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
  File "/usr/lib64/python2.7/site-packages/cffi/ffiplatform.py", line 25, in compile
    outputfilename = _build(tmpdir, ext)
  File "/usr/lib64/python2.7/site-packages/cffi/ffiplatform.py", line 50, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.ffiplatform.VerificationError: CompileError: command 'gcc' failed with exit status 1

CC: (none) => dpremy

Comment 4 Philippe Makowski 2014-07-19 18:32:44 CEST
Thanks for the report
python-xattr-0.7.2-3.2.mga4 is in update testing and should fix the problem

CC: (none) => makowski.mageia

Comment 5 David Remy 2014-07-19 19:10:20 CEST
Philippe, I'm not finding the package yet for python-xattr-0.7.2-3.2.mga4, only python-xattr-0.7.2-3.1.mga4. Do I need to wait for something else to finish syncing or is there something else going on?
Comment 6 Philippe Makowski 2014-07-19 19:14:44 CEST
(In reply to David Remy from comment #5)
> Philippe, I'm not finding the package yet for python-xattr-0.7.2-3.2.mga4,
> only python-xattr-0.7.2-3.1.mga4. Do I need to wait for something else to
> finish syncing or is there something else going on?

it landed 45 minutes ago, so wait for mirror sync 
http://pkgsubmit.mageia.org/uploads/done/4/core/updates_testing/20140719162629.philippem.valstar.27914.youri
Comment 7 David Remy 2014-07-19 19:28:02 CEST
Too fast I guess.

Tested on MGA4 32 and 64.

xattr now runs with no switches without error on both tests. Unsure how to use xattr to test getting attribss from files.

Adding ok as 32 no longer has the error and 64 does not add an error.

Whiteboard: (none) => mga4-32-ok mga4-64-ok

Comment 8 David Walser 2014-07-24 03:03:10 CEST
Validating now so it doesn't get missed.  The advisory still needs to be uploaded.

Sysadmins, please push this to updates for Mageia 4.

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 9 David Walser 2014-07-24 21:29:40 CEST
I didn't see an advisory on this bug actually.  Can someone post one?
Comment 10 Rémi Verschelde 2014-07-28 19:57:48 CEST
Ping, could you provide an advisory Philippe?

CC: (none) => remi

Comment 11 Philippe Makowski 2014-07-28 21:39:00 CEST
Suggested advisory:
========================

Updated python-xattr packages fix a missing dependency on pkg_resources Python module.

References:
https://bugs.mageia.org/show_bug.cgi?id=13750
========================

Updated packages in core/updates_testing:
========================
python-xattr-0.7.2-3.2.mga4
python-pkg-resources-1.3-1.1.mga4.noarch
python-setuptools-1.3-1.1.mga4.noarch
python3-pkg-resources-1.3-1.1.mga4.noarch
python3-setuptools-1.3-1.1.mga4.noarch

Source RPMs: 
python-xattr-0.7.2-3.2.mga4.src.rpm
python-setuptools-1.3-1.1.mga4.src.rpm
Comment 12 Rémi Verschelde 2014-07-28 23:47:39 CEST
Thanks, advisory uploaded.

Whiteboard: mga4-32-ok mga4-64-ok => mga4-32-ok mga4-64-ok advisory

Comment 13 Mageia Robot 2014-08-06 11:18:11 CEST
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2014-0154.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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