Date: Tue, 27 Jun 2017 09:54:33 -0700 From: David Wolfskill <david@catwhisker.org> To: Matthias Fechner <idefix@fechner.net> Cc: FreeBSD Ports ML <freebsd-ports@freebsd.org> Subject: Re: Should a package restart on upgrade itself Message-ID: <20170627165433.GR1241@albert.catwhisker.org> In-Reply-To: <b71469f3-dd9d-6680-f85e-a7acfcf9d944@fechner.net> References: <b71469f3-dd9d-6680-f85e-a7acfcf9d944@fechner.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Wjspmq6N72sNzV6w 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? > .... I do not claim that this is "best practice." But what I do, during my weekly updates of my "production" systems (at home) is: * "Clone" the active slice to the other slice. * Build the world & suitable kernels on the build machine. * Mount /usr/src and /usr/obj from the build machine. * Set DESTDIR to a suitable directory on the other slice. * make installkernel ${DESTDIR} && \ mergemaster -U -u 0022 -p && \ make installworld ${DESTDIR} && \ mergemaster -F -U -u 0022 -i && \=20 make delete-old ${DESTDIR} * reboot from the other slice. * Mount /usr/src and /usr/obj from the build machine. * Stop all services that depend on 3rd-party software (ports/packages). * pkg upgrade * make delete-old-libs * reboot (I elided a few minor embellishments; the above are the essential steps.) It seems to work for me. Peace, david --=20 David H. Wolfskill david@catwhisker.org I look forward to voting against Trump again at the earliest opportunity. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --Wjspmq6N72sNzV6w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJZUo3JXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDQ0I3Q0VGOTE3QTgwMUY0MzA2NEQ3N0Ix NTM5Q0M0MEEwNDlFRTE3AAoJEBU5zECgSe4XCnIH/3y6AR9SSrKtOxY9y4VEWPPs nepmTkFCuiU2GC4978GUTe/eLFbAgbAcidVtxeUCrjkdbfQ05mKUaVZaHoVHsPiD fv1b2zIjvSLEcjjpAwz6sgODE3hC2u7YSEun40FW74oiZekNqOoMj595ninutLh7 NRVQBglmM7xUfZbKopK4jo9HAlcbTAHLZ1DV90dDs+W8FCPWcQsyAdj8GSUFRaWM wH+QVJN7pTXkOqejrF8c8ABIgsiXo4TcMJa3aNBs1ztugMh7C02tJUGhIZgIlUZv fg8BMMzCZLrnNPDqRqJun0suC9a/08Dq2/Q+UvQTUAfLfc/oMowyEnggDFG0KuE= =phbw -----END PGP SIGNATURE----- --Wjspmq6N72sNzV6w--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170627165433.GR1241>