Mailinglist Archive: opensuse-packaging (102 mails)

< Previous Next >
Re: [opensuse-packaging] Please criticise my spec file.
  • From: Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx>
  • Date: Sun, 2 Sep 2007 13:45:06 +0200 (CEST)
  • Message-id: <Pine.LNX.4.64.0709021341300.14556@xxxxxxxxxxxxxxxxxxxxxxxxx>

On Sep 2 2007 00:18, Pascal Bleser wrote:
>> On Sep 1 2007 16:22, Paul Elliott wrote:
>>> Name:           peless
>>> Summary:        Tabbed text browser
>>> Version:        1.156
>>> Release:        19%{?dist}
>>> License:        GPL
>>> Group:          Productivity/Text/Utilities
>>> Source0:        http://download.berlios.de/peless/%{name}-%{version}.tar.bz2
>>> BuildRoot:      %{_tmppath}/%{name}-%{version}-build
>>> Packager:       https://developer.berlios.de/projects/peless/
>
>> Get rid of "Packager", "Vendor" and "Distribution"; they are
>> provided by the build system (depends on the build system).
>> Especially since you are the packager of the rpm, and not peless.
>
>Indeed.

(packman could really adhere to that too)

>And if you're just using rpmbuild, you can set the packager like this:
>echo '%packager John Doe <john.doe@xxxxxxxxx>' >> ~/.rpmmacros

And if you are using lbuild, oh well, you need patches first.

>> %debug_package is missing. Well, people normally do not need it, but editing
>> the specfile is something I would like to avoid, in case it seems necessary.
>
>You *must* add it (good practice).

It's not done for kernel-<flavor>, and there, it's a good thing not do so :)

>Furthermore, with %debug_package, rpmbuild will strip the binaries (and
>store the debug symbols into the -debuginfo subpackage).

Someone explain me the Fedora idiocy to implicitly add %debug_package on every
package...

>>> %install
>>> rm -rf $RPM_BUILD_ROOT
>>>
>> mkdir "$RPM_BUILD_ROOT" here
>
>Neither. no need to mkdir it.

This is 'needed' to avoid races outside lbuild. I can't find it, but it was on
lists.opensuse.org once.

>Do NOT use rm -rf $RPM_BUILD_ROOT because it potentially creates a race
>condition.

Explain.


>> Do not strip, this makes it impossible to build a debug package.
>> Also, the build system will strip.
>
>Exactly, or %debug_package takes care of it.
>
>Also, rather use the macro %makeinstall, which does this:
>%__make DESTDIR="%{buildroot}" install

So what's the point of all the macros..

>>> %clean
>>> rm -rf $RPM_BUILD_ROOT
>
>%__rm -rf "%{buildroot}"
>(but I'm being pedantic here ;D)

Yeah, sounds really redundant this %__make and %__rm.

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups