Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Oct 2016 10:02:51 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-pkgbase@freebsd.org
Subject:   Upgrading catch-22
Message-ID:  <8c035f9b-d8c7-62f9-7b0c-9cd042d39ce7@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--5Lww0dnkkJXwDfBhVIPGBpXAIoujTa7Fh
Content-Type: multipart/mixed; boundary="bgLsMDRTfasBgOlvbqgiA8kXfDNoDgb5b";
 protected-headers="v1"
From: Matthew Seaman <matthew@FreeBSD.org>
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8c035f9b-d8c7-62f9-7b0c-9cd042d39ce7>