Bug 16610

Summary: rpm overly cautious when building
Product: [Retired] Red Hat Linux Reporter: djschaap
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-08-19 22:18:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description djschaap 2000-08-19 22:18:39 UTC
rpm -ba file.spec returns:

Bad owner/group: /usr/src/redhat/SOURCES/file-1.1-1.tar.gz

Changing ownership of this file to "root" eliminates this problem; however,
after the compile phase, rpm bombs out again with a similar error due to
the spec file being owned by non-root (me).  I prefer to keep SPEC files
for custom packages I produce in a CVS repository accessed with my personal
username.

Previously, I was able to "chown -R g+w /usr/src/redhat" and then "rpm
--rebuild" source RPMs without having to be root.  This change makes it
unnecessarily complicated to rebuild source RPMs as a non-root user.

I believe this change happened somewhere between 3.0.3 and 3.0.5, but not
sure.  Is there a way to change this behavior (ie, eliminate these security
checks)?

Thanks.

Comment 1 Bill Nottingham 2000-08-19 22:20:04 UTC
It's returning bad owner/group because it can't
resolve the uid that owns the files. It implies that
they are owned by a user not in /etc/passwd or in NIS/LDAP/whatever.

Check your nsswitch setup.

Comment 2 djschaap 2000-08-19 22:42:16 UTC
Thanks for the quick response!  That's what it looked like to me as well,
except...

- I am able to login in to the system just fine.
- "ls -l" properly resolves both the user & group.

I am running with NIS, using "passwd: compat" in /etc/nsswitch.conf.  I am using
"+@my_nis_net_grp::::::" as the last line in /etc/passwd.  Strangely enough,
adding "+::::::/bin/false" after that line fixes the problem with rpm building.

Because rpm is the only program I've had a problem with, I would suspect this to
be a problem within rpm, but not being familiar with the code I can't say for
sure.

I'm leaving this bug report RESOLVED since I've now got a workaround, though
there *may* still be an issue here.

Thanks!