Bug 120154 - rpm and rpmbuild for non-root builds produce file_contexts errors
Summary: rpm and rpmbuild for non-root builds produce file_contexts errors
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: policy
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-04-06 13:59 UTC by Gene Czarcinski
Modified: 2007-11-30 22:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-06 14:53:41 UTC
Type: ---
Embargoed:


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

Description Gene Czarcinski 2004-04-06 13:59:22 UTC
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 14:00:24 UTC
Created attachment 99142 [details]
what I get when I run rpm -Uvh

Comment 2 Gene Czarcinski 2004-04-06 14:01:23 UTC
Created attachment 99143 [details]
what I get when I run rpmbuild

Comment 3 Daniel Walsh 2004-04-06 14:24:07 UTC
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.

Dan

Comment 4 Gene Czarcinski 2004-04-06 14:53:41 UTC
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.