How to execute some commands or scripts immediately after rpm installed and has to be run as part rpm install command.
I wrote a spec file to take back up of some files within directory and tar them. When I install rpm tar would be copied on file system how ever I had to untar the ball manually to desired location.
RPM spec %post doesn't execute in rpmbuild
The above lost helped me understand we can include %post steps in spec file itself which would do that job and commands get execute as part of rpm install command itself.
The %post section runs when you install an RPM Note that echo command included for test purpose are not executed.