From owner-freebsd-ports@freebsd.org Sun Jan 7 15:16:02 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBD6DE719ED for ; Sun, 7 Jan 2018 15:16:02 +0000 (UTC) (envelope-from SRS0=I3Wg=EC=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F8E96A232 for ; Sun, 7 Jan 2018 15:16:02 +0000 (UTC) (envelope-from SRS0=I3Wg=EC=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id DB80428411; Sun, 7 Jan 2018 16:10:45 +0100 (CET) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 7FC6728412; Sun, 7 Jan 2018 16:10:44 +0100 (CET) Subject: Re: 'pkg upgrade -f spamassassin' stops but doesn't restart spamd To: Michael Grimm , freebsd-ports@freebsd.org References: <76627A89-D7E9-4010-910B-5F25886E7E7E@ellael.org> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <5A523873.2050001@quip.cz> Date: Sun, 7 Jan 2018 16:10:43 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <76627A89-D7E9-4010-910B-5F25886E7E7E@ellael.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jan 2018 15:16:03 -0000 Michael Grimm wrote on 2018/01/07 15:31: > 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? There are no consensus about what services should do on deinstall or upgrade. That's why there is such a mess in ports / packages. Some did nothing (my preferred way), some stop (but did not start) the service, some modify user edited config files (removing / disabling modules in httpd.conf so Apache is broken on each upgrade of module(s)). Miroslav Lachman