Hi
Is it possible to take an rpm apart to see what it will do to a system and see what files are inside the package?
thanks
uklinux.net - The ISP of choice for the discerning Linux user.
On Tue, 8 Aug 2006, Tom Brown wrote:
Hi
Is it possible to take an rpm apart to see what it will do to a system and see what files are inside the package?
man rpm2cpio
Regards Lance
thanks _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Tom Brown wrote:
Hi
Is it possible to take an rpm apart to see what it will do to a system and see what files are inside the package?
"man rpm".
"rpm -qpl file.rpm" shows a list of files.
"rpm -qp --scripts file.rpm" shows which scripts are run after or before installation, deinstallation, or upgrade.
"rpm2cpio file.rpm | cpio -i --make-directories" will unpack the rpm to the directory you are momentarily in.
And - as already said - "man rpm".
Regards,
Ralph
"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.
thanks
Tom Brown 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.
Don't you have the src.rpm? There's alien, but that really sucks, as you cannot really put scripts into the rpm.
Ralph
On 8/8/06, Tom Brown tom@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.
You can, but this is an amazingly bad idea and is one of those "the world is ending, am I REALLY sure I want to do this?" kind of things?
On 8/8/06, Tom Brown tom@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.
You can, but this is an amazingly bad idea and is one of those "the world is ending, am I REALLY sure I want to do this?" kind of things?
Just to jump in here: I can understand that it shouldn't be the very first thing you do, but I'm curious as to why this is "an amazingly bad idea". Care to hit me with a clue stick?
Ta, Craig Miskell ======================================================================= Attention: The information contained in this message and/or attachments from AgResearch Limited is intended only for the persons or entities to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipients is prohibited by AgResearch Limited. If you have received this message in error, please notify the sender immediately. =======================================================================
On Wed, Aug 09, 2006 at 08:34:20AM +1200, Miskell, Craig wrote:
Just to jump in here: I can understand that it shouldn't be the very first thing you do, but I'm curious as to why this is "an amazingly bad idea". Care to hit me with a clue stick?
The case has probably been a bit over-stated. :)
However, if it's pre-compiled binaries, this approach will probably lead to inconvenience at some point later. You really want the source.
On Tue, 2006-08-08 at 13:44 +0100, Tom Brown 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.
thanks
Almost all opensource RPMS have published SRPMS ... certainly all from CentOS / KBS / RPMForge do.
Where did you obtain said RPM.
On 8/8/06, Tom Brown tom@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@centos.org http://lists.centos.org/mailman/listinfo/centos