Re: Rpm setting owner to build user
"Jeff Johnson" <[email protected]>
| Newsgroups | gmane.linux.redhat.rpm.general |
|---|---|
| Message-ID | <[email protected]> |
On 11/14/07, Jos Vos <[email protected]> wrote: > > On Tue, Nov 13, 2007 at 03:44:18PM -0800, Dan Ciarniello wrote: > > > One thing that didn't make sense at first was that the problem only > > occurred for this rpm and not others; all had the %defattr after the > > files. I eventually realized that I was building on two machines - one > > Fedora Core 4 and the other RHEL4. The rpmbuild version on FC4 is 4.4.1 > > while that on RHEL4 is 4.3.3. Apparently, in 4.3.3 the %defattr only > > applies to files following the directive while in 4.4.1 it applies to > all. > > No, that's not the reason. > > At some point the %defattr(-,root,root,-) became the default, probably > since RPM 4.4. Try to remove it, and you'll probably see that it still > works on your FC4. Yes, in order to establish a sane default. When building as non-root, the original default values for owner/group (the ownership of the files being packaged) was no longer sensible. The other problem is that %defattr has never had clear scoping across a set of files. Consider what happens with file manfiests that are either appended or prepended to the %files manifest. The scoping has always been across the remainder of %files, not within scope of the manifest, and so there were similar "changes in behavior" when automated tools started to add a %defattr automagically (like 5 years ago?) But for the reason you now discovered, I don't want to use this feature > in my spec files yet (maybe in 10 years or so... ;-)). Its rather easy to implement any desired behavior. Its impossible to please everyone. 73 de Jeff _______________________________________________ Rpm-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rpm-list