Page MenuHomeFreeBSD

Makefile: Force DISTDIR=/ for (update-)packages
ClosedPublic

Authored by ivy on Mon, Oct 6, 11:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 7, 4:19 PM
Unknown Object (File)
Mon, Oct 6, 8:51 PM
Unknown Object (File)
Mon, Oct 6, 4:23 PM
Unknown Object (File)
Mon, Oct 6, 2:30 PM
Unknown Object (File)
Mon, Oct 6, 2:29 PM
Subscribers

Details

Summary

The make(1) variable DISTDIR is used by both ports and src with a
different meaning. Some users may set DISTDIR in /etc/make.conf
for ports, which previously worked fine when building src since
the src targets which used this variable were not very commonly
used (mainly, make distributeworld).

Unfortunately, with pkgbase becoming the default, this is no longer
true since make (update-)packages invokes make stageworld, which is
sensitive to DISTDIR, and these users find that their build now fails.

A correct fix for this probably requires renaming one or both of
the DISTDIR variables, but for now, work around the problem by
setting DISTDIR=/ for the user-facing pkgbase targets, packages
and update-package. Since setting DISTDIR doesn't work for these
targets anyway, this should not break any existing configurations.

PR: 290010
Reported by: Oleh Vinichenko <moonlapse81@gmail.com>
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ivy requested review of this revision.Mon, Oct 6, 11:40 AM
kib added inline comments.
Makefile
180

Unrelated, can these targets be placed one per line? There and in other parts of the Makefiles.

Makefile
180

that's probably a good idea but i think it should be done as a separate change.

This revision is now accepted and ready to land.Tue, Oct 7, 9:00 AM
This revision was automatically updated to reflect the committed changes.