RPM Community Forums

Mailing List Message of <rpm-users>

Re: Spec file help

From: Eric MSP Veith <eveith@wwweb-library.net>
Date: Mon 22 Dec 2008 - 18:01:30 CET
Message-Id: <200812221801.33250.eveith@wwweb-library.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Monday 22 December 2008, Anders F Björklund <afb@rpm5.org> wrote:
> Eric MSP Veith wrote:
> > what you've spotted there are issues specific to my own build system.
> > The %{__make_install} macro is defined as %{__fakeroot} %{__make}
> > install
> > and is just a shortcut for me.
>
> Sure, just that you get the funky "fg: no job control"
> when they are not defined. %{__fakeroot} is a nice touch,
> easy enough to stub out where the program is not available...
> (guess I didn't have to mention it's not defined either)

I assume I surely cannot be blamed for introducing macros concerning my own 
build system? I provided the spec file as reference for the original 
poster. I should have stated that I introduced macros with my distribution 
that are guranteed to be there since I packed them with RPM. Obviously my 
spec file also somewhat "fails" some Guidelines of RPM Packaging, which I 
did not yet find. I am open and happy to read more suggestions from you. 
Could you provide me with a generic (i. e. not distro-specific) guideline 
on how to write nice spec files?

> >> And these lines are not needed anymore, with RPM 5:
> >> Buildroot: %{_tmppath}/%{name}-root
> >> [[ '%{buildroot}' != '/' ]] && %{__rm} -rf '%{buildroot}'
> >> The BuildRoot is automatically handled by RPM now...
> >
> > I didn't know this. How is it handled?
>
> Pretty much like the above, only that it is automatic...
> i.e. %buildroot is a global macro that's already set, and
> it's automatically cleaned before %install and in %clean.
> (also implies that any BuildRoot: tag is simply ignored)

I already found the definition of %__spec_clean_body in /usr/lib/rpm/macros. 
Since just "%{?buildroot:%{__rm} -rf '%{buildroot}'}%{nil}" doesn't suit 
me, I'm going to modify that, too. ;-) Sorry, but just "it's handled 
automatically" never satisfied me. I should have asked more specificly.

Thanks.

		-- Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklPx+oACgkQfkUtd7QNU/tlzACZATckQO5gTqrCXpYuLasB0ub1
MQwAn3nQ+PpRfk7uOj1B0n2QWmOrklJR
=XOFY
-----END PGP SIGNATURE-----
Received on Mon Dec 22 18:01:36 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.