[TriLUG] rpm database question

Tom Bryan tbryan at python.net
Tue Nov 20 12:56:25 EST 2001


On Wednesday 21 November 2001 05:44 am, you wrote:
> Adrian announced:
> > No, I build an rpm with the fix and install it.
>
> <sarcasm>Ahhh so you are a masochist then, eh?</sarcasm>
>
> RPM has some great potential.  With some up to date book(s) on the subject,
> and maybe a packaging tool that works, I'd probably use it more.  Building
> a package right now seems to be a major pain.  I haven't found a reliable &
> easy way yet to build those pesky spec files.  What's your secret?

You can use vendor-supplied RPMs, which may just work even with updated 
source, or you can write your own.  The problem with not basing your RPMs on 
vendor-supplied RPMs is that you may be unable to install RPMs that rely on 
the vendor's packages.  For example, if a vendor-supplied RPM expects 
python-devel, I don't think RPM would let you install it if you included the 
vendor's python-devel files in a package that you call python.

If that isn't a concern, and if all you're doing is 
./configure [options]
make
make install

then the .spec file isn't that hard.  Here's a trimmed down .spec file for a 
basic postgresql install.  

Summary: PostgreSQL, packaged for running and/or developing EcoAccess software
Name: postgresql
Version: 7.1.3
Release: 1
#BuildRoot: /var/tmp/
Source0: postgresql-%{version}.tar.gz
Copyright: BSD-style
Group: Application/Database
Vendor: Yourself
Packager: You again <email at goes.here>
Provides: PostgreSQL
 
%description
Anyhting you want here

%prep
# unpack the sources under /usr/src/redhat
%setup -q -T -b 0 -n postgresql-%{version}
 
%build
./configure --prefix=/usr/local/postgresql-%{version}
make
 
%install
make install

%files
%defattr(-,postgres,postgres)
/usr/local/postgresql-%{version}


Perhaps we'll here more about such issues at the upcoming RPM talk.  I hope 
that I can make it.  :) 

---Tom



More information about the TriLUG mailing list