[raring] python doesn't autogenerate all the *.pyc files

Bug #1160944 reported by Jamie Strandboge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python2.7 (Ubuntu)
Fix Released
High
Unassigned
python3.3 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I have some python applications that are confined with AppArmor. After upgrading to raring months ago, I noticed that whenever I started a confined application, I would get an AppArmor denial because it would try to write out the .pyc file in /usr. Of course, DAC would take care of this, but this seems to indicate a problem with autogenerating .pyc files during package install on raring. Eg:

$ ls -1 /usr/lib/python2.7/*py | wc -l
207
$ ls -1 /usr/lib/python2.7/*pyc | wc -l
88

summary: - [raring] python2.7 doesn't have all the *.pyc files
+ [raring] python2.7 autogenerate all the *.pyc files
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [raring] python2.7 autogenerate all the *.pyc files

Well, as per debian python policy .pyc files are generated using postinstall scripts with either dh_python2 (main&universe) or python-support (universe). Thus applications (residing in /usr that is) upon launching should not have write access to write .pyc files to disk, as those should be already pre-generated and present.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Oh, I missunderstood your request. Indeed it looks like some .py files from libpython2.7-stdlib are missing matching *.pyc files.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

libpython2.7-stdlib is missing these on my machine: http://paste.ubuntu.com/5652586/

Changed in python2.7 (Ubuntu):
status: New → Confirmed
importance: Undecided → High
description: updated
Revision history for this message
Matthias Klose (doko) wrote :

mine

Changed in python3.3 (Ubuntu):
importance: Undecided → High
status: New → Confirmed
summary: - [raring] python2.7 autogenerate all the *.pyc files
+ [raring] python doesn't autogenerate all the *.pyc files
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.7 - 2.7.4~rc1-4ubuntu1

---------------
python2.7 (2.7.4~rc1-4ubuntu1) raring; urgency=low

  * Merge with Debian; remaining changes:
    - Build-depend on python:any instead of python.

python2.7 (2.7.4~rc1-4) experimental; urgency=low

  * Fix byte-compiliation/-removal for the split-out library packages.
    LP: #1160944.
 -- Matthias Klose <email address hidden> Sat, 30 Mar 2013 15:48:29 +0100

Changed in python2.7 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3.3 - 3.3.1~rc1-2ubuntu1

---------------
python3.3 (3.3.1~rc1-2ubuntu1) raring; urgency=low

  * Merge with Debian; remaining changes:
    - Build-depend on python3:any instead of python3.

python3.3 (3.3.1~rc1-2) experimental; urgency=low

  * Fix byte-compiliation/-removal for the split-out library packages.
    LP: #1160944.
 -- Matthias Klose <email address hidden> Sat, 30 Mar 2013 18:10:53 +0100

Changed in python3.3 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.