mk: Rename variable to CHECK_SHLIBS_TOXIC.

Improves language and mirrors LD_TOXIC_PATH nomenclature available on at
least the SunOS dynamic linker.  The previous name is retained for now
for compatibility, even though I get the feeling I'm the only person who
is actually using this feature.
This commit is contained in:
jperkin 2021-10-11 20:26:28 +00:00
parent ea70aff2ae
commit 0148ecc87e
2 changed files with 14 additions and 12 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: check-shlibs-elf.awk,v 1.18 2020/01/16 22:53:11 joerg Exp $
# $NetBSD: check-shlibs-elf.awk,v 1.19 2021/10/11 20:26:28 jperkin Exp $
#
# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
# All rights reserved.
@ -127,7 +127,7 @@ function checkshlib(DSO, needed, rpath, found, dso_rpath, got_rpath, nrpath) {
print DSO ": rpath relative to WRKDIR"
}
}
nblist = split(blacklist, blist, " ")
ntpaths = split(toxic, tpaths, " ")
nedirs = split(extradirs, edirs, " ")
for (lib in needed) {
found = 0
@ -138,9 +138,9 @@ function checkshlib(DSO, needed, rpath, found, dso_rpath, got_rpath, nrpath) {
}
if (!libcache[libfile]) {
check_pkg(rpath[p] "/" lib)
for (b = 1; b <= nblist; b++) {
if (match(rpath[p] "/" lib, blist[b])) {
print DSO ": resolved path " rpath[p] "/" lib " matches blacklist " blist[b]
for (t = 1; t <= ntpaths; t++) {
if (match(rpath[p] "/" lib, tpaths[t])) {
print DSO ": resolved path " rpath[p] "/" lib " matches toxic " tpaths[t]
}
}
for (e = 1; e <= nedirs; e++) {
@ -175,7 +175,7 @@ BEGIN {
readelf = ENVIRON["READELF"]
wrkdir = ENVIRON["WRKDIR"]
extradirs = ENVIRON["CHECK_WRKREF_EXTRA_DIRS"]
blacklist = ENVIRON["CHECK_SHLIBS_BLACKLIST"]
toxic = ENVIRON["CHECK_SHLIBS_TOXIC"]
pkg_info_cmd = ENVIRON["PKG_INFO_CMD"]
depends_file = ENVIRON["DEPENDS_FILE"]
if (readelf == "")

View file

@ -1,4 +1,4 @@
# $NetBSD: check-shlibs.mk,v 1.33 2020/10/09 16:00:16 jperkin Exp $
# $NetBSD: check-shlibs.mk,v 1.34 2021/10/11 20:26:28 jperkin Exp $
#
# This file verifies that all libraries used by the package can be found
# at run-time.
@ -10,10 +10,10 @@
#
# Default value: "yes" for PKG_DEVELOPERs, "no" otherwise.
#
# CHECK_SHLIBS_BLACKLIST
# CHECK_SHLIBS_TOXIC
# A list of regular expressions that will cause the test to fail
# if they are matched in the resolved runpath. For example, set
# to ^/usr/lib/lib(crypto|ssl) will ensure that OpenSSL is not
# if they match any resolved library paths. For example, set
# to ^/usr/lib/lib(crypto|ssl) ensures that OpenSSL is not
# accidentally picked up from the OS.
#
# Default value: empty.
@ -77,8 +77,10 @@ CHECK_SHLIBS_NATIVE_ENV+= LANG=C
. if defined(CHECK_WRKREF) && !empty(CHECK_WRKREF:Mextra)
CHECK_SHLIBS_NATIVE_ENV+= CHECK_WRKREF_EXTRA_DIRS=${CHECK_WRKREF_EXTRA_DIRS:Q}
. endif
. if defined(CHECK_SHLIBS_BLACKLIST)
CHECK_SHLIBS_NATIVE_ENV+= CHECK_SHLIBS_BLACKLIST=${CHECK_SHLIBS_BLACKLIST:Q}
. if defined(CHECK_SHLIBS_TOXIC)
CHECK_SHLIBS_NATIVE_ENV+= CHECK_SHLIBS_TOXIC=${CHECK_SHLIBS_TOXIC:Q}
. elif defined(CHECK_SHLIBS_BLACKLIST)
CHECK_SHLIBS_NATIVE_ENV+= CHECK_SHLIBS_TOXIC=${CHECK_SHLIBS_BLACKLIST:Q}
. endif
privileged-install-hook: _check-shlibs