[CentOS] Deconstruct an rpm

Tue Aug 8 19:53:26 UTC 2006
Stephen John Smoogen <smooge at gmail.com>

On 8/8/06, Tom Brown <tom at ng23.net> wrote:
>
> > "rpm2cpio file.rpm | cpio -i --make-directories" will unpack the rpm to
> > the directory you are momentarily in.
>
> thanks for this it was a great help - Is it possible to modify the files
> within the rpm and then just 'tar' it back up again or some other such
> like to repackage it? I need to change something within an rpm but i
> don't have the spec files etc.
>

Here are the world is ending, please don't ask us to stop the cats and
dogs sleeping together instructions:

I normally pull out the files via rpm2cpio into a subtree. I then do
rpm -q --scripts and rpm -q --triggerscripts to look at what scripts
the RPM was doing. I then create a new rpm out of the list of files
(put them in a tar ball, have the %build untar that tar ball and
rebuiid. Put the trigger and pre/post scripts into the RPM. Make the
changes you need to do to make what you need working for Trendmicro
etc. Install rpm on test machine. Fix problems, lather, rinse, repeat.




> thanks
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


-- 
Stephen J Smoogen. -- CSIRT/Linux System Administrator
How far that little candle throws his beams! So shines a good deed
in a naughty world. = Shakespeare. "The Merchant of Venice"