Ok.  Based on your input with regards to the error I am seeing with the 
rpmbuild issues.  I'll need to rebuild RPM5.  So, I was going to download it, 
but there are no source tarballs (just source rpms) for newer versions and I 
cannot download newer sources from CVS due to a firewall.

How do you recommend I download a newer version?

From: Jeff Johnson <n3npq....@gmail.com<mailto:n3npq....@gmail.com>>
Reply-To: <rpm-users@rpm5.org<mailto:rpm-users@rpm5.org>>
Date: Mon, 20 Jun 2011 11:50:41 -0400
To: <rpm-users@rpm5.org<mailto:rpm-users@rpm5.org>>
Subject: Re: rpm errors upon running


On Jun 20, 2011, at 10:57 AM, Miller, Vincent (Rick) wrote:

Hi Jeff…thanks for the reply.  See my replies inline.  Also, I have an rpmbuild 
error at the tail of this message.


From: Jeff Johnson <n3...@mac.com<mailto:n3...@mac.com>>
Reply-To: <rpm-users@rpm5.org<mailto:rpm-users@rpm5.org>>
Date: Fri, 17 Jun 2011 19:10:33 -0400
To: <rpm-users@rpm5.org<mailto:rpm-users@rpm5.org>>
Subject: Re: rpm errors upon running


On Jun 17, 2011, at 1:43 PM, Miller, Vincent (Rick) wrote:

Hi,

I have installed RPM5 on FreeBSD 8.2-RELEASE and am now unable to do anything 
useful with it due to errors.  I tried searching the mail archives for similar 
issues, but only found a reference to DB_CONFIG in reference to initializing a 
the rpm db.  Since this is a brand new install and there were no db files on 
the host, I figured it might apply.  It mentions mmapsize, which is definitely 
set, but offered no recommendations into calculating what to set it to.


I don't know how you installed, but
make install
from a build SHOULD copy a /var/lib/rpm/DB_CONFIG into place.

The DB_CONFIG file is MANDATORY with @rpm5.org.

The DB_CONFIG file was put into place and the truss output shows DB_CONFIG 
being read.


The contents (from the rpm-5_3 "production" branch) that pertain to locking 
tunables are

# ================ Locking
set_lk_max_locks        16384
set_lk_max_lockers      16384
set_lk_max_objects      16384
mutex_set_max           163840

The heuristic (that I use) is that the mutex_set_max should be ~10x larger
than the other values, which is about the right scaling.

The size of the others depends on how many packages are managed,
which is an extrinsic quantity that isn't guessable a priori. 16K -> 64K are
about the right range, and conservative. There's likely something else
wrong if you appear to need >64K.

How did you build rpm? From CVS? rpm-5.4.1 or rpm-5.3.11?

I downloaded a source tarball for 5.3.4 and installed with the commands below 
after installing various ports  that appeared to be required.  The ports I 
installed were popt, beecrypt, pcre, gss, and expat.  Some of these ports had 
their own dependencies they installed.


You likely want to use the latest "production" rpm-5.3.11 release instead of 
rpm-5.3.4.
The @rpm5.org project does tick,tock monthly releases.

./configure —with-expat CPPFLAGS="-I/usr/local/include" 
LDFLAGS="-L/usr/local/lib" LIBS="-lgss"
gmake
gmake install


How many packages do you have?


I currently do not have any RPM packages.  There are a couple hundred ports 
installed, but this should have no bearing on RPM.


OK. In order to use RPM on FreeBSD as an "add-on" you will almost certainly
need to supply some dependencies.

There are two ways to do this:

1) capture the usual provides (like /bin/sh) in a virtual package and
install that first.

2) stub-in dependencies as needed. E.g. you will almost certainly have
to provide "/bin/sh" somehow, which can be done like this
mkdir -p /etc/rpm/sysinfo
echo "/bin/sh" >> /etc/rpm/sysinfo/Providename

You are likely to find that the two rules
1) Every file requires its parent directory
2) Every symlink requires its endpoint.
to be a bit bothersome as well. Stub those out in /etc/rpm/sysinfo
(or what ever path you have chosen) using
echo "/usr/bin" >> /etc/rpm/sysinfo/Dirnames
echo "/path/to/endpoint" >> /etc/rpm/sysinfo/Filelinktos




I'll include as much info as I can here, but it'll mean the length of this mail 
may be substantial.

The error I receive when I attempt to rpm –qa is:


<snipped but not ignored>


# ================ Locking
set_lk_max_locks 8000
set_lk_max_lockers 8000
set_lk_max_objects 8000
mutex_set_max 8000


Try setting "mutex_set_max" to 80000 not 8000.

I changed mutex_set_max to 80000 and ran rpm –qa and it did not produce the 
original error.  Additionally, it appears to have created the __db files in 
/var/local/lib/rpm/.  This is a good start.

My next test is to attempt to build an RPM.  I am going with a very simple 
test, initially, which is to create a new /etc/motd.  When I run rpmbuild on 
the spec file, I get the following error.  Do you have any thoughts on this?

[root@freebsd /usr/local/src/rpm/SPECS]# rpmbuild -bb 
vrsnconfig-FreeBSD-amd64-1.0.spec
Executing(%prep): /bin/sh -e /var/local/tmp/rpm-tmp.447
+ umask 022
+ cd /usr/local/src/rpm/BUILD
+ rm -rf /var/local/tmp/vrsnconfig-FreeBSD-amd64-root
+ cd /usr/local/src/rpm/BUILD
+ rm -rf vrsnconfig-FreeBSD-amd64-1.0
+ /bin/mkdir -p vrsnconfig-FreeBSD-amd64-1.0
+ cd vrsnconfig-FreeBSD-amd64-1.0
+ + /usr/bin/gzip/usr/bin/tar -dc -xvvf 
/usr/local/src/rpm/SOURCES/vrsnconfig-FreeBSD-amd64-1.0.tar.gz -

x etc/motd
+ STATUS=0
+ [ 0 -ne 0 ]
+ exit 0
Executing(%build): /bin/sh -e /var/local/tmp/rpm-tmp.447
+ umask 022
+ cd /usr/local/src/rpm/BUILD
+ cd vrsnconfig-FreeBSD-amd64-1.0
+ exit 0
Executing(%install): /bin/sh -e /var/local/tmp/rpm-tmp.447
+ umask 022
+ cd /usr/local/src/rpm/BUILD
+ /bin/rm -rf /var/local/tmp/vrsnconfig-FreeBSD-amd64-root
+ /bin/mkdir -p /var/local/tmp/vrsnconfig-FreeBSD-amd64-root
+ cd vrsnconfig-FreeBSD-amd64-1.0
+ mkdir /var/local/tmp/vrsnconfig-FreeBSD-amd64-root/etc
+ /usr/bin/install -m644 etc/motd 
/var/local/tmp/vrsnconfig-FreeBSD-amd64-root/etc
+ exit 0
Processing files: vrsnconfig-FreeBSD-amd64-1.0-1.amd64
error: magic_load(ms, NONE/share/file/magic) failed: could not find any magic 
files!
Assertion failed: (mg != NULL), function rpmfcClassify, file rpmfc.c, line 1154.

You need to specify a path to what used to be called /etc/magic until
FHS decided to rearrange everything and left the path UNSPECIFIED
(and so distros end-up all doing something different).

There's an AutoFu ./configure option to specify what path magic resides on.

>From devtool.con %fbsd8x target
--with-path-magic=${PREFIX}/share/file/magic

hth

73 de Jeff

Reply via email to