From c39f9c561ce75818988e1205ab3f9811e7501a99 Mon Sep 17 00:00:00 2001 From: Michael Legleux Date: Fri, 7 Nov 2025 02:51:12 -0800 Subject: [PATCH] chore: Point xrpld symlink to rippled (#6012) As part of renaming ripple(d) to xrpl(d), the xrpld symlink was made to point to itself instead of to the rippled binary. This change fixes the symlink. --- .github/scripts/rename/cmake.sh | 7 +++++-- cmake/XrplInstall.cmake | 4 +--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/scripts/rename/cmake.sh b/.github/scripts/rename/cmake.sh index 43089b476d..0f88fa5de2 100755 --- a/.github/scripts/rename/cmake.sh +++ b/.github/scripts/rename/cmake.sh @@ -74,16 +74,19 @@ if grep -q '"xrpld"' cmake/XrplCore.cmake; then # The script has been rerun, so just restore the name of the binary. ${SED_COMMAND} -i 's/"xrpld"/"rippled"/' cmake/XrplCore.cmake elif ! grep -q '"rippled"' cmake/XrplCore.cmake; then - ghead -n -1 cmake/XrplCore.cmake > cmake.tmp + ${HEAD_COMMAND} -n -1 cmake/XrplCore.cmake > cmake.tmp echo ' # For the time being, we will keep the name of the binary as it was.' >> cmake.tmp echo ' set_target_properties(xrpld PROPERTIES OUTPUT_NAME "rippled")' >> cmake.tmp tail -1 cmake/XrplCore.cmake >> cmake.tmp mv cmake.tmp cmake/XrplCore.cmake fi +# Restore the symlink from 'xrpld' to 'rippled'. +${SED_COMMAND} -i -E 's@create_symbolic_link\(xrpld@create_symbolic_link(rippled@' cmake/XrplInstall.cmake + # Remove the symlink that previously pointed from 'ripple' to 'xrpl' but now is # no longer needed. -${SED_COMMAND} -z -i -E 's@install\(CODE.+CMAKE_INSTALL_INCLUDEDIR}/xrpl\)\n"\)@install(CODE "set(CMAKE_MODULE_PATH \\"${CMAKE_MODULE_PATH}\\")")@' cmake/XrplInstall.cmake +${SED_COMMAND} -z -i -E 's@install\(CODE.+CMAKE_INSTALL_INCLUDEDIR}/xrpl\)\n"\)\n+@@' cmake/XrplInstall.cmake popd echo "Renaming complete." diff --git a/cmake/XrplInstall.cmake b/cmake/XrplInstall.cmake index 371dcdf216..05ace6eeea 100644 --- a/cmake/XrplInstall.cmake +++ b/cmake/XrplInstall.cmake @@ -37,8 +37,6 @@ install( DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) -install(CODE "set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\")") - install (EXPORT XrplExports FILE XrplTargets.cmake NAMESPACE Xrpl:: @@ -69,7 +67,7 @@ if (is_root_project AND TARGET xrpld) install(CODE " set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\") include(create_symbolic_link) - create_symbolic_link(xrpld${suffix} \ + create_symbolic_link(rippled${suffix} \ \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/xrpld${suffix}) ") endif ()