Re: How do I clear no-longer-usable packages from poudriere?

From: Moin Rahman <bofh_at_freebsd.org>
Date: Mon, 04 Mar 2024 09:53:04 UTC

> On Mar 3, 2024, at 7:33 PM, David Wolfskill <david@catwhisker.org> wrote:
> 
> I have a local package-builder that's (generally) been working quite
> well for me since Jul 2015 (through a couple of hardware replacements,
> sure, but the approach remains the same).
> 
> Today, in trying to chase down what was causing my central "hub" machine
> to whine:
> 
> ld-elf.so.1: /usr/local/lib/libtasn1.so.6: version LIBTASN1_0_3 required by /usr/local/lib/libgnutls.so.30 not defined
> 
> I found (via the "pkg_libchk" script from ports-mgmt/bsdadminscripts2)
> that some just-installed packages are apparently expecting to use
> libc.so.6, which hasn't existed on anything here since 18 February.
> 
> (My machines run stable/14 for getting things done; the development
> machines also track head, so I have some clue what's coming.)
> 
> The package-builder also builds FreeBSD for its "client" machines.  The
> package-builder (and my laptop) track stable/14 daily; the
> package-builder does a 2-pass weekend run of package-building (first
> pass on Saturday, after updating FreeBSD; second on Sunday).  Once the
> packages are built, the client machines update FreeBSD (to the latest
> snapshot from the package-builder, which is already running that code).
> 
> The package-builder is thus running the same revision of FreeBSD that
> the clients are about to run.  And poudriere is using the
> package-builder's /usr/src and /usr/ports to construct jails & build
> stuff.
> 
> I am trying to ensure a certain level of consistency, here.  And today
> appears to show that I have failed to do that.
> 
> Is there something less drastic than clearing all poudriere caches of
> packages and rebuilding all packages all over again??!? (that will get
> me a set of packages consistent with the current state of FreeBSD
> sources and ports (stable/14-n266921-8a7d5d73b849 and
> main-n654175-6928d3a11398, respectively (at the moment)))?
> 
> At least name resolution isn't broken this time, but printing seems to
> have been a casualty.
> 
> Peace,
> david
> --
> David H. Wolfskill                              david@catwhisker.org
> Alexey Navalny was a courageous man; Putin has made him a martyr.
> 
> See https://www.catwhisker.org/~david/publickey.gpg for my public key.

How do you upgrade the poudriere jails?

I faced these a couple of years ago on my head builder. And since then
I have never used poudriere's jail update method. I used to destroy the
jail and recreate the jail. I haven't checked recently again but the
main problem was somehow poudriere's jail update method did not used
to handle two important methods owhen you are building jails those are
`make delete-old` and `make delete-old-libs`. This might have fixed or
not but for being the safe side I always delete and create.

So I think that when upgrading your jails libc.so.6 were still there
while your main host has been handled properly by deleting those libs.
And no longer hosted those files. A find foo should be able to get
the answers.

And hence this chaos. So although for binary cases I still use
`poudriere jail -u` for src based jails I delete and recreate the
jails.

Kind regards,
Moin