Trying to figure out some umask issues

Mike McLean mikem at redhat.com
Mon Nov 10 18:11:30 UTC 2008


Jason L Tibbitts III wrote:
>>>>>> "MM" == Mike McLean <mikem at redhat.com> writes:
> 
> MM> I believe the umask needs to be 002 in order for users in the mock
> MM> group to be able to use mock effectively.
> 
> Which umask?  My person one?  If mock requires a specific umask value,
> it should simply set one itself.

It does. mock calls os.umask(002) at startup (and has for a while). The 
mock on the Fedora build hosts has this line. I'm not sure why you're 
seeing a difference. Can you point to a specific Fedora build whose 
results differ from what you get locally?

> MM> Regardless, if this is affecting your rpms, then your specs are
> MM> probably broken. Use %defattr in all %files sections.
> 
> You'll note that I mentioned that I do many package reviews; these
> aren't my rpms.  Also, %defattr is present in the packages I have seen
> to have this problem.  (Fedora guidelines mandate it.)  Is there some
> specific %defattr value you suggest?  "(-.root,root,-)" is quite
> common.

Sorry, I guess it gets a bit more complicated with modes. Jesse's 
comments seem dead-on. If you don't want to patch the package to have it 
install with proper modes, then you can work around it with multiple 
%defattr() macros and/or per-file %attr() macros




More information about the Fedora-buildsys-list mailing list