Skip to content

Commit d20e617

Browse files
vjtmeta-codesync[bot]
authored andcommitted
[metalos][classic] Add RPM version pin and feature integrity checks
Summary: # 💁 This diff Adds two more checks to `metalos-rootfs-checker`, completing Phase 1: **`rpm_version_pins.rs`** — Uses `Graph::pending_features()` to iterate features, deserializes RPM feature data into `rpm::Rpm` (the actual antlir2 type), identifies version-pinned subjects, and verifies each resolved to a matching RPM in the built image. **`feature_integrity.rs`** — Uses `Graph::pending_features()` to iterate features, deserializes feature data into the actual antlir2 structs (`install::Install`, `ensure_dir_exists::EnsureDirExists`, `symlink::Symlink`), then verifies declared paths exist in the `DirEntry` facts. Detects missing paths, wrong symlink targets, and wrong file types (with debug output of what was actually found). **Visibility:** Adds `//metalos/os/facebook/classic/flavor/...` to the default `lib_visibility` in `antlir/antlir2/features/defs.bzl` so all feature lib crates are accessible from the checker binary. **Error handling:** If the depgraph can't be opened (e.g., format change or prebuilt layer), emits a warning finding and skips the check — does not block the diff. Test Plan: ``` $ buck2 build fbcode//metalos/os/facebook/classic/flavor/check/rootfs_checker:metalos-rootfs-checker BUILD SUCCEEDED ``` Ran against playground flavor — clean run, exit 0, no findings. Reviewed By: vmagro Differential Revision: D93607925 fbshipit-source-id: aee2c1328414942ed15a0d97319f19697ecff918
1 parent ddf8a32 commit d20e617

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

antlir/antlir2/features/defs.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def feature_impl(
7676
test_deps: list[str] | Select | None = []):
7777
lib_visibility = lib_visibility or visibility or [
7878
"//antlir/antlir2/...",
79+
"//metalos/os/facebook/classic/flavor/...",
7980
"//tupperware/cm/antlir2/...",
8081
]
8182
rust_library(

0 commit comments

Comments
 (0)