On Thursday, February 8, 2018 2:09:07 PM CET Miroslav Suchý wrote:
> Hi,
> I am sometimes reviewing spec files and I very often see common mistakes.

The issues you are mentioning below hardly classify as mistakes in my view.

> I mean in packages which are already in
> Fedora. For a long time and they
> have some dust from past times.
> I am not going to file bug reports as those are not bugs. I will just point
> it here and leave it up to you to check your
> spec files:
> * Group: System Environment/Base
> Please remove it. Group was intended for something (sort apps in menus), but
> it never actually worked. It was required
> for EL5 packages. Since EL6 it
> can be omitted. And nowadays it is recommended to remove it completely. 
> * rm -rf $RPM_BUILD_ROOT
> In the past, it was necessary to clean the buildroot at the beginning of
> %install and the end of %clean. This is no
> longer true and not needed
> since F12.
> * %defattr(-,root,root,-)
> If you have this at the top of your %files section, then you can safely
> remove it. This is default since rpm 4.2, so it
> is not needed even for
> RHEL5.
> * Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
> RPM define builroot variable since F12 (and EL6). There is no need to define
> it yourself.

While all the above things are safe to be removed in Fedora, they are pretty
much harmless.  I would not spend too much energy to remove them manually in
each single package.

There might be valid reasons for the old stuff appearing in _some_ spec files
beyond your knowledge, for example specfile maintained by upstream, usable not
only by Fedora.

I would rather suggest to spend time on fixing spec file issues that may cause
real-world problems, such as C/C++ package being built in %install instead of
%build, or unescaped RPM macros in %changelog:



> Miroslav
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org

Reply via email to