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 526414
Summary: | missing /dev/fd symlink causes some mock builds using it to fail | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tuomo Soini <tis> | ||||||
Component: | mock | Assignee: | Clark Williams <williams> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 13 | CC: | dcantrell, herrold, jjneely, lystor, mebrown, rjones, williams | ||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||
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-09-23 04:57:20 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: |
|
Created attachment 363138 [details]
Proposed patch for problem with enhanced comment
Add missing /dev/fd symlink. Missing symlink causes problems
with fd handling during build causing failed builds.
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping for some reason I thought we had this and dropped it, but I can't find why we did so. I'll add it and run it through the test suite, since it looks reasonable. commit 0dbb10e278c2121b3d6dd8385974c3f777a8ef03 Author: Clark Williams <williams> Added for mock-1.1.2 Date: Fri Jul 16 09:42:21 2010 -0500 added symlink from /proc/self/fd to /dev/fd in the chroot (BZ# 526414) Added a symlink in the chroot from /proc/self/fd to /dev/fd. Only do this for EPEL5+ and FC hosts since the 2.6.9 kernel for EPEL4 does not support this. Signed-off-by: Clark Williams <williams> diff --git a/py/mock/backend.py b/py/mock/backend.py index f8cb412..f22ac12 100644 --- a/py/mock/backend.py +++ b/py/mock/backend.py @@ -359,6 +359,10 @@ class Root(object): os.symlink("/proc/self/fd/1", self.makeChrootPath("dev/stdout")) os.symlink("/proc/self/fd/2", self.makeChrootPath("dev/stderr")) + # don't symlink for RHEL4 systems + if kver > '2.6.9': + os.symlink("/proc/self/fd", self.makeChrootPath("dev/fd")) + # symlink it for FC hosts if kver >= '2.6.19': os.symlink("/dev/pts/ptmx", self.makeChrootPath("dev/ptmx")) *** Bug 453583 has been marked as a duplicate of this bug. *** mock-1.1.3-1.fc14 has been submitted as an update for Fedora 14. http://admin.fedoraproject.org/updates/mock-1.1.3-1.fc14 mock-1.1.3-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/mock-1.1.3-1.fc13 mock-1.0.10-1.el5 has been submitted as an update for Fedora EPEL 5. http://admin.fedoraproject.org/updates/mock-1.0.10-1.el5 mock-1.0.10-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/mock-1.0.10-1.fc12 mock-1.0.10-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: http://admin.fedoraproject.org/updates/mock-1.0.10-1.el5 mock-1.1.3-1.fc14 has been pushed to the Fedora 14 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: http://admin.fedoraproject.org/updates/mock-1.1.3-1.fc14 mock-1.1.3-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: http://admin.fedoraproject.org/updates/mock-1.1.3-1.fc13 mock-1.0.10-1.fc12 has been pushed to the Fedora 12 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: http://admin.fedoraproject.org/updates/mock-1.0.10-1.fc12 mock-1.1.3-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. This patch does not work. /dev/fd is not symlinked in on my Fedora 13 system running mock-1.1.3-1.fc13. I've verified that the patch above is present, and it is. However, we are comparing STRINGS not version numbers. Python 2.6.4 (r264:75706, Jun 4 2010, 18:20:31) [GCC 4.4.4 20100503 (Red Hat 4.4.4-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> kver = os.uname()[2] >>> kver '2.6.33.6-147.fc13.x86_64' >>> kver > '2.6.9' False >>> kver >= '2.6.19' True '2.6.33.6-147.fc13.x86_64' is NOT greater than '2.6.9' and the symlink does not get instaleld. Ugh. Good catch. Maybe there's an rpmlib routine exported to python that I can use to do a more thorough comparison. I really don't want to try and write my own RPM NVR comparison routine... Just do an "import rpm" and you'll have the same abilities as /usr/bin/rpmdev-vercmp does :) mock-1.1.4-1.fc14 has been submitted as an update for Fedora 14. http://admin.fedoraproject.org/updates/mock-1.1.4-1.fc14 mock-1.1.4-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/mock-1.1.4-1.fc13 mock-1.0.11-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/mock-1.0.11-1.fc12 mock-1.0.11-1.el5 has been submitted as an update for Fedora EPEL 5. http://admin.fedoraproject.org/updates/mock-1.0.11-1.el5 mock-1.0.11-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: http://admin.fedoraproject.org/updates/mock-1.0.11-1.el5 mock-1.1.4-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.4-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.11-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. Back around to looking at kABI kernel module packages. Using mock-1.1.4-1.fc13 I still don't have any success with /dev/fd being present in the chroot. In fact I still see at line 372 in backend.py the buggy code: # don't symlink for RHEL4 systems if kver > '2.6.9': os.symlink("/proc/self/fd", self.makeChrootPath("dev/fd")) On my Fedora 13 build host I'm testing by running mock <options> init. Then mock <options> shell. Finally ls /dev/fd. Koji (F14) also lacks /dev/fd -> /proc/self/fd. http://git.fedorahosted.org/git/?p=mock.git;a=blob;f=py/mock/backend.py;h=c7d0ca9c4bb1a6f05608049151ac657379eb7e3f;hb=HEAD#l371 371 # don't symlink for RHEL4 systems 372 if kver > '2.6.9': 373 os.symlink("/proc/self/fd", self.makeChrootPath("dev/fd")) That test must surely be wrong. It should be kver <= '2.6.9' if the comment is to be believed. This bug has been opened for 2 years, can we fix it now please. OK, I'm an idiot, but can we make the link unconditionally, because that test is failing to create the symlink. The biggest problem with that comparison is that it doesn't work, since it's a string comparison and 2.6.9 is > 2.6.33. I created a utility function called cmpKernelEVR() which uses the rpmutils function compareEVR(). It's in the queue so I'll try and push it out this week. mock-1.1.5-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.5-1.fc14 mock-1.1.5-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/mock-1.1.5-1.fc13 mock-1.0.12-1.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/mock-1.0.12-1.fc12 mock-1.0.12-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.12-1.el5 mock-1.0.12-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.12-1.el5 mock-1.1.5-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.5-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.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.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. |
Created attachment 363137 [details] Proposed patch for problem Description of problem: missing /dev/fd symlink causes some mock builds relying on it to fail Version-Release number of selected component (if applicable): mock 0.9.17. How reproducible: Always with packages needing /dev/fd/self or other specific file handle. Steps to Reproduce: 1. try to rebuild package in mock, build may be successful (some fail) 2. Check build logs for: '/dev/fd' or 'Broken pipe' 3. You'll find errors like these caused by missing /dev/fd symlink join: /dev/fd/63: No such file or directory sort: write failed: standard output: Broken pipe sort: fflush failed: standard output: Broken pipe zcat: stdout: Broken pipe cat: write error: Broken pipe /usr/bin/libtool: line 836: echo: write error: Broken pipe |/usr/bin/libtool: line 836: echo: write error: Broken pipe yes: standard output: Broken pipe sort: fflush failed: standard output: Broken pipe tr: write error: Broken pipe sort: write failed: standard output: Broken pipe Actual results: Failed or broken builds. Expected results: Successful builds.