apt: add hermetic sysroot support for rust sys crate#209
Open
alok-oai wants to merge 1 commit intobazel-contrib:new_apifrom
Open
apt: add hermetic sysroot support for rust sys crate#209alok-oai wants to merge 1 commit intobazel-contrib:new_apifrom
alok-oai wants to merge 1 commit intobazel-contrib:new_apifrom
Conversation
Motivation: Rust `-sys` crates need hermetic apt-provided headers/libs. Some crates can disable build scripts and link directly to Bazel C/C++ targets (for example `libudev-sys`, `alsa-sys`, `gstreamer-*-sys`, `wayland-sys`). Others still require build scripts and explicit sysroot-backed include/library search paths (notably `libspa-sys` / `pipewire-sys`, and `openssl-sys`). GStreamer test/runtime also needs plugin discovery paths. Changes: - add and export `apt_sysroot` to materialize apt tar inputs as a sysroot tree - generate `:sysroot` targets in translated dependency-set outputs - refactor `deb_import` to inspect `.deb` payloads and improve symlink/library resolution for cross-package linkage - improve link path handling for pkg-config and multiarch lib directories - switch apt shared-library linking to DT_RPATH behavior for hermetic transitive resolution - improve Contents index probing/parsing for Debian/Ubuntu layout differences - fix Provides-version constraint comparison direction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation:
Rust
-syscrates need hermetic apt-provided headers/libs. Some crates can disable build scripts and link directly to Bazel C/C++ targets (for examplelibudev-sys,alsa-sys,gstreamer-*-sys,wayland-sys). Others still require build scripts and explicit sysroot-backed include/library search paths (notablylibspa-sys/pipewire-sys, andopenssl-sys). GStreamer test/runtime also needs plugin discovery paths.Changes:
apt_sysrootto materialize apt tar inputs as a sysroot tree:sysroottargets in translated dependency-set outputsdeb_importto inspect.debpayloads and improve symlink/library resolution for cross-package linkage