Re: RPM question

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

 



On Sun, 2005-12-04 at 19:15 +0100, Luc MAIGNAN wrote:
> Hi,
> 
> sorry for a so newbie question, but I can't find the answer in the howto
> i've read.
> I want to build a RPM to install a software i've written. In the .spec,
> the %install tag seems to be executed when the rpm is built and not when
> i  install it. Where can I put code in the spec file to execute it at
> installation time ? (rpm -ivh)
> 

Two places.
the %pre tag is executed before the installation of the rpm
the %post tag is executed after the installation of the rpm (meaning,
the files are there and the %pre script has been executed)
If the script in %pre terminates with an error, the rpm will not be
installed, if the script in %post terminates with an error, rpm will
return an error but the rpm would have been installed.

there are equivalents %preun and %postun tags and you can mix them to
detect an upgrade with some environment variable

google for
Maximum RPM. It is an outdated guide to rpm but it still works.

also you might want to join the rpm

https://www.redhat.com/mailman/listinfo/rpm-listmailing list



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux