From owner-freebsd-ports@freebsd.org Tue Jun 27 16:35:03 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 76A58D8A29A for ; Tue, 27 Jun 2017 16:35:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54BCA73228; Tue, 27 Jun 2017 16:35:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 9B162A4D3; Tue, 27 Jun 2017 16:35:02 +0000 (UTC) Date: Tue, 27 Jun 2017 18:35:02 +0200 From: Baptiste Daroussin To: Matthias Fechner Cc: FreeBSD Ports ML Subject: Re: Should a package restart on upgrade itself Message-ID: <20170627163502.u2m4trqccbkri63j@ivaldir.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3x77s4hpnh5fjcnu" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) 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 16:35:03 -0000 --3x77s4hpnh5fjcnu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 27, 2017 at 06:29:24PM +0200, Matthias Fechner wrote: > 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 maintain) > that will include a "service foo restart"? >=20 > What is best practice here? >=20 A package self upgrading might cause issues: plugins not yet updated (hi dovecot), or services requiring an upgrade procedure. So activating a self restart of the service by default is a bad idea. service -R command can simplify the procedure for the admin given it restar= ts all services already started. Another option is to activate an option of pkg(8) off by default: HANDLE_RC_SCRIPTS =3D true; in /usr/local/etc/pkg.conf which will automatically restart the services on upgrade. In the futur it is planed to move this into a trigger (executed at the end = of the entire upgrade process) which will solve the "dovecot" issue, but not t= he one where upgrading requires a procedure. Best regards, Bapt --3x77s4hpnh5fjcnu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAllSiTMACgkQY4mL3PG3 Plr+BRAAsBQvA2X/sKgET7C7Z8zeV6SRRuW7ssJ+W7zcvjGVyiyFq5co3bMWxP6J DtbLr9eTag9620Duic/e8S68cJWkb/47l2QoP1SOFQEkIaxAslNOcsnHsZBHUi7M IcM2ZyU/nOipo9xXA8754M5lNoyougkyegp4pNmyNzgMpNw7vmgMAlgJgPf0WzgQ THhNlWIbRI53NnECrHz/EpvCY3A6tKuYDtrCFDGz1fxysufCXXTGMOV56ohZOVcy s/UwhkZFBT+T6tRYDMlrUw2BFoSg73KlbJkD6juKX4xjOG3w6h9/bNmqOw3UJM27 qXMQqFJh61XDhDH5P+qiJ7FCvdkuHK18+EbI3H4AxrGcCNqLG59RLEXUufrVeKrN VG8TGLXgqi5LvjvXA3cTAw4veUEZ38p5eNbZSwyHJxl5UITtuEjW5vOWYYnBkLVO 6UkbqnYWykJUB4aZvVA8z6l9jPotU3W2x4qdLzZbcXMYnTYSiALYwyto5UA1Bcoz kedL8MGHiLk3EdNenTmGhkeCUg7u8pX7vm4nNqqUNeiqNLxrbKcshjKDatIUg0HP Lv5IObWrm7XiHdGkKAlLinhqj0jP+9vT1SEj/IFOH94mQRa5awEirVTZuR1LjfKZ Luaqrg1YatFI960IS0OkCaN93SM8X2vYSS/EfuvHKJH4Owm1j0Y= =u446 -----END PGP SIGNATURE----- --3x77s4hpnh5fjcnu--