RPM Community Forums

Mailing List Message of <rpm-users>

Re: Recommendations on initializing the system rpmdb ?

From: Jeff Johnson <n3npq@mac.com>
Date: Sun 02 Jan 2011 - 09:02:22 CET
Message-id: <AC1292F0-2099-4E2B-B2F7-5A0D1A46552F@mac.com>

On Jan 2, 2011, at 12:48 AM, Sriram Narayanan wrote:

> Hello:
> 
> 1. What are the recommendations on initializing the rpmdb ?
> 

No initialization per se is needed:

[jbj@rhel6 wdj]$ rpm -qa --dbpath /tmp/blah
[jbj@rhel6 wdj]$ ls -al /tmp/blah
total 13720
drwxr-xr-x   2 jbj  jbj      4096 Jan  2 02:45 .
drwxrwxrwt. 19 root root    20480 Jan  2 02:45 ..
-rw-r--r--   1 jbj  jbj     24576 Jan  2 02:45 __db.001
-rw-r--r--   1 jbj  jbj  10493952 Jan  2 02:45 __db.002
-rw-r--r--   1 jbj  jbj  41951232 Jan  2 02:45 __db.003
-rw-r--r--   1 jbj  jbj  41951232 Jan  2 02:45 __db.004
-rw-r--r--   1 jbj  jbj  41951232 Jan  2 02:45 __db.005
-rw-r--r--   1 jbj  jbj  41951232 Jan  2 02:45 __db.006
-rw-r--r--   1 jbj  jbj    163840 Jan  2 02:45 __db.007
-rw-r--r--   1 jbj  jbj   4554752 Jan  2 02:45 __db.008
-rw-r--r--   1 jbj  jbj     40960 Jan  2 02:45 __db.009
-rw-r--r--   1 jbj  jbj  10485760 Jan  2 02:45 log.0000000001
-rw-r--r--   1 jbj  jbj      8192 Jan  2 02:45 Packages

You WILL need to configure cache/mmap sizes and particularly
the number of locks by adding a DB_CONFIG file.

> 2. I've tried to use /usr/local/lib/rpm/vpkg-provides.sh
> This asks for --spec_header '/path/to/os-base-header.spec'
> 

vpkg-provides.sh is for a installation model where a traditional software vendor
(like in Apple Mac OS X) provides a "native" OS and *.rpm packages are added
on top of the "native" os.

You will need to add a few tags like Name:, Version:, and Release:
(i.e. that's what is in os-base-header.spec if you wish to use
vpkg-provides.sh. The rest of the script should generate a virtual
package with library sonames and a %verifyscript to check library
file digests.

> a. What are the recommended contents of this spec file ?
> 

Essentially just the tags that prevent the vpkg-provides.sh
output spec file from building.

> b. What do other distros do ?
> 

Most distros use RPM for everything, in which case vpkg-provides.sh
is unnecessary. I've done packaging on Mac OS X, using vpkg-provides.sh
to jump start a spec file.

Note that Provides: can be added (1-per-line) to a file. E.g.
	mkdir -p /etc/rpm/sysinfo
	echo "/bin/sh" >> /etc/rpm/sysinfo/Providename
supplies the essential pre-requsite to run *.rpm scriptlets.

The ability to configure Provides: in a flat-file was re-added because
there were too many details to explain about how to use RPM "packages"
such as what vpkg-provides.sh does.

73 de Jeff
Received on Sun Jan 2 09:02:42 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.