PR comments and more tweaks

This commit is contained in:
Michael Legleux
2026-04-02 11:14:29 -07:00
parent deba938eef
commit 40e70a7bac
6 changed files with 19 additions and 19 deletions

View File

@@ -36,6 +36,8 @@ env:
jobs:
package:
name: ${{ inputs.pkg_type }} (${{ inputs.version }})
permissions:
contents: read
runs-on: ["self-hosted", "Linux", "X64", "heavy"]
container: ${{ inputs.container_image }}
timeout-minutes: 30

View File

@@ -11,10 +11,15 @@ if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/opt/xrpld")
return()
endif()
# Generate the RPM spec from template (substitutes @xrpld_version@, @pkg_release@).
if(NOT DEFINED pkg_release)
set(pkg_release 1)
endif()
if(NOT DEFINED xrpld_version OR xrpld_version STREQUAL "")
message(
FATAL_ERROR
"xrpld_version must be set (e.g. -Dxrpld_version=2.4.0)"
)
endif()
configure_file(
${CMAKE_SOURCE_DIR}/package/rpm/xrpld.spec.in
${CMAKE_BINARY_DIR}/package/rpm/xrpld.spec
@@ -42,7 +47,7 @@ if(DPKG_BUILDPACKAGE_EXECUTABLE)
package-deb
COMMAND
${CMAKE_SOURCE_DIR}/package/build_pkg.sh deb ${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR} ${xrpld_version}
${CMAKE_BINARY_DIR} ${xrpld_version} ${pkg_release}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Building Debian package"
VERBATIM
@@ -74,7 +79,7 @@ foreach(PKG deb rpm)
set(IMAGE ${RPM_TEST_IMAGE})
endif()
# Fixture: start container
# This image runs systemd for full testing xrpld.service
add_test(
NAME ${PKG}_container_start
COMMAND
@@ -82,12 +87,11 @@ foreach(PKG deb rpm)
"docker rm -f xrpld_${PKG}_install_test 2>/dev/null || true && \
docker run -d \
--name xrpld_${PKG}_install_test \
--memory=45g --memory-swap=45g \
--privileged \
--cgroupns host \
--volume '${CMAKE_SOURCE_DIR}:/root:ro' \
--volume /sys/fs/cgroup:/sys/fs/cgroup:rw \
--tmpfs /tmp --tmpfs /run --tmpfs /run/lock \
--tmpfs /tmp --tmpfs /run \
--tmpfs /run/lock \
${IMAGE} \
/usr/sbin/init"
)
@@ -96,7 +100,6 @@ foreach(PKG deb rpm)
PROPERTIES FIXTURES_SETUP ${PKG}_container LABELS packaging
)
# Fixture: stop container
# On CI: always stop. Locally: leave running on failure for diagnosis.
add_test(
NAME ${PKG}_container_stop
@@ -114,7 +117,6 @@ foreach(PKG deb rpm)
PROPERTIES FIXTURES_CLEANUP ${PKG}_container LABELS packaging
)
# Install package and run smoke test
add_test(
NAME ${PKG}_install
COMMAND
@@ -130,7 +132,6 @@ foreach(PKG deb rpm)
TIMEOUT 600
)
# Validate install paths and compat symlinks
add_test(
NAME ${PKG}_install_paths
COMMAND

View File

@@ -1,7 +1,7 @@
Source: xrpld
Section: net
Priority: optional
Maintainer: XRPL Foundation <contact@xrpl.org>
Maintainer: XRPL Foundation <contact@xrplf.org>
Rules-Requires-Root: no
Build-Depends:
debhelper-compat (= 13)
@@ -18,6 +18,6 @@ Depends:
${shlibs:Depends},
${misc:Depends}
Description: XRP Ledger daemon
xrpld is the reference implementation of the XRP Ledger protocol.
It participates in the peer-to-peer XRP Ledger network, processes
transactions, and maintains the ledger database.
Reference implementation of the XRP Ledger protocol. Participates
in the peer-to-peer network, processes transactions, and maintains
a local ledger copy.

View File

@@ -67,7 +67,7 @@ if [ "$can_update" = true ] ; then
set -e
apply_update
systemctl daemon-reload
systemctl restart xrpld.service
systemctl restart xrpld.service || { echo "$(date -u) xrpld daemon restart FAILED"; exit 1; }
echo "$(date -u) xrpld daemon updated."
else
echo "$(date -u) no updates available" >> "$UPDATELOG"

View File

@@ -11,10 +11,6 @@ check_resolves_to() {
[ "$actual" = "$2" ] || { echo "FAIL: $1 resolves to $actual, expected $2"; exit 1; }
}
# var dirs (compat symlinks)
check -L /var/log/rippled
check -L /var/lib/rippled
# compat directory symlinks — existence and resolved target
check -L /opt/ripple
check_resolves_to /opt/ripple /opt/xrpld

View File

@@ -6,6 +6,7 @@
set -o pipefail
set -x
rm -f /tmp/test_failed /tmp/unittest_results
trap 'test $? -ne 0 && touch /tmp/test_failed' EXIT
install_from=$1
@@ -47,7 +48,7 @@ elif [ "${pkgtype}" = "rpm" ] ; then
echo "No .rpm files found"
exit 1
fi
rpm -i "${rpms[@]}"
rpm -i "${rpms[@]}" || { echo "RPM install failed"; exit 1; }
fi
# Verify installed version