[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Fedora-packaging] Re: BuildRoot



On Tue, Jul 25, 2006 at 05:55:03PM +0200, Ralf Corsepius wrote:
> On Tue, 2006-07-25 at 16:46 +0200, Axel Thimm wrote:
> > On Tue, Jul 25, 2006 at 12:07:20PM +0200, Matthias Saou wrote:
> > How about the following patch (yet untested) to redhat-rpm-config
> > in devel and thus FC6/RHEL5? It would eliminate some issues and
> > allow for better planning:

> This would need quite an amount of testing.

So start testing today :)

> > diff -rud redhat-rpm-config-8.0.43.org/macros redhat-rpm-config-8.0.43/macros
> > --- redhat-rpm-config-8.0.43.org/macros 2005-08-17 02:27:33.000000000 +0200
> > +++ redhat-rpm-config-8.0.43/macros     2006-07-25 16:38:53.000000000 +0200
> > @@ -156,3 +156,18 @@
> >  
> >  # Disable lookups
> >  %_hkp_keyserver  %{nil}
> > +
> > +#==============================================================================
> > +#	These are the default values that can be overridden by other
> > +#	(e.g. per-platform, per-system, per-packager, per-package) macros.
> > +#
> > +#	Path to top of build area.
> > +%_topdir		%(test `%{__id_u}` = 0 && echo %{_usrsrc}/redhat || echo $HOME/rpmbuild)
> > +
> > +#	Directory where temporary files can be created.
> > +%_tmppath		%(test `%{__id_u}` = 0 && echo %{_var}/tmp || echo $HOME/rpmbuild/tmp
> > +
> > +#	Configurable build root path, same as BuildRoot: in a specfile.
> > +#	(Note: the configured macro value will override the spec file value).
> > +
> > +%buildroot		%{_tmppath}/%{name}-%{version}-%{release}
> 
> - Doesn't work in your several %arch's case.

I didn't want to obfuscate it, better use sane and common defaults.
The argument about arch was relative and not absolute anyway: "arch is
more important than id, therefor if we skip arch, we need to skip id".

But the scheme above even takes care of your multiuser-
build-the-same-package-corner-case, so at least you have no reason not
to be happy.

> - Do %_topdir/%_tmppath in .rpmmacros still work?

There's no reason not to. The current setup has their default setup in
a macro file just the same, the above just changes these defaults.

> - How does this interact with *.spec files containing hard-coded 
>   %Buildroots?

Read the comments.

> - Do %name, %version, %release always expand correctly (Rpm suffers from
>   a bug, where at least %name or %version (I don't recall exactly)
>   occasionally is not being expanded correctly)?

URL? I've never seen a macro fail using name/version and I use them
quite a lot.

Of course - as said - the above is untested, so anything may happen.
-- 
Axel.Thimm at ATrpms.net

Attachment: pgpds1lZ2C3ns.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]