Project

General

Profile

Feature #7330

Updated by Brett Smith almost 9 years ago

The after-install postinst script should, in the usual case, perform all the same actions that arvados-sso-server-upgrade.sh currently performs.    However, there are some expected implementation differences: 

 * Because postinst scripts are Debian-specific, you can assume Debian configuration (i.e., files are owned by www-data) without introspecting. 
 * Be prepared to be called "with dpkg's calling arguments":http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-mscriptsinstact or "rpm's calling arguments":http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S2-RPM-INSIDE-ERASE-TIME-SCRIPTS. arguments":http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-mscriptsinstact.    If some actions don't make sense in some calling scenarios, make sure they're skipped. 
 * Instead of introspecting the system to determine whether we're on Debian or Red Hat, use the calling arguments so we get that information directly from the packaging system, which should be more reliable. 
 * Instead of copying @/etc/arvados/sso/*.yml@ to @/var/www/arvados-sso/current/config@, we should make symlinks in @/var@ to files in @/etc@, so the copies don't get out of sync with the canonical versions. @/etc@.    If there's a way to do this directly with fpm, great; do that.    Otherwise, make the symlinks in the after-install postinst script, and add a small before-remove prerm script to remove them when the last version of the package is being removed (so they don't interfere with removing all of /var/www/arvados-sso). package removal).

Back