include/package-pack: add missing apk package lifecycle events
- pre-install calls preinst
- pre-upgrade calls preinst with PKG_UPGRADE=1
- post-upgrade calls postinst with PKG_UPGRADE=1
- prerm and postrm from the previous version of a package are NOT
executed on upgrade, so packages are expected to handle their own
migrations in the new versions
Link: https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package
Fixes: #18527
Reported-by: Dobroslaw Kijowski <[email protected]>
Suggested-by: Eric Fahlgren <[email protected]>
Suggested-by: Jonas Gorski <[email protected]>
Suggested-by: Thomas Richard <[email protected]>
Signed-off-by: George Sapkin <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/18531
Signed-off-by: Robert Marko <[email protected]>