pkgsrc/mk/pkginstall
khorben 727ba708e4 Introduce a new SYSCONFBASE variable (defaults to /etc)
This is part 1 to support additional platforms with the RC scripts provided in
pkgsrc, in privileged as well as in unprivileged mode, including on NetBSD
(with part 2 in pkgtools/rc.subr).

This variable is meant to point to the configuration directory of the base
system (as opposed to pkgsrc's own prefix) when it should be used by pkgsrc in
special cases (e.g. installing RC scripts), or to point to the existing
PKG_SYSCONFBASE directory otherwise (e.g. for any unprivileged bootstrap).
This teaches pkgsrc where the RC scripts should be installed, and more
importantly, where the local copy of rc.subr can be expected. Part 3 will
progressively update each and every RC script to substitute this path as
expected.

No functional changes are intended in privileged mode without a bootstrap. The
only variable affected by this change directly is RCD_SCRIPTS_DIR, which
currently remains with the same default of /etc/rc.d, and can be overridden as
before.

When bootstrapping, SYSCONFBASE also remains with the existing default when no
prefix is set or is "/usr/pkg" or "/usr"; it is set to $prefix/etc otherwise. It
can be specified specifically with --sysconfbase if necessary.

Existing installations or bootstraps are not affected, as this change needs
setting SYSCONFBASE in the corresponding $sysconfdir/mk.conf to have an impact.

Tested in privileged and unprivileged modes on NetBSD/amd64, and unprivileged
mode on Darwin/amd64; submitted for review on tech-pkg@.
2021-05-30 23:41:05 +00:00
..
bsd.pkginstall.mk Introduce a new SYSCONFBASE variable (defaults to /etc) 2021-05-30 23:41:05 +00:00
deinstall
dirs
files Work around a potential shell bug where "${FOO=${BAR%/*}}" does not work 2020-04-15 13:33:32 +00:00
fonts
footer
header
icon-themes
info-files
install
ocaml-findlib-register
perms
shell
shlibs
usergroup
usergroup-check
usergroupfuncs
usergroupfuncs.DragonFly
usergroupfuncs.FreeBSD
usergroupfuncs.Linux
usergroupfuncs.MirBSD