Re: Cross Distro Spec Files



Hi Greg, *,

On Wed, Jun 15, 2005 at 09:47:39AM -0700, Greg M. Kurtzer wrote:
> How about a script or hack to an existing build-tool (jhbuild or gargnome)
> that will take a spec file template and use that to create all of the specs
> for the packages?

I don't think this is possible. You may be able to create rpm-files,
sure, but this is not what I would consider a "good" one.

If you can create the logic to create the spec using a build-tool, you
could just create the real specs as well.

> For cAos Linux, we use mezzanine (previously the VALinux autobuild system)
> which can build SPEC's for the standard ./configure&&make&&makeinstall type
> source trees. Perhaps that can be used as a base and then just wrap it with
> ordering and the spec template?

For the standard procedure, you'd just have the %configure, %make and
%makeinstall macros.

This is not what makes up an rpm...
If we just wanted to create rpms that contain merely the files, we could
start just know, without any special "magic".

The tough thing about rpms is to get the requirements right and to split
the package reasonably.
This reminds me of a point I forgot in my last mail: How should packages
be split? Base package and development package? Or a devel-static
package as well?

I used the very same dummy spec file for every gnome-package, only
adapting the files-section. Not much trouble. Only a few packages only
rely on the "destdir" install, almost every package supports the
"prefix" install. The only thing that nees special treatment is the
removal of files that should not be owned by the package (scollkeepers
content-lists for example) - But I did neither of the things I would
consider a requirement to the specs:
* a "standard" name
* a decent description
* correct requirements, build-requires
* correct license
* split the devel-parts into a seperate package

> Regarding the package names, what I would like to see is not what I think will
> work... I would like to see the upstream names used for the primary packages
> (eg. gtk+),

Not sure what you mean with upstream names. The name of the tarball?

> and then compatibility libs or the non-default package versions
> having the versioned nomenclature (eg. gtk1). I know this isn't realistic, so
> I would think that a name file should be taken into the build script (eg:
> gtk+=gtk2, glib=glib2, etc...).

Basically it doesn't matter what name we choose for the package. It is
only important that the packages that make up the gnome-desktop and
"fifth-toe" packages have names they can check for using a
requires-statement.

> There will also need to be a master dependency file for both requires and
> buildrequires. This can then be used for build ordering as well I think.

How this is organized doesn't really matter... Such an abstraction layer
will help build-tools, but the specs have to be generated when the
tarball of the package is created. Relying on such a build tool to
generate/update the dependancy information is not what we should
envision. It could be an intermediate solution, but nevertheless the
spec file should be self-contained. (you must be able to run
"rpmbuild -ba <specfile>" without using the build-tool first)

> Unfortunately I would have to agree with Christian, there are way too many
> differences to make *clean* maintainable specs for the main distros. I also
> agree that utilizing rpmbuild defines will not work with the autobuilders that
> we use (mezzanine). Perhaps a SPEC/SRPM generation script is the next best
> thing?

Well, my point is not that it is difficutl to set those defines, but
that it is difficult to maintain these. If that build tool doesn't
ignore the system's rpm-configuration  the macros like %configure or
%make will work. You can even define "have_suse" or something. But the
problem is that when we do the "magic" in the specfile itself, it /will/
break sooner or later (and even worse: it will be harder to fix - you
risk breaking the support for the working distros when you modify the
spec). Maybe the main-distros and the popular packages won't be affected
- but what about the other ones?

ciao
Christian
-- 
NP: System Of A Down - Darts



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