Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed 2.0.0-rc2 #4818

Merged
merged 7 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Builds/CMake/RippledCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,16 @@ else ()
>)
endif ()

if (use_gold AND is_gcc)
if (use_mold)
# use mold linker if available
execute_process (
COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=mold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "mold")
target_link_libraries (common INTERFACE -fuse-ld=mold)
endif ()
unset (LD_VERSION)
elseif (use_gold AND is_gcc)
# use gold linker if available
execute_process (
COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=gold -Wl,--version
Expand Down Expand Up @@ -163,9 +172,7 @@ if (use_gold AND is_gcc)
$<$<NOT:$<BOOL:${static}>>:-Wl,--disable-new-dtags>)
endif ()
unset (LD_VERSION)
endif ()

if (use_lld)
elseif (use_lld)
# use lld linker if available
execute_process (
COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=lld -Wl,--version
Expand All @@ -176,6 +183,7 @@ if (use_lld)
unset (LD_VERSION)
endif()


if (assert)
foreach (var_ CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE)
STRING (REGEX REPLACE "[-/]DNDEBUG" "" ${var_} "${${var_}}")
Expand Down
2 changes: 2 additions & 0 deletions Builds/CMake/RippledSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if (is_linux)
option (static "link protobuf, openssl, libc++, and boost statically" ON)
option (perf "Enables flags that assist with perf recording" OFF)
option (use_gold "enables detection of gold (binutils) linker" ON)
option (use_mold "enables detection of mold (binutils) linker" ON)
else ()
# we are not ready to allow shared-libs on windows because it would require
# export declarations. On macos it's more feasible, but static openssl
Expand All @@ -45,6 +46,7 @@ else ()
set (static ON CACHE BOOL "static link, linux only. ON for WIN/macos" FORCE)
set (perf OFF CACHE BOOL "perf flags, linux only" FORCE)
set (use_gold OFF CACHE BOOL "gold linker, linux only" FORCE)
set (use_mold OFF CACHE BOOL "mold linker, linux only" FORCE)
endif ()
if (is_clang)
option (use_lld "enables detection of lld linker" ON)
Expand Down
135 changes: 130 additions & 5 deletions Builds/containers/gitlab-ci/pkgbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,30 @@ rocky_8_smoketest:
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
<<: *run_local_smoketest

fedora_37_smoketest:
rocky_9_smoketest:
stage: smoketest
dependencies:
- rpm_build
image:
name: artifactory.ops.ripple.com/fedora:37
name: artifactory.ops.ripple.com/rockylinux/rockylinux:9

<<: *run_local_smoketest

alma_8_smoketest:
stage: smoketest
dependencies:
- rpm_build
image:
name: artifactory.ops.ripple.com/almalinux:8
<<: *run_local_smoketest

alma_9_smoketest:
stage: smoketest
dependencies:
- rpm_build
image:
name: artifactory.ops.ripple.com/almalinux:9

<<: *run_local_smoketest

fedora_38_smoketest:
Expand All @@ -209,6 +227,14 @@ fedora_38_smoketest:
name: artifactory.ops.ripple.com/fedora:38
<<: *run_local_smoketest

fedora_39_smoketest:
stage: smoketest
dependencies:
- rpm_build
image:
name: artifactory.ops.ripple.com/fedora:39
<<: *run_local_smoketest

ubuntu_18_smoketest:
stage: smoketest
dependencies:
Expand Down Expand Up @@ -249,6 +275,14 @@ debian_11_smoketest:
name: artifactory.ops.ripple.com/debian:11
<<: *run_local_smoketest

debian_12_smoketest:
stage: smoketest
dependencies:
- dpkg_build
image:
name: artifactory.ops.ripple.com/debian:12
<<: *run_local_smoketest

#########################################################################
## ##
## stage: verify_sig ##
Expand Down Expand Up @@ -345,7 +379,6 @@ centos_7_verify_repo_test:
<<: *only_primary
<<: *run_repo_smoketest


rocky_8_verify_repo_test:
stage: verify_from_test
variables:
Expand All @@ -357,12 +390,34 @@ rocky_8_verify_repo_test:
<<: *only_primary
<<: *run_repo_smoketest

fedora_37_verify_repo_test:
rocky_9_verify_repo_test:
stage: verify_from_test
variables:
RPM_REPO: "rippled-rpm-test-mirror"
image:
name: artifactory.ops.ripple.com/fedora:37
name: artifactory.ops.ripple.com/rockylinux/rockylinux:9
dependencies:
- rpm_sign
<<: *only_primary
<<: *run_repo_smoketest

almalinux_8_verify_repo_test:
stage: verify_from_test
variables:
RPM_REPO: "rippled-rpm-test-mirror"
image:
name: artifactory.ops.ripple.com/almalinux:8
dependencies:
- rpm_sign
<<: *only_primary
<<: *run_repo_smoketest

almalinux_9_verify_repo_test:
stage: verify_from_test
variables:
RPM_REPO: "rippled-rpm-test-mirror"
image:
name: artifactory.ops.ripple.com/almalinux:9
dependencies:
- rpm_sign
<<: *only_primary
Expand All @@ -379,6 +434,18 @@ fedora_38_verify_repo_test:
<<: *only_primary
<<: *run_repo_smoketest

fedora_39_verify_repo_test:
stage: verify_from_test
variables:
RPM_REPO: "rippled-rpm-test-mirror"
image:
name: artifactory.ops.ripple.com/fedora:39

dependencies:
- rpm_sign
<<: *only_primary
<<: *run_repo_smoketest

ubuntu_18_verify_repo_test:
stage: verify_from_test
variables:
Expand Down Expand Up @@ -439,6 +506,18 @@ debian_11_verify_repo_test:
<<: *only_primary
<<: *run_repo_smoketest

debian_12_verify_repo_test:
stage: verify_from_test
variables:
DISTRO: "bookworm"
DEB_REPO: "rippled-deb-test-mirror"
image:
name: artifactory.ops.ripple.com/debian:12
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest

#########################################################################
## ##
## stage: wait_approval_prod ##
Expand Down Expand Up @@ -515,6 +594,39 @@ rocky_8_verify_repo_prod:
<<: *only_primary
<<: *run_repo_smoketest

rocky_9_verify_repo_prod:
stage: verify_from_prod
variables:
RPM_REPO: "rippled-rpm"
image:
name: artifactory.ops.ripple.com/rockylinux/rockylinux:9
dependencies:
- rpm_sign
<<: *only_primary
<<: *run_repo_smoketest

alma_8_verify_repo_prod:
stage: verify_from_prod
variables:
RPM_REPO: "rippled-rpm"
image:
name: artifactory.ops.ripple.com/almalinux:8
dependencies:
- rpm_sign
<<: *only_primary
<<: *run_repo_smoketest

alma_9_verify_repo_prod:
stage: verify_from_prod
variables:
RPM_REPO: "rippled-rpm"
image:
name: artifactory.ops.ripple.com/almalinux:9
dependencies:
- rpm_sign
<<: *only_primary
<<: *run_repo_smoketest

fedora_37_verify_repo_prod:
stage: verify_from_prod
variables:
Expand Down Expand Up @@ -597,6 +709,19 @@ debian_11_verify_repo_prod:
<<: *only_primary
<<: *run_repo_smoketest

debian_12_verify_repo_prod:
stage: verify_from_prod
variables:
DISTRO: "bookworm"
DEB_REPO: "rippled-deb"
image:
name: artifactory.ops.ripple.com/debian:12
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest


#########################################################################
## ##
## stage: get_final_hashes ##
Expand Down
12 changes: 2 additions & 10 deletions Builds/containers/gitlab-ci/smoketest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ case ${ID} in
ubuntu|debian)
pkgtype="dpkg"
;;
fedora|centos|rhel|scientific|rocky)
fedora|centos|rhel|scientific|rocky|almalinux)
pkgtype="rpm"
;;
*)
Expand Down Expand Up @@ -79,16 +79,8 @@ else
# yum --showduplicates list rippled
yum -y install ${rpm_version_release}
elif [ "${install_from}" = "local" ] ; then
# cached pkg install
pkgs=("yum-utils openssl-static zlib-static")
if [[ "$ID" =~ rocky|fedora ]]; then
if [[ "$ID" =~ "rocky" ]]; then
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/Rocky-PowerTools.repo
fi
pkgs="${pkgs[@]/openssl-static}"
fi
yum install -y $pkgs
rm -f build/rpm/packages/rippled-debug*.rpm
rm -f build/rpm/packages/rippled-devel*.rpm
rm -f build/rpm/packages/*.src.rpm
rpm -i build/rpm/packages/*.rpm
else
Expand Down
3 changes: 2 additions & 1 deletion src/ripple/app/misc/impl/Transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ Transaction::getJson(JsonOptions options, bool binary) const
Json::Value ret(
mTransaction->getJson(options & ~JsonOptions::include_date, binary));

if (mLedgerIndex)
// NOTE Binary STTx::getJson output might not be a JSON object
if (ret.isObject() && mLedgerIndex)
{
if (!(options & JsonOptions::disable_API_prior_V2))
{
Expand Down
Loading