jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.14k stars 1.07k forks source link

Need a way to specify posttrans script for RPM #499

Open cwells opened 11 years ago

cwells commented 11 years ago

See http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Scriptlet_Ordering

Note that during an upgrade, the order of scripts will be:

1) before-install 2) after-install 3) before-remove 4) after-remove

I discovered the problem when trying to create an rpm that would stop a service when the rpm is uninstalled (via before-remove scriptlet). I start the service in after-install, but before-remove then immediately stops it. I have to choose between auto-starting the service after install/upgrade or auto-stopping it after uninstall. It's not straightforward to do both.

If there were an option to specify a scriptlet to run during the %posttrans phase, then the service could be (re)started at that point.

rbowlby commented 11 years ago

Whoa, pretty bummed RPM scriptlets aren't fully supported. posttrans is particularly important when the fpm package I'm creating obsoletes an existing package whose postun removes the binary symlinks.

tldr; +1

lindenle commented 11 years ago

+1

mirakaia commented 11 years ago

+1

hokadiri commented 11 years ago

+1