On Dec 13, 2007 11:03 AM, Bob Beers <bob.beers@xxxxxxxxx> wrote:
On Dec 13, 2007 10:35 AM, Jeff Johnson <n3npq.jbj@xxxxxxxxx> wrote:Thank you Jeff and Matthew for the rapid responses!
>
> What you miss is %attr markers in the %files manifest.
>
> Add explicit
> %attr(mode,user,group)
> (substituting the actual values for "mode", "user", "group" above)
> for paths listed in the %files manifest.
>
> There is also %defattr, and there's a certain art to expressing
> %attr so that itscopes correctly across glob patterns, but rpm
> packaging easily separates the actual {mode,user,group} used
> during build from the same tuple used during install.
>
Do I understand correctlythat I can
omit the make install line in %install section
if I add appropriate %attr lines in the %file section?
You can't omit "make install" (and adding the DESTDIR=%{buildroot}
is perfectly sane if that is what you are doing).
Think of %{buildroot} as a staging area for package contents. However
you populate, with cp, or install or ... any other means. But you need to
populate the %{buildroot} with the contents that you want in packages.
(Note: yes I'm perfectly aware that one can package w/o BuildRoot:, but
let's not go there please.)
Something like this?
%files
%attr(755,root,root)
/usr/local/bin/file01
%attr(644,root,root)
/usr/local/bin/file02
%attr(750,root,wheel)
/usr/local/bin/file03
%attr(750,root,aaa)
/usr/local/bin/file04
%attr(750,root,bbb)
/usr/local/bin/file05
The scoping is up to next newline, so make sure the %attr is
on the same line as the path or pattern.
73 de Jeff
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list