Bug 120154 - rpm and rpmbuild for non-root builds produce file_contexts errors
rpm and rpmbuild for non-root builds produce file_contexts errors
Product: Fedora
Classification: Fedora
Component: policy (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-04-06 09:59 EDT by Gene Czarcinski
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-04-06 10:53:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
what I get when I run rpm -Uvh (137.19 KB, text/plain)
2004-04-06 10:00 EDT, Gene Czarcinski
no flags Details
what I get when I run rpmbuild (296.57 KB, text/plain)
2004-04-06 10:01 EDT, Gene Czarcinski
no flags Details

  None (edit)
Description Gene Czarcinski 2004-04-06 09:59:22 EDT
Description of problem:

It is possible this should be against rpm so I will cc him on this
report.  However, since if I "setenforce 0" the problem goes away (no
messages), I assume policy is involved.

I have a directory structure .rpmrc and .rpmmacros so that I can build
rpms as non-root ... the "safe" way (per Mike Harris stuff).  I am
able to build the policy rpms (policy-1.9.2-12).  However, when I run
the rpm -Uvh command to install the source and again when I run
rpmbuild -bi for building, I get lots and lots of messages of the form:

/etc/security/selinux/file_contexts:  invalid context
system_u:object_r:default_t on line number 39
/etc/security/selinux/file_contexts:  invalid context
system_u:object_r:root_t on line number 44
/etc/security/selinux/file_contexts:  invalid context
system_u:object_r:home_root_t on line number 53

I am attaching the redirected console logs for the rpm -Uvh and
rpmbuild -bi since they are a bit large.
Comment 1 Gene Czarcinski 2004-04-06 10:00:24 EDT
Created attachment 99142 [details]
what I get when I run rpm -Uvh
Comment 2 Gene Czarcinski 2004-04-06 10:01:23 EDT
Created attachment 99143 [details]
what I get when I run rpmbuild
Comment 3 Daniel Walsh 2004-04-06 10:24:07 EDT
No this is a bug in policy.  Policy needs 
can_getsecurity($1_t) added.

I have modified policy with this change in policy-1.9.2-13  
Available on people.  Or in tomorrows build.

Comment 4 Gene Czarcinski 2004-04-06 10:53:41 EDT
OK, 1.9.2-13 fixes things and I am closing this report ... if the fix
gets lost, I will reopen.

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