Page MenuHomeFreeBSD

freebsd-update: Library ordering
ClosedPublic

Authored by cperciva on Tue, Sep 23, 7:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 9:36 PM
Unknown Object (File)
Sun, Oct 12, 7:15 PM
Unknown Object (File)
Sat, Oct 11, 3:00 AM
Unknown Object (File)
Fri, Oct 10, 10:24 AM
Unknown Object (File)
Fri, Oct 10, 5:50 AM
Unknown Object (File)
Fri, Oct 10, 5:50 AM
Unknown Object (File)
Thu, Oct 9, 9:29 PM
Unknown Object (File)
Thu, Oct 9, 8:11 PM
Subscribers

Details

Summary

Upgrading from 14.x to 15.x with freebsd-update broke because libc
depends on the new libsys library; freebsd-update installed the new
libc before creating libsys, and every step after that failed because
all the tools (including gunzip and install) are dynamically linked
and need a working libc.

Enforce ordering when installing shared objects: First libsys, then
libc, then libthr, and then all the rest of the shared object files.

This is a candidate for an Errata Notice since is breaks upgrades.

MFC after: 3 days
Sponsored by: https://www.patreon.com/cperciva

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Thanks.

Tested with:

  1. the VirtualBox guest snapshot that I used for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289769#c0, the standard set of base components, on UFS
  1. a fresh installation of 14.3-RELEASE, the full set, on ZFS.

Both completed without error.

usr.sbin/freebsd-update/freebsd-update.sh
3118
3123
3128
3135

BTW, did you ever run shell-check over freebsd-update?

This revision is now accepted and ready to land.Tue, Sep 23, 8:54 PM
In D52688#1203807, @kib wrote:

BTW, did you ever run shell-check over freebsd-update?

Not until now. I don't think shellcheck even existed when I first wrote freebsd-update.

On first glance, lots of complaints about not quoting things but I don't see anything which actually matters.

This revision was automatically updated to reflect the committed changes.