HomeFreeBSD

release: Use the ABI of the target release to fetch packages

Description

release: Use the ABI of the target release to fetch packages

  • Point --rootdir at the installed destdir in the dvd tree. This causes pkg to determine the ABI from the installed destdir instead of the host's binaries. Previously the result was that packages for the host's ABI were always downloaded breaking cross-releases (e.g. arm64 releases built on an amd64 host included amd64 packages on the DVD ISO image rather than arm64 packages). This also handles version mismatches, and I tested this by cross-building a 15.x arm64 release on a 14.x amd64 host.
  • As a result, pkg now does a chdir(3) to the rootdir before running, so the -o argument to fetch needs to be updated to be relative to rootdir instead of the CWD as make runs.
  • Add a new ROOTDIR variable to limit references to "dvd" to one place. Ideally ROOTDIR would be an argument to this script so that it didn't really know about the dvd layout at all.
  • While here, simplify creation of symlinks by just using a longer path to the link name instead of using 'cd' in the shell before invoking ln(1). Also use ln -sf to create the pkg.pkg symlink rather than rm + ln.

PR: 278273
Reported by: gatekeeper <tiago.gasiba@gmail.com>
Reviewed by: imp, delphij
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44749

(cherry picked from commit ea2663040d524efd84b12edcbe83884437fdceea)

Details

Provenance
jhbAuthored on Sat, Apr 13, 9:16 PM
cpercivaCommitted on Wed, Apr 17, 5:43 AM
Reviewer
imp
Differential Revision
D44749: release: Use the ABI of the target release to fetch packages
Parents
rG1c9953bea952: cloudware: allow disk format to be a list
Branches
Unknown
Tags
Unknown