Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Oct 2024 10:49:59 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        "garga@freebsd.org" <garga@FreeBSD.org>, FreeBSD-pkgbase@freebsd.org
Cc:        Baptiste Daroussin <bapt@FreeBSD.org>
Subject:   Re: libmd.so.6 and pkgbase
Message-ID:  <4E0CA824-A901-4219-ACCA-48B351C98E2B@yahoo.com>
References:  <4E0CA824-A901-4219-ACCA-48B351C98E2B.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Renato Botelho <garga_at_FreeBSD.org> wrote on
Date: Mon, 07 Oct 2024 14:20:00 UTC :

> On 07/10/24 03:53, Baptiste Daroussin wrote:
> > Hello everyone,
> >=20
> > Just a reminder when using pkgbase, make sure you do activate
> > BACKUP_LIBRARIES=3Dtrue in pkg.conf
> >=20
> > This way pkg will save a copy of libmd.so.6 during the upgrade in
> > /usr/local/lib/pkg/libmd.so.6 (and create a package named =
compat-libraries to
> > track it).
> >=20
> > This will prevent you from having a couple of days without a new =
version of pkg
> > built against libmd.so.7 available (or some of the packages which =
also requires
> > libmd.so.7.
>=20
> I have BACKUP_LIBRARIES=3Dtrue on my pkg.conf and upgraded a system=20
> running CURRENT this morning using pkgbase. After that I got pkg =
linked=20
> with both libmd.so.6 and libmd.so.7:
>=20
> root@x230:~ # ldd /usr/local/sbin/pkg
> /usr/local/sbin/pkg:
> libelf.so.2 =3D> /lib/libelf.so.2 (0x28b8027a6000)
> libjail.so.1 =3D> /lib/libjail.so.1 (0x28b80340b000)
> libssl.so.30 =3D> /usr/lib/libssl.so.30 (0x28b80436a000)
> libcrypto.so.30 =3D> /lib/libcrypto.so.30 (0x28b804e18000)
> libarchive.so.7 =3D> /usr/lib/libarchive.so.7 (0x28b805e0a000)
> libbz2.so.4 =3D> /usr/lib/libbz2.so.4 (0x28b80710e000)
> libz.so.6 =3D> /lib/libz.so.6 (0x28b807ccc000)
> liblzma.so.5 =3D> /usr/lib/liblzma.so.5 (0x28b808368000)
> libprivatezstd.so.5 =3D> /usr/lib/libprivatezstd.so.5=20
> (0x28b806205000)
> libm.so.5 =3D> /lib/libm.so.5 (0x28b808952000)
> libutil.so.9 =3D> /lib/libutil.so.9 (0x28b808ad1000)
> libmd.so.6 =3D> not found (0)
> libthr.so.3 =3D> /lib/libthr.so.3 (0x28b809f4c000)
> libc.so.7 =3D> /lib/libc.so.7 (0x28b80ae53000)
> libbsdxml.so.4 =3D> /lib/libbsdxml.so.4 (0x28b80c034000)
> libmd.so.7 =3D> /lib/libmd.so.7 (0x28b80cdf7000)
> libsys.so.7 =3D> /lib/libsys.so.7 (0x28b80ddb1000)
> [vdso] (0x28b801eee000)
. . .

It would help for tracking down were the dependencies are
to use "ldd -a ". It shows what each involved *.so.*
in turn references of itself. The example below is for
a context that does not have the problem you report
(not a pkgbase context) but it illustrates the type of
extra information that is output:

# ldd -a /usr/local/sbin/pkg
/usr/local/sbin/pkg:
	libelf.so.2 =3D> /lib/libelf.so.2 (0xc4840f00000)
	libjail.so.1 =3D> /lib/libjail.so.1 (0xc48410d3000)
	libssl.so.30 =3D> /usr/lib/libssl.so.30 (0xc4841fae000)
	libcrypto.so.30 =3D> /lib/libcrypto.so.30 (0xc4842853000)
	libarchive.so.7 =3D> /usr/lib/libarchive.so.7 (0xc4843af6000)
	libbz2.so.4 =3D> /usr/lib/libbz2.so.4 (0xc48403f6000)
	libz.so.6 =3D> /lib/libz.so.6 (0xc4845351000)
	liblzma.so.5 =3D> /usr/lib/liblzma.so.5 (0xc48455b0000)
	libprivatezstd.so.5 =3D> /usr/lib/libprivatezstd.so.5 =
(0xc484480f000)
	libm.so.5 =3D> /lib/libm.so.5 (0xc48463e4000)
	libutil.so.9 =3D> /lib/libutil.so.9 (0xc4846b3d000)
	libmd.so.7 =3D> /lib/libmd.so.7 (0xc48477f3000)
	libthr.so.3 =3D> /lib/libthr.so.3 (0xc4848518000)
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/lib/libelf.so.2:
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/lib/libjail.so.1:
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/usr/lib/libssl.so.30:
	libcrypto.so.30 =3D> /lib/libcrypto.so.30 (0xc4842853000)
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/lib/libcrypto.so.30:
	libthr.so.3 =3D> /lib/libthr.so.3 (0xc4848518000)
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/usr/lib/libarchive.so.7:
	libz.so.6 =3D> /lib/libz.so.6 (0xc4845351000)
	libbz2.so.4 =3D> /usr/lib/libbz2.so.4 (0xc48403f6000)
	liblzma.so.5 =3D> /usr/lib/liblzma.so.5 (0xc48455b0000)
	libbsdxml.so.4 =3D> /lib/libbsdxml.so.4 (0xc4849553000)
	libprivatezstd.so.5 =3D> /usr/lib/libprivatezstd.so.5 =
(0xc484480f000)
	libcrypto.so.30 =3D> /lib/libcrypto.so.30 (0xc4842853000)
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/usr/lib/libbz2.so.4:
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/lib/libz.so.6:
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/usr/lib/liblzma.so.5:
	libmd.so.7 =3D> /lib/libmd.so.7 (0xc48477f3000)
	libthr.so.3 =3D> /lib/libthr.so.3 (0xc4848518000)
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/usr/lib/libprivatezstd.so.5:
	libthr.so.3 =3D> /lib/libthr.so.3 (0xc4848518000)
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/lib/libm.so.5:
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/lib/libutil.so.9:
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/lib/libmd.so.7:
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
/lib/libthr.so.3:
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
	libsys.so.7 =3D> /lib/libsys.so.7 (0xc484af47000)
/lib/libc.so.7:
	libsys.so.7 =3D> /lib/libsys.so.7 (0xc484af47000)
/lib/libbsdxml.so.4:
	libc.so.7 =3D> /lib/libc.so.7 (0xc484889d000)
[preloaded]
	[vdso] (0xc483f927000)


I expect that /usr/local/sbin/pkg has the only reference
to libmd.so.6 in your context and that /usr/lib/liblzma.so.5
is what is referencing libmd.so.7 .

If so, I'll note that you can avoid the problem by using
pkg-static instead of pkg as your command:

# ldd -a /usr/local/sbin/pkg-static=20
ldd: /usr/local/sbin/pkg-static: not a dynamic ELF executable

So there is no use of *.so.* files for pkg-static .

(I make no claims about other programs that might be involved
overall.)

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E0CA824-A901-4219-ACCA-48B351C98E2B>