Bug 556350 - build tests depend on optional component
Summary: build tests depend on optional component
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-18 02:10 UTC by JW
Modified: 2010-02-05 16:34 UTC (History)
3 users (show)

Fixed In Version: coreutils-8.4-4.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-05 16:34:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description JW 2010-01-18 02:10:57 UTC
Description of problem:
If one builds coreutils configure without "--enable-selinux" then the resultant ls utility does not contain the "--scontext" command-line option.  However, the test suite library (test-lib.sh) contains a function require_selinux_ which uses "ls --scontext" to attempt to determine whether selinux is enabled.  Unfortunately the said function does not account for the possibility that ls doesn't support that option ... it only acts on the ls output (either ? or unlabeled).

Version-Release number of selected component (if applicable):
coreutils-7.6-8

How reproducible:
Always

Steps to Reproduce:
1. build coreutils without configure option of '--enable-selinux'
  
Actual results:
1. Various tests fail because the require_selinux_ function fails in an unexpected manner

Expected results:
The require_selinux_ function should also invoke skip_test_ if ls exits with non-zero status.

Additional info:
selinux is unwanted, unnecessary, and pollutes the system by creating an overly complex and unmanageable mess.

Comment 1 JW 2010-01-18 02:23:04 UTC
It is in fact the fault of a patch: coreutils-6.10-configuration.patch

This patch replaces the 'ls -Z' in the test-lib.sh with 'ls --scontext' for some undocumented reason.

This is wrong because --scontext might not be compiled into ls. Chicken and egg.  You cannot use the output from a missing feature to test if a feature is missing!

The spec file groups the patch in "Our patches" so I figure that RedHat has introduced this bug.

Comment 2 Ondrej Vasik 2010-01-18 12:27:33 UTC
Thanks for report. You are right, it's caused by Red Hat patch and it has to be fixed.

That replacement is because previous coreutils Fedora/Red Hat maintainer added SELinux patch from NSA before it was accepted by upstream. Now it sometimes slightly differs from upstream and I have to keep those things as they might be in use in some Fedora/RHEL-4/5 scripts.

Comment 3 Ondrej Vasik 2010-02-05 16:34:05 UTC
Moved that test-lib.sh modification into selinux patch directly and built as coreutils-8.4-4.fc13 - closing RAWHIDE.


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