Bug 691292 - Coreutils fails to build in mock >= 1.1.9
Summary: Coreutils fails to build in mock >= 1.1.9
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: coreutils
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-28 05:15 UTC by Mathieu Bridon
Modified: 2011-12-06 17:12 UTC (History)
4 users (show)

Fixed In Version: coreutils-8.4-14.el6
Doc Type: Bug Fix
Doc Text:
Prior to this update, SELinux appeared to be disabled when building coreutils in Mock. As a result, coreutils did not build. With this update, SELinux determines more precisely whether it is disabled or not. Now, the packages are built successfully.
Clone Of:
Environment:
Last Closed: 2011-12-06 17:12:32 UTC
Target Upstream Version:


Attachments (Terms of Use)
Make coreutils build in mock >= 1.1.9 (1.74 KB, patch)
2011-03-28 05:18 UTC, Mathieu Bridon
no flags Details | Diff
Backported patch from the one committed upstream (1.58 KB, patch)
2011-04-06 08:21 UTC, Mathieu Bridon
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1693 0 normal SHIPPED_LIVE coreutils bug fix update 2011-12-06 00:49:52 UTC

Description Mathieu Bridon 2011-03-28 05:15:44 UTC
Description of problem:
Mock 1.1.9 (currently only in EPEL testing) introduces a change in how it handles SELinux inside the chroot:
    https://bugzilla.redhat.com/show_bug.cgi?id=573111

This makes coreutils fail to build in mock >= 1.1.9:
    https://bugzilla.redhat.com/show_bug.cgi?id=573111#c26
(read the "Actual results" section for more details on the failure)

The way mock fakes SELinux being disabled might improve in the future, but the way the unit tests check whether SELinux is enabled is still not ideal.

Here is the upstreamed patch to fix the issue:
    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8359

I'm attaching a patch rebased on top of the RHEL6 version.


Version-Release number of selected component (if applicable):
    coreutils-8.4-9.el6


How reproducible:
Always.


Steps to Reproduce:
1. Update mock to 1.1.9 from EPEL testing
2. Run:
    mock -r epel-6-x86_64 --rebuild coreutils-8.4-9.el6.src.rpm

  
Actual results:
Build fails because of the following sequence of events:
- mock fakes SELinux being disabled by grepping the selinux filesystem out of /proc/filesystems
- some unit tests check whether SELinux is enabled by running ls and grepping for context
- the files do have an SELinux context (SELinux is enabled on the host)
- the unit test fails since SELinux is disabled inside the chroot


Expected results:
Build succeeds, including unit tests.


Additional info:
This build failure is happening on all systems that have SELinux enabled when building in mock, including Fedora >= 14. From the changelog in the RHEL package, it seems like you maintain the package in both RHEL and Fedora. Would you like me to also open a bug report for Rawhide or is this one enough to track them all?

Note that the Fedora Koji builders have SELinux disabled so you won't be able to reproduce the issue there.

Comment 1 Mathieu Bridon 2011-03-28 05:18:16 UTC
Created attachment 488077 [details]
Make coreutils build in mock >= 1.1.9

This a a backported to RHEL6 version of the upstreamed patch:
    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8359

Comment 3 Ondrej Vasik 2011-03-28 06:04:12 UTC
Thanks for report, alternative workaround is to just skip the check section of the build - as the affected part is in testsuite. As you have already mentioned, this doesn't affect koji and brew builders.

Comment 4 Mathieu Bridon 2011-04-06 08:19:46 UTC
Upstream reviewed my patch and committed a slightly different version:
    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8359#16

As such, I'm attaching a backported patch for the latest package in RHEL6.

Comment 5 Mathieu Bridon 2011-04-06 08:21:25 UTC
Created attachment 490189 [details]
Backported patch from the one committed upstream

Comment 6 Ondrej Vasik 2011-04-06 10:49:33 UTC
Thanks for the links, I'm aware of it ...

Comment 7 RHEL Program Management 2011-07-06 00:19:23 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 12 Eliska Slobodova 2011-09-19 14:21:49 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the coreutils packages did not build in Mock because SELinux appeared to be disabled in chroot. This update improves the determination of SELinux. Now, the packages are built correctly in Mock.

Comment 13 Eliska Slobodova 2011-09-19 14:57:55 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Previously, the coreutils packages did not build in Mock because SELinux appeared to be disabled in chroot. This update improves the determination of SELinux. Now, the packages are built correctly in Mock.+Prior to this update, SELinux appeared to be disabled when building coreutils in Mock. As a result, coreutils did not build. With this update, SELinux determines more precisely whether it is disabled or not. Now, the packages are built successfully.

Comment 14 errata-xmlrpc 2011-12-06 17:12:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1693.html


Note You need to log in before you can comment on or make changes to this bug.