Bug 232293 - pkgbase uses (global) ports environment variables in src Makefiles -> conflict
Summary: pkgbase uses (global) ports environment variables in src Makefiles -> conflict
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkgbase (Nobody)
Depends on:
Reported: 2018-10-15 16:00 UTC by Bjoern A. Zeeb
Modified: 2020-11-06 19:12 UTC (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Bjoern A. Zeeb freebsd_committer 2018-10-15 16:00:51 UTC
pkgbase uses DISTDIR in Makefile.inc1 as an optional environment variable.

This conflicts with the global ports environment variable;  if someone has DISTDIR set in her environment make packages fails in funny ways.

An initial attempt to fix parts of this problem was done in https://svnweb.freebsd.org/base?view=revision&revision=337991 .
This change was
(a) not enough to fix the entire problem
(b) does not fix the underlying problem of the conflict

It would be advisable to rename the variable in Makefile.inc1 and also fix the "packages" target to work if a DISTDIR (replacement) variable is set.
Comment 1 commit-hook freebsd_committer 2018-10-20 16:20:06 UTC
A commit references this bug:

Author: tcberner
Date: Sat Oct 20 16:19:12 UTC 2018
New revision: 482589
URL: https://svnweb.freebsd.org/changeset/ports/482589

  databases/kdb: fix build with GCC-based architectures

  PR:		232293
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl>

Comment 2 Ed Maste freebsd_committer 2020-01-18 20:04:26 UTC
Also `DISTDIR` is not set when running plain `make packages`. Log shows paths like /usr/obj/tmp/cirrus-ci-build/amd64.amd64/worldstage//METALOG (.../${DISTDIR}/METALOG)