From owner-freebsd-stable@freebsd.org Wed Oct 19 18:27:17 2016 Return-Path: Delivered-To: freebsd-stable@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 0B385C1800A for ; Wed, 19 Oct 2016 18:27:17 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (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 CB2C5127; Wed, 19 Oct 2016 18:27:16 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bwva5-0007DE-Tr; Wed, 19 Oct 2016 19:27:13 +0100 Date: Wed, 19 Oct 2016 19:27:13 +0100 From: Gary Palmer To: "Kevin P. Neal" Cc: Matthew Seaman , freebsd-stable@freebsd.org Subject: Re: 11.0 Install Question Message-ID: <20161019182713.GA73102@in-addr.com> References: <53CC5785-5ABC-4235-9E3B-ECF6A9E0A74B@mac.com> <20161019144953.34e63e30@gmail.com> <58073101.2000203@quip.cz> <20161019085504.GA37097@xtaz.uk> <20161019175523.GA37473@neutralgood.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161019175523.GA37473@neutralgood.org> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 18:27:17 -0000 On Wed, Oct 19, 2016 at 01:55:23PM -0400, Kevin P. Neal wrote: > On Wed, Oct 19, 2016 at 10:08:04AM +0100, Matthew Seaman wrote: > > On 2016/10/19 09:55, Matt Smith wrote: > > > On Oct 19 10:38, Miroslav Lachman wrote: > > >> Jonathan Haack wrote on 2016/10/19 10:09: > > >>> Awe geez ... pkg won't work ... says "shared object "libssl.so.7" not > > >>> found, required by "pkg" > > >> > > >> Do not panic, just run pkg-static to upgrade pkg it-self > > >> > > >> /usr/local/sbin/pkg-static install -f pkg > > >> > > > > > > I think that these instructions should be in the announcement release > > > notes as this question comes up a lot. The notes just say something like > > > "upgrade all your packages". Most people will then just try and run pkg > > > upgrade and get that error without knowing how to solve it. It's not > > > intuitive unless you have come across this before. > > > > pkg(8) does have a built-in warning when it detects an OS major version > > upgrade, which is to do a forced upgrade of pkg(8) so it matches the ABI > > versions of system shlibs. Did that warning appear in this case? > > Loading of shared libraries generally happens before main() is entered. > It follows that pkg wouldn't have a chance to do anything useful before > dying if a library is missing. Hi, I don't think this is strictly true On one of my systems at least (10.x), the main pkg binary is in /usr/sbin which is a shim which either offers to install a full pkg binary or calls the full pkg binary with whatever arguments you passed it. The main pkg binary lives in /usr/local/sbin/pkg. It seems it should be possible to add some kind of check to the shim to "do the right thing" and offer to use pkg-static to upgrade the main pkg binary if the dynamically linked one is broken. Or maybe it should default to calling pkg-static instead of pkg, which would prevent the problem in the first place. Of course this assumes the user has /usr/sbin before /usr/local/sbin on their path, but I suspect that is true in most cases Regards, Gary