Bug 1709 - sos package requires python-rpm
Summary: sos package requires python-rpm
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 1
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard:
Keywords: Junior_job, validated_update
Depends on: 2317
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-09 12:22 CEST by Johnny Accot
Modified: 2011-10-07 14:54 CEST (History)
5 users (show)

See Also:
Source RPM: sos-2.2-1.mga1.src.rpm
CVE:
Status comment:


Attachments

Description Johnny Accot 2011-06-09 12:22:41 CEST
Description of problem:

If you install the "sos" package and try to run /usr/sbin/sosreport, it will fail with the following trace if python-rpm is not installed:

# /usr/sbin/sosreport
Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 18, in <module>
    from sos.sosreport import sosreport, doExitCode
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 40, in <module>
    import sos.policyredhat
  File "/usr/lib/python2.7/site-packages/sos/policyredhat.py", line 31, in <module>
    import rpm
ImportError: No module named rpm

Installing python-rpm fixes the problem.  A dependency on "python-rpm" should be added to "sos".

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Manuel Hiebel 2011-08-26 22:30:23 CEST

Keywords: (none) => Junior_job

Comment 1 Florian Hubold 2011-09-23 17:50:21 CEST
Taking this one.

Status: NEW => ASSIGNED
CC: (none) => doktor5000
Assignee: bugsquad => doktor5000

Comment 2 Florian Hubold 2011-09-27 20:21:06 CEST
There is now sos-2.2-1.1.mga1 in core/updates_testing to validate
-------------------------------------------------------


Suggested advisory:
-------------------
This update addresses the folloving problems:


It was discovered [1] that /usr/sbin/sosreport does not run without python-rpm installed. A Require on python-rpm was added, resulting in /usr/sbin/sosreport being able to be executed normally.

[1] https://bugs.mageia.org/show_bug.cgi?id=1709

-------------------------------------------------------
Steps to reproduce:

- install/update to update candidate
- make sure that /usr/sbin/sosreport runs successfully

Assignee: doktor5000 => qa-bugs

Comment 3 Dave Hodgins 2011-09-28 00:58:35 CEST
Could someone from the sysadmin team link the package python-rpm from
Core Release to Core Updates Testing, so we can confirm that is the
only package that needs to be linked, to avoid bug 2317.

Please remove sysadmin-bugs from the cc list once it's linked, and we'll
re-add it when the update is validated.

CC: (none) => davidwhodgins, sysadmin-bugs

Comment 4 claire robinson 2011-09-28 10:52:01 CEST
According to Sophie, the only extra require is python-rpm so we should be safe with just linking that one once validated.

Before:
http://sophie.zarb.org/rpms/1cf4662e12da95dec59b516e77509d73/deps

After:
http://sophie.zarb.org/rpms/bbc42da4fd7323a5c88c6abd83ac0684/deps
Comment 5 Samuel Verschelde 2011-09-28 11:00:00 CEST
(In reply to comment #4)
> According to Sophie, the only extra require is python-rpm so we should be safe
> with just linking that one once validated.
> 
> Before:
> http://sophie.zarb.org/rpms/1cf4662e12da95dec59b516e77509d73/deps
> 
> After:
> http://sophie.zarb.org/rpms/bbc42da4fd7323a5c88c6abd83ac0684/deps

But python-rpm may itself have dependencies that are not present on a system having only :
- basesystem-minimal
- sos and all its dependencies

CC: (none) => stormi

Comment 6 claire robinson 2011-09-28 11:08:22 CEST
2317 is a nightmare!

i586:

Before:
# sosreport
Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 18, in <module>
    from sos.sosreport import sosreport, doExitCode
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 40, in
<module>
    import sos.policyredhat
  File "/usr/lib/python2.7/site-packages/sos/policyredhat.py", line 31, in
<module>
    import rpm
  File "/usr/lib/python2.7/site-packages/rpm/__init__.py", line 9, in <module>
    # See the README file for information on usage and redistribution.
ImportError: No module named _rpm


Confirmed bug 2317 for python-rpm

Installed python-rpm and was able to update sos through mageiaupdate.

After:
# sosreport

sosreport (version 2.1)

This utility will collect some detailed  information about the
hardware and setup of your Red Hat Enterprise Linux system.
The information is collected and an archive is  packaged under
/tmp, which you can send to a support representative.
Red Hat Enterprise Linux will use this information for diagnostic purposes ONLY
and it will be considered confidential information.

This process may take a while to complete.
No changes will be made to your system.

Please enter your first initial and last name [localhost]: C Robinson
Please enter the case number that you are generating this report for: 12345

  Running plugins. Please wait ...

  Completed [42/42] ...      
Creating compressed archive...

Your sosreport has been generated and saved in:
  /tmp/sosreport-CRobinson.12345-20110928100255-7092.tar.xz

The md5sum is: 2ecdcc5a9e8874ba1c4e00e126d97092

Please send this file to your support representative.



As we are not running RHEL the wording will need changing.

Florian do you want to do that now or in another bug?
Comment 7 Florian Hubold 2011-09-28 11:30:17 CEST
No, the wording won't be changed, asked my mentor about that,
as also the version number is incorrectly displayed (2.1 vs. 2.2).
We won't change upstream behavior there, because it might confuse
them if they maybe provide support for some Mageia sos users.

The wrong version was reported upstream: https://bugzilla.redhat.com/show_bug.cgi?id=741872
Comment 8 Samuel Verschelde 2011-09-28 11:38:52 CEST
I ran the following steps to check if there are new dependencies pulled by python-rpm. There are none.

[sam@localhost ~]$ urpmq -r sos
sos-2.2-1.mga1|sos-2.2-1.1.mga1
[sam@localhost ~]$ urpmq --requires-recursive sos-2.2-1.mga1 | sort > sos-release.txt
[sam@localhost ~]$ urpmq --requires-recursive sos-2.2-1.1.mga1 | sort > sos-update.txt
[sam@localhost ~]$ urpmq --requires-recursive basesystem-minimal | sort > basesystem-minimal.txt
[sam@localhost ~]$ diff -u sos-release.txt sos-update.txt | grep "^\+[^+]" | sed 's/\+//' | tee newdeps.txt
cpio
gawk
libelfutils1
liblua5.1
libmagic1
libnspr4
libnss3
librpm1
libsigsegv2
nss
python-rpm
rmt
rpm
rpm-mageia-setup
update-alternatives
[sam@localhost ~]$ # so now we have the list of new deps. Those missing from basesystem-minimal must be linked.
[sam@localhost ~]$ diff -u basesystem-minimal.txt newdeps.txt | grep "^\+[^+]" | sed 's/\+//'
python-rpm

Here you are, the only new dep is python-rpm !
Comment 9 claire robinson 2011-09-28 12:02:18 CEST
Excellent work Stormi! :o)
Comment 10 claire robinson 2011-09-28 12:03:06 CEST
In this case tested OK i586, I will check x86_64 also.
Comment 11 claire robinson 2011-09-28 12:17:44 CEST
x86_64:

Before:
# sosreport
Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 18, in <module>
    from sos.sosreport import sosreport, doExitCode
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 40, in <module>
    import sos.policyredhat
  File "/usr/lib/python2.7/site-packages/sos/policyredhat.py", line 31, in <module>
    import rpm
  File "/usr/lib64/python2.7/site-packages/rpm/__init__.py", line 9, in <module>
    # See the README file for information on usage and redistribution.
ImportError: No module named _rpm


Confirm bug 2317 for python-rpm

After:
# sosreport

sosreport (version 2.1)

This utility will collect some detailed  information about the
hardware and setup of your Red Hat Enterprise Linux system.
The information is collected and an archive is  packaged under
/tmp, which you can send to a support representative.
Red Hat Enterprise Linux will use this information for diagnostic purposes ONLY
and it will be considered confidential information.

This process may take a while to complete.
No changes will be made to your system.

Press ENTER to continue, or CTRL-C to quit.

Please enter your first initial and last name [mega]: C Robinson
Please enter the case number that you are generating this report for: 98765

  Running plugins. Please wait ...

  Completed [42/42] ...
Creating compressed archive...

Your sosreport has been generated and saved in:
  /tmp/sosreport-CRobinson.98765-20110928111050-b53a.tar.xz

The md5sum is: bddd84efc705549bb3b9aa394af0b53a

Please send this file to your support representative.


Testing complete x86_64 - Update Validated.


Advisory:
-------------------
This update addresses the following problems:


It was discovered [1] that /usr/sbin/sosreport does not run without python-rpm
installed. A Require on python-rpm was added, resulting in /usr/sbin/sosreport
being able to be executed normally.

[1] https://bugs.mageia.org/show_bug.cgi?id=1709

--------------------

Source RPM: sos-2.2-1.1.mga1.src.rpm


Could sysadmin please push from core/updates_testing to core/updates and also link python-rpm from core/release to core/updates (rpm-4.8.1-10.mga1.src.rpm)

Thankyou!

Keywords: (none) => validated_update
Hardware: i586 => All
Version: Cauldron => 1
Depends on: (none) => 2317

Comment 12 D Morgan 2011-10-07 14:54:39 CEST
update pushed.
link done.

Status: ASSIGNED => RESOLVED
CC: (none) => dmorganec
Resolution: (none) => FIXED


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