From owner-freebsd-ports@freebsd.org Wed Jun 27 09:58:19 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A28E1017A51 for ; Wed, 27 Jun 2018 09:58:19 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28A1875A46; Wed, 27 Jun 2018 09:58:19 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from ogg.in.absolight.net (ogg.in.absolight.net [IPv6:2a01:678:ab:50::42:42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: mat/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id A5C171C3BC; Wed, 27 Jun 2018 09:58:18 +0000 (UTC) (envelope-from mat@FreeBSD.org) Date: Wed, 27 Jun 2018 11:58:17 +0200 From: Mathieu Arnold To: Miroslav Lachman <000.fbsd@quip.cz> Cc: freebsd-ports@freebsd.org Subject: Re: Should a package restart on upgrade itself Message-ID: <20180627095817.uvr3xgid4vflbmba@ogg.in.absolight.net> References: <595296BF.3040906@quip.cz> <77549bbc-50b1-7635-2ca4-1ae229098506@quip.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="exo422stywl27yxo" Content-Disposition: inline In-Reply-To: <77549bbc-50b1-7635-2ca4-1ae229098506@quip.cz> User-Agent: NeoMutt/20171215 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 09:58:19 -0000 --exo422stywl27yxo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 26, 2018 at 01:27:49PM +0200, Miroslav Lachman wrote: > Miroslav Lachman wrote on 2017/06/27 19:32: > > Matthias Fechner wrote on 2017/06/27 18:29: > > > Dear all, > > >=20 > > > it is always a pain if pkg upgrade a lot of packages to restart all > > > services to make sure update/security fixes are applied to all running > > > services. > > >=20 > > > Is there an option in pkg that it restart services automatically or is > > > it OK if I would add a post-install script to the packages (I maintai= n) > > > that will include a "service foo restart"? > > >=20 > > > What is best practice here? > >=20 > > Please don't do this. > > Some ports did this in the past and this was really a pain during larger > > upgrades. It sometimes leave services stopped (hi MySQL). > >=20 > > The same bad practice is disabling / enabling Apache modules on upgrade. > >=20 > > pkg upgrade should just do it's work - upgrade packages on disk. But > > manipulating config files and restart of services is up to me - the > > Administrator (or my tools). > >=20 > > It would be nice to have some kind of "hooks" in pkg, which can be used > > to notify deployment tools that some services should be (re)started, or > > do restart in some simpler environment if user allows this (setup hooks > > for service restart). > > But is must not be done automatically for individual ports / packages > > even if maintainer thinks it is Good Idea (tm) >=20 > Again and again and again... >=20 > Can we have some written (or do we have?) policy to not stop/start/restart > services from some @preunexec / @postexec targets? > I really don't like that some packages are still shutting down or trying = to > restart in the middle of the pkg upgrade process. There is a policy, it MUST NOT be done. Services are stopped and started with the rc file they install, and pkg does it when its configuration variable HANDLE_RC_SCRIPTS is set to true. Please point out to ports doing this so that they can be fixed. --=20 Mathieu Arnold --exo422stywl27yxo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAABCgBmBQJbM1+4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85I3YIP/12col87XeUX9aMstKQgu+ck Zu6dZFTjzX6jSwfctLK16VjD+G45y0MZV1WuTJi1le9I+pqL0b62v6/60KqMXjIL gP4NoU6HPY2oD/VXQePdPk8N03dTS8t5t6v/pSwejHURZUsNXyvkV3q1TGmL23Xj LMosls/hohZq8PX+7zwJ0ZV/cQUkhZ7O3bUy0O7cH0IWVTl94DbYwjUeMztTRDr1 KzwuR+PgveWcPtgIMKPQKTD+8wur3PsolnFLVsC85UNfLaIx8p4dsKUtB1qFbvsr jWJ35DzculThZ4iPFMdFov8DbCDaivrqV8kMzMDyVMKcY0LKX+jpDMGlHx5EaYAl UB9OZg2U5iZqpIhyGi9IVFasJsWdF8bWOVQPS07B/h19D8g+5+ws7BcPrzmYDhu8 kNwzE4Xuu1Hm8XylvyblKDH4ZQq6Ln0DgfJ1+Y89L4dIHjJBWfdIM5bhvUsZTILi UIgboNIK7dRajaFsNEO67+PbhQGsXVAFQm5LpRQB7U3Q1WS8WcD04OSQ5rzsuvU4 eiy5kCfrpNwRkqQ1w1UYQyz2ba9x4L2c2dc/WstdAYZ395bD5jD1Yve21j/sTFgZ JcmDqK7brkCGdOu+2TUZhSHDX9x/7w+1A/MqrEZfGt3ivxOt3drwnsRitG08iYPf hcAS3eOTGOybFyjCmkO/ =xxWU -----END PGP SIGNATURE----- --exo422stywl27yxo--