rpm spec example

Arthur Clune <[email protected]>
Newsgroups gmane.network.up2date.current.devel
Message-ID <[email protected]>
I've been building rhn_register RPMs for my clients as per 
client_building.txt.

Taking the example .spec file from the doc/client dir rpm -ba fails:

---------------------------------------

Processing files: rhn_register-2.7.2-7.x.2_current
error: File not found: 
/var/tmp/rhn_register-root/usr/lib/python1.5/site-packages/dmimodule.so
Requires: python >= 1.5.2 rpm-python >= 4.0.2 python-xmlrpc >= 1.4.4 
sh-utils
Obsoletes: rhns_register
Processing files: rhn_register-gnome-2.7.2-7.x.2_current
Finding  Provides: (using /usr/lib/rpm/find-provides)...
Finding  Requires: (using /usr/lib/rpm/find-requires)...
PreReq: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) 
<= 3.0.4-1
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 
rpmlib(CompressedFileNames) <= 3.0.4-1
Requires: rhn_register = 2.7.2 usermode >= 1.33 pam >= 0.72 redhat-logos 
pygnome pygtk pygtk-libglade pygnome-libglade /bin/sh /usr/bin/python
Obsoletes: rhns_register-gnome


RPM build errors:
    File not found: 
/var/tmp/rhn_register-root/usr/lib/python1.5/site-packages/dmimodule.so

--------------------------------------------------------------

/usr/lib/python1.5/site-packages/dmimodule.so does exist.

Editing the .spec file solves the problem:

-----------------------

%install
# ONLY for 6.x builds
#cp rhn_register.pam6x rhn_register.pam

rm -fr $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT

# next two lines added
mkdir -p $RPM_BUILD_ROOT/usr/lib/python1.5/site-packages/
cp /usr/lib/python1.5/site-packages/dmimodule.so 
$RPM_BUILD_ROOT/usr/lib/python1.5/site-packages/

make install PREFIX=$RPM_BUILD_ROOT MANPATH=%{_mandir}

-------------------------------------

Is this something stupid I'm doing wrong, or something in the example .spec 
file?

I'm building on a RH7.2 box.

Arthur

--
Arthur Clune [email protected]
We are the sum of the things we pretend to be, so we must be careful
who we pretend to be - Kurt Vonnegut
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.