From owner-freebsd-pkgbase@freebsd.org Sun Oct 2 09:03:17 2016 Return-Path: Delivered-To: freebsd-pkgbase@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 D6DB3AC678C for ; Sun, 2 Oct 2016 09:03:17 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8117FA19 for ; Sun, 2 Oct 2016 09:03:14 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (unknown [IPv6:2001:8b0:151:1:1c1d:86a1:a200:b700]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 55ABD5F8C for ; Sun, 2 Oct 2016 09:03:03 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/55ABD5F8C; dkim=none; dkim-atps=neutral To: freebsd-pkgbase@freebsd.org From: Matthew Seaman Subject: Upgrading catch-22 Message-ID: <8c035f9b-d8c7-62f9-7b0c-9cd042d39ce7@FreeBSD.org> Date: Sun, 2 Oct 2016 10:02:51 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5Lww0dnkkJXwDfBhVIPGBpXAIoujTa7Fh" X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-pkgbase@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Packaging the FreeBSD base system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 09:03:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5Lww0dnkkJXwDfBhVIPGBpXAIoujTa7Fh Content-Type: multipart/mixed; boundary="bgLsMDRTfasBgOlvbqgiA8kXfDNoDgb5b"; protected-headers="v1" From: Matthew Seaman To: freebsd-pkgbase@freebsd.org Message-ID: <8c035f9b-d8c7-62f9-7b0c-9cd042d39ce7@FreeBSD.org> Subject: Upgrading catch-22 --bgLsMDRTfasBgOlvbqgiA8kXfDNoDgb5b Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dear all, Here's a bit of a trap you can get into when upgrading to 12-CURRENT. I've a 12-CURRENT VM which I last upgraded right after 11-STABLE was branched, and current switched from 11 to 12. Now I've come to rebuild base and create a new set of base packages, and I observe this in the output from 'make packages': =3D=3D=3D> zlib (install) install -U -M /usr/obj/usr/src/amd64.amd64/kernelstage//kernel.premeta -D /usr/obj/usr/src/amd64.amd64/kernelstage -T release -o root -g wheel -m 555 zlib.ko /usr/obj/usr/src/amd64.amd64/kernelstage/kernel/boot/kernel/ install -U -M /usr/obj/usr/src/amd64.amd64/kernelstage//kernel.premeta -D /usr/obj/usr/src/amd64.amd64/kernelstage -T debug -o root -g wheel -m 555 zlib.ko.debug /usr/obj/usr/src/amd64.amd64/kernelstage/kernel/usr/lib/debug/boot/kernel= / kldxref /usr/obj/usr/src/amd64.amd64/kernelstage/kernel/boot/kernel =3D=3D=3D> Creating FreeBSD-acct-debug-12.0.s20161001100232 /lib/libc.so.7: version FBSD_1.5 required by /usr/local/lib/libpkg.so.3 not found /lib/libc.so.7: version FBSD_1.5 required by /usr/local/lib/libpkg.so.3 not found *** Error code 1 Stop. make[5]: stopped in /usr/src *** Error code 1 Stop. make[4]: stopped in /usr/src *** Error code 1 Stop. make[3]: stopped in /usr/src *** Error code 1 Stop. make[2]: stopped in /usr/src *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src Yeah -- turns out updating pkg(8) from the repos right before updating the base system was not a particularly good idea, as now pkg expects an ABI version from libc newer than what was installed. So, I need to install the new package with the latest libc.so so I can run pkg to install the new package with the latest libc.so... Catch 22. I got around the problem relatively easily by symlinking pkg to pkg-stati= c: # ls -l /usr/local/sbin/pkg* lrwxr-xr-x 1 root wheel 10 Oct 1 11:11 /usr/local/sbin/pkg@ -> pkg-static -rwxr-xr-x 1 root wheel 172368 Sep 25 14:50 /usr/local/sbin/pkg-dynam= ic* -rwxr-xr-x 1 root wheel 5845512 Sep 25 14:50 /usr/local/sbin/pkg-stati= c* -r-xr-xr-x 1 root wheel 3913 Sep 25 14:50 /usr/local/sbin/pkg2ng* I know that in general you want to use the dynamically linked version of pkg(8), because you can't do the dynamic linkage analysis to find out what shlibs are provided and required by various binaries otherwise. However, in order to extract oneself from this sort of mess, it would be really handy to be able to say: # make PKG_CMD=3D/usr/local/sbin/pkg-static packages # pkg-static upgrade Seems that the literal command 'pkg' is used everywhere. Change that to provide a ${PKG_CMD} variable that can be overridden. https://reviews.freebsd.org/D8120 Cheers, Matthew --bgLsMDRTfasBgOlvbqgiA8kXfDNoDgb5b-- --5Lww0dnkkJXwDfBhVIPGBpXAIoujTa7Fh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJ8BAEBCgBmBQJX8M1BXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATwhYP/jTHvouKysxwa0ag2wwDHQJ5 PVKfWFpSHUArQ+ih/aUjTaEAtKBC7ayGV6gVo19nkniL0QBJ8kljWsiQKebEoSaS pa+tDSy5cr5aiUQUkb4L3xzDbg9SBz14Kz9QlVEKsltOUwTQtYRj14y5tEimgu4B o5YiEsXGl8aqGV/MwzPe6+Cp4G899yIuBungLl+W2ik6MZ3ipgCTDX/uABZWbqHk GnqdFf2m7EDezR3tD8iDgXt3slv5kCuBFLYXt/EaUU4NsS4Bmpcexil9RgeoDL0z zY8Q5XILv4Mj9PyRGfMnP2Frjid7y/UqNaMfMyyB7CFAEsJZIFQRI6gWkFvv/4yl OfGdJKKaFzDsLdsLLZhcjeumbYJq3VPYHujWitvUYyilqMB0cvmN5a8GN7n4wTVW 9y7NCc5LzR9JQJUCYoFIxC/lzAqWeGJHFWZHbJ2gDcVkH/x0sX5yxEVgbTJH+t2r XwGJMyaxrtykq9KOmseVkQQo7KOztpB67txPxGJCUsK10zUULXc4tbTh7nY1Z9Od hHdNRoKK6pVDMSBOj1trZDu2WTHmUdLm/dyJSCqyvcp6Zb13liaQC9nJjwVmQlrR kPWLC+oRkrtVU8vQEUv6JpjtEAA5S4CmRlwTpuYDUDbTPcbEHrL1tMeffoeSOFYf rx0JSjv8qHcACitbqslq =op2A -----END PGP SIGNATURE----- --5Lww0dnkkJXwDfBhVIPGBpXAIoujTa7Fh--