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

Re: Building package for noarch, and subpackage for realarchitecture



On Wed, May 28, 2003 at 07:02:38PM -0400, seth vidal wrote:
> On Wed, 2003-05-28 at 18:45, Bernard Johnson wrote:
> > Yes, you can, but you have to jump through some hoops to make it work.  Take
> > a look at http://www.symetrix.com/files/tmda/srpms/tmda-0.73-1.src.rpm.
> > 
> > Then you build it like so:
> > 
> > rpmbuild -ba --target noarch,i386 tmda.spec
> > 
> > it will produce a noarch package and a i386 package
> > 
> > This was based on information given to me by other users of the list.
> 
> Great.
> 
>  The last time I saw this discussed the answer was no.
> 
> Is it really building two different packages for this one package and
> you're putting together the noarch.rpm and i386.rpm from the two?

The only restriction imposed by rpm is
	The value of arch is constant for a single parse/build.

The above invocation is a loop, first for a "noarch" build, second for
"i386". The spec file then has massive "%ifarch ..." constructs to
flip from "noarch" to "i386".

Doable, but more than a bit hacky. Personally, I think that splitting
the "noarch" stuff into a seperate package is the better (i.e. maintainable)
solution, rather than cross dressing spec files.

The assumption of constant arch during parse/build is wired deeply
-- by design -- through the rpm build code, and is not worth the pain
of trying to change. OTOH, if I were to try to change, the solution
would be to nest spec files, so that a build with a "noarch" subpackage
was exactly the same as, say,
	%include noarch-subpackage.spec

There are reasons other than "noarch" subpackages to nest spec files as well.
What's really, really broken in current spec file parser is the lack
of a state transition back to preamble, that's what needs fixing badly.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC




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