Bug 1592052

Summary: pyelftools is out-of-date and this prevents running pwntools
Product: [Fedora] Fedora Reporter: W. Michael Petullo <mike>
Component: pyelftoolsAssignee: Terje Røsten <terje.rosten>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact: Terje Røsten <terje.rosten>
Priority: unspecified    
Version: 28CC: besser82, mail, moez.roy, terje.rosten
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pyelftools-0.24-1.fc27 pyelftools-0.24-1.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-25 10:22:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
RPM specification to build pwntools
none
Updated pyelftools.spec
none
Updated pyelftools SRPM none

Description W. Michael Petullo 2018-06-16 14:36:05 UTC
Created attachment 1452175 [details]
RPM specification to build pwntools

Description of problem:
I am trying to package pwntools (https://docs.pwntools.com/) for Fedora. Recent versions of pwntools rely on importing pyelftools roundup function (from elftools.common.utils import roundup). However, the version of pyelftools packages for Fedora does not include this function.

Version-Release number of selected component (if applicable):
pyelftools-0.22-0.15.git20130619.a1d9681.fc28

How reproducible:
Every time

Steps to Reproduce:
1. Build and install pwntools using the attached RPM specification.
2. Run "python -c 'import pwn'"

Actual results:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/pwn/__init__.py", line 4, in <module>
    from pwn.toplevel import *
  File "/usr/lib/python2.7/site-packages/pwn/toplevel.py", line 20, in <module>
    import pwnlib
  File "/usr/lib/python2.7/site-packages/pwnlib/__init__.py", line 43, in <module>
    importlib.import_module('.%s' % module, 'pwnlib')
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/site-packages/pwnlib/dynelf.py", line 56, in <module>
    from pwnlib import elf
  File "/usr/lib/python2.7/site-packages/pwnlib/elf/__init__.py", line 9, in <module>
    from pwnlib.elf.corefile import Core
  File "/usr/lib/python2.7/site-packages/pwnlib/elf/corefile.py", line 77, in <module>
    from elftools.common.utils import roundup
ImportError: cannot import name roundup

Expected results:
The Python statement should execute with no error.

Additional info:

Comment 1 W. Michael Petullo 2018-06-16 18:23:08 UTC
Created attachment 1452223 [details]
Updated pyelftools.spec

Comment 2 W. Michael Petullo 2018-06-16 18:24:12 UTC
Created attachment 1452224 [details]
Updated pyelftools SRPM

Comment 3 Fedora Update System 2018-06-17 13:07:13 UTC
pyelftools-0.24-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-8bafaa1f0d

Comment 4 Fedora Update System 2018-06-17 13:07:28 UTC
pyelftools-0.24-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d6416734da

Comment 5 Fedora Update System 2018-06-17 19:38:00 UTC
pyelftools-0.24-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-d6416734da

Comment 6 Fedora Update System 2018-06-17 20:19:33 UTC
pyelftools-0.24-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-8bafaa1f0d

Comment 7 Fedora Update System 2018-06-25 10:22:25 UTC
pyelftools-0.24-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-06-25 10:54:06 UTC
pyelftools-0.24-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.