From 52226be5b46f8beb2285002f52dd7f63e2622005 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Wed, 28 Jan 2026 16:04:45 -0500 Subject: [PATCH 1/2] Clarify `link_libraries` Clarify that the list of libraries supplied by `link_libraries` is a list of file paths, not a list of component references. --- schema.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schema.rst b/schema.rst index ce5a8de..dc6d5a5 100644 --- a/schema.rst +++ b/schema.rst @@ -427,8 +427,8 @@ Attribute names are case sensitive. :type: list(string) :context: component configuration - Specifies a list of additional libraries that must be linked against - when linking code that consumes the component. + Specifies a list of additional libraries (as paths, not components) + that must be linked against when linking code that consumes the component. (Note that packages should avoid using this attribute if at all possible. Use `requires (component)`_ instead whenever possible.) From a1a25fa40206abd096fe3cb446441b8cba3601db Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Thu, 29 Jan 2026 13:38:24 -0500 Subject: [PATCH 2/2] Add `dyld_requires` Add an attribute to allow specifying requirements that are only needed to satisfy the dynamic library loader (or the linker, when operating in certain strict modes). Because these are only needed by the build in limited cases (and arguably are only "needed" to work around broken environments), this is not being treated as a breaking schema change. While this could conceivably have a `dyld_libraries` companion, that is not being added at this time. (Anyway, `link_libraries` is discouraged, and `dyld_libraries` would be as well.) Fixes: #106 --- conf.py | 2 +- schema.rst | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 295f862..7ef199b 100644 --- a/conf.py +++ b/conf.py @@ -13,7 +13,7 @@ project = 'Common Package Specification' copyright = '2025, Matthew Woehlke' -version_info = (0, 14, 0) +version_info = (0, 14, 1) release = '.'.join(map(str, version_info)) version = '.'.join(map(str, version_info[:2])) diff --git a/schema.rst b/schema.rst index dc6d5a5..9cc879c 100644 --- a/schema.rst +++ b/schema.rst @@ -307,6 +307,38 @@ Attribute names are case sensitive. the latter, when applicable to the source being compiled, shall have precedence. +.. ---------------------------------------------------------------------------- +.. cps:attribute:: dyld_requires + :type: list(string) + :context: component configuration + + Specifies additional components required by a component + which are needed only by the dynamic library loader. + Unlike `requires (component)`_ or `link_requires`_, + these are not used to resolve symbol references of the consumer, + but represent "private" implementation requirements + of the component on which this attribute appears. + + Typically, such requirements represent a need + to ensure that the required component can be found at run time. + This is usually accomplished in one of three ways: + + - Ensuring that the component resides + in a default / "system" search path. + + - Encoding the component path in the binary + in a way that influences the dynamic library loader + (e.g. "RPATH"). + + - Providing the component path in an environment variable + which influences the dynamic library loader's search paths. + + The last case requires external information to be provided; + this attribute facilitates tools generating that information. + In some instances, this external library search information + may also be required to successfully link components, + if the linker demands that all library references can be resolved. + .. ---------------------------------------------------------------------------- .. cps:attribute:: hints :type: list(string)