Re: Insert a %post into existing rpm?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 06, 2006 at 05:41:20PM +0800, Daniel Grimwood wrote:

> The reason is that the rpm currently comes with an install script that 
> installs the (relocatable) rpm and then does some trivial modifications to 
> some of the files that got installed.  (It effectively replaces some tokens 
> with RPM_INSTALL_PREFIX in a few files.).  I'd like to stick those changes 
> straight into a %post script and repackage the rpm to simplify new installs 
> and upgrades.
> 
> Is this possible/easy to do with rpm?  If not then I could try converting to 
> deb with alien, putting the post script in and converting back to rpm, but I 
> don't know if that would wreck RPM_INSTALL_PREFIX, plus it's not elegant.

In those situations I use the RPM as source file and have a %prep like

   %setup -q -c -T 
   mkdir root
   rpm2cpio %{SOURCE0} | ( cd root; cpio -iudm )

This makes future maintenance easy, preserves the pristine source
(which is the third-party RPM in that case), etc.

Lots of third-party RPMs (especially those of *huge* companies) are
crap and show those people do not understand what RPM is meant for.
Especially dropping everything in some directory and have a
multi-thousand-line %post script to actually install the stuff (the
last RPM I looked at from EMC had a 2900+ lines (!) %post script)
seems to be a popular method :-(, thus throwing away most of the
system management advantages RPM offers you.

-- 
--    Jos Vos <jos@xxxxxx>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux