]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Replace literal uses of /usr/local in C sources with _PATH_LOCALBASE
authorse <se@FreeBSD.org>
Tue, 27 Oct 2020 11:29:11 +0000 (11:29 +0000)
committerse <se@FreeBSD.org>
Tue, 27 Oct 2020 11:29:11 +0000 (11:29 +0000)
commite87228c6008bded0a9a1f058a6faf5a67e5d0e38
tree123ca2f0a46ad9a1203a6b3c7a7a38c2a50854e6
parent158890f8d42714533007cf7612b3fb6087a6b13a
Replace literal uses of /usr/local in C sources with _PATH_LOCALBASE

Literal references to /usr/local exist in a large number of files in
the FreeBSD base system. Many are in contributed software, in configuration
files, or in the documentation, but 19 uses have been identified in C
source files or headers outside the contrib and sys/contrib directories.

This commit makes it possible to set _PATH_LOCALBASE in paths.h to use
a different prefix for locally installed software.

In order to avoid changes to openssh source files, LOCALBASE is passed to
the build via Makefiles under src/secure. While _PATH_LOCALBASE could have
been used here, there is precedent in the construction of the path used to
a xauth program which depends on the LOCALBASE value passed on the compiler
command line to select a non-default directory.

This could be changed in a later commit to make the openssh build
consistently use _PATH_LOCALBASE. It is considered out-of-scope for this
commit.

Reviewed by: imp
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D26942
18 files changed:
crypto/openssh/regress/unittests/sshkey/test_sshkey.c
lib/libc/nls/msgcat.c
lib/libfetch/common.c
sbin/nvmecontrol/nvmecontrol.c
secure/lib/libssh/Makefile
secure/usr.bin/ssh-agent/Makefile
tools/tools/ath/athprom/athprom.c
tools/tools/net80211/wesside/wesside/wesside.c
usr.bin/fortune/fortune/pathnames.h
usr.bin/mail/pathnames.h
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
usr.sbin/cpucontrol/cpucontrol.c
usr.sbin/cron/cron/pathnames.h
usr.sbin/mailwrapper/mailwrapper.c
usr.sbin/pciconf/pathnames.h
usr.sbin/pkg/config.c
usr.sbin/pkg/config.h
usr.sbin/pkg/pkg.c