RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1226398 - scap-as-rpm requires python2.7
Summary: scap-as-rpm requires python2.7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openscap
Version: 6.6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Šimon Lukašík
QA Contact: Marek Haicman
URL:
Whiteboard:
Depends On:
Blocks: 1172231 1271982
TreeView+ depends on / blocked
 
Reported: 2015-05-29 16:20 UTC by Chinmay Paradkar
Modified: 2019-10-10 09:50 UTC (History)
2 users (show)

Fixed In Version: openscap-1.2.7-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 20:53:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0806 0 normal SHIPPED_LIVE openscap bug fix and enhancement update 2016-05-10 22:38:33 UTC

Description Chinmay Paradkar 2015-05-29 16:20:07 UTC
Description of problem:

There is a bug, running the program "scap-as-rpm" from the package "openscap-utils". This is because in RHEL-6 there is python-2.6 while /usr/bin/scap-as-rpm which is a python-script, is using python-2.7 methods.

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

openscap-utils-1.0.10-3.el6.x86_64

Steps to Reproduce:

Just call scap-as-rpm with any of *xccdf.xml 

# scap-as-rpm /usr/share/xml/scap/ssg/content/ssg-rhel6-xccdf.xml 

Actual results:

RPM version 4.8.0
Traceback (most recent call last):
  File "/usr/bin/scap-as-rpm", line 321, in <module>
    ret = main()
  File "/usr/bin/scap-as-rpm", line 277, in main
    rpmbuild_sources_path, rpmbuild_rpm_path, rpmbuild_srpm_path = get_rpmbuild_paths()
  File "/usr/bin/scap-as-rpm", line 112, in get_rpmbuild_paths
    sources = subprocess.check_output(["rpm", "--eval", "%{_sourcedir}"]).strip()
AttributeError: 'module' object has no attribute 'check_output'

Expected results:

The command should success without any traceback.

Additional info:

I have attached a patch that works.

Regards,
Chinmay Paradkar,
GSS, Red Hat Inc.

Comment 3 Martin Preisler 2015-06-01 13:32:47 UTC
Fixed upstream, see https://github.com/OpenSCAP/openscap/commit/7f9889b42d5f1d462ec891576c3f635aca955d35

This would be relatively easy to downstream as a patch.

Comment 4 Zbynek Moravec 2015-07-14 09:53:00 UTC
Moving to post, as this was resolved in upstream.

Comment 9 Marek Haicman 2016-01-26 10:31:42 UTC
Verified fix on openscap-utils-1.2.8-1.el6.x86_64.

Comment 11 errata-xmlrpc 2016-05-10 20:53:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-0806.html


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