Page MenuHomeFreeBSD

freebsd-update: Library ordering
ClosedPublic

Authored by cperciva on Tue, Sep 23, 7:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 3, 4:35 PM
Unknown Object (File)
Wed, Oct 1, 9:29 PM
Unknown Object (File)
Wed, Oct 1, 6:51 PM
Unknown Object (File)
Wed, Oct 1, 5:01 AM
Unknown Object (File)
Tue, Sep 30, 6:43 PM
Unknown Object (File)
Sat, Sep 27, 2:41 PM
Unknown Object (File)
Wed, Sep 24, 9:51 PM
Unknown Object (File)
Wed, Sep 24, 6:28 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 67268
Build 64151: arc lint + arc unit

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.