How to run a tool stored in RPM package upon uninstallation?

[email protected]
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
Hi all,

I am new to RPM development and so far I have been figuring out many things just
by looking at the documentation but now I am stuck with a new issue.

I basically want a small tool to be executed when my rpm is being uninstalled by
the user. This tool should be embedded in the RPM package but should be
extracted only upon uninstallation, and should be removed after being run. I can
not use the %file directive to include this tool in my package since I do not
want this file to actually be "installed" or stored on the user's system.

If you are familiar with InstallShield on Windows, it is possible to run upon
uninstallation a custom action which uses an executable stored in the binary
table. That's basically what I want to do with RPM.

Any ideas on how to do that?

Thanks in advance.

Ben
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.