[TriLUG] Another plea for RPM help!

Tom Bryan tbryan at python.net
Sun Nov 18 10:51:42 EST 2001


Argh!  How does anyone learn how to package RPMs well?  Did you have to read 
the source?  I can't find any decent online documentation about RPM.  

I'm trying to write a .spec file, and I really want to do it well.  Here's a 
nice example.  I'm building a custom postgresql .rpm for a project.  I'd like 
to run ldconfig when the package installs.  I see that Red Hat's RPM does 
this: 

%post -p /sbin/ldconfig 

Question #1: What does the -p flag do?  I can't find any documentation on it.

Question #2: I see that some other RPMs do something like
/sbin/ldconfig -n /usr/local/pkg
Only processing the directory that I'm adding seems like a good idea, but the 
-n option to ldconfig says that it doesn't rebuild the cache.  Is that a good 
idea?

Question #3: Why don't these RPMs protect the post script with a 
if [ $1 = 1 ]
then
	/sbin/ldconfig -n /usr/local/pkg
fi
So that it isn't run every time the package is installed?

I know that someone lurking on this list is preparing a presentation on RPM.  
Where did *you* learn it?  How do I learn how to create a well-written .spec 
file that doesn't abuse RPM's intent and avoid all of its helpful features?  

Finally, will the RPM presentation for TriLUG cover such fine points, or will 
it just cover the basic installing and building of RPMs?

---Tom



More information about the TriLUG mailing list