[PLUG] RPM questions

Paul Heinlein heinlein at attbi.com
Mon Jun 3 01:13:49 UTC 2002


On Sun, 2 Jun 2002, Rich Shepard wrote:

> I have been using '--nodeps' once I check that the required libs are
> present. I just wondered if there's a way of making the rpm db aware
> of a non-rpm-installed library. You confirmed that the answer is,
> "no".

That's really not true. What you do is write a dummy package that
contains no files, just a bunch of Provides: lines. That's what I did
on my Solaris box to let rpm know what libraries came installed with
the system.

First, you create the .spec file. It'd look something like this:

#
# this is a virtual rpm; it doesn't contain any files, just a list
# of Provides taken from the base solaris os. See the very bottom
# of this .spec for the actual package info...
#

Summary: Manually installed libraries
Name: handbuilt
Version: 1.0
Release: 1
Copyright: GPL
Group: System Environment/Base
Packager: Rich Shepard <>
# these are just examples. season to taste
Provides: lib450.so.1
Provides: libC.so.3
Provides: libC.so.5
Provides: libCrun.so.1
Provides: libCstd.so.1
Provides: libFS.so
Provides: libFS.so.5
Provides: libICE.so
Provides: libICE.so.6

%description
This is a virtual RPM package.  It contains no actual files.  It uses
the `Provides' token from RPM 3.x and later to list many of the shared
libraries I've installed by hand on my system.

%prep
# nothing to do

%build
# nothing to do

%install
# nothing to do

%clean
# nothing to do

%files
# nothing here

#
# eof
#


Then "build" the rpm: "rpm -bb /path/to/foo.spec" -- and install it. 
>From that point forward, rpm is aware of the libraries you've listed 
in the various Provides: lines. Note that you don't need to provide a 
full path to the library, just its basename.

--Paul Heinlein <heinlein at attbi.com>






More information about the PLUG mailing list