From owner-freebsd-ports@freebsd.org Tue Jun 27 19:08:09 2017 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 04D6AD8E0A7 for ; Tue, 27 Jun 2017 19:08:09 +0000 (UTC) (envelope-from 000.fbsd@quip.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 B6D2A79538 for ; Tue, 27 Jun 2017 19:08:08 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id DBB6528472; Tue, 27 Jun 2017 21:08:04 +0200 (CEST) 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 B80F428453; Tue, 27 Jun 2017 21:08:03 +0200 (CEST) Subject: Re: Should a package restart on upgrade itself To: Matthias Fechner , freebsd-ports@freebsd.org References: <20170627163502.u2m4trqccbkri63j@ivaldir.net> <4aad148bce4cfc626dea0d31bd62be41@acheronmedia.com> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <5952AD13.6090700@quip.cz> Date: Tue, 27 Jun 2017 21:08:03 +0200 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: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 19:08:09 -0000 Matthias Fechner wrote on 2017/06/27 20:11: > Am 27.06.2017 um 18:50 schrieb Vlad K.: >> Will this cover libraries as well? Eg. Libre/Open SSL upgrades, >> restart all services that depend on it? >> >> Meanwhile, there's "lsop": > > thanks for this tool, that is indeed very helpful. > > Maybe it is a good idea if pkg collects the information from each > package what should be restarted if: > > HANDLE_RC_SCRIPTS = true; > > is set. > In this case it is the responsibility of the package maintainer to mark which service should be started if it was upgraded. > And then do a single bulk restart operation at the end of the complete upgrade. It is not so easy to handle this on maintainer side. For example we have one machine with PHP + Apache + Lighttpd. If some PHP extension is reinstalled, what should be restarted and how maintainer should know it? Is Apache using PHP? Is Lighttpd using PHP? Are there php-fpm running PHP? Just because there is some package it doesn't mean it uses PHP and should be restarted. It depends on configuration made by sysadmin. Sometimes the setup is so complex that it is better to let this on admins decision and not some automagick guess. Miroslav Lachman