Re: preserving file attributes from make install in rpm spec file
"Jeff Johnson" <[email protected]>
| Newsgroups | gmane.linux.redhat.rpm.general |
|---|---|
| Message-ID | <[email protected]> |
On Dec 13, 2007 11:03 AM, Bob Beers <[email protected]> wrote: > On Dec 13, 2007 10:35 AM, Jeff Johnson <[email protected]> wrote: > > > > > 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. > > > > Thank you Jeff and Matthew for the rapid responses! > > 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 [email protected] https://www.redhat.com/mailman/listinfo/rpm-list