> It's really not expected that a package runs something which changes > packaged files or their permissions. > > Automatically running something which stops and starts daemons is > also not expected.
If we go by the letter of the install process, where we're supposed to "stop/disable all appropriate applications" during upgrades, none of it is necessary except that the database must be upgraded, which in the case of slant means kwebapp-sqldiff passes an upgrade script into slant.db. (I assume that stop/disable means to remove packages from pkg_scripts before upgrading so they don't automatically start upon booting and/or are running during pkg_add -u.) However, this requires users to know that the httpd and slant services must be temporarily disabled. As a user myself, I'd probably never do that. I reboot into bsd.rd, do the stuff, then run pkg_add -u afterward. In this case, slant-collectd/httpd will be running during pkg_add, and the CGI script will also be runnable. So there's a period during which the database schema and the collector/cgi script are out of sync. To counter this, I install the cgi script with mode 0 so it won't be run, then run an upgrade script which stops the slant service, if it's running. It then upgrades the database, sets the cgi script mode, and restart (conditionally) the slant service. I'm not sure which is proper---please let me know and I can make the changes!
