feat(rnp-src): sync vendored HEAD flavor to librnp main (pin, clone-sync, drop json-c) - #101
Merged
Merged
Conversation
…ync, drop json-c) librnp main moved heavily since the last validated sync: json-c was replaced by a vendored single-header nlohmann/json (rnpgp/rnp@4f5c4e6e), dump gained decompression-bomb caps, PQC subkey export was fixed, and PQC subkey handling is now properly ENABLE_PQC-guarded. The public FFI surface delta vs 0.18.1 is unchanged from what the parity table already tracks. - Pin the HEAD flavor to 470695b98abe (current main tip). RNP_HEAD_REF was nominally 'pin for reproducibility' but actually floated 'main' — fresh builds got whatever landed that day. - prepare_librnp_head now syncs cached clones to the pin on every build (fetch + hard checkout + submodule sync), so stale clones can't keep serving old source; the idempotent Botan-include patcher re-runs after. - Flavor::Head.cache_dir() embeds the pin's short SHA (rnp-head-<sha>), so bumping the pin automatically invalidates cached artifacts. - Drop json-c for the HEAD flavor: upstream vendored nlohmann/json, so json-c is neither built, passed to CMake, nor linked (Windows advapi32 also gated off — only json-c needed it). The 0.18.1 release flavor keeps building and linking json-c exactly as before. Installed.flavor carries the decision to rnp-sys. Validated: 27/27 release-flavor suites green locally; flavored build produces librnp.a at the pin with zero json-c; 11 flavor unit tests. The macOS flavored signing segfault is pre-existing (#100) and unrelated — ubuntu CI (pqc + crypto-refresh job) is the authoritative gate, as it has always been for this flavor.
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.
Syncs the vendored HEAD flavor (pqc / crypto-refresh) to current librnp
main.What changed upstream
librnp
mainmoved heavily since our last validated sync: json-c was removed in favor of a vendored single-header nlohmann/json (rnpgp/rnp@4f5c4e6e), dump gained decompression-bomb caps, PQC subkey export was fixed (both traditional and PQC subkeys now exported inrnp_key_export_autocrypt), PQC subkey handling is properly#if defined(ENABLE_PQC)-guarded, plus Android/OHOS CI and CMake hardening. The public FFI surface delta vs 0.18.1 is unchanged from what we already track (rnp_op_encrypt_enable_skesk_v6new, the two sphincsplus functions removed — both already handled in the parity table).What this PR does
470695b98abe8a427fc47847acb387c089cb156d(current main tip).RNP_HEAD_REFwas nominally "pin to a commit for reproducibility" but actually floatedmain— a fresh build got whatever landed that day, including unvalidated regressions.prepare_librnp_headnow fetches + hard-checks-out the pin (with submodule sync) on every build instead of cloning once and reusing a stale tree forever. The Botan-include patcher re-runs afterwards (it is idempotent;--forcediscards its previous edits).Flavor::Head.cache_dir()is nowrnp-head-<short-sha>(was the pin-agnosticrnp-flavored), so bumping the pin automatically invalidates stale cached artifacts — the same protectionrnp-0.18.1-b1gives the release flavor.Installed.flavorcarries the decision and rnp-sys gatesstatic=json-c(and Windowsadvapi32, which only json-c needed) accordingly. The 0.18.1 release flavor still builds and links json-c exactly as before.Validation
rnp-srcflavor unit tests: 11 pass (including new pin-is-full-SHA and needs-json-c mapping tests).--features vendored,pqc,crypto-refreshbuild: clone synced to470695b,install/rnp-head-470695b9/lib/librnp.aproduced, zero json-c references in the build, link succeeded.pqc + crypto-refresh(ubuntu) is the authoritative gate for the flavored build.mainbefore this PR, same machine) crashes identically, and it reproduces against the 2026-08-28 pin whose ubuntu CI was green, so it pre-dates this sync and is macOS-specific; filed as Flavored (HEAD) vendored build segfaults in signing on macOS/ARM64 — pre-existing, not the pinning sync #100.