build(cmake): add RS_SYSTEM_LIBRNP to link the system librnp - #386
Merged
Merged
Conversation
Contributor
|
The PR looks fine, but comments really need to be that verbose? Use succinct comments when necessary and explain why and do not restate what the code does |
Distribution builds (e.g. Debian) must use the system librnp instead of the vendored copy (Debian Policy 4.13 forbids embedded code copies of packaged libraries). The new cmake_dependent_option reuses the pre-built librnp code path introduced for Android, resolves the headers so non-standard prefixes work, and makes a missing system librnp a fatal configure error instead of a silent fallback to the vendored sources. Default OFF: nothing changes for regular builds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jolavillette
force-pushed
the
feature/system-librnp
branch
from
September 18, 2026 19:01
3dda381 to
d5f5124
Compare
Contributor
Author
|
Fair point, trimmed: the option description is now one line and the two comments only say why (distro policy forbids the vendored copy, hence the hard failure; PUBLIC because rnp/rnp.h is reached from authgpg.h). Code unchanged, force-pushed. |
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.
New option
RS_SYSTEM_LIBRNP(default OFF, requiresRS_RNPLIB): link the distribution's librnp instead of building the vendored copy. Required by Debian policy (no embedded copies of libraries the distribution already packages), and useful for any distro packaging.It reuses the pre-built-librnp code path introduced for Android:
find_pathso non-standard prefixes work, and exported PUBLIC:rnppgphandler.h(reached from the publicauthgpg.h) includesrnp/rnp.h, so consumers of theretrosharetarget need them too — the vendored code path exports its include directory PUBLIC for the same reason.Note: current master requires rnp >= 0.17.1 (
rnp_key_direct_signature_create/rnp_key_signature_sign, absent from 0.17.0). Validated by a full Debian package build against Debian sid's rnp 0.18.1 in a clean container.No default behavior changes: with the option OFF (the default) the vendored build is untouched.
Companion PR on the super-project side: RetroShare/RetroShare#3309. Part of the groundwork for Debian packaging (Debian bug #659069).
🤖 Generated with Claude Code