Red Hat Bugzilla – Bug 1026469
brp-python-bytecompile should ignore symlinks to files it cannot write
Last modified: 2015-07-01 09:22:21 EDT
Description of problem:
calibre build run /usr/lib/rpm/brp-python-bytecompile. If python-feedparser (a runtime dependency, not a build time one) is *not* installed, everything works fine, becuase brp-python-bytecompile ignored dangling symlinks.
But if python-feedparser is installed, and the dynglings are not symlanked^W^W^W^W symlinks are dangling, it fails with:
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
Bytecompiling .py files below /home/zbyszek/rpmbuild/BUILDROOT/calibre-1.9.0-1.fc21.x86_64/usr/lib/python2.7/ using /usr/bin/python2.7
Sorry [Errno 13] Permission denied: '/home/zbyszek/rpmbuild/BUILDROOT/calibre-1.9.0-1.fc21.x86_64/usr/lib64/calibre/calibre/web/feeds/feedparser.pyc'
error: Bad exit status from /var/tmp/rpm-tmp.UBLMpQ (%install)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. build calibre
2. install calibre
3. attempt to build again
I'm setting severity to low, because this won't happen in a pristine build environment and is easy enough to work around.
I think that this is really a bug in rpm-build, brp-python-bytecompile should ignore symlinks to files it cannot write. As we symlink to unbundle stuff, such things will happen more and more often. It *could* be worked-around in this srpm, but it won't be particularly easy or elegant, and it's much nicer to fix it in rpm-build.
Can brp-python-bytecompile ignore symlinks to files it cannot write?
Yup, it certainly has no business touching files outside the buildroot.
I'll have a look...
Mmh. Getting python compileall.compile_dir() to comply is not entirely straightforward. Its rx-argument could probably be (ab)used for the purpose but doing so within a single-liner python -c invocation is...
Anyway, its something to fix but not perhaps super urgent. As a short-term workaround, you can add "BuildConfilicts: python-feedparser" with a comment pointing to this bug.
ok, added in rawhide.
Should we keep this open?
I think so. BuildConflict is just a band-aid.
Yeah, lets leave this open.
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 20 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fixed upstream as d2a6bec00041032f29bc65360adeff04f19f2db5