diff --git a/conda_build/metadata.py b/conda_build/metadata.py index 6fd065e0b2..2b8e137883 100644 --- a/conda_build/metadata.py +++ b/conda_build/metadata.py @@ -596,6 +596,7 @@ def parse(data, config, path=None): "post-link": str, "pre-unlink": str, "missing_dso_whitelist": None, + "missing_dso_allowlist": None, # preferred keyword for inclusive language "error_overdepending": None, "error_overlinking": None, "overlinking_ignore_patterns": [], diff --git a/conda_build/post.py b/conda_build/post.py index bb4aebd14c..17ce2872fc 100644 --- a/conda_build/post.py +++ b/conda_build/post.py @@ -1072,7 +1072,7 @@ def _lookup_in_sysroots_and_allowlist( if not in_allowlist and not in_sysroots: _print_msg( errors, - f"{msg_prelude}: {needed_dso} not found in packages, sysroot(s) nor the missing_dso_whitelist.\n" + f"{msg_prelude}: {needed_dso} not found in packages, sysroot(s) nor the missing_dso_allowlist.\n" ".. is this binary repackaging?", verbose=verbose, ) @@ -1157,6 +1157,7 @@ def _show_linking_messages( pkg_name, error_overlinking, runpath_whitelist, + rpath_allowlist, # preferred keyword for inclusive language verbose, requirements_run, lib_packages, @@ -1193,7 +1194,9 @@ def _show_linking_messages( ) continue if runpaths and not ( - runpath_whitelist or any(fnmatch(f, w) for w in runpath_whitelist) + runpath_whitelist + or rpath_allowlist + or any(fnmatch(f, w) for w in runpath_whitelist or rpath_allowlist) ): _print_msg( errors, @@ -1256,7 +1259,9 @@ def check_overlinking_impl( run_prefix, build_prefix, missing_dso_whitelist, + missing_dso_allowlist, # preferred keyword for inclusive language runpath_whitelist, + rpath_allowlist, # preferred keyword for inclusive language error_overlinking, error_overdepending, verbose, @@ -1360,7 +1365,7 @@ def check_overlinking_impl( allowlist = DEFAULT_WIN_ALLOWLIST build_is_host = True if on_win else False - allowlist += missing_dso_whitelist or [] + allowlist += missing_dso_whitelist or missing_dso_allowlist or [] # Sort the sysroots by the number of files in them so things can assume that # the first sysroot is more important than others. @@ -1473,6 +1478,7 @@ def check_overlinking_impl( pkg_name, error_overlinking, runpath_whitelist, + rpath_allowlist, # preferred keyword for inclusive language verbose, requirements_run, lib_packages, @@ -1563,8 +1569,10 @@ def check_overlinking(m: MetaData, files, host_prefix=None): [req.split(" ")[0] for req in m.get_value("requirements/host", [])], host_prefix or m.config.host_prefix, m.config.build_prefix, - m.get_value("build/missing_dso_whitelist", []), - m.get_value("build/runpath_whitelist", []), + m.get_value( + ("build/missing_dso_whitelist" or "build/missing_dso_allowlist"), [] + ), + m.get_value(("build/runpath_whitelist" or "build/rpath_allowlist"), []), m.config.error_overlinking, m.config.error_overdepending, m.config.verbose, diff --git a/conda_build/skeletons/rpm.py b/conda_build/skeletons/rpm.py index d44477171f..2a53410947 100644 --- a/conda_build/skeletons/rpm.py +++ b/conda_build/skeletons/rpm.py @@ -45,7 +45,7 @@ build: number: 2 noarch: generic - missing_dso_whitelist: + missing_dso_allowlist: - '*' {depends} diff --git a/docs/source/resources/define-metadata.rst b/docs/source/resources/define-metadata.rst index fdca3889b2..eb326669f7 100644 --- a/docs/source/resources/define-metadata.rst +++ b/docs/source/resources/define-metadata.rst @@ -910,7 +910,7 @@ Use this sparingly, as the overlinking checks generally do prevent you from maki Allowlisting shared libraries ----------------------------- -The ``missing_dso_whitelist`` build key is a list of globs for +The ``missing_dso_allowlist`` build key is a list of globs for dynamic shared object (DSO) files that should be ignored when examining linkage information. @@ -923,12 +923,12 @@ or error ``--error-overlinking`` will result. .. code-block:: yaml build: - missing_dso_whitelist: + missing_dso_allowlist: These keys allow additions to the list of allowed libraries. -The ``runpath_whitelist`` build key is a list of globs for paths +The ``rpath_allowlist`` build key is a list of globs for paths which are allowed to appear as runpaths in the package's shared libraries. All other runpaths will cause a warning message to be printed during the build. @@ -936,7 +936,7 @@ printed during the build. .. code-block:: yaml build: - runpath_whitelist: + rpath_allowlist: .. _requirements: