Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 629041
Summary: | selinux plugin expects that yum cache directory exists | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dan Horák <dan> | ||||
Component: | mock | Assignee: | Clark Williams <williams> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 12 | CC: | dcantrell, jvcelak, mebrown, williams | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | mock-1.1.10-1.el6 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-10-28 22:22:15 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Dan Horák
2010-08-31 18:45:33 UTC
Does this patch fix the error? diff --git a/py/mock/plugins/selinux.py b/py/mock/plugins/selinux.py index fd4bf2e..2af41a5 100644 --- a/py/mock/plugins/selinux.py +++ b/py/mock/plugins/selinux.py @@ -35,6 +35,7 @@ class SELinux(object): self.rootObj = rootObj self.conf = conf + mock.util.mkdirIfAbsent(conf["cachedir"]) self.filesystems = os.path.join(conf["cachedir"], "filesystems") self.chrootFilesystems = rootObj.makeChrootPath("/proc/filesystems") (In reply to comment #1) > Does this patch fix the error? > > diff --git a/py/mock/plugins/selinux.py b/py/mock/plugins/selinux.py > index fd4bf2e..2af41a5 100644 > --- a/py/mock/plugins/selinux.py > +++ b/py/mock/plugins/selinux.py > @@ -35,6 +35,7 @@ class SELinux(object): > self.rootObj = rootObj > self.conf = conf > > + mock.util.mkdirIfAbsent(conf["cachedir"]) > self.filesystems = os.path.join(conf["cachedir"], "filesystems") > self.chrootFilesystems = rootObj.makeChrootPath("/proc/filesystems") Thanks, it helps. The only downside I can see now is that it will create empty directories that won't be removed and another mechanism like tmpwatch will be needed. Although mock should be convinced to remove the "cachedir" when it has caching disabled. Adding Jan to the CC Actually I think we should fix this in a different way. Rather than creating the fake /proc/filesystems file in the cache dir, I think we should create it in a tmpdir. It's just bind-mounted into the chroot and then deleted so there's no reason to save it. So I think we should rework the selinux plugin to ues the tempfile module, create a temp file, use that for the bind-mount, then remove the file when unloaded. Created attachment 442411 [details]
modification to the fake '/proc/filesystems' file generated by the selinux plugin
I was thinking that we could change the selinux plugin to use tempfile rather than putting the data file in the cachedir (which might not be there)
Clark, you are right. Creating fake 'filesystems' in tmpdir instead of cachedir seems much more reasonable to me. New build (mock-1.1.6) that does this and also sets appropriate permissions for the fake /proc/filesystems https://koji.fedoraproject.org/koji/buildinfo?buildID=200570 mock-1.1.6-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mock-1.1.6-1.fc13 mock-1.1.6-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.6-1.fc14 mock-1.0.13-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.13-1.el5 mock-1.0.13-1.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/mock-1.0.13-1.fc12 mock-1.1.6-1.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/mock-1.1.6-1.fc13 mock-1.1.6-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.6-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. mock-1.0.14-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.14-1.el5 mock-1.0.15-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.15-1.el5 mock-1.1.9-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc13 mock-1.0.16-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.16-1.el5 mock-1.1.9-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.9-1.el6 mock-1.1.9-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc14 mock-1.1.9-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.9-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.10-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc15 mock-1.1.10-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc14 mock-1.0.17-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.17-1.el5 mock-1.1.10-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc13 mock-1.1.10-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6 mock-1.1.10-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.10-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.10-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. mock-1.0.17-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.10-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report. |