Re: rpm %defattr question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 14 July 2009, Jesse Keating wrote:
> On Tue, 2009-07-14 at 17:33 +0300, Ville Skyttä wrote:
> > Your guess is as good as mine, but I don't know why it would need to
> > change.
>
> %defattr and %attr appear to use different syntax, as I tried to use the
> same %defattr syntax for an %attr line and RPM balked.  Making them
> consistent would be nice.

I don't think consistency is necessarily a very good thing here because as you 
noticed, %defattr and %attr are different.  Somewhat simplified; %defattr 
specifies default ownership and _optionally different modes_ for files and 
dirs for stuff on lines after it in %files, while %attr specifies the _same 
mode_ and ownership for all the stuff following it on the same line in %files, 
regardless if the stuff is dirs or files.  The same/different modes difference 
is most important with %files entries that recurse and match both files and 
dirs.

%defattr(<mode-for-non-dirs>,<user>,<group>[,<mode-for-dirs>])
%attr(<mode-for-everything-on-this-line>,<user>,<group>) /some/thing

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux