I'm seeing a lot of reviews lately with complaints about %defattr. I admit to not always checking it myself, but this seems to be the kind of thing that rpmlint could easily check for.
I know that the complete lack of %defattr is problematic, but I'm not sure whether "%defattr(-,root,root)" is a blocker or not. The only place it seems to be mentioned is in %lang section of the guidelines (and in templates contained in the various language-specific guidelines).
- J<
On Sat, 2007-07-28 at 12:01 -0500, Jason L Tibbitts III wrote:
I know that the complete lack of %defattr is problematic,
Yes.
but I'm not sure whether "%defattr(-,root,root)" is a blocker or not.
No. It's perfectly valid for a package to not have any files owned by root. Yes, it would be unusual, but not wrong per se.
On Saturday 28 July 2007 19:01:11 Jason L Tibbitts III wrote:
I know that the complete lack of %defattr is problematic, but I'm not sure whether "%defattr(-,root,root)" is a blocker or not. The only
Why is it sometimes %defattr(-,root,root) and sometimes %defattr(-,root,root,-) (which is what rpmdev-newspec generates)?
Regards, Till
On Sat, 2007-07-28 at 21:25 +0200, Till Maas wrote:
Why is it sometimes %defattr(-,root,root) and sometimes %defattr(-,root,root,-) (which is what rpmdev-newspec generates)?
I believe the complete spec for %defattr is:
"%defattr" "(" fileperms ["," user-owner ["," group-owner ["," dirperms] ] ] ")"
with "-" in {file,dir}perms meaning no change from what it already has.
On Sat, 28 Jul 2007, Ignacio Vazquez-Abrams wrote:
On Sat, 2007-07-28 at 21:25 +0200, Till Maas wrote:
Why is it sometimes %defattr(-,root,root) and sometimes %defattr(-,root,root,-) (which is what rpmdev-newspec generates)?
I believe the complete spec for %defattr is:
"%defattr" "(" fileperms ["," user-owner ["," group-owner ["," dirperms] ] ] ")"
with "-" in {file,dir}perms meaning no change from what it already has.
Yup.
If something, rpmlint should check for unattributed files: ones that aren't covered by %defattr or file-specific %attr. Missing %defattr isn't an error, totally unattributed files are (or should be treated as such, perhaps on rpmbuild level) because the outcome then relies on who happens to build the package.
- Panu -
packaging@lists.fedoraproject.org