[packman] list of most frequent problems

Pascal Bleser pascal.bleser at skynet.be
Sun Apr 2 13:44:11 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Czanik wrote:
> Hello,

Hi Peter

> Can I ask you guys a big favor? Could you please check your spec files
> before 10.1 is released? Here is a collection of most frequent problems,
> what makes compiling with y2pmbuild difficult:

A few comments/additions...

> - missing gcc-c++ (unable to compile)

The portable requirement would be "c++_compiler" instead of "gcc-c++".
I guess that doesn't matter much for us as we only do packages for
Linux, but nevertheless ;)

In 99% of cases, you'll also need to specify
libstdc++ libstdc++-devel

Note that the same is true for "c_compiler" instead of "gcc"

But that's not really critical, as most of the software we're packaging
wouldn't compile with anything else than gcc/g++ anyway ;)

Also, don't forget to specify make and glibc-devel

> - missing pkgconfig (configure is not able to find requirements, this
> solved the transcode problems)
> - missing xorg-x11-devel (kdelibs requires it, but the rest does not
> take care...)

To remain portable on SUSE versions below 9.2, I use the following trick:

%if %suse_version >= 920
%define xwindow xorg-x11
%else
%define xwindow XFree86
%endif

Summary:	...
...
BuildRequires:	%{xwindow}-libs %{xwindow}-devel

Because SUSE versions < 9.2 have XFree86 and not xorg-x11.

Another option would be to write
BuildRequires:	XFree86-libs XFree86-devel
even when it's xorg-x11, because the xorg-x11 packages "Provides" the
XFree86 ones for backwards compatibility.

Personally, I prefer the %if %suse_version ... method as above, because
I don't really trust the backwards compatibility Provides: any more in
SUSE packages, as I've been told that the GLX provides disappeared in
10.1 :\

> - nasm is only i386, and probably Opteron. Please ifarch it out for PPC

Ok.

%ifarch %ix86 amd64 x86_64
BuildRequires:	nasm
%endif

> - missing update-desktop-files (it's required for most X11 applications)

Actually it's required whenever you use %suse_update_desktop_file, which
*must* be used according to the SUSE Package Conventions (of course,
only if there is a .desktop file ;)).

BuildRequires:	update-desktop-files
...
%install
...
%suse_update_desktop_file -r "%{name}.desktop" Graphics Photograph

BTW, the list of categories is here:
http://forgeftp.novell.com//library/SUSE%20Package%20Conventions/spc_desktop_menu.html#spc_dm_category_list

> - BuildPreReq is not known by y2pmbuild, and even if it's still
> supported by rpmbuild, it was written off as obsolete on different forums

Yes, heard the same, BuildPreReq is obsoleted by BuildRequires (they
always did exactly the same anyway).

> - and a generic one: if you have a 'Requires' line for a package, make
> sure, that you also have a related 'BuildRequires' line for the related
> development package. Like if there is Requires: libvorbis, then there
> should also be BuildRequires: libvorbis-devel. Sometimes it's not that
> easy, like cdparanoia, libmpeg3, etc. don't have separate devel packages...

Indeed.
And it's true they're not always easy to find.

Here's what I do, maybe it helps:
- - I always do a local build, not in the chroot, just to be able to fill
the spec file
- - I run a little script of mine on the resulting binaries (bin/* and
lib*.so) to find out what packages are required at runtime
- - from that list, I deduce the -devel packages and fill in the
BuildRequires

That script is available from the packman SVN, in trunk/tools/ldd2rpm
as well as here:
http://linux01.gwdg.de/~pbleser/files/rpm/ldd2rpm

> Most of these are much more easily fixed by the guy maintaining the
> package, than the poor guy who tries to recompile it. So, it would be
> fantastic, if you could go through this check list!

Absolutely. Thanks again for your hard work :)

> Last time I hacked y2pmbuild configuration to include frequently missing
> packages, but that is a very dirty hack taking away reproducibility,
> which is the main advantage of y2pmbuild...

Yep.

cheers
- --
  -o) Pascal Bleser     http://linux01.gwdg.de/~pbleser/
  /\\ <pascal.bleser at skynet.be>       <guru at unixtech.be>
 _\_v The more things change, the more they stay insane.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEL7kLr3NMWliFcXcRAsE/AJ9sXmT9J2ihSoQCWYBZ+p3iGegCQwCgoL0z
sTruax+RS/AUUhau1VjhsqQ=
=Pw3F
-----END PGP SIGNATURE-----




More information about the Packman mailing list