Description of problem: I run a Xvfb server in the %check section of the plplot build to allow the running of various tests that require an X server. This is no longer working in rawhide. On my initial build I got: SELinux: Failed to open x_contexts mapping in policy and the server fails to start. So I added selinux-policy-targeted and now I get: SELinux: Invalid object class mapping, disabling SELinux support. Backtrace: 0: Xvfb (xorg_backtrace+0x2d) [0x5132f9] 1: Xvfb (0x400000+0x115cb6) [0x515cb6] 2: /lib64/libc.so.6 (0x2b52d986b000+0x340e0) [0x2b52d989f0e0] 3: /lib64/libselinux.so.1 (0x2b52d8166000+0x7274) [0x2b52d816d274] 4: /lib64/libselinux.so.1 (avc_destroy+0x116) [0x2b52d8174166] 5: Xvfb (0x400000+0x47929) [0x447929] 6: Xvfb (CloseDownExtensions+0x2b) [0x4e336d] 7: Xvfb (0x400000+0xc85d7) [0x4c85d7] 8: /lib64/libc.so.6 (__libc_start_main+0xfd) [0x2b52d9889e7d] 9: Xvfb (0x400000+0x19d09) [0x419d09] Segmentation fault at address (nil) Fatal server error: Caught signal 11 (Segmentation fault). Server aborting This is with mock 1.1.5 on a F13 host running 2.6.34.7-56.fc13.x86_64. The koji builders work fine, so perhaps it detects the F13 kernel and tries to to more stuff that it does on the koji builders. Version-Release number of selected component (if applicable): xorg-x11-server-Xvfb-1.9.0-13.fc15.x86_64
I believe this is supposed to be fixed in F14 I am not sure mock was fixed in F13, to not put down labels.
Updated my mock machine to F14 and still get: _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created. Fatal server error: SELinux: Failed to open x_contexts mapping in policy
Orion, are you loading the SELinux plugin? If you're running SELinux on your build machine, then you need to. If you're loading it and you're getting SELinux problems, then we have a bug.
Is this what you mean? # semodule -l | grep mock mock 1.0.0
No, there's an selinux plugin in mock now. It should load by default, detect that the host system is running selinux in enforcing or permissive mode then bind mount a fake /proc/filesystems file in the chroot so that running things like sestatus in the chroot will return disabled. you should see a print at the start of the run that says: INFO: selinux enabled or INFO: selinux disabled when the plugin initializes. This tells if the host system is running SELinux
INFO: mock.py version 1.1.5 starting... State Changed: init plugins INFO: selinux enabled
There's a problem with the SELinux plugin in mock 1.1.5 in that it uses mkstemp() to create the dummy /proc/filesystems file and hence it's created with mode 0600, i.e. unreadable to processes running as user mockbuild in the chroot. This causes some versions of libselinux (including F-13 and RHEL-6 Beta) to return -1 for is_selinux_enabled(), which some users if teh library (e.g. openssh) treat as "enabled". Simple fix is to fix the mode of the file to be 0444 like the real /proc/filesystems: --- /usr/lib/python2.6/site-packages/mock/plugins/selinux.py.orig 2010-09-17 23:15:23.000000000 +0100 +++ /usr/lib/python2.6/site-packages/mock/plugins/selinux.py 2010-10-14 11:04:56.906097982 +0100 @@ -58,6 +58,7 @@ os.close(self.fd) host.close() + os.chmod(self.filesystems, 0444) self.rootObj.mountCmds.append("mount -n --bind %s %s" % (self.filesystems, self.chrootFilesystems)) self.rootObj.umountCmds.append("umount -n %s" % self.chrootFilesystems)
Yes there is a another bug on Mock with the same solution.
Argh, I've had the fix Paul mentions in my tree for a while now, just got caught up in other stuff. I'll push out a new mock later today which should fix the issue.
Orion, would you try the mock-1.1.6 build in koji: https://koji.fedoraproject.org/koji/buildinfo?buildID=200570 and let me know if that clears up the SELinux permission problem?
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
Fixes it for me. Thanks!
\o/ Pushed to testing
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
I'm going to reopen this because I seem to see the same problem when I run mock --shell, which is impacting my ability to troubleshoot a build failure. mock-1.1.8-1.fc14.noarch
so when you run --shell, what's failing?
The Xvfb server doesn't start with: Fatal server error: SELinux: Failed to open x_contexts mapping in policy
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.0.16-1.el5 has been pushed to the Fedora EPEL 5 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.0.16-1.el5
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.