On Saturday 10. July 2010 00.32.56 Felipe Contreras wrote: > On Sat, Jul 10, 2010 at 12:18 AM, Thiago Macieira <[email protected]> wrote: > > On Friday 9. July 2010 21.45.26 Felipe Contreras wrote: > >> It's about having a spec file that works on Fedora, openSUSE, > >> Mandriva, etc. Those are called distro-agnostic, or multi-distro. > >> > >> Here's one example: > >> http://git.kernel.org/?p=git/git.git;a=blob;f=git.spec.in > >> > >> Such spec files build fine on MeeGo, but are rejected for > >> integration because they "don't follow the guidelines". > > > > That file would be most likely be rejected in Mandriva too, for not > > following the guidelines. > > Can you point out which specific sections of the guidelines are not > met by the distro-agnostic spec file? Or are you just guessing? > > > Compare with the Mandriva equivalent of the same file: > > http://svn.mandriva.com/cgi- > > bin/viewvc.cgi/packages/cooker/git/current/SPECS/git.spec?revision=538411 > > &view=markup > > I already argued that the fact the distribution has a different spec, > doesn't mean that the upstream spec doesn't comply.
The fact that it builds doesn't mean it complies either. And in this case, it
doesn't even build (on Mandriva, %{_libexec} is /usr/lib, so the
%{_libexec}/git-core/*svn* glob fails)
Other things I noticed that aren't per recommendation:
* the Release isn't using %mkrel
* the BuildRequires line lists many packages on the same line -- it should be
one per line
* the %build section uses make directly instead of the %make macro
* changelog in the file, as opposed to the SVN log
> > I'm sorry, but I don't know .spec files to be really cross-distro. It's
> > something you can base on and adapt to your distro.
>
> Unfortunately it seems to be the case. But ideally no changes should
> be required, and if the changes can be minimized, that's good.
Like I said, the fact that you can build is great. That means you must use the
lowest common denominator for the macros available.
That doesn't mean the .spec file will be accepted by distros without
modification. In fact, I doubt any of them take upstream .spec files without
modifying a little.
> > At the very *least*, package names differ from distro to disto.
> > Therefore, all the Requires and BuildRequires rules are distro-specific.
>
> No. Nowadays distros find the Requires automatically (at least for
> binary packages) based on the link dependencies. Also there's now the
> pkgconfig() capability, so you don't need to mention the specific -dev
> package that provides certain .pc file in the BuildRequires.
That's assuming that there is a .pc file for the specific package. There are
many development packages without, like for example zlib. If I write in my
.spec file BuildRequires: zlib1-devel (that's the package name on Mandriva),
will it work on other distros?
How about tools for use in scripts? Let's take one example, which is a tool I
wrote: qdbus. On Mandriva it's on the qt4-qtdbus package. Where is it on other
distros?
Of course there will be similarities. And of course, with a bit of effort on
your part and on the goodwill of the distros, you'll be able to write cross-
distro .spec files.
But my experience is that there's enough difference that cross-distro .spec
files aren't a reality.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev
