Running a bash script in RPM install

devzero2000 pinto.elia at gmail.com
Tue Jul 28 20:42:33 UTC 2009


On Tue, Jul 28, 2009 at 8:05 PM, Vinay Kalkoti <kalkoti.vinay at gmail.com>wrote:

> Hi,
>
> I have a tar file which I need to untar and run a script which is
> inside that. Is is possible to create an RPM package which will copy
> this tar file to a location, untar it and run the script when I
> install the RPM ?
>

Sure, open the tar in %install where do you  want and in %post execute your
script. But if you want to this why use a package manager in first place ?
What do you do in the script and with the tar file are hidden to the rpm,
the content are no listed in %files section, so you have no value added from
using it (RPM). Perhaps I have not very understood well what you want to do,
but at me seems similar to what someone want to do to packaging some
proprietary sw : in the spec  they install the original software somewhere,
and list it in %files, and in %post install call the installation script,
that probably install the sw in other place. Result: rpm  cannot know which
files you have installed, if they are of configuration or not, the
dependencies probably. In synthesis this a rpm that it is not a rpm, because
a package manager is different from a tar : it contain metadata,Hints : what
happens if you want remove a package built in this way ?

hth

>
> Thanks,
> Vinay
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20090728/6f90f1a2/attachment.htm>


More information about the Rpm-list mailing list