diff options
author | jperkin <jperkin@pkgsrc.org> | 2017-05-03 13:46:53 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2017-05-03 13:46:53 +0000 |
commit | 00dacc1b6218822faeeefe7378085bf33f0a6d41 (patch) | |
tree | 337610f2a7d18f545f061098f7f777f349a9de9f /mk/check/check-shlibs-elf.awk | |
parent | 0217bcb70921a72a980fb2b4e66919e32b35bd64 (diff) | |
download | pkgsrc-00dacc1b6218822faeeefe7378085bf33f0a6d41.tar.gz |
Introduce CHECK_SHLIBS_BLACKLIST which allows users to specify a list of
regexps that will cause the checks to fail if they match resolved RPATHs.
Diffstat (limited to 'mk/check/check-shlibs-elf.awk')
-rw-r--r-- | mk/check/check-shlibs-elf.awk | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mk/check/check-shlibs-elf.awk b/mk/check/check-shlibs-elf.awk index 8f934896ee2..84bf5c1b433 100644 --- a/mk/check/check-shlibs-elf.awk +++ b/mk/check/check-shlibs-elf.awk @@ -1,4 +1,4 @@ -# $NetBSD: check-shlibs-elf.awk,v 1.14 2017/04/26 11:19:16 jperkin Exp $ +# $NetBSD: check-shlibs-elf.awk,v 1.15 2017/05/03 13:46:53 jperkin Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -121,13 +121,14 @@ function checkshlib(DSO, needed, rpath, found, dso_rpath, got_rpath, nrpath) { if (!got_rpath) nrpath = split(system_rpath, rpath, ":") close(cmd) - nedirs = split(extradirs, edirs, " ") for (p in rpath) { if (rpath[p] == wrkdir || substr(rpath[p], 1, length(wrkdir) + 1) == wrkdir "/") { print DSO ": rpath relative to WRKDIR" } } + nblist = split(blacklist, blist, " ") + nedirs = split(extradirs, edirs, " ") for (lib in needed) { found = 0 for (p = 1; p <= nrpath; p++) { @@ -137,6 +138,11 @@ 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 (e = 1; e <= nedirs; e++) { if (rpath[p] == edirs[e] || substr(rpath[p], 1, length(edirs[e]) + 1) == edirs[e] "/") { @@ -169,6 +175,7 @@ BEGIN { readelf = ENVIRON["READELF"] wrkdir = ENVIRON["WRKDIR"] extradirs = ENVIRON["CHECK_WRKREF_EXTRA_DIRS"] + blacklist = ENVIRON["CHECK_SHLIBS_BLACKLIST"] pkg_info_cmd = ENVIRON["PKG_INFO_CMD"] depends_file = ENVIRON["DEPENDS_FILE"] if (readelf == "") |