'pkg upgrade -f spamassassin' stops but doesn't restart spamd

Michael Grimm trashcan at ellael.org
Sun Jan 7 14:31:14 UTC 2018


Hi,

I am following 11-STABLE and therefore upgrading my system quite frequently. During that process I do recompile all ports installed by poudriere and upgrade all ports after reboot.

Today I stumbled over an IMHO weird behaviour of the spamassassin's installation process, that stops a running spamd daemon without restarting. Even worse, the user will not be informed about that procedure:

	mail> /usr/local/etc/rc.d/sa-spamd status
	spamd is running as pid 13859.

	mail> pkg upgrade -fy spamassassin
	Updating poudriere repository catalogue...
	poudriere repository is up to date.
	All repositories are up to date.
	Checking integrity... done (0 conflicting)
	The following 1 package(s) will be affected (of 0 checked):

	Installed packages to be REINSTALLED:
		spamassassin-3.4.1_11 [poudriere]

	Number of packages to be reinstalled: 1
	[mail] [1/1] Reinstalling spamassassin-3.4.1_11...
	===> Creating groups.
	Using existing group 'spamd'.
	===> Creating users
	Using existing user 'spamd'.
	[mail] [1/1] Extracting spamassassin-3.4.1_11: 100%
[*]	Stopping spamd.
	Waiting for PIDS: 13859, 13859.
	You may need to manually remove /usr/local/etc/mail/spamassassin/local.cf if it is no longer needed.
	Message from spamassassin-3.4.1_11:

	==========================================================================

	You should complete the following post-installation tasks:

		1) Read /usr/local/share/doc/spamassassin/INSTALL
		   and /usr/local/share/doc/spamassassin/UPGRADE
		   BEFORE enabling SpamAssassin for important changes

		2) Edit the configuration in /usr/local/etc/mail/spamassassin,
		   in particular /usr/local/etc/mail/spamassassin/init.pre
		   You may get lots of annoying (but harmless) error messages
		   if you skip this step.

		3) To run spamd, add the following to /etc/rc.conf:
		   spamd_enable="YES"

		4) If this is a new installation, you should run sa-update
		   and sa-compile. If this isn't a new installation, you
		   should probably run those commands on a regular basis
		   anyway.

		5) Install mail/spamass-rules if you want some third-party
		   spam-catching rulesets

	SECURITY NOTE:
	By default, spamd runs as root (the AS_ROOT option). If you wish
	to change this, add the following to /etc/rc.conf:

		spamd_flags="-u spamd -H /var/spool/spamd"

	==========================================================================

	mail> /usr/local/etc/rc.d/sa-spamd status
	spamd is not running.

Ok, one might notice that the daemon has been stopped [*], but section "You should complete …" fails to mention, that one needs to restart the daemon after upgrading.


Please correct me if I am wrong but I have always been under the impression that stopping a daemon whilst upgrading violates conventions?

Thanks and with kind regards,
Michael







More information about the freebsd-ports mailing list