Re: [cooker-commits] [svn-commit] r769353 - cooker/kcm-grub2/current/SPECS

Jeffrey Johnson <[email protected]> Fri, 27 Jan 2012 13:09:56 -0500
Newsgroups gmane.linux.mandrake.cooker.devel
Message-ID <[email protected]>
On Jan 27, 2012, at 11:53 AM, Andrey Bondrov wrote:

> 28.01.2012 02:20, Nicolas Lécureuil пишет:
>> On Fri, Jan 27, 2012 at 2:15 PM, dsilakov<[email protected]>  wrote:
>>> Author: dsilakov
>>> Date: Fri Jan 27 13:15:42 2012
>>> New Revision: 769353
>>> 
>>> Added:
>>>   cooker/kcm-grub2/current/SPECS/kcm-grub2.spec
>>> 
>>> Log:
>>> SILENT: fix release
>> fix release ?
>> 
>> 
>> please use real commit message and please clean this spec file before
>> i got an heart attack or  something like this because this seems an
>> opensuse spec file imported in mandriva with no modification/cleaning
> 
> Indeed.

Please note that I tend to have minority/contrarian POV wrto RPM issues.
Don't take any of my comments as disagreeing. In fact all your comments
are surpassingly (to me) accurate.

> 
> 1. All locales should be managed by find_lang instead of listing every file in %files section.
> 

An entirely different (but related) issue:

	No *.spec should include locales for group/summary/description.

Last I checked (about a year ago) there were ~900 *.spec recipes
that has locales with description/summary/group.

> 2. make_jobs definition should be removed as we have %make in Mandriva.
> 
> 3. BuildRoot should be removed as not needed even by RPM4 in 2010.2, not to mention RPM5.
> 

The same applies to %clean in @rpm5.org code: there is no need for %clean
in almost all *.spec recipes, and there's likely some other way
to fix any *.spec that still might claim to need %clean.

Whether BuildRoot: and %clean SHOULD be removed is a question
that can only be answered by considering "legacy compatibility".

> 4. BuildRequires are just wrong: lib64magick-devel and lib64hd-devel. 64 bits shouldn't be hardcoded.
> Use "rpm -q lib64magick-devel --provides" and choose something better from the list :-)
> 
> 5. $RPM_BUILD_ROOT is something we should avoid. Always use %{buildroot} instead.
> 

There is literally no difference whether $RPM_BUILD_ROOT or %buildroot is
used. They will _ALWAYS_ have the same value.

> 6. And in any case, we don't need %clean section in RPM5 at all. Keep it only when you plan to backport package to 2010.2.
> 

Good: you have already mentioned what I just said (I'm replying item by item).

> 7. You don't have to write "%setup -n %{name}-%{version} -q" because it's the same as "%setup -q"
> 

I could pretty easily change the -q "opt-out" disabler into
a -v "opt-in" enabler and change the default behavior of
%setup so that even -q need not be specified in *.spec recipes.

If you think that is a good idea, please add a bug report at
	http://launchpad.net/rpm
which will then be scheduled into 2012 as appropriate.

> 8. For "make -C build DESTDIR=%buildroot install" we have "%makeinstall_std" macro
> 
> 9. All commented junk like " #kde_post_install" should be removed.
> 
> Hope this helps :-)

Yes it does help: *.spec recipes are so cluttered up with "macro magic"
and ancient history that its very difficult to see what to do to
package up software.

hth