]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
release: Use the ABI of the target release to fetch packages
authorJohn Baldwin <jhb@FreeBSD.org>
Sat, 13 Apr 2024 21:16:01 +0000 (14:16 -0700)
committerColin Percival <cperciva@FreeBSD.org>
Sun, 14 Apr 2024 23:45:40 +0000 (16:45 -0700)
commitea2663040d524efd84b12edcbe83884437fdceea
tree2c338b15c985cd48dd05a8ddcd041acfb2041d1a
parent5c213bf01a5dca7c4030efd2ad9c9f84852e7b32
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
release/scripts/pkg-stage.sh