Bug 216805 - ports-mgmt/pkg will break itself on a pre 10.3 system
Summary: ports-mgmt/pkg will break itself on a pre 10.3 system
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-05 03:21 UTC by Jim Keener
Modified: 2017-04-06 14:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Keener 2017-02-05 03:21:09 UTC
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"
Comment 1 Jim Keener 2017-02-05 03:21:52 UTC
To be clear, this isn't something that needs to be fixed/backported to an unsupported version, but a consideration when moving forward.
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2017-03-26 21:31:58 UTC
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
Comment 3 Maxim Usatov 2017-04-06 14:09:19 UTC
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