Replacing Postinst Scripts
Mark Shuttleworth
mark at ubuntu.com
Thu Nov 19 18:05:18 UTC 2015
Just to share a view on things we've discussed that seem pertinent to
this thread:
* upgrades
It does make sense for there to be scripts that you can run on upgrade.
In addition, there will be health check scripts to validate that the new
version is working, and backup scripts to ensure data is safely
recoverable as versions roll and rollback.
* initialization
Your snap should be able to initialize the working data from scratch. A
factory reset is effectively the erasure of all custom data, and your
snap should be able to use that to reset itself to a clean state.
* users
Snappy systems are multi-user systems (fred, joe, pete). What's not
clear is the need for "system" users like the traditional "www-data" and
"postgres" users. In the olden days of UNIX, users were the only way to
separate access to files on the system. Today, we use modern kernel
primitives like apparmor and namespaces to control access to the
filesystem, for example. Even an app running as your user cannot read
stuff that apparmor prevents them from seeing.
Mark
More information about the snappy-app-devel
mailing list