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 809898 - RFE: add detection of Python bytecode for recent versions of Python
Summary: RFE: add detection of Python bytecode for recent versions of Python
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: file
Version: 6.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: 6.3
Assignee: Jan Kaluža
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On: 531082
Blocks: 1172231 1269913
TreeView+ depends on / blocked
 
Reported: 2012-04-04 15:49 UTC by Dave Malcolm
Modified: 2016-05-10 19:46 UTC (History)
7 users (show)

Fixed In Version: file-5.04-26.el6
Doc Type: Enhancement
Doc Text:
Clone Of: 531082
: 1271636 (view as bug list)
Environment:
Last Closed: 2016-05-10 19:46:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0760 0 normal SHIPPED_LIVE Moderate: file security, bug fix, and enhancement update 2016-05-10 22:32:51 UTC

Description Dave Malcolm 2012-04-04 15:49:00 UTC
Can we ensure that "file" in RHEL6 identifies Python bytecode for all released versions of Python?
(i.e. 2.7, 3.0, 3.1, 3.2, and, later this year, 3.3)

I'm not sure if the Fedora work below made it into RHEL6:

+++ This bug was initially created as a clone of Bug #531082 +++

Created attachment 366152 [details]
Add bytecode values for Python 3.0 and 3.1

Description of problem:
Attached is a patch that adds support for Python 3.0 and Python 3.1 bytecode files to the .pyc/.pyo support.

With this file:
$ file /usr/lib/python3.1/re.pyo
/usr/lib/python3.1/re.pyo: python 3.1 byte-compiled

Caveat: only tested with 3.1; I calculated up the value for 3.0 from the source in python's py3k branch's Python/import.c:
[snip]
       Python 3.0a5: 3130 (lexical exception stacking, including POP_EXCEPT)
[snip]
       Python 3.1a0: 3150 (optimize conditional branches:
			   introduce POP_JUMP_IF_FALSE and POP_JUMP_IF_TRUE)
[snip]

Note that the value has 1 added to it in py3k's _PyImport_Init,
giving:
  python 3.0: magic=3131 = 0x0c3b (hex) =  0x3b 0x0c 0xc0 0xd0a (header)
and 
  python 3.1: magic=3151 = 0x0c4f (hex) =  0x4f 0x0c 0x0d 0x0a (header)

--- Additional comment from dmalcolm on 2009-10-26 16:17:38 EDT ---

>  python 3.0: magic=3131 = 0x0c3b (hex) =  0x3b 0x0c 0xc0 0xd0a (header)
should read:
>  python 3.0: magic=3131 = 0x0c3b (hex) =  0x3b 0x0c 0xc0 0x0a (header)

--- Additional comment from dmalcolm on 2009-10-26 16:50:27 EDT ---

I've sent the patch to the upstream mailing list (file.com), but it's current stuck in the moderator queue as I'm not yet subscribed (they seem to require human intervention for approving subscriptions)

--- Additional comment from dnovotny on 2009-10-27 08:51:03 EDT ---

hello Dave, thanks for the patch, added in file-5.03-11.fc13

I am subscribed to the list, so if your post doesn't show up there I can send the patch from my address.

--- Additional comment from dnovotny on 2009-10-27 10:04:57 EDT ---

...now I see your mail in the upstream mailing list

--- Additional comment from dmalcolm on 2009-10-27 10:15:00 EDT ---

(In reply to comment #4)
> ...now I see your mail in the upstream mailing list  
http://mx.gw.com/pipermail/file/2009/000483.html

Comment 2 Jan Kaluža 2012-04-10 09:32:46 UTC
Well, Python releases happen faster than RHEL6 updates, so as regular rule we can't ensure that. In the time of Bug 557608, Python 2.7 and 3.2 was not released yet.

Comment 3 RHEL Program Management 2013-10-14 00:43:42 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 19 errata-xmlrpc 2016-05-10 19:46: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/RHSA-2016-0760.html


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