feat(bundler): add post/pre install/remove scripts for linux deb and rpm packages#9209
feat(bundler): add post/pre install/remove scripts for linux deb and rpm packages#9209amrbashir merged 6 commits intotauri-apps:devfrom vlabo:dev
Conversation
|
Hi there! I ( not sure of others ) would prefer having the |
|
So you mean like this? {
"deb":
"pre_install": "",
"post_install": "",
...
}I could see that working too but i'd also like to hear the others' opionions. That said, if we do keep a struct (which imo is fine too) then i think we should have one generic struct and reuse it in both deb and rpm. |
|
Im fine with both solutions. With or without struct. In rpm there is a lot more settings related to the scripts compared to deb packages. |
|
Right, i meant to re-use the same struct declaration but keep the respective deb/rpm configs, similar to HookCommand for beforeXCommand |
|
I removed the script structs now the config looks like this: "bundle": {
"linux": {
"deb": {
"preInstallScript": "./preinst_script.sh",
"postInstallScript": "./postinst_script.sh",
"preRemoveScript": "./prerm_script.sh",
"postRemoveScript": "./postrm_script.sh"
},
"rpm": {
"preInstallScript": "./preinst_script.sh",
"postInstallScript": "./postinst_script.sh",
"preRemoveScript": "./prerm_script.sh",
"postRemoveScript": "./postrm_script.sh"
}
}
}It seem like the cleaner solution to me. But the maintainers opinions is more important. |
New configuration options:
I fallowed the official implementation for debian packages:
https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
For rpm package I used the already available functions from the
rpmcrate:https://docs.rs/rpm/0.14.0/rpm/struct.PackageBuilder.html#method.pre_install_script
https://docs.rs/rpm/0.14.0/rpm/struct.PackageBuilder.html#method.post_install_script
https://docs.rs/rpm/0.14.0/rpm/struct.PackageBuilder.html#method.pre_uninstall_script
https://docs.rs/rpm/0.14.0/rpm/struct.PackageBuilder.html#method.post_uninstall_script
closes #9192
closes #8993