RPM

Jacek Konieczny jajcus at pld.org.pl
Thu Mar 22 18:37:19 CET 2001


Hi,

I have just updated rpm find{,-perl}-{requires,provides} scritps and
added some macros improving automatic generating of dependency info.

There are 5 new macros which can be defined in spec files:
%_noautoreqfiles        --- lists files to be excluded from 
                                auto "Requires:" generation
%_noautoreq             --- lists capabilities which should not
                                be added as "Requires"
%_noautoreqdep          --- lists capabilities which should not be used
                                for adding package dependencies 
%_noautoprovfiles       --- lists files to be excluded from
                                auto "Provides" generation
%_noautoprov             --- lists capabilities which should not
                                be added as "Requires"

Example of usage:

1) in bzflag.spec:
Requires:       OpenGL
%define         _noautoreqdep   libGL.so.1 libGLU.so.1

Adding this line causes "Requires: XFree86-OpenGL-libs" is not generated
for the package. libGL.so.1 requirement is added still though. And
"OpenGL" dependency is mannualy added.
"_noautoreqdep" is used instead of "%_noautoreq XFree86-OpenGL-libs" so
proper dependencies will be made even if package is built in other
OpenGL environment (eg. Mesa).

2) in dbman.spec (note: this should not be needed, but find-perl-provides is broken) 

%define         _noautoprovfiles %{_datadir}/%{name}/*
%define         _noautoreq "perl(Term::ReadLine)" "perl(Term::Slang)" "perl(Curses)"
 
The first line makes many fake "Provides" not beeing generated. These
modules are for internal use in dbman only.
The second line removes dependency from "perl(Term::ReadLine)"
"perl(Term::Slang)" "perl(Curses)" be removed, as dbman can be used
without those modules.


This system works on my computer. I have tried to commit it to CVS but:

1) rpm.spec patches *linux.{req,prov} files (which are installed as
find-{provides,requires}) but I was not able just to upgrade
rpm-{requires,provides} patches as other patches depend on them. In fact
the files are patches several times, and after that they have little in
common with the originals. IMHO we should "Source" them instead.

2) I couldn't build the rpm package:
../lib/.libs/librpm.so: undefined reference to `db3vec'
../lib/.libs/librpm.so: undefined reference to `db3Free'
../lib/.libs/librpm.so: undefined reference to `db3New'
collect2: ld returned 1 exit status
make[2]: *** [dump] Error 1

$ rpm -q db3 db3-devel
db3-3.1.17-6
db3-devel-3.1.17-6

I would like to commit my improvements as soon as possible (if nobody
objects, of course), but I don't know how to make rpm build.

Greets,
        Jacek

PS.
        I hope anybody understood my English :-)



More information about the pld-devel-en mailing list