Sponsored Content
Skip to content

feat: Install validator-keys - #5841

Merged
legleux merged 2 commits into
XRPLF:developfrom
legleux:install_vkt
Oct 14, 2025
Merged

feat: Install validator-keys#5841
legleux merged 2 commits into
XRPLF:developfrom
legleux:install_vkt

Conversation

@legleux

@legleux legleux commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Add the validator-keys as a CMake install target when it is requested to be built.

Context of Change

Sometimes people ask where this is. Maybe this can make it a little easier to locate. The CMake needed to be updated also and this removes the need for manually installing into packages.

Type of Change

  • New feature (non-breaking change which adds functionality)

Warning during CMake configure.

Before

CMake Warning (dev) at /usr/share/cmake/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(validator_keys_src) is deprecated, call
  FetchContent_MakeAvailable(validator_keys_src) instead.  Policy CMP0169 can
  be set to OLD to allow FetchContent_Populate(validator_keys_src) to be
  called directly for now, but the ability to call it with declared details
  will be removed completely in a future version.
Call Stack (most recent call first):
  cmake/RippledValidatorKeys.cmake:19 (FetchContent_Populate)
  CMakeLists.txt:151 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

After

No warning.


Fix DESTDIR not being respected.

Before

CMake error on install.

CMake Error at cmake/create_symbolic_link.cmake:15 (file):
  file failed to create symbolic link '/usr/local/include/ripple': Permission
  denied
Call Stack (most recent call first):
  build/cmake_install.cmake:88 (create_symbolic_link)
...
CMake Error at cmake/create_symbolic_link.cmake:15 (file):
  file failed to create symbolic link '$DESTDIR/usr/local/bin/xrpld': No such
  file or directory
Call Stack (most recent call first):
  build/cmake_install.cmake:153 (create_symbolic_link)

After

No errors. Links created.

% find -L . -xtype l -name xrpld
./rippled_install/usr/local/bin/xrpld
% find -L . -xtype l -name ripple
./rippled_install/usr/local/include/ripple

No validator-keys in installation.

Before

validator-keys not installed.

# CMake/configure/install

% find . -type f -name validator-keys
./build/validator-keys/validator-keys

After

The validator-keys tool is installed with rippled.

 % find . -type f -name validator-keys
./rippled_install/usr/local/bin/validator-keys
./build/_deps/validator_keys-build/validator-keys

@codecov

codecov Bot commented Oct 3, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.2%. Comparing base (46ba8a2) to head (87088b2).
⚠️ Report is 7 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5841     +/-   ##
=========================================
- Coverage     79.2%   79.2%   -0.0%     
=========================================
  Files          816     816             
  Lines        72425   72425             
  Branches      8365    8366      +1     
=========================================
- Hits         57376   57368      -8     
- Misses       15049   15057      +8     

see 3 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Tapanito
Tapanito requested review from Bronek and a1q123456 October 3, 2025 15:08
@Tapanito Tapanito added the Triaged Issue/PR has been triaged for viability, liveliness, etc. label Oct 3, 2025
@legleux
legleux requested review from bthomee and ximinez October 8, 2025 15:48

@ximinez ximinez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but for reference and confirmation, could you post the build instructions necessary to build validator-keys from within rippled?

I think it's just

cmake [...] -Dvalidator-keys=ON ${dir}
cmake --build ${dir} --target validator-keys
${dir}/_deps/validator_keys-build/validator-keys --unittest

But confirmation would be nice.

@legleux

legleux commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

Approved, but for reference and confirmation, could you post the build instructions necessary to build validator-keys from within rippled?

I think it's just

cmake [...] -Dvalidator-keys=ON ${dir}
cmake --build ${dir} --target validator-keys
${dir}/_deps/validator_keys-build/validator-keys --unittest

But confirmation would be nice.

Very close. The option is validator_keys but the target is validator-keys.
I just updated this to output validator-keys with the rest of the build artifacts.

cmake -B ${BUILD_DIR} -Dvalidator_keys=ON 
cmake --build ${BUILD_DIR} --target validator-keys
./${BUILD_DIR}/validator-keys --unittest

@a1q123456 a1q123456 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but it would be nicer if we could avoid DESTDIR and use CMAKE_INSTALL_PREFIX to make it more conventional but it's not directly relating to this PR.

@a1q123456

Copy link
Copy Markdown
Contributor

Approved, but for reference and confirmation, could you post the build instructions necessary to build validator-keys from within rippled?
I think it's just

cmake [...] -Dvalidator-keys=ON ${dir}
cmake --build ${dir} --target validator-keys
${dir}/_deps/validator_keys-build/validator-keys --unittest

But confirmation would be nice.

Very close. The option is validator_keys but the target is validator-keys. I just updated this to output validator-keys with the rest of the build artifacts.

cmake -B ${BUILD_DIR} -Dvalidator_keys=ON 
cmake --build ${BUILD_DIR} --target validator-keys
./${BUILD_DIR}/validator-keys --unittest

Wouldn't it be better to add EXCLUDE_FROM_ALL to validator-keys if we don't intend to build it by default?

@legleux

legleux commented Oct 14, 2025

Copy link
Copy Markdown
Contributor Author

LGTM but it would be nicer if we could avoid DESTDIR and use CMAKE_INSTALL_PREFIX to make it more conventional but it's not directly relating to this PR.

DESTDIR is pretty conventional. install() is also called during packaging which takes place in a clean, isolated staging tree which if DESTDIR is unset would copy those files outside that environment to the final destination where the package means to install them (but we're not installing a package at that point).

Wouldn't it be better to add EXCLUDE_FROM_ALL to validator-keys if we don't intend to build it by default?

By default, the validator-keys target does have the EXCLUDE_FROM_ALL property set which is why we need to explicitly build it with --target validator-keys.

@legleux
legleux added this pull request to the merge queue Oct 14, 2025
Merged via the queue into XRPLF:develop with commit 97bc94a Oct 14, 2025
3 checks passed
@legleux
legleux deleted the install_vkt branch October 14, 2025 22:25
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
* feat: Install validator-keys

* output validator-keys with everything else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Triaged Issue/PR has been triaged for viability, liveliness, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants