Bug 436717

Summary: Rebuild of coreutils fails with "FAIL: chcon.log"
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-26 10:56:09 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
tests/misc/chcon.log none

Description Robert Scheck 2008-03-09 17:43:18 EDT
Description of problem:
Rebuild of coreutils fails with "FAIL: chcon.log", because mcstrans(d) is not
a must. So please correct the patch to work also without mcstrans(d) running.

Version-Release number of selected component (if applicable):
coreutils-6.10-11

How reproducible:
Everytime, see above.

Expected results:
Working rebuild even without having mcstrans(d) running.
Comment 1 Robert Scheck 2008-03-09 17:43:54 EDT
Created attachment 297381 [details]
tests/misc/chcon.log
Comment 2 Ondrej Vasik 2008-03-10 07:08:13 EDT
Thanks for report, will try to find suitable solution for unactive selinux
translation... but I don't know about which patch you are talking about. Chcon
implementation was in selinux patch in coreutils-6.9, coreutils-6.10 are using
upstream implementation of chcon (which is  very similar to implementation in
coreutils-selinux.patch ).
Comment 3 Robert Scheck 2008-03-10 07:13:11 EDT
Sorry, I didn't have an exact look to it, I thought that SELinux would come from 
that patch. The fix is IMHO just to allow both: With and without translation. But
I don't know how the check is performed, maybe just an regexp?
Comment 4 Ondrej Vasik 2008-03-10 07:29:46 EDT
In coreutils-6.9 all selinux things were from that selinux patch -
coreutils-6.10 included selinux things by default - but unfortunately in some
cases unlike with Red Hat patch. Therefore upstream solution is based on Red Hat
patch, but sometimes not the same. 
Chcon check is following: perform some commands and compare results with
expected results. So maybe the easiest way would be to skip the test when
translation is not active - as is already done for the case of some only
"non-root" tests executed by root. 
Comment 5 Ondrej Vasik 2008-03-26 10:56:09 EDT
Anyway - chcon is root only test, so it will be skipped when rebuild with
non-root user. So that's an easy workaround for the issue. Same problem with not
running mcstrans(d) was with cp-a-selinux test. While fixing that issue I found
that the chcon test fails in selinux enforcing mode as well... Both issues fixed
and built as coreutils-6.10-15.fc9, closing RAWHIDE.
Comment 6 Jim Meyering 2008-04-01 11:27:22 EDT
Thanks for the report and investigation.
I've fixed this upstream:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13098