pkg will break itself if on a pre-10.3 system when upgrading. Desired behavior would be to fail on update or upgrade with a message saying the current pkg package is incompatible with the current version of the operating system. % sudo pkg update Password: Updating FreeBSD repository catalogue... Fetching meta.txz: 100% 944 B 0.9kB/s 00:01 Fetching packagesite.txz: 100% 6 MiB 5.9MB/s 00:01 Processing entries: 100% FreeBSD repository update completed. 26006 packages processed. % sudo pkg upgrade Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. New version of pkg detected; it needs to be installed first. The following 1 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: pkg: 1.8.7_3 -> 1.9.4_1 Number of packages to be upgraded: 1 2 MiB to be downloaded. Proceed with this action? [y/N]: y Fetching pkg-1.9.4_1.txz: 100% 2 MiB 2.6MB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Upgrading pkg from 1.8.7_3 to 1.9.4_1... [1/1] Extracting pkg-1.9.4_1: 100% /usr/local/lib/libpkg.so.3: Undefined symbol "openat"
To be clear, this isn't something that needs to be fixed/backported to an unsupported version, but a consideration when moving forward.
Again this is not a bug. FreeBSD 10.2 is not supported anymore and pkg is now built on 10.3 there is nothing I can do about it. There are some changes in the 10.3 libc which makes the binary incompatible with 10.2 the only thing I plan to do is to prevent pkg from upgrading itself if on an EOLed freebsd
Just happened to me on 10.0. pkg suggested to upgrade itself and broke itself: Proceed with this action? [y/N]: y Fetching pkg-1.10.1.txz: 100% 3 MiB 2.6MB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Upgrading pkg from 1.9.4_1 to 1.10.1... [1/1] Extracting pkg-1.10.1: 100% /lib/libc.so.7: version FBSD_1.4 required by /usr/local/lib/libpkg.so.4 not found