Subject: Proposal: SYSTEMBASE
To: None <>
From: Todd Vierling <>
List: tech-pkg
Date: 05/01/2004 12:12:12
When talking with Jeremy Reed regarding the Linux packages, it occurred to
me that an OS built entirely from pkgsrc has some rather different needs
from an OS that uses pkgsrc for third-party software only.  So I've been

How about a new set of variables intended to be used (some for packages,
some for mk.conf) to indicate when packages should be installed to /usr?
I'll call this variable set SYSTEMBASE.

Basic variable definitions would be:

SYSTEMBASE?=	${LOCALBASE}	# default to third-party behavior
#USE_SYSTEMBASE=		# if set in package, default to SYSTEMBASE
#USE_SYSTEMBASE.<pkgname>=	# mk.conf: make <pkgname> use SYSTEMBASE

Some assumptions:

* specific tools commonly thought of as "base system" (gettext-lib,
  libiconv, coreutils, grep, m4, sed, etc.) would get USE_SYSTEMBASE in the
  package Makefile.  This wouldn't affect any system by default, as
  SYSTEMBASE defaults to LOCALBASE, but would have profound differences on a
  pkgsrc-built OS.

* SYSTEMBASE must *not* be required to be in the rpath for binaries.  In
  other words, if it's not set to ${LOCALBASE}, then the dynamic linker
  better know how to get there.  (So overriding SYSTEMBASE to "/usr" or ""
  are probably the only viable options.)  This requirement makes maintenance
  easier, as it doesn't require twiddling LDFLAGS or CPPFLAGS.

  may also be triggered by this condition to make certain properties of
  pkgsrc become more appropriate for a pkgsrc-built OS.

-- Todd Vierling <> <>