A best-practice question
Panu Matilainen
pmatilai at laiskiainen.org
Mon Nov 26 09:20:51 UTC 2012
On 11/26/2012 08:55 AM, Eran Ben Natan wrote:
> Hello,
>
>
>
> From your experience, is it better to set files owner and mode in the
> install part, using the install command, or in the files part with
> %attr?
Like Valery already pointed out, rpmbuild should never ever be executed
as root, which means you simply cannot set file ownership during
%install. File ownership should always be set in %files with %defattr/%attr.
Setting the file mode is up to you. Often its suffieciently taken care
of with by "make install" during %install so that only eg
"%defattr(root,root,-)" is needed, and if further tweaking is needed it
can be done from either %install or %files via %defattr/%attr.
- Panu -
More information about the Rpm-list
mailing list