]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Makefile.inc1: Use INSTALL_DDIR for distributeworld's distrib-dirs
authorJessica Clarke <jrtc27@FreeBSD.org>
Thu, 8 Jun 2023 16:47:04 +0000 (17:47 +0100)
committerJessica Clarke <jrtc27@FreeBSD.org>
Thu, 8 Jun 2023 18:14:12 +0000 (19:14 +0100)
commit469727c966bbd91447c8402470452b95810f3ffe
treec1b21a9fedc407663bce067daae0bddb39d254d1
parenta30a0d940daef2df51371cf142790109e2019fa0
Makefile.inc1: Use INSTALL_DDIR for distributeworld's distrib-dirs

INSTALL_DDIR is the canonicalised version of DESTDIR/DISTDIR. Whilst
most of what distrib-dirs does doesn't need the canonicalised form, it
is responsible for installing the POSIX and en_US.US_ASCII NLS symlinks
to C, and therefore needs the canonicalised version for those two uses
of install for NO_ROOT builds, since our install does a naive text-based
prefix strip when creating the METALOG entry rather than a smarter path
semantics-aware one (which itself is really a bug, and has bitten us
many times). As a result, using plain DESTDIR/DISTDIR instead can result
in the METALOG having ./path/to/destdir/base/usr/share/nls/$LOCALE
rather than ./base/usr/share/nls/$LOCALE and then being filtered out
when creating base.meta (or, if you're unlucky and the absolute path
begins with base or tests, weird things will probably happen).

Given this footgun an audit of DESTDIR uses is probably in order,
especially those using DESTDIR/DISTDIR, but this is sufficient for now.
Makefile.inc1