Red Hat Bugzilla – Bug 129025
cups writes /usr/share/printconf/util/backend.pyo, fails if /usr/share is not writable
Last modified: 2007-11-30 17:10:46 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040625
Description of problem:
cups appears to open /usr/share/printconf/util/backend.pyo for writing.
This fails if /usr/share/.... is not writable, or if running with
strict SELinux policy.
Perhaps making /usr/share/printconf/util/backend.pyo a symlink
(say, to /etc/cups/backend.pyo)......
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. boot system with USB printer (say, HP 950PSC), and /usr/share
read-only, or with SELinux strict/enforcing
Apps that ship Python code should also ship the .pyo/.pyc bits IMHO --
but apparently this is not trivial to do correctly. CC'ing Python
maintainer for further input.
As far as SELinux goes (and I think this is what prompted this bug
report) these should be dontaudit, and I thought they were at one point.
dontaudit would remove the avc's, but the write of the file would fail.
That would be OK if the the .pyo is never used, but then ....
The .pyo file is just to speed up loading of the Python module -- it
is for optimization, which in this case is lost in the noise of having
to load the foomatic database later on.
Waiting for redhat-rpm-config to turn on the Python pre-compilation.
Tim - if you'll tell me what changes to make, I can do that, or feel free to
just check in the necessary changes yourself.
/usr/lib/rpm/brp-python-bytecompile needs to get run in
Enabled in redhat-rpm-config CVS, it'll wind up in the dist sooner
Please build this. Thanks.