Add recipes for zenoh, zenoh-c and zenoh-plugin-webserver #26736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #26053 .
PR content
This PRs adds some initial recipes for Zenoh ecosystem (https://zenoh.io/).
In particular, it contains the following recipes that generate the following packages (structure and naming inspired by the Debian and homebrew existing packages):
zenoh
recipe, corresponding to the https:/eclipse-zenoh/zenoh repo, that generates the packages:zenoh-rust-abi
, meta-package that captures the Rust ABI used byzenohd
and all the Rust pluginszenohd
, containing thezenohd
zenoh router executablezenoh-plugin-rest
, rust plugin that is dlopen-ed byzenohd
zenoh-plugin-storage-manager
, rust plugin that is dlopen-ed byzenohd
zenoh
, metapackage that depends onzenohd
,zenoh-plugin-rest
andzenoh-plugin-storage-manager
for consistency with the equivalent package available for Debian and homebrewzenoh-c
recipe, corresponding to the https:/eclipse-zenoh/zenoh-c repo, that generates the packages:libzenohc
package, containing a C library implemented using rustzenoh-plugin-webserver
recipe, corresponding to the https:/eclipse-zenoh/zenoh-plugin-webserver repo, that generates the packages:zenoh-plugin-webserver
, rust plugin that is dlopen-ed byzenohd
I typically avoid to include multiple recipes in the same PR, but in this case this is useful to show how future
zenoh-*
packages may be packaged.Zenoh specificity
The most important thing is to distinguish two kind of
zenoh
packages:zenohd
(that typically are namedzenoh-plugin-*
orzenoh-backend-*
). These packages need special care as they need to be compiled using exactly the same dependencies and rust compiler version used to compilezenohd
, as otherwise ABI breakage could happen (see https:/eclipse-zenoh/zenoh/tree/0.11.0?tab=readme-ov-file#plugins). The fact that all plugins of a givenzenoh
version are built with the same packages of the same releasezenohd
is ensured by theCargo.lock
files in zenoh repositories, that are appropriately aligned (see for example eclipse-zenoh/zenoh-plugin-webserver@ec23805). So to ensure that allzenohd
andzenoh
plugins installed in the same environment are compatible, we created thezenoh-rust-abi
package on whichzenohd
and allzenoh
plugins depend. The version ofzenoh-rust-abi
is defined as{{ zenoh_version }}.{{ rust_compiler_version }}
, ensuring that if necessary a given zenoh release can be compiled for a newer rust compiler version.An example of the first kind of package is
libzenohc
contained in this PR, it has a run dependency onzenoh-rust-abi
, but just to ensure thatlibzenohc
is installed with azenohd
with the same version:On anothe hand, an example of the second kind of package is
zenoh-plugin-webserver
, that needs to match the ABI that zenohd expects, and so has the following constraint onzenoh-rust-abi
:(the hosts dependency becomes a run dependency thanks to
zenoh-rust-abi
'srun_exports
.Alternatives considered
Possible modifications to the packaging strategies that I considered but eventually did not do:
zenoh
packages that need to share the same rust abi (so basicallyzenohd
and all thezenoh-plugin-*
andzenoh-backend-*
packages) in the same recipe/feedstock. I excluded this in the end as there are many such packages (see https:/search?q=org%3Aeclipse-zenoh+zenoh-plugin&type=repositories and https:/search?q=org%3Aeclipse-zenoh+zenoh-backend&type=repositories) and so it would be eventually be difficult to manage all of them in a single feedstock.rust_compiler_version
inconda_build_config.yaml
, but without that I was unable to use the{{ rust_compiler_version }}
in the recipes, so I found no other solution to be able to compute the version of thezenoh-rust-abi
.Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).