mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 19:25:51 +00:00
Compare commits
308 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c56d9fc3e | ||
|
|
6b61505ac2 | ||
|
|
e4db0fba2b | ||
|
|
8f89694fae | ||
|
|
5433e133d5 | ||
|
|
2487dab194 | ||
|
|
77e0912a0e | ||
|
|
a948203dae | ||
|
|
8f65bc24a0 | ||
|
|
9f102fc99d | ||
|
|
7bff9dc7f0 | ||
|
|
e86181c096 | ||
|
|
65df4bceaa | ||
|
|
3397922989 | ||
|
|
046d0c2f0a | ||
|
|
01fc4b0203 | ||
|
|
5b7d2c133a | ||
|
|
237b406e8c | ||
|
|
5427321260 | ||
|
|
ce570c166d | ||
|
|
649c11a78e | ||
|
|
7fae1c1262 | ||
|
|
f259cc1ab6 | ||
|
|
002893f280 | ||
|
|
1d9db1bfdd | ||
|
|
3b5fcd5873 | ||
|
|
a95505739d | ||
|
|
31c8281922 | ||
|
|
c6f6375015 | ||
|
|
6f74a745db | ||
|
|
36cb5f90e2 | ||
|
|
89780c8e4f | ||
|
|
9d4d8c22d9 | ||
|
|
b014b79d88 | ||
|
|
a61a88ea81 | ||
|
|
f31c50d04d | ||
|
|
8ceb0f3a79 | ||
|
|
d943c58b3d | ||
|
|
7ca1c644d1 | ||
|
|
300b7e078a | ||
|
|
3574956e5e | ||
|
|
e8a7b2a1fc | ||
|
|
b580049ec0 | ||
|
|
21c4aaf993 | ||
|
|
213491d94b | ||
|
|
da203b241b | ||
|
|
5d88b726c2 | ||
|
|
dcb7dd8d27 | ||
|
|
91e9658217 | ||
|
|
b28f62bbd9 | ||
|
|
4f4951022c | ||
|
|
58f7aecb0b | ||
|
|
5530a0b665 | ||
|
|
aded4a7a92 | ||
|
|
01df19c08b | ||
|
|
c197c4cdd9 | ||
|
|
5ba1f984df | ||
|
|
cb09e61d2f | ||
|
|
3c9db4b69e | ||
|
|
eeb8b41889 | ||
|
|
f7dd37e355 | ||
|
|
a45a95e5ea | ||
|
|
c6fee28b92 | ||
|
|
77dc63b549 | ||
|
|
66bfe909e6 | ||
|
|
9c50415ebe | ||
|
|
516ffb2147 | ||
|
|
f18c6dfea7 | ||
|
|
1cb67fbd20 | ||
|
|
54afdaa101 | ||
|
|
1c2ae10dc0 | ||
|
|
d34e8be316 | ||
|
|
4111382a31 | ||
|
|
11e914fbe9 | ||
|
|
0e983528e1 | ||
|
|
6b4437db39 | ||
|
|
534a36536c | ||
|
|
beba87129e | ||
|
|
b7e902dccc | ||
|
|
9eb30d4316 | ||
|
|
8fdad0d7fd | ||
|
|
0b812cdece | ||
|
|
724a301599 | ||
|
|
71d7d67fa3 | ||
|
|
264280edd7 | ||
|
|
beb0904a32 | ||
|
|
77c0a62a74 | ||
|
|
5d011c7e6b | ||
|
|
5644c8704f | ||
|
|
c9a586c243 | ||
|
|
f709311762 | ||
|
|
adde0c2d11 | ||
|
|
adf672ff83 | ||
|
|
029580886e | ||
|
|
32f8ae1af1 | ||
|
|
ce997a6de8 | ||
|
|
3620ac287e | ||
|
|
629ed5c691 | ||
|
|
78076a6903 | ||
|
|
67238b9fa6 | ||
|
|
c7ef4c9783 | ||
|
|
b21a05d465 | ||
|
|
436de0e03a | ||
|
|
8d482d3557 | ||
|
|
c5003969de | ||
|
|
1f417764c3 | ||
|
|
e75cd49313 | ||
|
|
4f95b9d7a6 | ||
|
|
066f91ca07 | ||
|
|
c3acbce82d | ||
|
|
b7f588b789 | ||
|
|
9346842eed | ||
|
|
f191c911d4 | ||
|
|
e6f49040f5 | ||
|
|
2f3f6dcb03 | ||
|
|
5ebcaf0a6c | ||
|
|
8bfdbcbab5 | ||
|
|
135b63dbe0 | ||
|
|
46167d1c46 | ||
|
|
79e621d96c | ||
|
|
66627b26cf | ||
|
|
7aad6e5127 | ||
|
|
dffcdea12b | ||
|
|
d7725837f5 | ||
|
|
7745c72b2c | ||
|
|
acb373280b | ||
|
|
4f506599f6 | ||
|
|
383f1b6ab3 | ||
|
|
da18c86cbf | ||
|
|
9fcb28acad | ||
|
|
305c9a8d61 | ||
|
|
9b2d563dec | ||
|
|
150d4a47e4 | ||
|
|
1c9df69b33 | ||
|
|
10555faa92 | ||
|
|
0f1ffff068 | ||
|
|
9309b57364 | ||
|
|
cb08f2b6ec | ||
|
|
84cde3ce0b | ||
|
|
f7b3ddd87b | ||
|
|
1e7710eee2 | ||
|
|
07f047b1e2 | ||
|
|
8687b5c3c9 | ||
|
|
ecd49e1535 | ||
|
|
c77a8d5ec6 | ||
|
|
e13676f709 | ||
|
|
74594d5348 | ||
|
|
caf4827c0b | ||
|
|
c2b03fecca | ||
|
|
60c276d90b | ||
|
|
2929748898 | ||
|
|
5ec8783d35 | ||
|
|
96aab1288f | ||
|
|
aebf2ac990 | ||
|
|
ac78b7a9a7 | ||
|
|
b72a87c7d3 | ||
|
|
39c32561bd | ||
|
|
89aa8b21ec | ||
|
|
a828e24cf0 | ||
|
|
f7a8d2de84 | ||
|
|
32559463ef | ||
|
|
8f514937a4 | ||
|
|
36b34a7bd5 | ||
|
|
5edaec2bd0 | ||
|
|
2f1f453052 | ||
|
|
6eaaa7bcfa | ||
|
|
e354497f63 | ||
|
|
6fcd654bee | ||
|
|
d275a2ab72 | ||
|
|
3f33471220 | ||
|
|
a82ad5ba76 | ||
|
|
48e804c40c | ||
|
|
c9c54c9799 | ||
|
|
24fe5f9fd0 | ||
|
|
476ee8a479 | ||
|
|
0ee63b7c7b | ||
|
|
31e7e5a56e | ||
|
|
e4b17d1cf2 | ||
|
|
0ce15e0e35 | ||
|
|
b0e0f319a1 | ||
|
|
2233f585f8 | ||
|
|
61d8c7a85b | ||
|
|
6f8750316c | ||
|
|
fda9e9a7ee | ||
|
|
d8a84e9530 | ||
|
|
c3a9f3dbf3 | ||
|
|
df1300fb37 | ||
|
|
648d6c3e2f | ||
|
|
47ffc392d7 | ||
|
|
0362e935af | ||
|
|
a79fa2026b | ||
|
|
c1e7fe2d93 | ||
|
|
4a5ad4cfac | ||
|
|
ffd453f7dd | ||
|
|
518fb6d208 | ||
|
|
093055c039 | ||
|
|
b7ac73c8e4 | ||
|
|
004ec2d201 | ||
|
|
ebbf4b64a5 | ||
|
|
649ab872ff | ||
|
|
7e9e9104ea | ||
|
|
3726f8bf31 | ||
|
|
e37dc710cf | ||
|
|
5d38e4cfbf | ||
|
|
28f4cc7817 | ||
|
|
95fabd5762 | ||
|
|
23ce431876 | ||
|
|
04ef885108 | ||
|
|
d33df35378 | ||
|
|
ba3c0e5145 | ||
|
|
be1ce5eca9 | ||
|
|
df66e4151e | ||
|
|
9a31f321cd | ||
|
|
e40e38e8d3 | ||
|
|
f5af42a640 | ||
|
|
fe05b8c4fe | ||
|
|
7b3507bb87 | ||
|
|
0ecfc7cb1a | ||
|
|
e2eed966b0 | ||
|
|
5a15229eeb | ||
|
|
d318ab612a | ||
|
|
9aaa0dff5f | ||
|
|
b88ed5a8ec | ||
|
|
ce64f7a90f | ||
|
|
5e1cb09b88 | ||
|
|
3d0c14f3e3 | ||
|
|
83ac141f65 | ||
|
|
e67f90588a | ||
|
|
69bb2be446 | ||
|
|
92d35e54c7 | ||
|
|
47dec467ea | ||
|
|
cd3a6bf530 | ||
|
|
6a9c270776 | ||
|
|
21a3f4a5b5 | ||
|
|
e5275b8577 | ||
|
|
83faf43140 | ||
|
|
22b4de2e44 | ||
|
|
b95ca98965 | ||
|
|
7e46f5342b | ||
|
|
59326bbbc5 | ||
|
|
9eb303f8e8 | ||
|
|
47ccd0b579 | ||
|
|
5e6728dccd | ||
|
|
d458e9972b | ||
|
|
b0b44d32bd | ||
|
|
8266d9d598 | ||
|
|
0839a202c9 | ||
|
|
ee60b16b3a | ||
|
|
18d437284e | ||
|
|
1f75ba23ee | ||
|
|
723733a778 | ||
|
|
8e6a0d418c | ||
|
|
f55913dcee | ||
|
|
e46d2bcf27 | ||
|
|
d632f9f6c8 | ||
|
|
3172a816fa | ||
|
|
4e724794c5 | ||
|
|
610436d737 | ||
|
|
0ee6f15b35 | ||
|
|
e32bc674aa | ||
|
|
34786abd4f | ||
|
|
d0a813a19d | ||
|
|
25474343a9 | ||
|
|
670bc22cfa | ||
|
|
80bda7cc48 | ||
|
|
dac080f1c8 | ||
|
|
767dd4ff3f | ||
|
|
01c37fed69 | ||
|
|
04bd5878f1 | ||
|
|
e836375d99 | ||
|
|
aa4a5b7fe9 | ||
|
|
5aedb0e07a | ||
|
|
dfe69f1b76 | ||
|
|
87d06a2571 | ||
|
|
7ca1f78446 | ||
|
|
b68a66928c | ||
|
|
245174c42c | ||
|
|
7c66747d27 | ||
|
|
cdd37a2a05 | ||
|
|
c66be3e6cf | ||
|
|
70779f6850 | ||
|
|
525aaecbca | ||
|
|
9d3cd718e4 | ||
|
|
656e9fe180 | ||
|
|
8aa617d972 | ||
|
|
711608e652 | ||
|
|
bc9773eb45 | ||
|
|
bea9610440 | ||
|
|
375af87a86 | ||
|
|
1502e6e2cd | ||
|
|
593677ee82 | ||
|
|
8f58687091 | ||
|
|
c7e6803956 | ||
|
|
6faaa91850 | ||
|
|
d66d960d59 | ||
|
|
18235067af | ||
|
|
3eb8aa8b80 | ||
|
|
b9903bbcc4 | ||
|
|
48803a48af | ||
|
|
1b9387eddc | ||
|
|
34ca457132 | ||
|
|
df60e46750 | ||
|
|
e7e672c3f8 | ||
|
|
4d5459d041 | ||
|
|
59f5844381 | ||
|
|
a07a729e3d | ||
|
|
b65e279db6 | ||
|
|
1ddc966b31 |
3
.github/ISSUE_TEMPLATE/config.yml
vendored
3
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -3,9 +3,6 @@ contact_links:
|
||||
- name: XRP Ledger Documentation
|
||||
url: https://xrpl.org/
|
||||
about: All things about XRPL
|
||||
- name: General question for the community
|
||||
url: https://forum.xpring.io/c/community/
|
||||
about: Please ask and answer questions here.
|
||||
- name: Security bug bounty program
|
||||
url: https://ripple.com/bug-bounty/
|
||||
about: Please report security-relevant bugs in our software here.
|
||||
|
||||
33
.github/actions/build/action.yml
vendored
Normal file
33
.github/actions/build/action.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: build
|
||||
inputs:
|
||||
generator:
|
||||
default: null
|
||||
configuration:
|
||||
required: true
|
||||
cmake-args:
|
||||
default: null
|
||||
# An implicit input is the environment variable `build_dir`.
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: dependencies
|
||||
uses: ./.github/actions/dependencies
|
||||
with:
|
||||
configuration: ${{ inputs.configuration }}
|
||||
- name: configure
|
||||
shell: bash
|
||||
run: |
|
||||
cd ${build_dir}
|
||||
cmake \
|
||||
${{ inputs.generator && format('-G {0}', inputs.generator) || '' }} \
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
||||
-DCMAKE_BUILD_TYPE=${{ inputs.configuration }} \
|
||||
${{ inputs.cmake-args }} \
|
||||
..
|
||||
- name: build
|
||||
shell: bash
|
||||
run: |
|
||||
cmake \
|
||||
--build ${build_dir} \
|
||||
--config ${{ inputs.configuration }} \
|
||||
--parallel ${NUM_PROCESSORS:-$(nproc)}
|
||||
26
.github/actions/dependencies/action.yml
vendored
Normal file
26
.github/actions/dependencies/action.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: dependencies
|
||||
inputs:
|
||||
configuration:
|
||||
required: true
|
||||
# An implicit input is the environment variable `build_dir`.
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: unlock Conan
|
||||
shell: bash
|
||||
run: conan remove --locks
|
||||
- name: export custom recipes
|
||||
shell: bash
|
||||
run: |
|
||||
conan export external/snappy snappy/1.1.10@
|
||||
conan export external/soci soci/4.0.3@
|
||||
- name: install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ${build_dir}
|
||||
cd ${build_dir}
|
||||
conan install \
|
||||
--output-folder . \
|
||||
--build missing \
|
||||
--settings build_type=${{ inputs.configuration }} \
|
||||
..
|
||||
9
.github/workflows/clang-format.yml
vendored
9
.github/workflows/clang-format.yml
vendored
@@ -4,16 +4,17 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CLANG_VERSION: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install clang-format
|
||||
run: |
|
||||
codename=$( lsb_release --codename --short )
|
||||
sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null <<EOF
|
||||
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${CLANG_VERSION} main
|
||||
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${CLANG_VERSION} main
|
||||
deb http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
||||
deb-src http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
||||
EOF
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add
|
||||
sudo apt-get update
|
||||
|
||||
16
.github/workflows/doxygen.yml
vendored
16
.github/workflows/doxygen.yml
vendored
@@ -1,22 +1,32 @@
|
||||
name: Build and publish Doxygen documentation
|
||||
# To test this workflow, push your changes to your fork's `develop` branch.
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
job:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://rippleci/rippled-ci-builder:2944b78d22db
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: check environment
|
||||
run: |
|
||||
echo ${PATH} | tr ':' '\n'
|
||||
cmake --version
|
||||
doxygen --version
|
||||
env | sort
|
||||
- name: build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DBoost_NO_BOOST_CMAKE=ON ..
|
||||
cmake -Donly_docs=TRUE ..
|
||||
cmake --build . --target docs --parallel $(nproc)
|
||||
- name: publish
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
|
||||
4
.github/workflows/levelization.yml
vendored
4
.github/workflows/levelization.yml
vendored
@@ -4,11 +4,11 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CLANG_VERSION: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check levelization
|
||||
run: Builds/levelization/levelization.sh
|
||||
- name: Check for differences
|
||||
|
||||
47
.github/workflows/macos.yml
vendored
Normal file
47
.github/workflows/macos.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: macos
|
||||
on: [push, pull_request]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- macos
|
||||
generator:
|
||||
- Ninja
|
||||
configuration:
|
||||
- Release
|
||||
runs-on: [self-hosted, macOS]
|
||||
env:
|
||||
# The `build` action requires these variables.
|
||||
build_dir: .build
|
||||
NUM_PROCESSORS: 12
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: install Ninja
|
||||
if: matrix.generator == 'Ninja'
|
||||
run: brew install ninja
|
||||
- name: check environment
|
||||
run: |
|
||||
echo ${PATH} | tr ':' '\n'
|
||||
python --version
|
||||
conan --version
|
||||
cmake --version
|
||||
env | sort
|
||||
- name: configure Conan
|
||||
run : |
|
||||
conan profile get env.CXXFLAGS default || true
|
||||
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
|
||||
- name: build
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
generator: ${{ matrix.generator }}
|
||||
configuration: ${{ matrix.configuration }}
|
||||
- name: test
|
||||
run: |
|
||||
${build_dir}/rippled --unittest
|
||||
157
.github/workflows/nix.yml
vendored
Normal file
157
.github/workflows/nix.yml
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
name: nix
|
||||
on: [push, pull_request]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
# This workflow has two job matrixes.
|
||||
# They can be considered phases because the second matrix ("test")
|
||||
# depends on the first ("dependencies").
|
||||
#
|
||||
# The first phase has a job in the matrix for each combination of
|
||||
# variables that affects dependency ABI:
|
||||
# platform, compiler, and configuration.
|
||||
# It creates a GitHub artifact holding the Conan profile,
|
||||
# and builds and caches binaries for all the dependencies.
|
||||
# If an Artifactory remote is configured, they are cached there.
|
||||
# If not, they are added to the GitHub artifact.
|
||||
# GitHub's "cache" action has a size limit (10 GB) that is too small
|
||||
# to hold the binaries if they are built locally.
|
||||
# We must use the "{upload,download}-artifact" actions instead.
|
||||
#
|
||||
# The second phase has a job in the matrix for each test configuration.
|
||||
# It installs dependency binaries from the cache, whichever was used,
|
||||
# and builds and tests rippled.
|
||||
|
||||
jobs:
|
||||
|
||||
dependencies:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- linux
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
configuration:
|
||||
- Debug
|
||||
- Release
|
||||
include:
|
||||
- compiler: gcc
|
||||
profile:
|
||||
version: 11
|
||||
cc: /usr/bin/gcc
|
||||
cxx: /usr/bin/g++
|
||||
- compiler: clang
|
||||
profile:
|
||||
version: 14
|
||||
cc: /usr/bin/clang-14
|
||||
cxx: /usr/bin/clang++-14
|
||||
runs-on: [self-hosted, heavy]
|
||||
container: thejohnfreeman/rippled-build-ubuntu:12e19cd9034b
|
||||
env:
|
||||
build_dir: .build
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: check environment
|
||||
run: |
|
||||
echo ${PATH} | tr ':' '\n'
|
||||
conan --version
|
||||
cmake --version
|
||||
env | sort
|
||||
- name: configure Conan
|
||||
env:
|
||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
||||
run: |
|
||||
conan profile new default --detect
|
||||
conan profile update settings.compiler.cppstd=20 default
|
||||
conan profile update settings.compiler=${{ matrix.compiler }} default
|
||||
conan profile update settings.compiler.version=${{ matrix.profile.version }} default
|
||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
||||
conan profile update env.CC=${{ matrix.profile.cc }} default
|
||||
conan profile update env.CXX=${{ matrix.profile.cxx }} default
|
||||
conan profile update conf.tools.build:compiler_executables='{"c": "${{ matrix.profile.cc }}", "cpp": "${{ matrix.profile.cxx }}"}' default
|
||||
# Do not quote the URL. An empty string will be accepted (with
|
||||
# a non-fatal warning), but a missing argument will not.
|
||||
conan remote add ripple ${{ env.CONAN_URL }} --insert 0
|
||||
- name: try to authenticate to ripple Conan remote
|
||||
id: remote
|
||||
run: |
|
||||
echo outcome=$(conan user --remote ripple ${{ secrets.CONAN_USERNAME }} --password ${{ secrets.CONAN_TOKEN }} && echo success || echo failure) | tee ${GITHUB_OUTPUT}
|
||||
- name: archive profile
|
||||
# Create this archive before dependencies are added to the local cache.
|
||||
run: tar -czf conan.tar -C ~/.conan .
|
||||
- name: list missing binaries
|
||||
id: binaries
|
||||
# Print the list of dependencies that would need to be built locally.
|
||||
# A non-empty list means we have "failed" to cache binaries remotely.
|
||||
run: |
|
||||
echo missing=$(conan info . --build missing --json 2>/dev/null | grep '^\[') | tee ${GITHUB_OUTPUT}
|
||||
- name: build dependencies
|
||||
if: (steps.binaries.outputs.missing != '[]')
|
||||
uses: ./.github/actions/dependencies
|
||||
with:
|
||||
configuration: ${{ matrix.configuration }}
|
||||
- name: upload dependencies to remote
|
||||
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'success')
|
||||
run: conan upload --remote ripple '*' --all --parallel --confirm
|
||||
- name: recreate archive with dependencies
|
||||
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'failure')
|
||||
run: tar -czf conan.tar -C ~/.conan .
|
||||
- name: upload archive
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||
path: conan.tar
|
||||
if-no-files-found: error
|
||||
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- linux
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
configuration:
|
||||
- Debug
|
||||
- Release
|
||||
cmake-args:
|
||||
-
|
||||
- "-Dunity=ON"
|
||||
needs: dependencies
|
||||
runs-on: [self-hosted, heavy]
|
||||
container: thejohnfreeman/rippled-build-ubuntu:12e19cd9034b
|
||||
env:
|
||||
build_dir: .build
|
||||
steps:
|
||||
- name: download cache
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||
- name: extract cache
|
||||
run: |
|
||||
mkdir -p ~/.conan
|
||||
tar -xzf conan.tar -C ~/.conan
|
||||
- name: check environment
|
||||
run: |
|
||||
echo ${PATH} | tr ':' '\n'
|
||||
conan --version
|
||||
cmake --version
|
||||
env | sort
|
||||
ls ~/.conan
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: build
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
generator: Ninja
|
||||
configuration: ${{ matrix.configuration }}
|
||||
cmake-args: ${{ matrix.cmake-args }}
|
||||
- name: test
|
||||
run: |
|
||||
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
||||
99
.github/workflows/windows.yml
vendored
Normal file
99
.github/workflows/windows.yml
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
name: windows
|
||||
# We have disabled this workflow because it fails in our CI Windows
|
||||
# environment, but we cannot replicate the failure in our personal Windows
|
||||
# test environments, nor have we gone through the trouble of setting up an
|
||||
# interactive CI Windows environment.
|
||||
# We welcome contributions to diagnose or debug the problems on Windows. Until
|
||||
# then, we leave this tombstone as a reminder that we have tried (but failed)
|
||||
# to write a reliable test for Windows.
|
||||
# on: [push, pull_request]
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- 'action'
|
||||
paths:
|
||||
- '.github/workflow/windows.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
generator:
|
||||
- Visual Studio 16 2019
|
||||
configuration:
|
||||
- Release
|
||||
runs-on: windows-2019
|
||||
env:
|
||||
build_dir: .build
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: choose Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: learn Python cache directory
|
||||
id: pip-cache
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
||||
- name: restore Python cache directory
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/windows.yml') }}
|
||||
- name: install Conan
|
||||
run: pip install wheel 'conan<2'
|
||||
- name: check environment
|
||||
run: |
|
||||
$env:PATH -split ';'
|
||||
python --version
|
||||
conan --version
|
||||
cmake --version
|
||||
dir env:
|
||||
- name: configure Conan
|
||||
run: |
|
||||
conan profile new default --detect
|
||||
conan profile update settings.compiler.cppstd=20 default
|
||||
conan profile update settings.compiler.runtime=MT default
|
||||
conan profile update settings.compiler.toolset=v141 default
|
||||
- name: learn Conan cache directory
|
||||
id: conan-cache
|
||||
run: |
|
||||
echo "dir=$(conan config get storage.path)" >> $GITHUB_OUTPUT
|
||||
- name: restore Conan cache directory
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.conan-cache.outputs.dir }}
|
||||
key: ${{ hashFiles('~/.conan/profiles/default', 'conanfile.py', 'external/rocksdb/*', '.github/workflows/windows.yml') }}
|
||||
- name: export custom recipes
|
||||
run: |
|
||||
conan export external/snappy snappy/1.1.9@
|
||||
conan export external/soci soci/4.0.3@
|
||||
- name: install dependencies
|
||||
run: |
|
||||
mkdir $env:build_dir
|
||||
cd $env:build_dir
|
||||
conan install .. --build missing --settings build_type=${{ matrix.configuration }}
|
||||
- name: configure
|
||||
run: |
|
||||
$env:build_dir
|
||||
cd $env:build_dir
|
||||
pwd
|
||||
ls
|
||||
cmake `
|
||||
-G "${{ matrix.generator }}" `
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake `
|
||||
-Dassert=ON `
|
||||
-Dreporting=OFF `
|
||||
-Dunity=OFF `
|
||||
..
|
||||
- name: build
|
||||
run: |
|
||||
cmake --build $env:build_dir --target rippled --config ${{ matrix.configuration }} --parallel $env:NUMBER_OF_PROCESSORS
|
||||
- name: test
|
||||
run: |
|
||||
& "$env:build_dir\${{ matrix.configuration }}\rippled.exe" --unittest
|
||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -21,7 +21,6 @@ bin/project-cache.jam
|
||||
|
||||
# Ignore object files.
|
||||
*.o
|
||||
build
|
||||
.nih_c
|
||||
tags
|
||||
TAGS
|
||||
@@ -65,7 +64,7 @@ docs/html_doc
|
||||
# Xcode user-specific project settings
|
||||
# Xcode
|
||||
.DS_Store
|
||||
*/build/*
|
||||
/build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
@@ -104,3 +103,12 @@ Builds/VisualStudio2015/*.sdf
|
||||
CMakeSettings.json
|
||||
compile_commands.json
|
||||
.clangd
|
||||
packages
|
||||
pkg_out
|
||||
pkg
|
||||
CMakeUserPresets.json
|
||||
bld.rippled/
|
||||
.vscode
|
||||
|
||||
# Suggested in-tree build directory
|
||||
/.build/
|
||||
|
||||
169
.gitlab-ci.yml
169
.gitlab-ci.yml
@@ -1,169 +0,0 @@
|
||||
# I don't know what the minimum size is, but we cannot build on t3.micro.
|
||||
|
||||
# TODO: Factor common builds between different tests.
|
||||
|
||||
# The parameters for our job matrix:
|
||||
#
|
||||
# 1. Generator (Make, Ninja, MSBuild)
|
||||
# 2. Compiler (GCC, Clang, MSVC)
|
||||
# 3. Build type (Debug, Release)
|
||||
# 4. Definitions (-Dunity=OFF, -Dassert=ON, ...)
|
||||
|
||||
|
||||
.job_linux_build_test:
|
||||
only:
|
||||
variables:
|
||||
- $CI_PROJECT_URL =~ /^https?:\/\/gitlab.com\//
|
||||
stage: build
|
||||
tags:
|
||||
- linux
|
||||
- c5.2xlarge
|
||||
image: thejohnfreeman/rippled-build-ubuntu:4b73694e07f0
|
||||
script:
|
||||
- bin/ci/build.sh
|
||||
- bin/ci/test.sh
|
||||
cache:
|
||||
# Use a different key for each unique combination of (generator, compiler,
|
||||
# build type). Caches are stored as `.zip` files; they are not merged.
|
||||
# Generate a new key whenever you want to bust the cache, e.g. when the
|
||||
# dependency versions have been bumped.
|
||||
# By default, jobs pull the cache. Only a few specially chosen jobs update
|
||||
# the cache (with policy `pull-push`); one for each unique combination of
|
||||
# (generator, compiler, build type).
|
||||
policy: pull
|
||||
paths:
|
||||
- .nih_c/
|
||||
|
||||
'build+test Make GCC Debug':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Unix Makefiles
|
||||
COMPILER: gcc
|
||||
BUILD_TYPE: Debug
|
||||
cache:
|
||||
key: 62ada41c-fc9e-4949-9533-736d4d6512b6
|
||||
policy: pull-push
|
||||
|
||||
'build+test Ninja GCC Debug':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: gcc
|
||||
BUILD_TYPE: Debug
|
||||
cache:
|
||||
key: 1665d3eb-6233-4eef-9f57-172636899faa
|
||||
policy: pull-push
|
||||
|
||||
'build+test Ninja GCC Debug -Dstatic=OFF':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: gcc
|
||||
BUILD_TYPE: Debug
|
||||
CMAKE_ARGS: '-Dstatic=OFF'
|
||||
cache:
|
||||
key: 1665d3eb-6233-4eef-9f57-172636899faa
|
||||
|
||||
'build+test Ninja GCC Debug -Dstatic=OFF -DBUILD_SHARED_LIBS=ON':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: gcc
|
||||
BUILD_TYPE: Debug
|
||||
CMAKE_ARGS: '-Dstatic=OFF -DBUILD_SHARED_LIBS=ON'
|
||||
cache:
|
||||
key: 1665d3eb-6233-4eef-9f57-172636899faa
|
||||
|
||||
'build+test Ninja GCC Debug -Dunity=OFF':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: gcc
|
||||
BUILD_TYPE: Debug
|
||||
CMAKE_ARGS: '-Dunity=OFF'
|
||||
cache:
|
||||
key: 1665d3eb-6233-4eef-9f57-172636899faa
|
||||
|
||||
'build+test Ninja GCC Release -Dassert=ON':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: gcc
|
||||
BUILD_TYPE: Release
|
||||
CMAKE_ARGS: '-Dassert=ON'
|
||||
cache:
|
||||
key: c45ec125-9625-4c19-acf7-4e889d5f90bd
|
||||
policy: pull-push
|
||||
|
||||
'build+test(manual) Ninja GCC Release -Dassert=ON':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: gcc
|
||||
BUILD_TYPE: Release
|
||||
CMAKE_ARGS: '-Dassert=ON'
|
||||
MANUAL_TEST: 'true'
|
||||
cache:
|
||||
key: c45ec125-9625-4c19-acf7-4e889d5f90bd
|
||||
|
||||
'build+test Make clang Debug':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Unix Makefiles
|
||||
COMPILER: clang
|
||||
BUILD_TYPE: Debug
|
||||
cache:
|
||||
key: bf578dc2-5277-4580-8de5-6b9523118b19
|
||||
policy: pull-push
|
||||
|
||||
'build+test Ninja clang Debug':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: clang
|
||||
BUILD_TYPE: Debug
|
||||
cache:
|
||||
key: 762514c5-3d4c-4c7c-8da2-2df9d8839cbe
|
||||
policy: pull-push
|
||||
|
||||
'build+test Ninja clang Debug -Dunity=OFF':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: clang
|
||||
BUILD_TYPE: Debug
|
||||
CMAKE_ARGS: '-Dunity=OFF'
|
||||
cache:
|
||||
key: 762514c5-3d4c-4c7c-8da2-2df9d8839cbe
|
||||
|
||||
'build+test Ninja clang Debug -Dunity=OFF -Dsan=address':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: clang
|
||||
BUILD_TYPE: Debug
|
||||
CMAKE_ARGS: '-Dunity=OFF -Dsan=address'
|
||||
CONCURRENT_TESTS: 1
|
||||
cache:
|
||||
key: 762514c5-3d4c-4c7c-8da2-2df9d8839cbe
|
||||
|
||||
'build+test Ninja clang Debug -Dunity=OFF -Dsan=undefined':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: clang
|
||||
BUILD_TYPE: Debug
|
||||
CMAKE_ARGS: '-Dunity=OFF -Dsan=undefined'
|
||||
cache:
|
||||
key: 762514c5-3d4c-4c7c-8da2-2df9d8839cbe
|
||||
|
||||
'build+test Ninja clang Release -Dassert=ON':
|
||||
extends: .job_linux_build_test
|
||||
variables:
|
||||
GENERATOR: Ninja
|
||||
COMPILER: clang
|
||||
BUILD_TYPE: Release
|
||||
CMAKE_ARGS: '-Dassert=ON'
|
||||
cache:
|
||||
key: 7751be37-2358-4f08-b1d0-7e72e0ad266d
|
||||
policy: pull-push
|
||||
6
.pre-commit-config.yaml
Normal file
6
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# .pre-commit-config.yaml
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v10.0.1
|
||||
hooks:
|
||||
- id: clang-format
|
||||
460
.travis.yml
460
.travis.yml
@@ -1,460 +0,0 @@
|
||||
# There is a known issue where Travis will have trouble fetching the cache,
|
||||
# particularly on non-linux builds. Try restarting the individual build
|
||||
# (probably will not be necessary in the "windep" stages) if the end of the
|
||||
# log looks like:
|
||||
#
|
||||
#---------------------------------------
|
||||
# attempting to download cache archive
|
||||
# fetching travisorder/cache--windows-1809-containers-f2bf1c76c7fb4095c897a4999bd7c9b3fb830414dfe91f33d665443b52416d39--compiler-gpp.tgz
|
||||
# found cache
|
||||
# adding C:/Users/travis/_cache to cache
|
||||
# creating directory C:/Users/travis/_cache
|
||||
# No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
|
||||
# Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
|
||||
# The build has been terminated
|
||||
#---------------------------------------
|
||||
|
||||
language: cpp
|
||||
dist: bionic
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
stages:
|
||||
- windep-vcpkg
|
||||
- windep-boost
|
||||
- build
|
||||
|
||||
env:
|
||||
global:
|
||||
- DOCKER_IMAGE="rippleci/rippled-ci-builder:2020-01-08"
|
||||
- CMAKE_EXTRA_ARGS="-Dwerr=ON -Dwextra=ON"
|
||||
- NINJA_BUILD=true
|
||||
# change this if we get more VM capacity
|
||||
- MAX_TIME_MIN=80
|
||||
- CACHE_DIR=${TRAVIS_HOME}/_cache
|
||||
- NIH_CACHE_ROOT=${CACHE_DIR}/nih_c
|
||||
- PARALLEL_TESTS=true
|
||||
# this is NOT used by linux container based builds (which already have boost installed)
|
||||
- BOOST_URL='https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz'
|
||||
# Alternate dowload location
|
||||
- BOOST_URL2='https://downloads.sourceforge.net/project/boost/boost/1.75.0/boost_1_75_0.tar.bz2?r=&ts=1594393912&use_mirror=newcontinuum'
|
||||
# Travis downloader doesn't seem to have updated certs. Using this option
|
||||
# introduces obvious security risks, but they're Travis's risks.
|
||||
# Note that this option is only used if the "normal" build fails.
|
||||
- BOOST_WGET_OPTIONS='--no-check-certificate'
|
||||
- VCPKG_DIR=${CACHE_DIR}/vcpkg
|
||||
- USE_CCACHE=true
|
||||
- CCACHE_BASEDIR=${TRAVIS_HOME}"
|
||||
- CCACHE_NOHASHDIR=true
|
||||
- CCACHE_DIR=${CACHE_DIR}/ccache
|
||||
|
||||
before_install:
|
||||
- export NUM_PROCESSORS=$(nproc)
|
||||
- echo "NUM PROC is ${NUM_PROCESSORS}"
|
||||
- if [ "$(uname)" = "Linux" ] ; then docker pull ${DOCKER_IMAGE}; fi
|
||||
- if [ "${MATRIX_EVAL}" != "" ] ; then eval "${MATRIX_EVAL}"; fi
|
||||
- if [ "${CMAKE_ADD}" != "" ] ; then export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} ${CMAKE_ADD}"; fi
|
||||
- bin/ci/ubuntu/travis-cache-start.sh
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
# TODO these need more investigation
|
||||
#
|
||||
# there are a number of UBs caught currently that need triage
|
||||
- name: ubsan, clang-8
|
||||
# this one often runs out of memory:
|
||||
- name: manual tests, gcc-8, release
|
||||
# The Windows build may fail if any of the dependencies fail, but
|
||||
# allow the rest of the builds to continue. They may succeed if the
|
||||
# dependency is already cached. These do not need to be retried if
|
||||
# _any_ of the Windows builds succeed.
|
||||
- stage: windep-vcpkg
|
||||
- stage: windep-boost
|
||||
|
||||
# https://docs.travis-ci.com/user/build-config-yaml#usage-of-yaml-anchors-and-aliases
|
||||
include:
|
||||
# debug builds
|
||||
- &linux
|
||||
stage: build
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/
|
||||
compiler: gcc-8
|
||||
name: gcc-8, debug
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
script:
|
||||
- sudo chmod -R a+rw ${CACHE_DIR}
|
||||
- ccache -s
|
||||
- travis_wait ${MAX_TIME_MIN} bin/ci/ubuntu/build-in-docker.sh
|
||||
- ccache -s
|
||||
- <<: *linux
|
||||
compiler: clang-8
|
||||
name: clang-8, debug
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- <<: *linux
|
||||
compiler: clang-8
|
||||
name: reporting, clang-8, debug
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dreporting=ON"
|
||||
# coverage builds
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_cov/
|
||||
compiler: gcc-8
|
||||
name: coverage, gcc-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dcoverage=ON"
|
||||
- TARGET=coverage_report
|
||||
- SKIP_TESTS=true
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_cov/
|
||||
compiler: clang-8
|
||||
name: coverage, clang-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dcoverage=ON"
|
||||
- TARGET=coverage_report
|
||||
- SKIP_TESTS=true
|
||||
# test-free builds
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/
|
||||
compiler: gcc-8
|
||||
name: no-tests-unity, gcc-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dtests=OFF"
|
||||
- SKIP_TESTS=true
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/
|
||||
compiler: clang-8
|
||||
name: no-tests-non-unity, clang-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dtests=OFF -Dunity=OFF"
|
||||
- SKIP_TESTS=true
|
||||
# nounity
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_nounity/
|
||||
compiler: gcc-8
|
||||
name: non-unity, gcc-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dunity=OFF"
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_nounity/
|
||||
compiler: clang-8
|
||||
name: non-unity, clang-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dunity=OFF"
|
||||
# manual tests
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_man/
|
||||
compiler: gcc-8
|
||||
name: manual tests, gcc-8, debug
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- MANUAL_TESTS=true
|
||||
# manual tests
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_man/
|
||||
compiler: gcc-8
|
||||
name: manual tests, gcc-8, release
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Release
|
||||
- CMAKE_ADD="-Dassert=ON -Dunity=OFF"
|
||||
- MANUAL_TESTS=true
|
||||
# release builds
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_release/
|
||||
compiler: gcc-8
|
||||
name: gcc-8, release
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Release
|
||||
- CMAKE_ADD="-Dassert=ON -Dunity=OFF"
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_release/
|
||||
compiler: clang-8
|
||||
name: clang-8, release
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
- BUILD_TYPE=Release
|
||||
- CMAKE_ADD="-Dassert=ON"
|
||||
# asan
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_san/
|
||||
compiler: clang-8
|
||||
name: asan, clang-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
- BUILD_TYPE=Release
|
||||
- CMAKE_ADD="-Dsan=address"
|
||||
- ASAN_OPTIONS="print_stats=true:atexit=true"
|
||||
#- LSAN_OPTIONS="verbosity=1:log_threads=1"
|
||||
- PARALLEL_TESTS=false
|
||||
# ubsan
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_san/
|
||||
compiler: clang-8
|
||||
name: ubsan, clang-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
- BUILD_TYPE=Release
|
||||
- CMAKE_ADD="-Dsan=undefined"
|
||||
# once we can run clean under ubsan, add halt_on_error=1 to options below
|
||||
- UBSAN_OPTIONS="print_stacktrace=1:report_error_type=1"
|
||||
- PARALLEL_TESTS=false
|
||||
# tsan
|
||||
# current tsan failure *might* be related to:
|
||||
# https://github.com/google/sanitizers/issues/1104
|
||||
# but we can't get it to run, so leave it disabled for now
|
||||
# - <<: *linux
|
||||
# if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_linux/ OR commit_message =~ /travis_run_san/
|
||||
# compiler: clang-8
|
||||
# name: tsan, clang-8
|
||||
# env:
|
||||
# - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
# - BUILD_TYPE=Release
|
||||
# - CMAKE_ADD="-Dsan=thread"
|
||||
# - TSAN_OPTIONS="history_size=3 external_symbolizer_path=/usr/bin/llvm-symbolizer verbosity=1"
|
||||
# - PARALLEL_TESTS=false
|
||||
# dynamic lib builds
|
||||
- <<: *linux
|
||||
compiler: gcc-8
|
||||
name: non-static, gcc-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dstatic=OFF"
|
||||
- <<: *linux
|
||||
compiler: gcc-8
|
||||
name: non-static + BUILD_SHARED_LIBS, gcc-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dstatic=OFF -DBUILD_SHARED_LIBS=ON"
|
||||
# makefile
|
||||
- <<: *linux
|
||||
compiler: gcc-8
|
||||
name: makefile generator, gcc-8
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- NINJA_BUILD=false
|
||||
# misc alternative compilers
|
||||
- <<: *linux
|
||||
compiler: gcc-9
|
||||
name: gcc-9
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
|
||||
- BUILD_TYPE=Debug
|
||||
- <<: *linux
|
||||
compiler: clang-9
|
||||
name: clang-9, debug
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-9 && CXX=clang++-9"
|
||||
- BUILD_TYPE=Debug
|
||||
- <<: *linux
|
||||
compiler: clang-9
|
||||
name: clang-9, release
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-9 && CXX=clang++-9"
|
||||
- BUILD_TYPE=Release
|
||||
# verify build with min version of cmake
|
||||
- <<: *linux
|
||||
compiler: gcc-8
|
||||
name: min cmake version
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_EXE=/opt/local/cmake/bin/cmake
|
||||
- SKIP_TESTS=true
|
||||
# validator keys project as subproj of rippled
|
||||
- <<: *linux
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_vkeys/
|
||||
compiler: gcc-8
|
||||
name: validator-keys
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||
- BUILD_TYPE=Debug
|
||||
- CMAKE_ADD="-Dvalidator_keys=ON"
|
||||
- TARGET=validator-keys
|
||||
# macos
|
||||
- &macos
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_mac/
|
||||
stage: build
|
||||
os: osx
|
||||
osx_image: xcode13.1
|
||||
name: xcode13.1, debug
|
||||
env:
|
||||
# put NIH in non-cache location since it seems to
|
||||
# cause failures when homebrew updates
|
||||
- NIH_CACHE_ROOT=${TRAVIS_BUILD_DIR}/nih_c
|
||||
- BLD_CONFIG=Debug
|
||||
- TEST_EXTRA_ARGS=""
|
||||
- BOOST_ROOT=${CACHE_DIR}/boost_1_75_0
|
||||
- >-
|
||||
CMAKE_ADD="
|
||||
-DBOOST_ROOT=${BOOST_ROOT}/_INSTALLED_
|
||||
-DBoost_ARCHITECTURE=-x64
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON"
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- protobuf
|
||||
- grpc
|
||||
- pkg-config
|
||||
- bash
|
||||
- ninja
|
||||
- cmake
|
||||
- wget
|
||||
- zstd
|
||||
- libarchive
|
||||
- openssl@1.1
|
||||
update: true
|
||||
install:
|
||||
- export OPENSSL_ROOT=$(brew --prefix openssl@1.1)
|
||||
- travis_wait ${MAX_TIME_MIN} Builds/containers/shared/install_boost.sh
|
||||
- brew uninstall --ignore-dependencies boost
|
||||
script:
|
||||
- mkdir -p build.macos && cd build.macos
|
||||
- cmake -G Ninja ${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=${BLD_CONFIG} ..
|
||||
- travis_wait ${MAX_TIME_MIN} cmake --build . --parallel --verbose
|
||||
- ./rippled --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS} ${TEST_EXTRA_ARGS}
|
||||
- <<: *macos
|
||||
name: xcode13.1, release
|
||||
before_script:
|
||||
- export BLD_CONFIG=Release
|
||||
- export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -Dassert=ON"
|
||||
- <<: *macos
|
||||
name: ipv6 (macos)
|
||||
before_script:
|
||||
- export TEST_EXTRA_ARGS="--unittest-ipv6"
|
||||
- <<: *macos
|
||||
osx_image: xcode13.1
|
||||
name: xcode13.1, debug
|
||||
# windows
|
||||
- &windows
|
||||
if: commit_message !~ /travis_run_/ OR commit_message =~ /travis_run_win/
|
||||
os: windows
|
||||
env:
|
||||
# put NIH in a non-cached location until
|
||||
# we come up with a way to stabilize that
|
||||
# cache on windows (minimize incremental changes)
|
||||
- CACHE_NAME=win_01
|
||||
- NIH_CACHE_ROOT=${TRAVIS_BUILD_DIR}/nih_c
|
||||
- VCPKG_DEFAULT_TRIPLET="x64-windows-static"
|
||||
- MATRIX_EVAL="CC=cl.exe && CXX=cl.exe"
|
||||
- BOOST_ROOT=${CACHE_DIR}/boost_1_75
|
||||
- >-
|
||||
CMAKE_ADD="
|
||||
-DCMAKE_PREFIX_PATH=${BOOST_ROOT}/_INSTALLED_
|
||||
-DBOOST_ROOT=${BOOST_ROOT}/_INSTALLED_
|
||||
-DBoost_ROOT=${BOOST_ROOT}/_INSTALLED_
|
||||
-DBoost_DIR=${BOOST_ROOT}/_INSTALLED_/lib/cmake/Boost-1.75.0
|
||||
-DBoost_COMPILER=vc141
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static"
|
||||
stage: windep-vcpkg
|
||||
name: prereq-vcpkg
|
||||
install:
|
||||
- choco upgrade cmake.install
|
||||
- choco install ninja visualstudio2017-workload-vctools -y
|
||||
script:
|
||||
- df -h
|
||||
- env
|
||||
- travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh openssl
|
||||
- travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh grpc
|
||||
- travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh libarchive[lz4]
|
||||
# TBD consider rocksdb via vcpkg if/when we can build with the
|
||||
# vcpkg version
|
||||
# - travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh rocksdb[snappy,lz4,zlib]
|
||||
- <<: *windows
|
||||
stage: windep-boost
|
||||
name: prereq-keep-boost
|
||||
install:
|
||||
- choco upgrade cmake.install
|
||||
- choco install ninja visualstudio2017-workload-vctools -y
|
||||
- choco install visualstudio2019buildtools visualstudio2019community visualstudio2019-workload-vctools -y
|
||||
script:
|
||||
- export BOOST_TOOLSET=msvc-14.1
|
||||
- travis_wait ${MAX_TIME_MIN} Builds/containers/shared/install_boost.sh
|
||||
- &windows-bld
|
||||
<<: *windows
|
||||
stage: build
|
||||
name: windows, debug
|
||||
before_script:
|
||||
- export BLD_CONFIG=Debug
|
||||
script:
|
||||
- df -h
|
||||
- . ./bin/sh/setup-msvc.sh
|
||||
- mkdir -p build.ms && cd build.ms
|
||||
- cmake -G Ninja ${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=${BLD_CONFIG} ..
|
||||
- travis_wait ${MAX_TIME_MIN} cmake --build . --parallel --verbose
|
||||
# override num procs to force fewer unit test jobs
|
||||
- export NUM_PROCESSORS=2
|
||||
- travis_wait ${MAX_TIME_MIN} ./rippled.exe --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS}
|
||||
- <<: *windows-bld
|
||||
name: windows, release
|
||||
before_script:
|
||||
- export BLD_CONFIG=Release
|
||||
- <<: *windows-bld
|
||||
name: windows, visual studio, debug
|
||||
script:
|
||||
- mkdir -p build.ms && cd build.ms
|
||||
- export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_GENERATOR_TOOLSET=host=x64"
|
||||
- cmake -G "Visual Studio 15 2017 Win64" ${CMAKE_EXTRA_ARGS} ..
|
||||
- export DESTDIR=${PWD}/_installed_
|
||||
- travis_wait ${MAX_TIME_MIN} cmake --build . --parallel --verbose --config ${BLD_CONFIG} --target install
|
||||
# override num procs to force fewer unit test jobs
|
||||
- export NUM_PROCESSORS=2
|
||||
- >-
|
||||
travis_wait ${MAX_TIME_MIN} "./_installed_/Program Files/rippled/bin/rippled.exe" --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS}
|
||||
- <<: *windows-bld
|
||||
name: windows, vc2019
|
||||
install:
|
||||
- choco upgrade cmake.install
|
||||
- choco install ninja -y
|
||||
- choco install visualstudio2019buildtools visualstudio2019community visualstudio2019-workload-vctools -y
|
||||
before_script:
|
||||
- export BLD_CONFIG=Release
|
||||
# we want to use the boost build from cache, which was built using the
|
||||
# vs2017 compiler so we need to specify the Boost_COMPILER. BUT, we
|
||||
# can't use the cmake config files generated by boost b/c they are
|
||||
# broken for Boost_COMPILER override, so we need to specify both
|
||||
# Boost_NO_BOOST_CMAKE and a slightly different Boost_COMPILER string
|
||||
# to make the legacy find module work for us. If the cmake configs are
|
||||
# fixed in the future, it should be possible to remove these
|
||||
# workarounds.
|
||||
- export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DBoost_NO_BOOST_CMAKE=ON -DBoost_COMPILER=-vc141"
|
||||
|
||||
before_cache:
|
||||
- if [ $(uname) = "Linux" ] ; then SUDO="sudo"; else SUDO=""; fi
|
||||
- cd ${TRAVIS_HOME}
|
||||
- if [ -f cache_ignore.tar ] ; then $SUDO tar xvf cache_ignore.tar; fi
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
|
||||
cache:
|
||||
timeout: 900
|
||||
directories:
|
||||
- $CACHE_DIR
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
143
API-CHANGELOG.md
Normal file
143
API-CHANGELOG.md
Normal file
@@ -0,0 +1,143 @@
|
||||
# API Changelog
|
||||
|
||||
This changelog is intended to list all updates to the [public API methods](https://xrpl.org/public-api-methods.html).
|
||||
|
||||
For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior.
|
||||
|
||||
The API version controls the API behavior you see. This includes what properties you see in responses, what parameters you're permitted to send in requests, and so on. You specify the API version in each of your requests. When a breaking change is introduced to the `rippled` API, a new version is released. To avoid breaking your code, you should set (or increase) your version when you're ready to upgrade.
|
||||
|
||||
For a log of breaking changes, see the **API Version [number]** headings. In general, breaking changes are associated with a particular API Version number. For non-breaking changes, scroll to the **XRP Ledger version [x.y.z]** headings. Non-breaking changes are associated with a particular XRP Ledger (`rippled`) release.
|
||||
|
||||
## API Version 1
|
||||
|
||||
This version is supported by all `rippled` versions. At time of writing, it is the default API version, used when no `api_version` is specified. When a new API version is introduced, the command line interface will default to the latest API version. The command line is intended for ad-hoc usage by humans, not programs or automated scripts. The command line is not meant for use in production code.
|
||||
|
||||
### Idiosyncrasies
|
||||
|
||||
#### V1 account_info response
|
||||
|
||||
In [the response to the `account_info` command](https://xrpl.org/account_info.html#response-format), there is `account_data` - which is supposed to be an `AccountRoot` object - and `signer_lists` is in this object. However, the docs say that `signer_lists` should be at the root level of the reponse - and this makes sense, since signer lists are not part of the AccountRoot object. (First reported in [xrpl-dev-portal#938](https://github.com/XRPLF/xrpl-dev-portal/issues/938).) Thanks to [rippled#3770](https://github.com/XRPLF/rippled/pull/3770), this field will be moved in `api_version: 2`, to the root level of the response.
|
||||
|
||||
#### server_info - network_id
|
||||
|
||||
The `network_id` field was added in the `server_info` response in version 1.5.0 (2019), but it was not returned in [reporting mode](https://xrpl.org/rippled-server-modes.html#reporting-mode).
|
||||
|
||||
## XRP Ledger version 1.12.0
|
||||
|
||||
[Version 1.12.0](https://github.com/XRPLF/rippled/releases/tag/1.12.0) was released on Sep 6, 2023.
|
||||
|
||||
### Additions in 1.12
|
||||
|
||||
Additions are intended to be non-breaking (because they are purely additive).
|
||||
|
||||
- `server_info`: Added `ports`, an array which advertises the RPC and WebSocket ports. This information is also included in the `/crawl` endpoint (which calls `server_info` internally). `grpc` and `peer` ports are also included. (https://github.com/XRPLF/rippled/pull/4427)
|
||||
- `ports` contains objects, each containing a `port` for the listening port (a number string), and a `protocol` array listing the supported protocols on that port.
|
||||
- This allows crawlers to build a more detailed topology without needing to port-scan nodes.
|
||||
- (For peers and other non-admin clients, the info about admin ports is excluded.)
|
||||
- Clawback: The following additions are gated by the Clawback amendment (`featureClawback`). (https://github.com/XRPLF/rippled/pull/4553)
|
||||
- Adds an [AccountRoot flag](https://xrpl.org/accountroot.html#accountroot-flags) called `lsfAllowTrustLineClawback` (https://github.com/XRPLF/rippled/pull/4617)
|
||||
- Adds the corresponding `asfAllowTrustLineClawback` [AccountSet Flag](https://xrpl.org/accountset.html#accountset-flags) as well.
|
||||
- Clawback is disabled by default, so if an issuer desires the ability to claw back funds, they must use an `AccountSet` transaction to set the AllowTrustLineClawback flag. They must do this before creating any trust lines, offers, escrows, payment channels, or checks.
|
||||
- Adds the [Clawback transaction type](https://github.com/XRPLF/XRPL-Standards/blob/master/XLS-39d-clawback/README.md#331-clawback-transaction), containing these fields:
|
||||
- `Account`: The issuer of the asset being clawed back. Must also be the sender of the transaction.
|
||||
- `Amount`: The amount being clawed back, with the `Amount.issuer` being the token holder's address.
|
||||
- Adds [AMM](https://github.com/XRPLF/XRPL-Standards/discussions/78) ([#4294](https://github.com/XRPLF/rippled/pull/4294), [#4626](https://github.com/XRPLF/rippled/pull/4626)) feature:
|
||||
- Adds `amm_info` API to retrieve AMM information for a given tokens pair.
|
||||
- Adds `AMMCreate` transaction type to create `AMM` instance.
|
||||
- Adds `AMMDeposit` transaction type to deposit funds into `AMM` instance.
|
||||
- Adds `AMMWithdraw` transaction type to withdraw funds from `AMM` instance.
|
||||
- Adds `AMMVote` transaction type to vote for the trading fee of `AMM` instance.
|
||||
- Adds `AMMBid` transaction type to bid for the Auction Slot of `AMM` instance.
|
||||
- Adds `AMMDelete` transaction type to delete `AMM` instance.
|
||||
- Adds `sfAMMID` to `AccountRoot` to indicate that the account is `AMM`'s account. `AMMID` is used to fetch `ltAMM`.
|
||||
- Adds `lsfAMMNode` `TrustLine` flag to indicate that one side of the `TrustLine` is `AMM` account.
|
||||
- Adds `tfLPToken`, `tfSingleAsset`, `tfTwoAsset`, `tfOneAssetLPToken`, `tfLimitLPToken`, `tfTwoAssetIfEmpty`,
|
||||
`tfWithdrawAll`, `tfOneAssetWithdrawAll` which allow a trader to specify different fields combination
|
||||
for `AMMDeposit` and `AMMWithdraw` transactions.
|
||||
- Adds new transaction result codes:
|
||||
- tecUNFUNDED_AMM: insufficient balance to fund AMM. The account does not have funds for liquidity provision.
|
||||
- tecAMM_BALANCE: AMM has invalid balance. Calculated balances greater than the current pool balances.
|
||||
- tecAMM_FAILED: AMM transaction failed. Fails due to a processing failure.
|
||||
- tecAMM_INVALID_TOKENS: AMM invalid LP tokens. Invalid input values, format, or calculated values.
|
||||
- tecAMM_EMPTY: AMM is in empty state. Transaction expects AMM in non-empty state (LP tokens > 0).
|
||||
- tecAMM_NOT_EMPTY: AMM is not in empty state. Transaction expects AMM in empty state (LP tokens == 0).
|
||||
- tecAMM_ACCOUNT: AMM account. Clawback of AMM account.
|
||||
- tecINCOMPLETE: Some work was completed, but more submissions required to finish. AMMDelete partially deletes the trustlines.
|
||||
|
||||
## XRP Ledger version 1.11.0
|
||||
|
||||
[Version 1.11.0](https://github.com/XRPLF/rippled/releases/tag/1.11.0) was released on Jun 20, 2023.
|
||||
|
||||
### Breaking changes in 1.11
|
||||
|
||||
- Added the ability to mark amendments as obsolete. For the `feature` admin API, there is a new possible value for the `vetoed` field. (https://github.com/XRPLF/rippled/pull/4291)
|
||||
- The value of `vetoed` can now be `true`, `false`, or `"Obsolete"`.
|
||||
- Removed the acceptance of seeds or public keys in place of account addresses. (https://github.com/XRPLF/rippled/pull/4404)
|
||||
- This simplifies the API and encourages better security practices (i.e. seeds should never be sent over the network).
|
||||
- For the `ledger_data` method, when all entries are filtered out, the `state` field of the response is now an empty list (in other words, an empty array, `[]`). (Previously, it would return `null`.) While this is technically a breaking change, the new behavior is consistent with the documentation, so this is considered only a bug fix. (https://github.com/XRPLF/rippled/pull/4398)
|
||||
- If and when the `fixNFTokenRemint` amendment activates, there will be a new AccountRoot field, `FirstNFTSequence`. This field is set to the current account sequence when the account issues their first NFT. If an account has not issued any NFTs, then the field is not set. ([#4406](https://github.com/XRPLF/rippled/pull/4406))
|
||||
- There is a new account deletion restriction: an account can only be deleted if `FirstNFTSequence` + `MintedNFTokens` + `256` is less than the current ledger sequence.
|
||||
- This is potentially a breaking change if clients have logic for determining whether an account can be deleted.
|
||||
- NetworkID
|
||||
- For sidechains and networks with a network ID greater than 1024, there is a new [transaction common field](https://xrpl.org/transaction-common-fields.html), `NetworkID`. (https://github.com/XRPLF/rippled/pull/4370)
|
||||
- This field helps to prevent replay attacks and is now required for chains whose network ID is 1025 or higher.
|
||||
- The field must be omitted for Mainnet, so there is no change for Mainnet users.
|
||||
- There are three new local error codes:
|
||||
- `telNETWORK_ID_MAKES_TX_NON_CANONICAL`: a `NetworkID` is present but the chain's network ID is less than 1025. Remove the field from the transaction, and try again.
|
||||
- `telREQUIRES_NETWORK_ID`: a `NetworkID` is required, but is not present. Add the field to the transaction, and try again.
|
||||
- `telWRONG_NETWORK`: a `NetworkID` is specified, but it is for a different network. Submit the transaction to a different server which is connected to the correct network.
|
||||
|
||||
### Additions and bug fixes in 1.11
|
||||
|
||||
- Added `nftoken_id`, `nftoken_ids` and `offer_id` meta fields into NFT `tx` and `account_tx` responses. (https://github.com/XRPLF/rippled/pull/4447)
|
||||
- Added an `account_flags` object to the `account_info` method response. (https://github.com/XRPLF/rippled/pull/4459)
|
||||
- Added `NFTokenPages` to the `account_objects` RPC. (https://github.com/XRPLF/rippled/pull/4352)
|
||||
- Fixed: `marker` returned from the `account_lines` command would not work on subsequent commands. (https://github.com/XRPLF/rippled/pull/4361)
|
||||
|
||||
# In development
|
||||
|
||||
Changes below this point are in development.
|
||||
|
||||
## API Version 2
|
||||
|
||||
At the time of writing, this version is expected to be introduced in `rippled` version 2.0.
|
||||
|
||||
Currently (prior to the release of 2.0), it is available as a "beta" version, meaning it can be enabled with a config setting in `rippled.cfg`:
|
||||
```
|
||||
[beta_rpc_api]
|
||||
1
|
||||
```
|
||||
|
||||
Since `api_version` 2 is in "beta", breaking changes can be made at any time.
|
||||
|
||||
#### Modifications to account_info response in V2
|
||||
|
||||
- `signer_lists` is returned in the root of the response. Previously, in API version 1, it was nested under `account_data`. (https://github.com/XRPLF/rippled/pull/3770)
|
||||
- When using an invalid `signer_lists` value, the API now returns an "invalidParams" error. (https://github.com/XRPLF/rippled/pull/4585)
|
||||
- (`signer_lists` must be a boolean. In API version 1, strings are accepted and may return a normal response - as if `signer_lists` were `true`.)
|
||||
|
||||
#### Modifications to [account_tx](https://xrpl.org/account_tx.html#account_tx) response in V2
|
||||
|
||||
- Using `ledger_index_min`, `ledger_index_max`, and `ledger_index` returns `invalidParams` because if you use `ledger_index_min` or `ledger_index_max`, then it does not make sense to also specify `ledger_index`. Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4571)
|
||||
- The same applies for `ledger_index_min`, `ledger_index_max`, and `ledger_hash`. (https://github.com/XRPLF/rippled/issues/4545#issuecomment-1565065579)
|
||||
- Using a `ledger_index_min` or `ledger_index_max` beyond the range of ledgers that the server has:
|
||||
- returns `lgrIdxMalformed` in API version 2. (https://github.com/XRPLF/rippled/issues/4288)
|
||||
- Previously, in API version 1, no error was returned.
|
||||
|
||||
##### In progress
|
||||
|
||||
- Attempting to use a non-boolean value (such as a string) for the `binary` or `forward` parameters returns `invalidParams` (`rpcINVALID_PARAMS`). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)
|
||||
|
||||
#### Modifications to [noripple_check](https://xrpl.org/noripple_check.html#noripple_check) response in V2
|
||||
|
||||
##### In progress
|
||||
|
||||
- Attempting to use a non-boolean value (such as a string) for the `transactions` parameter returns `invalidParams` (`rpcINVALID_PARAMS`). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)
|
||||
|
||||
# Unit tests for API changes
|
||||
|
||||
The following information is useful to developers contributing to this project:
|
||||
|
||||
The purpose of unit tests is to catch bugs and prevent regressions. In general, it often makes sense to create a test function when there is a breaking change to the API. For APIs that have changed in a new API version, the tests should be modified so that both the prior version and the new version are properly tested.
|
||||
|
||||
To take one example: for `account_info` version 1, WebSocket and JSON-RPC behavior should be tested. The latest API version, i.e. API version 2, should be tested over WebSocket, JSON-RPC, and command line.
|
||||
373
BUILD.md
Normal file
373
BUILD.md
Normal file
@@ -0,0 +1,373 @@
|
||||
| :warning: **WARNING** :warning:
|
||||
|---|
|
||||
| These instructions assume you have a C++ development environment ready with Git, Python, Conan, CMake, and a C++ compiler. For help setting one up on Linux, macOS, or Windows, [see this guide](./docs/build/environment.md). |
|
||||
|
||||
> These instructions also assume a basic familiarity with Conan and CMake.
|
||||
> If you are unfamiliar with Conan,
|
||||
> you can read our [crash course](./docs/build/conan.md)
|
||||
> or the official [Getting Started][3] walkthrough.
|
||||
|
||||
## Branches
|
||||
|
||||
For a stable release, choose the `master` branch or one of the [tagged
|
||||
releases](https://github.com/ripple/rippled/releases).
|
||||
|
||||
```
|
||||
git checkout master
|
||||
```
|
||||
|
||||
For the latest release candidate, choose the `release` branch.
|
||||
|
||||
```
|
||||
git checkout release
|
||||
```
|
||||
|
||||
For the latest set of untested features, or to contribute, choose the `develop`
|
||||
branch.
|
||||
|
||||
```
|
||||
git checkout develop
|
||||
```
|
||||
|
||||
## Minimum Requirements
|
||||
|
||||
See [System Requirements](https://xrpl.org/system-requirements.html).
|
||||
|
||||
Building rippled generally requires git, Python, Conan, CMake, and a C++ compiler. Some guidance on setting up such a [C++ development environment can be found here](./docs/build/environment.md).
|
||||
|
||||
- [Python 3.7](https://www.python.org/downloads/)
|
||||
- [Conan 1.55](https://conan.io/downloads.html)
|
||||
- [CMake 3.16](https://cmake.org/download/)
|
||||
|
||||
`rippled` is written in the C++20 dialect and includes the `<concepts>` header.
|
||||
The [minimum compiler versions][2] required are:
|
||||
|
||||
| Compiler | Version |
|
||||
|-------------|---------|
|
||||
| GCC | 10 |
|
||||
| Clang | 13 |
|
||||
| Apple Clang | 13.1.6 |
|
||||
| MSVC | 19.23 |
|
||||
|
||||
### Linux
|
||||
|
||||
The Ubuntu operating system has received the highest level of
|
||||
quality assurance, testing, and support.
|
||||
|
||||
Here are [sample instructions for setting up a C++ development environment on Linux](./docs/build/environment.md#linux).
|
||||
|
||||
### Mac
|
||||
|
||||
Many rippled engineers use macOS for development.
|
||||
|
||||
Here are [sample instructions for setting up a C++ development environment on macOS](./docs/build/environment.md#macos).
|
||||
|
||||
### Windows
|
||||
|
||||
Windows is not recommended for production use at this time.
|
||||
|
||||
- Additionally, 32-bit Windows development is not supported.
|
||||
- Visual Studio 2022 is not yet supported.
|
||||
- rippled generally requires [Boost][] 1.77, which Conan cannot build with VS 2022.
|
||||
- Until rippled is updated for compatibility with later versions of Boost, Windows developers may need to use Visual Studio 2019.
|
||||
|
||||
[Boost]: https://www.boost.org/
|
||||
|
||||
## Steps
|
||||
|
||||
### Set Up Conan
|
||||
|
||||
After you have a [C++ development environment](./docs/build/environment.md) ready with Git, Python, Conan, CMake, and a C++ compiler, you may need to set up your Conan profile.
|
||||
|
||||
These instructions assume a basic familiarity with Conan and CMake.
|
||||
|
||||
If you are unfamiliar with Conan, then please read [this crash course](./docs/build/conan.md) or the official [Getting Started][3] walkthrough.
|
||||
|
||||
You'll need at least one Conan profile:
|
||||
|
||||
```
|
||||
conan profile new default --detect
|
||||
```
|
||||
|
||||
Update the compiler settings:
|
||||
|
||||
```
|
||||
conan profile update settings.compiler.cppstd=20 default
|
||||
```
|
||||
|
||||
**Linux** developers will commonly have a default Conan [profile][] that compiles
|
||||
with GCC and links with libstdc++.
|
||||
If you are linking with libstdc++ (see profile setting `compiler.libcxx`),
|
||||
then you will need to choose the `libstdc++11` ABI:
|
||||
|
||||
```
|
||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
||||
```
|
||||
|
||||
**Windows** developers may need to use the x64 native build tools.
|
||||
An easy way to do that is to run the shortcut "x64 Native Tools Command
|
||||
Prompt" for the version of Visual Studio that you have installed.
|
||||
|
||||
Windows developers must also build `rippled` and its dependencies for the x64
|
||||
architecture:
|
||||
|
||||
```
|
||||
conan profile update settings.arch=x86_64 default
|
||||
```
|
||||
|
||||
### Multiple compilers
|
||||
|
||||
When `/usr/bin/g++` exists on a platform, it is the default cpp compiler. This
|
||||
default works for some users.
|
||||
|
||||
However, if this compiler cannot build rippled or its dependencies, then you can
|
||||
install another compiler and set Conan and CMake to use it.
|
||||
Update the `conf.tools.build:compiler_executables` setting in order to set the correct variables (`CMAKE_<LANG>_COMPILER`) in the
|
||||
generated CMake toolchain file.
|
||||
For example, on Ubuntu 20, you may have gcc at `/usr/bin/gcc` and g++ at `/usr/bin/g++`; if that is the case, you can select those compilers with:
|
||||
```
|
||||
conan profile update 'conf.tools.build:compiler_executables={"c": "/usr/bin/gcc", "cpp": "/usr/bin/g++"}' default
|
||||
```
|
||||
|
||||
Replace `/usr/bin/gcc` and `/usr/bin/g++` with paths to the desired compilers.
|
||||
|
||||
It should choose the compiler for dependencies as well,
|
||||
but not all of them have a Conan recipe that respects this setting (yet).
|
||||
For the rest, you can set these environment variables.
|
||||
Replace `<path>` with paths to the desired compilers:
|
||||
|
||||
- `conan profile update env.CC=<path> default`
|
||||
- `conan profile update env.CXX=<path> default`
|
||||
|
||||
Export our [Conan recipe for Snappy](./external/snappy).
|
||||
It does not explicitly link the C++ standard library,
|
||||
which allows you to statically link it with GCC, if you want.
|
||||
|
||||
```
|
||||
conan export external/snappy snappy/1.1.10@
|
||||
```
|
||||
|
||||
Export our [Conan recipe for SOCI](./external/soci).
|
||||
It patches their CMake to correctly import its dependencies.
|
||||
|
||||
```
|
||||
conan export external/soci soci/4.0.3@
|
||||
```
|
||||
|
||||
### Build and Test
|
||||
|
||||
1. Create a build directory and move into it.
|
||||
|
||||
```
|
||||
mkdir .build
|
||||
cd .build
|
||||
```
|
||||
|
||||
You can use any directory name. Conan treats your working directory as an
|
||||
install folder and generates files with implementation details.
|
||||
You don't need to worry about these files, but make sure to change
|
||||
your working directory to your build directory before calling Conan.
|
||||
|
||||
**Note:** You can specify a directory for the installation files by adding
|
||||
the `install-folder` or `-if` option to every `conan install` command
|
||||
in the next step.
|
||||
|
||||
2. Generate CMake files for every configuration you want to build.
|
||||
|
||||
```
|
||||
conan install .. --output-folder . --build missing --settings build_type=Release
|
||||
conan install .. --output-folder . --build missing --settings build_type=Debug
|
||||
```
|
||||
|
||||
For a single-configuration generator, e.g. `Unix Makefiles` or `Ninja`,
|
||||
you only need to run this command once.
|
||||
For a multi-configuration generator, e.g. `Visual Studio`, you may want to
|
||||
run it more than once.
|
||||
|
||||
Each of these commands should also have a different `build_type` setting.
|
||||
A second command with the same `build_type` setting will overwrite the files
|
||||
generated by the first. You can pass the build type on the command line with
|
||||
`--settings build_type=$BUILD_TYPE` or in the profile itself,
|
||||
under the section `[settings]` with the key `build_type`.
|
||||
|
||||
If you are using a Microsoft Visual C++ compiler,
|
||||
then you will need to ensure consistency between the `build_type` setting
|
||||
and the `compiler.runtime` setting.
|
||||
|
||||
When `build_type` is `Release`, `compiler.runtime` should be `MT`.
|
||||
|
||||
When `build_type` is `Debug`, `compiler.runtime` should be `MTd`.
|
||||
|
||||
```
|
||||
conan install .. --output-folder . --build missing --settings build_type=Release --settings compiler.runtime=MT
|
||||
conan install .. --output-folder . --build missing --settings build_type=Debug --settings compiler.runtime=MTd
|
||||
```
|
||||
|
||||
3. Configure CMake and pass the toolchain file generated by Conan, located at
|
||||
`$OUTPUT_FOLDER/build/generators/conan_toolchain.cmake`.
|
||||
|
||||
Single-config generators:
|
||||
|
||||
```
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
Pass the CMake variable [`CMAKE_BUILD_TYPE`][build_type]
|
||||
and make sure it matches the `build_type` setting you chose in the previous
|
||||
step.
|
||||
|
||||
Multi-config generators:
|
||||
|
||||
```
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake ..
|
||||
```
|
||||
|
||||
**Note:** You can pass build options for `rippled` in this step.
|
||||
|
||||
4. Build `rippled`.
|
||||
|
||||
For a single-configuration generator, it will build whatever configuration
|
||||
you passed for `CMAKE_BUILD_TYPE`. For a multi-configuration generator,
|
||||
you must pass the option `--config` to select the build configuration.
|
||||
|
||||
Single-config generators:
|
||||
|
||||
```
|
||||
cmake --build .
|
||||
```
|
||||
|
||||
Multi-config generators:
|
||||
|
||||
```
|
||||
cmake --build . --config Release
|
||||
cmake --build . --config Debug
|
||||
```
|
||||
|
||||
5. Test rippled.
|
||||
|
||||
Single-config generators:
|
||||
|
||||
```
|
||||
./rippled --unittest
|
||||
```
|
||||
|
||||
Multi-config generators:
|
||||
|
||||
```
|
||||
./Release/rippled --unittest
|
||||
./Debug/rippled --unittest
|
||||
```
|
||||
|
||||
The location of `rippled` in your build directory depends on your CMake
|
||||
generator. Pass `--help` to see the rest of the command line options.
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
| Option | Default Value | Description |
|
||||
| --- | ---| ---|
|
||||
| `assert` | OFF | Enable assertions.
|
||||
| `reporting` | OFF | Build the reporting mode feature. |
|
||||
| `tests` | ON | Build tests. |
|
||||
| `unity` | ON | Configure a unity build. |
|
||||
| `san` | N/A | Enable a sanitizer with Clang. Choices are `thread` and `address`. |
|
||||
|
||||
[Unity builds][5] may be faster for the first build
|
||||
(at the cost of much more memory) since they concatenate sources into fewer
|
||||
translation units. Non-unity builds may be faster for incremental builds,
|
||||
and can be helpful for detecting `#include` omissions.
|
||||
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
### Conan
|
||||
|
||||
After any updates or changes to dependencies, you may need to do the following:
|
||||
|
||||
1. Remove your build directory.
|
||||
2. Remove the Conan cache:
|
||||
```
|
||||
rm -rf ~/.conan/data
|
||||
```
|
||||
4. Re-run [conan install](#build-and-test).
|
||||
|
||||
|
||||
### no std::result_of
|
||||
|
||||
If your compiler version is recent enough to have removed `std::result_of` as
|
||||
part of C++20, e.g. Apple Clang 15.0, then you might need to add a preprocessor
|
||||
definition to your build.
|
||||
|
||||
```
|
||||
conan profile update 'options.boost:extra_b2_flags="define=BOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
|
||||
conan profile update 'env.CFLAGS="-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
|
||||
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
|
||||
conan profile update 'conf.tools.build:cflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
|
||||
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
|
||||
```
|
||||
|
||||
|
||||
### call to 'async_teardown' is ambiguous
|
||||
|
||||
If you are compiling with an early version of Clang 16, then you might hit
|
||||
a [regression][6] when compiling C++20 that manifests as an [error in a Boost
|
||||
header][7]. You can workaround it by adding this preprocessor definition:
|
||||
|
||||
```
|
||||
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_DISABLE_CONCEPTS"' default
|
||||
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
|
||||
```
|
||||
|
||||
|
||||
### recompile with -fPIC
|
||||
|
||||
If you get a linker error suggesting that you recompile Boost with
|
||||
position-independent code, such as:
|
||||
|
||||
```
|
||||
/usr/bin/ld.gold: error: /home/username/.conan/data/boost/1.77.0/_/_/package/.../lib/libboost_container.a(alloc_lib.o):
|
||||
requires unsupported dynamic reloc 11; recompile with -fPIC
|
||||
```
|
||||
|
||||
Conan most likely downloaded a bad binary distribution of the dependency.
|
||||
This seems to be a [bug][1] in Conan just for Boost 1.77.0 compiled with GCC
|
||||
for Linux. The solution is to build the dependency locally by passing
|
||||
`--build boost` when calling `conan install`.
|
||||
|
||||
```
|
||||
conan install --build boost ...
|
||||
```
|
||||
|
||||
|
||||
## Add a Dependency
|
||||
|
||||
If you want to experiment with a new package, follow these steps:
|
||||
|
||||
1. Search for the package on [Conan Center](https://conan.io/center/).
|
||||
2. Modify [`conanfile.py`](./conanfile.py):
|
||||
- Add a version of the package to the `requires` property.
|
||||
- Change any default options for the package by adding them to the
|
||||
`default_options` property (with syntax `'$package:$option': $value`).
|
||||
3. Modify [`CMakeLists.txt`](./CMakeLists.txt):
|
||||
- Add a call to `find_package($package REQUIRED)`.
|
||||
- Link a library from the package to the target `ripple_libs`
|
||||
(search for the existing call to `target_link_libraries(ripple_libs INTERFACE ...)`).
|
||||
4. Start coding! Don't forget to include whatever headers you need from the package.
|
||||
|
||||
|
||||
[1]: https://github.com/conan-io/conan-center-index/issues/13168
|
||||
[2]: https://en.cppreference.com/w/cpp/compiler_support/20
|
||||
[3]: https://docs.conan.io/en/latest/getting_started.html
|
||||
[5]: https://en.wikipedia.org/wiki/Unity_build
|
||||
[6]: https://github.com/boostorg/beast/issues/2648
|
||||
[7]: https://github.com/boostorg/beast/issues/2661
|
||||
[build_type]: https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
|
||||
[runtime]: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
|
||||
[toolchain]: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
|
||||
[pcf]: https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#package-configuration-file
|
||||
[pvf]: https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#package-version-file
|
||||
[find_package]: https://cmake.org/cmake/help/latest/command/find_package.html
|
||||
[search]: https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure
|
||||
[prefix_path]: https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html
|
||||
[profile]: https://docs.conan.io/en/latest/reference/profiles.html
|
||||
@@ -1,62 +0,0 @@
|
||||
set (RocksDB_DIR "" CACHE PATH "Root directory of RocksDB distribution")
|
||||
|
||||
find_path (RocksDB_INCLUDE_DIR
|
||||
rocksdb/db.h
|
||||
PATHS ${RocksDB_DIR})
|
||||
|
||||
set (RocksDB_VERSION "")
|
||||
find_file (RocksDB_VERSION_FILE
|
||||
rocksdb/version.h
|
||||
PATHS ${RocksDB_DIR})
|
||||
if (RocksDB_VERSION_FILE)
|
||||
file (READ ${RocksDB_VERSION_FILE} _verfile)
|
||||
if ("${_verfile}" MATCHES "#define[ \\t]+ROCKSDB_MAJOR[ \\t]+([0-9]+)")
|
||||
string (APPEND RocksDB_VERSION "${CMAKE_MATCH_1}")
|
||||
else ()
|
||||
string (APPEND RocksDB_VERSION "0")
|
||||
endif()
|
||||
if ("${_verfile}" MATCHES "#define[ \\t]+ROCKSDB_MINOR[ \\t]+([0-9]+)")
|
||||
string (APPEND RocksDB_VERSION ".${CMAKE_MATCH_1}")
|
||||
else ()
|
||||
string (APPEND RocksDB_VERSION ".0")
|
||||
endif()
|
||||
if ("${_verfile}" MATCHES "#define[ \\t]+ROCKSDB_PATCH[ \\t]+([0-9]+)")
|
||||
string (APPEND RocksDB_VERSION ".${CMAKE_MATCH_1}")
|
||||
else ()
|
||||
string (APPEND RocksDB_VERSION ".0")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (RocksDB_USE_STATIC)
|
||||
list (APPEND RocksDB_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}rocksdb${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}rocksdblib${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif ()
|
||||
|
||||
list (APPEND RocksDB_NAMES rocksdb)
|
||||
|
||||
find_library (RocksDB_LIBRARY NAMES ${RocksDB_NAMES}
|
||||
PATHS
|
||||
${RocksDB_DIR}
|
||||
${RocksDB_DIR}/bin/Release
|
||||
${RocksDB_DIR}/bin64_vs2013/Release
|
||||
PATH_SUFFIXES lib lib64)
|
||||
|
||||
foreach (_n RocksDB_NAMES)
|
||||
list (APPEND RocksDB_NAMES_DBG "${_n}_d" "${_n}d")
|
||||
endforeach ()
|
||||
find_library (RocksDB_LIBRARY_DEBUG NAMES ${RocksDB_NAMES_DBG}
|
||||
PATHS
|
||||
${RocksDB_DIR}
|
||||
${RocksDB_DIR}/bin/Debug
|
||||
${RocksDB_DIR}/bin64_vs2013/Debug
|
||||
PATH_SUFFIXES lib lib64)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (RocksDB
|
||||
REQUIRED_VARS RocksDB_LIBRARY RocksDB_INCLUDE_DIR
|
||||
VERSION_VAR RocksDB_VERSION)
|
||||
|
||||
mark_as_advanced (RocksDB_INCLUDE_DIR RocksDB_LIBRARY)
|
||||
set (RocksDB_INCLUDE_DIRS ${RocksDB_INCLUDE_DIR})
|
||||
set (RocksDB_LIBRARIES ${RocksDB_LIBRARY})
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
These are modules and sources that support our CMake build.
|
||||
|
||||
== FindBoost.cmake ==
|
||||
|
||||
In order to facilitate updating to latest releases of boost, we've made a local
|
||||
copy of the FindBoost cmake module in our repo. The latest official version can
|
||||
generally be obtained
|
||||
[here](https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake).
|
||||
|
||||
The latest version provided by Kitware can be tailored for use with the
|
||||
version of CMake that it ships with (typically the next upcoming CMake
|
||||
release). As such, the latest version from the repository might not work
|
||||
perfectly with older versions of CMake - for instance, the latest version
|
||||
might use features or properties only available in the version of CMake that
|
||||
it ships with. Given this, it's best to test any updates to this module with a few
|
||||
different versions of cmake.
|
||||
|
||||
@@ -13,7 +13,6 @@ link_libraries (Ripple::common)
|
||||
set_target_properties (common
|
||||
PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
target_compile_features (common INTERFACE cxx_std_17)
|
||||
target_compile_definitions (common
|
||||
INTERFACE
|
||||
$<$<CONFIG:Debug>:DEBUG _DEBUG>
|
||||
@@ -108,6 +107,7 @@ else ()
|
||||
-Wno-char-subscripts
|
||||
-Wno-format
|
||||
-Wno-unused-local-typedefs
|
||||
-fstack-protector
|
||||
$<$<BOOL:${is_gcc}>:
|
||||
-Wno-unused-but-set-variable
|
||||
-Wno-deprecated
|
||||
@@ -120,11 +120,15 @@ else ()
|
||||
target_link_libraries (common
|
||||
INTERFACE
|
||||
-rdynamic
|
||||
$<$<BOOL:${is_linux}>:-Wl,-z,relro,-z,now>
|
||||
# link to static libc/c++ iff:
|
||||
# * static option set and
|
||||
# * NOT APPLE (AppleClang does not support static libc/c++) and
|
||||
# * NOT san (sanitizers typically don't work with static libc/c++)
|
||||
$<$<AND:$<BOOL:${static}>,$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:-static-libstdc++>)
|
||||
$<$<AND:$<BOOL:${static}>,$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:
|
||||
-static-libstdc++
|
||||
-static-libgcc
|
||||
>)
|
||||
endif ()
|
||||
|
||||
if (use_gold AND is_gcc)
|
||||
|
||||
@@ -13,6 +13,10 @@ if (unity)
|
||||
set_target_properties(xrpl_core PROPERTIES UNITY_BUILD ON)
|
||||
endif ()
|
||||
|
||||
add_library(libxrpl INTERFACE)
|
||||
target_link_libraries(libxrpl INTERFACE xrpl_core)
|
||||
add_library(xrpl::libxrpl ALIAS libxrpl)
|
||||
|
||||
|
||||
#[===============================[
|
||||
beast/legacy FILES:
|
||||
@@ -50,7 +54,7 @@ target_sources (xrpl_core PRIVATE
|
||||
src/ripple/basics/impl/FileUtilities.cpp
|
||||
src/ripple/basics/impl/IOUAmount.cpp
|
||||
src/ripple/basics/impl/Log.cpp
|
||||
src/ripple/basics/impl/strHex.cpp
|
||||
src/ripple/basics/impl/Number.cpp
|
||||
src/ripple/basics/impl/StringUtilities.cpp
|
||||
#[===============================[
|
||||
main sources:
|
||||
@@ -70,6 +74,7 @@ target_sources (xrpl_core PRIVATE
|
||||
subdir: protocol
|
||||
#]===============================]
|
||||
src/ripple/protocol/impl/AccountID.cpp
|
||||
src/ripple/protocol/impl/AMMCore.cpp
|
||||
src/ripple/protocol/impl/Book.cpp
|
||||
src/ripple/protocol/impl/BuildInfo.cpp
|
||||
src/ripple/protocol/impl/ErrorCodes.cpp
|
||||
@@ -77,11 +82,15 @@ target_sources (xrpl_core PRIVATE
|
||||
src/ripple/protocol/impl/Indexes.cpp
|
||||
src/ripple/protocol/impl/InnerObjectFormats.cpp
|
||||
src/ripple/protocol/impl/Issue.cpp
|
||||
src/ripple/protocol/impl/STIssue.cpp
|
||||
src/ripple/protocol/impl/Keylet.cpp
|
||||
src/ripple/protocol/impl/LedgerFormats.cpp
|
||||
src/ripple/protocol/impl/LedgerHeader.cpp
|
||||
src/ripple/protocol/impl/PublicKey.cpp
|
||||
src/ripple/protocol/impl/Quality.cpp
|
||||
src/ripple/protocol/impl/QualityFunction.cpp
|
||||
src/ripple/protocol/impl/Rate2.cpp
|
||||
src/ripple/protocol/impl/Rules.cpp
|
||||
src/ripple/protocol/impl/SField.cpp
|
||||
src/ripple/protocol/impl/SOTemplate.cpp
|
||||
src/ripple/protocol/impl/STAccount.cpp
|
||||
@@ -94,7 +103,9 @@ target_sources (xrpl_core PRIVATE
|
||||
src/ripple/protocol/impl/STObject.cpp
|
||||
src/ripple/protocol/impl/STParsedJSON.cpp
|
||||
src/ripple/protocol/impl/STPathSet.cpp
|
||||
src/ripple/protocol/impl/STXChainBridge.cpp
|
||||
src/ripple/protocol/impl/STTx.cpp
|
||||
src/ripple/protocol/impl/XChainAttestations.cpp
|
||||
src/ripple/protocol/impl/STValidation.cpp
|
||||
src/ripple/protocol/impl/STVar.cpp
|
||||
src/ripple/protocol/impl/STVector256.cpp
|
||||
@@ -108,6 +119,9 @@ target_sources (xrpl_core PRIVATE
|
||||
src/ripple/protocol/impl/UintTypes.cpp
|
||||
src/ripple/protocol/impl/digest.cpp
|
||||
src/ripple/protocol/impl/tokens.cpp
|
||||
src/ripple/protocol/impl/NFTSyntheticSerializer.cpp
|
||||
src/ripple/protocol/impl/NFTokenID.cpp
|
||||
src/ripple/protocol/impl/NFTokenOfferID.cpp
|
||||
#[===============================[
|
||||
main sources:
|
||||
subdir: crypto
|
||||
@@ -135,8 +149,8 @@ target_link_libraries (xrpl_core
|
||||
OpenSSL::Crypto
|
||||
Ripple::boost
|
||||
Ripple::syslibs
|
||||
NIH::secp256k1
|
||||
NIH::ed25519-donna
|
||||
secp256k1::secp256k1
|
||||
ed25519::ed25519
|
||||
date::date
|
||||
Ripple::opts)
|
||||
#[=================================[
|
||||
@@ -144,28 +158,55 @@ target_link_libraries (xrpl_core
|
||||
#]=================================]
|
||||
install (
|
||||
FILES
|
||||
src/ripple/basics/algorithm.h
|
||||
src/ripple/basics/Archive.h
|
||||
src/ripple/basics/base64.h
|
||||
src/ripple/basics/base_uint.h
|
||||
src/ripple/basics/BasicConfig.h
|
||||
src/ripple/basics/Blob.h
|
||||
src/ripple/basics/Buffer.h
|
||||
src/ripple/basics/ByteUtilities.h
|
||||
src/ripple/basics/chrono.h
|
||||
src/ripple/basics/comparators.h
|
||||
src/ripple/basics/CompressionAlgorithms.h
|
||||
src/ripple/basics/contract.h
|
||||
src/ripple/basics/CountedObject.h
|
||||
src/ripple/basics/DecayingSample.h
|
||||
src/ripple/basics/Expected.h
|
||||
src/ripple/basics/FeeUnits.h
|
||||
src/ripple/basics/FileUtilities.h
|
||||
src/ripple/basics/hardened_hash.h
|
||||
src/ripple/basics/IOUAmount.h
|
||||
src/ripple/basics/join.h
|
||||
src/ripple/basics/KeyCache.h
|
||||
src/ripple/basics/LocalValue.h
|
||||
src/ripple/basics/Log.h
|
||||
src/ripple/basics/make_SSLContext.h
|
||||
src/ripple/basics/MathUtilities.h
|
||||
src/ripple/basics/mulDiv.h
|
||||
src/ripple/basics/Number.h
|
||||
src/ripple/basics/partitioned_unordered_map.h
|
||||
src/ripple/basics/PerfLog.h
|
||||
src/ripple/basics/random.h
|
||||
src/ripple/basics/RangeSet.h
|
||||
src/ripple/basics/README.md
|
||||
src/ripple/basics/ResolverAsio.h
|
||||
src/ripple/basics/Resolver.h
|
||||
src/ripple/basics/safe_cast.h
|
||||
src/ripple/basics/scope.h
|
||||
src/ripple/basics/SHAMapHash.h
|
||||
src/ripple/basics/Slice.h
|
||||
src/ripple/basics/spinlock.h
|
||||
src/ripple/basics/strHex.h
|
||||
src/ripple/basics/StringUtilities.h
|
||||
src/ripple/basics/TaggedCache.h
|
||||
src/ripple/basics/tagged_integer.h
|
||||
src/ripple/basics/SubmitSync.h
|
||||
src/ripple/basics/ThreadSafetyAnalysis.h
|
||||
src/ripple/basics/ToString.h
|
||||
src/ripple/basics/UnorderedContainers.h
|
||||
src/ripple/basics/UptimeClock.h
|
||||
src/ripple/basics/XRPAmount.h
|
||||
src/ripple/basics/algorithm.h
|
||||
src/ripple/basics/base_uint.h
|
||||
src/ripple/basics/chrono.h
|
||||
src/ripple/basics/contract.h
|
||||
src/ripple/basics/FeeUnits.h
|
||||
src/ripple/basics/hardened_hash.h
|
||||
src/ripple/basics/strHex.h
|
||||
DESTINATION include/ripple/basics)
|
||||
install (
|
||||
FILES
|
||||
@@ -192,27 +233,37 @@ install (
|
||||
install (
|
||||
FILES
|
||||
src/ripple/protocol/AccountID.h
|
||||
src/ripple/protocol/AMMCore.h
|
||||
src/ripple/protocol/AmountConversions.h
|
||||
src/ripple/protocol/Book.h
|
||||
src/ripple/protocol/BuildInfo.h
|
||||
src/ripple/protocol/ErrorCodes.h
|
||||
src/ripple/protocol/Feature.h
|
||||
src/ripple/protocol/Fees.h
|
||||
src/ripple/protocol/HashPrefix.h
|
||||
src/ripple/protocol/Indexes.h
|
||||
src/ripple/protocol/InnerObjectFormats.h
|
||||
src/ripple/protocol/Issue.h
|
||||
src/ripple/protocol/json_get_or_throw.h
|
||||
src/ripple/protocol/KeyType.h
|
||||
src/ripple/protocol/Keylet.h
|
||||
src/ripple/protocol/KnownFormats.h
|
||||
src/ripple/protocol/LedgerFormats.h
|
||||
src/ripple/protocol/LedgerHeader.h
|
||||
src/ripple/protocol/NFTSyntheticSerializer.h
|
||||
src/ripple/protocol/NFTokenID.h
|
||||
src/ripple/protocol/NFTokenOfferID.h
|
||||
src/ripple/protocol/Protocol.h
|
||||
src/ripple/protocol/PublicKey.h
|
||||
src/ripple/protocol/Quality.h
|
||||
src/ripple/protocol/QualityFunction.h
|
||||
src/ripple/protocol/Rate.h
|
||||
src/ripple/protocol/Rules.h
|
||||
src/ripple/protocol/SField.h
|
||||
src/ripple/protocol/SOTemplate.h
|
||||
src/ripple/protocol/STAccount.h
|
||||
src/ripple/protocol/STAmount.h
|
||||
src/ripple/protocol/STIssue.h
|
||||
src/ripple/protocol/STArray.h
|
||||
src/ripple/protocol/STBase.h
|
||||
src/ripple/protocol/STBitString.h
|
||||
@@ -224,6 +275,8 @@ install (
|
||||
src/ripple/protocol/STParsedJSON.h
|
||||
src/ripple/protocol/STPathSet.h
|
||||
src/ripple/protocol/STTx.h
|
||||
src/ripple/protocol/XChainAttestations.h
|
||||
src/ripple/protocol/STXChainBridge.h
|
||||
src/ripple/protocol/STValidation.h
|
||||
src/ripple/protocol/STVector256.h
|
||||
src/ripple/protocol/SecretKey.h
|
||||
@@ -239,6 +292,9 @@ install (
|
||||
src/ripple/protocol/UintTypes.h
|
||||
src/ripple/protocol/digest.h
|
||||
src/ripple/protocol/jss.h
|
||||
src/ripple/protocol/serialize.h
|
||||
src/ripple/protocol/nft.h
|
||||
src/ripple/protocol/nftPageMask.h
|
||||
src/ripple/protocol/tokens.h
|
||||
DESTINATION include/ripple/protocol)
|
||||
install (
|
||||
@@ -258,6 +314,7 @@ install (
|
||||
DESTINATION include/ripple/beast/clock)
|
||||
install (
|
||||
FILES
|
||||
src/ripple/beast/core/CurrentThreadName.h
|
||||
src/ripple/beast/core/LexicalCast.h
|
||||
src/ripple/beast/core/List.h
|
||||
src/ripple/beast/core/SemanticVersion.h
|
||||
@@ -271,6 +328,14 @@ install (
|
||||
install (
|
||||
FILES src/ripple/beast/hash/impl/xxhash.h
|
||||
DESTINATION include/ripple/beast/hash/impl)
|
||||
install (
|
||||
FILES
|
||||
src/ripple/beast/net/IPAddress.h
|
||||
src/ripple/beast/net/IPAddressConversion.h
|
||||
src/ripple/beast/net/IPAddressV4.h
|
||||
src/ripple/beast/net/IPAddressV6.h
|
||||
src/ripple/beast/net/IPEndpoint.h
|
||||
DESTINATION include/ripple/beast/net)
|
||||
install (
|
||||
FILES
|
||||
src/ripple/beast/rfc2616.h
|
||||
@@ -278,6 +343,26 @@ install (
|
||||
src/ripple/beast/unit_test.h
|
||||
src/ripple/beast/xor_shift_engine.h
|
||||
DESTINATION include/ripple/beast)
|
||||
install (
|
||||
FILES
|
||||
src/ripple/beast/unit_test/amount.hpp
|
||||
src/ripple/beast/unit_test/dstream.hpp
|
||||
src/ripple/beast/unit_test/global_suites.hpp
|
||||
src/ripple/beast/unit_test/main.cpp
|
||||
src/ripple/beast/unit_test/match.hpp
|
||||
src/ripple/beast/unit_test/recorder.hpp
|
||||
src/ripple/beast/unit_test/reporter.hpp
|
||||
src/ripple/beast/unit_test/results.hpp
|
||||
src/ripple/beast/unit_test/runner.hpp
|
||||
src/ripple/beast/unit_test/suite.hpp
|
||||
src/ripple/beast/unit_test/suite_info.hpp
|
||||
src/ripple/beast/unit_test/suite_list.hpp
|
||||
src/ripple/beast/unit_test/thread.hpp
|
||||
DESTINATION include/ripple/beast/unit_test)
|
||||
install (
|
||||
FILES
|
||||
src/ripple/beast/unit_test/detail/const_container.hpp
|
||||
DESTINATION include/ripple/beast/unit_test/detail)
|
||||
install (
|
||||
FILES
|
||||
src/ripple/beast/utility/Journal.h
|
||||
@@ -371,6 +456,8 @@ target_sources (rippled PRIVATE
|
||||
src/ripple/app/reporting/ReportingETL.cpp
|
||||
src/ripple/app/reporting/ETLSource.cpp
|
||||
src/ripple/app/reporting/P2pProxy.cpp
|
||||
src/ripple/app/misc/impl/AMMHelpers.cpp
|
||||
src/ripple/app/misc/impl/AMMUtils.cpp
|
||||
src/ripple/app/misc/CanonicalTXSet.cpp
|
||||
src/ripple/app/misc/FeeVoteImpl.cpp
|
||||
src/ripple/app/misc/HashRouter.cpp
|
||||
@@ -395,24 +482,38 @@ target_sources (rippled PRIVATE
|
||||
src/ripple/app/paths/Pathfinder.cpp
|
||||
src/ripple/app/paths/RippleCalc.cpp
|
||||
src/ripple/app/paths/RippleLineCache.cpp
|
||||
src/ripple/app/paths/RippleState.cpp
|
||||
src/ripple/app/paths/TrustLine.cpp
|
||||
src/ripple/app/paths/impl/AMMLiquidity.cpp
|
||||
src/ripple/app/paths/impl/AMMOffer.cpp
|
||||
src/ripple/app/paths/impl/BookStep.cpp
|
||||
src/ripple/app/paths/impl/DirectStep.cpp
|
||||
src/ripple/app/paths/impl/PaySteps.cpp
|
||||
src/ripple/app/paths/impl/XRPEndpointStep.cpp
|
||||
src/ripple/app/rdb/backend/RelationalDBInterfacePostgres.cpp
|
||||
src/ripple/app/rdb/backend/RelationalDBInterfaceSqlite.cpp
|
||||
src/ripple/app/rdb/impl/RelationalDBInterface.cpp
|
||||
src/ripple/app/rdb/impl/RelationalDBInterface_global.cpp
|
||||
src/ripple/app/rdb/impl/RelationalDBInterface_nodes.cpp
|
||||
src/ripple/app/rdb/impl/RelationalDBInterface_postgres.cpp
|
||||
src/ripple/app/rdb/impl/RelationalDBInterface_shards.cpp
|
||||
src/ripple/app/rdb/backend/detail/impl/Node.cpp
|
||||
src/ripple/app/rdb/backend/detail/impl/Shard.cpp
|
||||
src/ripple/app/rdb/backend/impl/PostgresDatabase.cpp
|
||||
src/ripple/app/rdb/backend/impl/SQLiteDatabase.cpp
|
||||
src/ripple/app/rdb/impl/Download.cpp
|
||||
src/ripple/app/rdb/impl/PeerFinder.cpp
|
||||
src/ripple/app/rdb/impl/RelationalDatabase.cpp
|
||||
src/ripple/app/rdb/impl/ShardArchive.cpp
|
||||
src/ripple/app/rdb/impl/State.cpp
|
||||
src/ripple/app/rdb/impl/UnitaryShard.cpp
|
||||
src/ripple/app/rdb/impl/Vacuum.cpp
|
||||
src/ripple/app/rdb/impl/Wallet.cpp
|
||||
src/ripple/app/tx/impl/AMMBid.cpp
|
||||
src/ripple/app/tx/impl/AMMCreate.cpp
|
||||
src/ripple/app/tx/impl/AMMDelete.cpp
|
||||
src/ripple/app/tx/impl/AMMDeposit.cpp
|
||||
src/ripple/app/tx/impl/AMMVote.cpp
|
||||
src/ripple/app/tx/impl/AMMWithdraw.cpp
|
||||
src/ripple/app/tx/impl/ApplyContext.cpp
|
||||
src/ripple/app/tx/impl/BookTip.cpp
|
||||
src/ripple/app/tx/impl/CancelCheck.cpp
|
||||
src/ripple/app/tx/impl/CancelOffer.cpp
|
||||
src/ripple/app/tx/impl/CashCheck.cpp
|
||||
src/ripple/app/tx/impl/Change.cpp
|
||||
src/ripple/app/tx/impl/Clawback.cpp
|
||||
src/ripple/app/tx/impl/CreateCheck.cpp
|
||||
src/ripple/app/tx/impl/CreateOffer.cpp
|
||||
src/ripple/app/tx/impl/CreateTicket.cpp
|
||||
@@ -420,6 +521,11 @@ target_sources (rippled PRIVATE
|
||||
src/ripple/app/tx/impl/DepositPreauth.cpp
|
||||
src/ripple/app/tx/impl/Escrow.cpp
|
||||
src/ripple/app/tx/impl/InvariantCheck.cpp
|
||||
src/ripple/app/tx/impl/NFTokenAcceptOffer.cpp
|
||||
src/ripple/app/tx/impl/NFTokenBurn.cpp
|
||||
src/ripple/app/tx/impl/NFTokenCancelOffer.cpp
|
||||
src/ripple/app/tx/impl/NFTokenCreateOffer.cpp
|
||||
src/ripple/app/tx/impl/NFTokenMint.cpp
|
||||
src/ripple/app/tx/impl/OfferStream.cpp
|
||||
src/ripple/app/tx/impl/PayChan.cpp
|
||||
src/ripple/app/tx/impl/Payment.cpp
|
||||
@@ -427,11 +533,13 @@ target_sources (rippled PRIVATE
|
||||
src/ripple/app/tx/impl/SetRegularKey.cpp
|
||||
src/ripple/app/tx/impl/SetSignerList.cpp
|
||||
src/ripple/app/tx/impl/SetTrust.cpp
|
||||
src/ripple/app/tx/impl/XChainBridge.cpp
|
||||
src/ripple/app/tx/impl/SignerEntries.cpp
|
||||
src/ripple/app/tx/impl/Taker.cpp
|
||||
src/ripple/app/tx/impl/Transactor.cpp
|
||||
src/ripple/app/tx/impl/apply.cpp
|
||||
src/ripple/app/tx/impl/applySteps.cpp
|
||||
src/ripple/app/tx/impl/details/NFTokenUtils.cpp
|
||||
#[===============================[
|
||||
main sources:
|
||||
subdir: basics (partial)
|
||||
@@ -516,7 +624,6 @@ target_sources (rippled PRIVATE
|
||||
src/ripple/nodestore/impl/DeterministicShard.cpp
|
||||
src/ripple/nodestore/impl/DecodedBlob.cpp
|
||||
src/ripple/nodestore/impl/DummyScheduler.cpp
|
||||
src/ripple/nodestore/impl/EncodedBlob.cpp
|
||||
src/ripple/nodestore/impl/ManagerImp.cpp
|
||||
src/ripple/nodestore/impl/NodeObject.cpp
|
||||
src/ripple/nodestore/impl/Shard.cpp
|
||||
@@ -529,6 +636,7 @@ target_sources (rippled PRIVATE
|
||||
src/ripple/overlay/impl/Cluster.cpp
|
||||
src/ripple/overlay/impl/ConnectAttempt.cpp
|
||||
src/ripple/overlay/impl/Handshake.cpp
|
||||
src/ripple/overlay/impl/InboundHandoff.cpp
|
||||
src/ripple/overlay/impl/Message.cpp
|
||||
src/ripple/overlay/impl/OverlayImpl.cpp
|
||||
src/ripple/overlay/impl/PeerImp.cpp
|
||||
@@ -566,7 +674,7 @@ target_sources (rippled PRIVATE
|
||||
src/ripple/rpc/handlers/AccountObjects.cpp
|
||||
src/ripple/rpc/handlers/AccountOffers.cpp
|
||||
src/ripple/rpc/handlers/AccountTx.cpp
|
||||
src/ripple/rpc/handlers/AccountTxOld.cpp
|
||||
src/ripple/rpc/handlers/AMMInfo.cpp
|
||||
src/ripple/rpc/handlers/BlackList.cpp
|
||||
src/ripple/rpc/handlers/BookOffers.cpp
|
||||
src/ripple/rpc/handlers/CanDelete.cpp
|
||||
@@ -593,6 +701,7 @@ target_sources (rippled PRIVATE
|
||||
src/ripple/rpc/handlers/LogLevel.cpp
|
||||
src/ripple/rpc/handlers/LogRotate.cpp
|
||||
src/ripple/rpc/handlers/Manifest.cpp
|
||||
src/ripple/rpc/handlers/NFTOffers.cpp
|
||||
src/ripple/rpc/handlers/NodeToShard.cpp
|
||||
src/ripple/rpc/handlers/NoRippleCheck.cpp
|
||||
src/ripple/rpc/handlers/OwnerInfo.cpp
|
||||
@@ -625,12 +734,11 @@ target_sources (rippled PRIVATE
|
||||
src/ripple/rpc/handlers/WalletPropose.cpp
|
||||
src/ripple/rpc/impl/DeliveredAmount.cpp
|
||||
src/ripple/rpc/impl/Handler.cpp
|
||||
src/ripple/rpc/impl/GRPCHelpers.cpp
|
||||
src/ripple/rpc/impl/LegacyPathFind.cpp
|
||||
src/ripple/rpc/impl/RPCHandler.cpp
|
||||
src/ripple/rpc/impl/RPCHelpers.cpp
|
||||
src/ripple/rpc/impl/Role.cpp
|
||||
src/ripple/rpc/impl/ServerHandlerImp.cpp
|
||||
src/ripple/rpc/impl/ServerHandler.cpp
|
||||
src/ripple/rpc/impl/ShardArchiveHandler.cpp
|
||||
src/ripple/rpc/impl/ShardVerificationScheduler.cpp
|
||||
src/ripple/rpc/impl/Status.cpp
|
||||
@@ -670,7 +778,11 @@ if (tests)
|
||||
src/test/app/AccountDelete_test.cpp
|
||||
src/test/app/AccountTxPaging_test.cpp
|
||||
src/test/app/AmendmentTable_test.cpp
|
||||
src/test/app/AMM_test.cpp
|
||||
src/test/app/AMMCalc_test.cpp
|
||||
src/test/app/AMMExtended_test.cpp
|
||||
src/test/app/Check_test.cpp
|
||||
src/test/app/Clawback_test.cpp
|
||||
src/test/app/CrossingLimits_test.cpp
|
||||
src/test/app/DeliverMin_test.cpp
|
||||
src/test/app/DepositAuth_test.cpp
|
||||
@@ -683,10 +795,15 @@ if (tests)
|
||||
src/test/app/HashRouter_test.cpp
|
||||
src/test/app/LedgerHistory_test.cpp
|
||||
src/test/app/LedgerLoad_test.cpp
|
||||
src/test/app/LedgerMaster_test.cpp
|
||||
src/test/app/LedgerReplay_test.cpp
|
||||
src/test/app/LoadFeeTrack_test.cpp
|
||||
src/test/app/Manifest_test.cpp
|
||||
src/test/app/MultiSign_test.cpp
|
||||
src/test/app/NetworkID_test.cpp
|
||||
src/test/app/NFToken_test.cpp
|
||||
src/test/app/NFTokenBurn_test.cpp
|
||||
src/test/app/NFTokenDir_test.cpp
|
||||
src/test/app/OfferStream_test.cpp
|
||||
src/test/app/Offer_test.cpp
|
||||
src/test/app/OversizeMeta_test.cpp
|
||||
@@ -696,8 +813,10 @@ if (tests)
|
||||
src/test/app/PseudoTx_test.cpp
|
||||
src/test/app/RCLCensorshipDetector_test.cpp
|
||||
src/test/app/RCLValidations_test.cpp
|
||||
src/test/app/ReducedOffer_test.cpp
|
||||
src/test/app/Regression_test.cpp
|
||||
src/test/app/SHAMapStore_test.cpp
|
||||
src/test/app/XChain_test.cpp
|
||||
src/test/app/SetAuth_test.cpp
|
||||
src/test/app/SetRegularKey_test.cpp
|
||||
src/test/app/SetTrust_test.cpp
|
||||
@@ -721,6 +840,7 @@ if (tests)
|
||||
src/test/basics/FileUtilities_test.cpp
|
||||
src/test/basics/IOUAmount_test.cpp
|
||||
src/test/basics/KeyCache_test.cpp
|
||||
src/test/basics/Number_test.cpp
|
||||
src/test/basics/PerfLog_test.cpp
|
||||
src/test/basics/RangeSet_test.cpp
|
||||
src/test/basics/scope_test.cpp
|
||||
@@ -733,6 +853,7 @@ if (tests)
|
||||
src/test/basics/contract_test.cpp
|
||||
src/test/basics/FeeUnits_test.cpp
|
||||
src/test/basics/hardened_hash_test.cpp
|
||||
src/test/basics/join_test.cpp
|
||||
src/test/basics/mulDiv_test.cpp
|
||||
src/test/basics/tagged_integer_test.cpp
|
||||
#[===============================[
|
||||
@@ -804,13 +925,17 @@ if (tests)
|
||||
src/test/jtx/Env_test.cpp
|
||||
src/test/jtx/WSClient_test.cpp
|
||||
src/test/jtx/impl/Account.cpp
|
||||
src/test/jtx/impl/AMM.cpp
|
||||
src/test/jtx/impl/AMMTest.cpp
|
||||
src/test/jtx/impl/Env.cpp
|
||||
src/test/jtx/impl/JSONRPCClient.cpp
|
||||
src/test/jtx/impl/ManualTimeKeeper.cpp
|
||||
src/test/jtx/impl/TestHelpers.cpp
|
||||
src/test/jtx/impl/WSClient.cpp
|
||||
src/test/jtx/impl/acctdelete.cpp
|
||||
src/test/jtx/impl/account_txn_id.cpp
|
||||
src/test/jtx/impl/amount.cpp
|
||||
src/test/jtx/impl/attester.cpp
|
||||
src/test/jtx/impl/balance.cpp
|
||||
src/test/jtx/impl/check.cpp
|
||||
src/test/jtx/impl/delivermin.cpp
|
||||
@@ -832,9 +957,11 @@ if (tests)
|
||||
src/test/jtx/impl/regkey.cpp
|
||||
src/test/jtx/impl/sendmax.cpp
|
||||
src/test/jtx/impl/seq.cpp
|
||||
src/test/jtx/impl/xchain_bridge.cpp
|
||||
src/test/jtx/impl/sig.cpp
|
||||
src/test/jtx/impl/tag.cpp
|
||||
src/test/jtx/impl/ticket.cpp
|
||||
src/test/jtx/impl/token.cpp
|
||||
src/test/jtx/impl/trust.cpp
|
||||
src/test/jtx/impl/txflags.cpp
|
||||
src/test/jtx/impl/utility.cpp
|
||||
@@ -890,7 +1017,8 @@ if (tests)
|
||||
src/test/protocol/BuildInfo_test.cpp
|
||||
src/test/protocol/InnerObjectFormats_test.cpp
|
||||
src/test/protocol/Issue_test.cpp
|
||||
src/test/protocol/KnownFormatToGRPC_test.cpp
|
||||
src/test/protocol/Hooks_test.cpp
|
||||
src/test/protocol/Memo_test.cpp
|
||||
src/test/protocol/PublicKey_test.cpp
|
||||
src/test/protocol/Quality_test.cpp
|
||||
src/test/protocol/STAccount_test.cpp
|
||||
@@ -920,11 +1048,11 @@ if (tests)
|
||||
src/test/rpc/AccountSet_test.cpp
|
||||
src/test/rpc/AccountTx_test.cpp
|
||||
src/test/rpc/AmendmentBlocked_test.cpp
|
||||
src/test/rpc/AMMInfo_test.cpp
|
||||
src/test/rpc/Book_test.cpp
|
||||
src/test/rpc/DepositAuthorized_test.cpp
|
||||
src/test/rpc/DeliveredAmount_test.cpp
|
||||
src/test/rpc/Feature_test.cpp
|
||||
src/test/rpc/Fee_test.cpp
|
||||
src/test/rpc/GatewayBalances_test.cpp
|
||||
src/test/rpc/GetCounts_test.cpp
|
||||
src/test/rpc/JSONRPC_test.cpp
|
||||
@@ -947,12 +1075,10 @@ if (tests)
|
||||
src/test/rpc/ServerInfo_test.cpp
|
||||
src/test/rpc/ShardArchiveHandler_test.cpp
|
||||
src/test/rpc/Status_test.cpp
|
||||
src/test/rpc/Submit_test.cpp
|
||||
src/test/rpc/Subscribe_test.cpp
|
||||
src/test/rpc/Transaction_test.cpp
|
||||
src/test/rpc/TransactionEntry_test.cpp
|
||||
src/test/rpc/TransactionHistory_test.cpp
|
||||
src/test/rpc/Tx_test.cpp
|
||||
src/test/rpc/ValidatorInfo_test.cpp
|
||||
src/test/rpc/ValidatorRPC_test.cpp
|
||||
src/test/rpc/Version_test.cpp
|
||||
@@ -989,17 +1115,18 @@ if (is_ci)
|
||||
target_compile_definitions(rippled PRIVATE RIPPLED_RUNNING_IN_CI)
|
||||
endif ()
|
||||
|
||||
if (reporting)
|
||||
target_compile_definitions(rippled PRIVATE RIPPLED_REPORTING)
|
||||
endif ()
|
||||
if(reporting)
|
||||
set_target_properties(rippled PROPERTIES OUTPUT_NAME rippled-reporting)
|
||||
get_target_property(BIN_NAME rippled OUTPUT_NAME)
|
||||
message(STATUS "Reporting mode build: rippled renamed ${BIN_NAME}")
|
||||
target_compile_definitions(rippled PRIVATE RIPPLED_REPORTING)
|
||||
endif()
|
||||
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16)
|
||||
# any files that don't play well with unity should be added here
|
||||
if (tests)
|
||||
set_source_files_properties(
|
||||
# these two seem to produce conflicts in beast teardown template methods
|
||||
src/test/rpc/ValidatorRPC_test.cpp
|
||||
src/test/rpc/ShardArchiveHandler_test.cpp
|
||||
PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
|
||||
endif () #tests
|
||||
endif ()
|
||||
# any files that don't play well with unity should be added here
|
||||
if (tests)
|
||||
set_source_files_properties(
|
||||
# these two seem to produce conflicts in beast teardown template methods
|
||||
src/test/rpc/ValidatorRPC_test.cpp
|
||||
src/test/rpc/ShardArchiveHandler_test.cpp
|
||||
PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
|
||||
endif () #tests
|
||||
|
||||
@@ -1,79 +1,84 @@
|
||||
#[===================================================================[
|
||||
docs target (optional)
|
||||
#]===================================================================]
|
||||
if (tests)
|
||||
find_package (Doxygen)
|
||||
if (NOT TARGET Doxygen::doxygen)
|
||||
message (STATUS "doxygen executable not found -- skipping docs target")
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
set (doxygen_output_directory "${CMAKE_BINARY_DIR}/docs")
|
||||
set (doxygen_include_path "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
set (doxygen_index_file "${doxygen_output_directory}/html/index.html")
|
||||
set (doxyfile "${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile")
|
||||
|
||||
file (GLOB_RECURSE doxygen_input
|
||||
docs/*.md
|
||||
src/ripple/*.h
|
||||
src/ripple/*.cpp
|
||||
src/ripple/*.md
|
||||
src/test/*.h
|
||||
src/test/*.md
|
||||
Builds/*/README.md)
|
||||
list (APPEND doxygen_input
|
||||
README.md
|
||||
RELEASENOTES.md
|
||||
src/README.md)
|
||||
set (dependencies "${doxygen_input}" "${doxyfile}")
|
||||
|
||||
function (verbose_find_path variable name)
|
||||
# find_path sets a CACHE variable, so don't try using a "local" variable.
|
||||
find_path (${variable} "${name}" ${ARGN})
|
||||
if (NOT ${variable})
|
||||
message (WARNING "could not find ${name}")
|
||||
else ()
|
||||
message (STATUS "found ${name}: ${${variable}}/${name}")
|
||||
endif ()
|
||||
endfunction ()
|
||||
|
||||
verbose_find_path (doxygen_plantuml_jar_path plantuml.jar PATH_SUFFIXES share/plantuml)
|
||||
verbose_find_path (doxygen_dot_path dot)
|
||||
|
||||
# https://en.cppreference.com/w/Cppreference:Archives
|
||||
# https://stackoverflow.com/questions/60822559/how-to-move-a-file-download-from-configure-step-to-build-step
|
||||
set (download_script "${CMAKE_BINARY_DIR}/docs/download-cppreference.cmake")
|
||||
file (WRITE
|
||||
"${download_script}"
|
||||
"file (DOWNLOAD \
|
||||
http://upload.cppreference.com/mwiki/images/b/b2/html_book_20190607.zip \
|
||||
${CMAKE_BINARY_DIR}/docs/cppreference.zip \
|
||||
EXPECTED_HASH MD5=82b3a612d7d35a83e3cb1195a63689ab \
|
||||
)\n \
|
||||
execute_process ( \
|
||||
COMMAND \"${CMAKE_COMMAND}\" -E tar -xf cppreference.zip \
|
||||
)\n"
|
||||
)
|
||||
set (tagfile "${CMAKE_BINARY_DIR}/docs/cppreference-doxygen-web.tag.xml")
|
||||
add_custom_command (
|
||||
OUTPUT "${tagfile}"
|
||||
COMMAND "${CMAKE_COMMAND}" -P "${download_script}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs"
|
||||
)
|
||||
set (doxygen_tagfiles "${tagfile}=http://en.cppreference.com/w/")
|
||||
|
||||
add_custom_command (
|
||||
OUTPUT "${doxygen_index_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E env
|
||||
"DOXYGEN_OUTPUT_DIRECTORY=${doxygen_output_directory}"
|
||||
"DOXYGEN_INCLUDE_PATH=${doxygen_include_path}"
|
||||
"DOXYGEN_TAGFILES=${doxygen_tagfiles}"
|
||||
"DOXYGEN_PLANTUML_JAR_PATH=${doxygen_plantuml_jar_path}"
|
||||
"DOXYGEN_DOT_PATH=${doxygen_dot_path}"
|
||||
"${DOXYGEN_EXECUTABLE}" "${doxyfile}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
DEPENDS "${dependencies}" "${tagfile}")
|
||||
add_custom_target (docs
|
||||
DEPENDS "${doxygen_index_file}"
|
||||
SOURCES "${dependencies}")
|
||||
endif ()
|
||||
|
||||
option(with_docs "Include the docs target?" FALSE)
|
||||
|
||||
if(NOT (with_docs OR only_docs))
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package(Doxygen)
|
||||
if(NOT TARGET Doxygen::doxygen)
|
||||
message(STATUS "doxygen executable not found -- skipping docs target")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(doxygen_output_directory "${CMAKE_BINARY_DIR}/docs")
|
||||
set(doxygen_include_path "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
set(doxygen_index_file "${doxygen_output_directory}/html/index.html")
|
||||
set(doxyfile "${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile")
|
||||
|
||||
file(GLOB_RECURSE doxygen_input
|
||||
docs/*.md
|
||||
src/ripple/*.h
|
||||
src/ripple/*.cpp
|
||||
src/ripple/*.md
|
||||
src/test/*.h
|
||||
src/test/*.md
|
||||
Builds/*/README.md)
|
||||
list(APPEND doxygen_input
|
||||
README.md
|
||||
RELEASENOTES.md
|
||||
src/README.md)
|
||||
set(dependencies "${doxygen_input}" "${doxyfile}")
|
||||
|
||||
function(verbose_find_path variable name)
|
||||
# find_path sets a CACHE variable, so don't try using a "local" variable.
|
||||
find_path(${variable} "${name}" ${ARGN})
|
||||
if(NOT ${variable})
|
||||
message(NOTICE "could not find ${name}")
|
||||
else()
|
||||
message(STATUS "found ${name}: ${${variable}}/${name}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
verbose_find_path(doxygen_plantuml_jar_path plantuml.jar PATH_SUFFIXES share/plantuml)
|
||||
verbose_find_path(doxygen_dot_path dot)
|
||||
|
||||
# https://en.cppreference.com/w/Cppreference:Archives
|
||||
# https://stackoverflow.com/questions/60822559/how-to-move-a-file-download-from-configure-step-to-build-step
|
||||
set(download_script "${CMAKE_BINARY_DIR}/docs/download-cppreference.cmake")
|
||||
file(WRITE
|
||||
"${download_script}"
|
||||
"file(DOWNLOAD \
|
||||
http://upload.cppreference.com/mwiki/images/b/b2/html_book_20190607.zip \
|
||||
${CMAKE_BINARY_DIR}/docs/cppreference.zip \
|
||||
EXPECTED_HASH MD5=82b3a612d7d35a83e3cb1195a63689ab \
|
||||
)\n \
|
||||
execute_process( \
|
||||
COMMAND \"${CMAKE_COMMAND}\" -E tar -xf cppreference.zip \
|
||||
)\n"
|
||||
)
|
||||
set(tagfile "${CMAKE_BINARY_DIR}/docs/cppreference-doxygen-web.tag.xml")
|
||||
add_custom_command(
|
||||
OUTPUT "${tagfile}"
|
||||
COMMAND "${CMAKE_COMMAND}" -P "${download_script}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs"
|
||||
)
|
||||
set(doxygen_tagfiles "${tagfile}=http://en.cppreference.com/w/")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${doxygen_index_file}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E env
|
||||
"DOXYGEN_OUTPUT_DIRECTORY=${doxygen_output_directory}"
|
||||
"DOXYGEN_INCLUDE_PATH=${doxygen_include_path}"
|
||||
"DOXYGEN_TAGFILES=${doxygen_tagfiles}"
|
||||
"DOXYGEN_PLANTUML_JAR_PATH=${doxygen_plantuml_jar_path}"
|
||||
"DOXYGEN_DOT_PATH=${doxygen_dot_path}"
|
||||
"${DOXYGEN_EXECUTABLE}" "${doxyfile}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
DEPENDS "${dependencies}" "${tagfile}")
|
||||
add_custom_target(docs
|
||||
DEPENDS "${doxygen_index_file}"
|
||||
SOURCES "${dependencies}")
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
install (
|
||||
TARGETS
|
||||
ed25519-donna
|
||||
common
|
||||
opts
|
||||
ripple_syslibs
|
||||
@@ -16,17 +15,6 @@ install (
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include)
|
||||
|
||||
if(${INSTALL_SECP256K1})
|
||||
install (
|
||||
TARGETS
|
||||
secp256k1
|
||||
EXPORT RippleExports
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include)
|
||||
endif()
|
||||
|
||||
install (EXPORT RippleExports
|
||||
FILE RippleTargets.cmake
|
||||
NAMESPACE Ripple::
|
||||
|
||||
@@ -35,17 +35,10 @@ target_link_libraries (opts
|
||||
$<$<BOOL:${profile}>:-pg>
|
||||
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${profile}>>:-p>)
|
||||
|
||||
if (jemalloc)
|
||||
if (static)
|
||||
set(JEMALLOC_USE_STATIC ON CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
find_package (jemalloc REQUIRED)
|
||||
target_compile_definitions (opts INTERFACE PROFILE_JEMALLOC)
|
||||
target_include_directories (opts SYSTEM INTERFACE ${JEMALLOC_INCLUDE_DIRS})
|
||||
target_link_libraries (opts INTERFACE ${JEMALLOC_LIBRARIES})
|
||||
get_filename_component (JEMALLOC_LIB_PATH ${JEMALLOC_LIBRARIES} DIRECTORY)
|
||||
## TODO see if we can use the BUILD_RPATH target property (is it transitive?)
|
||||
set (CMAKE_BUILD_RPATH ${CMAKE_BUILD_RPATH} ${JEMALLOC_LIB_PATH})
|
||||
if(jemalloc)
|
||||
find_package(jemalloc REQUIRED)
|
||||
target_compile_definitions(opts INTERFACE PROFILE_JEMALLOC)
|
||||
target_link_libraries(opts INTERFACE jemalloc::jemalloc)
|
||||
endif ()
|
||||
|
||||
if (san)
|
||||
|
||||
@@ -14,7 +14,7 @@ if (is_multiconfig)
|
||||
file(GLOB md_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS
|
||||
*.md)
|
||||
LIST(APPEND all_sources ${md_files})
|
||||
foreach (_target secp256k1 ed25519-donna pbufs xrpl_core rippled)
|
||||
foreach (_target secp256k1::secp256k1 ed25519::ed25519 xrpl_core rippled)
|
||||
get_target_property (_type ${_target} TYPE)
|
||||
if(_type STREQUAL "INTERFACE_LIBRARY")
|
||||
continue()
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH prefix path..this is where we will download
|
||||
and build any ExternalProjects, and they will hopefully
|
||||
survive across build directory deletion (manual cleans)
|
||||
#]===================================================================]
|
||||
|
||||
string (REGEX REPLACE "[ \\/%]+" "_" gen_for_path ${CMAKE_GENERATOR})
|
||||
string (TOLOWER ${gen_for_path} gen_for_path)
|
||||
# HACK: trying to shorten paths for windows CI (which hits 260 MAXPATH easily)
|
||||
# @see: https://issues.jenkins-ci.org/browse/JENKINS-38706?focusedCommentId=339847
|
||||
string (REPLACE "visual_studio" "vs" gen_for_path ${gen_for_path})
|
||||
if (NOT DEFINED NIH_CACHE_ROOT)
|
||||
if (DEFINED ENV{NIH_CACHE_ROOT})
|
||||
set (NIH_CACHE_ROOT $ENV{NIH_CACHE_ROOT})
|
||||
else ()
|
||||
set (NIH_CACHE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/.nih_c")
|
||||
endif ()
|
||||
endif ()
|
||||
set (nih_cache_path
|
||||
"${NIH_CACHE_ROOT}/${gen_for_path}/${CMAKE_CXX_COMPILER_ID}_${CMAKE_CXX_COMPILER_VERSION}")
|
||||
if (NOT is_multiconfig)
|
||||
set (nih_cache_path "${nih_cache_path}/${CMAKE_BUILD_TYPE}")
|
||||
endif ()
|
||||
file(TO_CMAKE_PATH "${nih_cache_path}" nih_cache_path)
|
||||
message (STATUS "NIH-EP cache path: ${nih_cache_path}")
|
||||
## two convenience variables:
|
||||
set (ep_lib_prefix ${CMAKE_STATIC_LIBRARY_PREFIX})
|
||||
set (ep_lib_suffix ${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
|
||||
# this is a setting for FetchContent and needs to be
|
||||
# a cache variable
|
||||
# https://cmake.org/cmake/help/latest/module/FetchContent.html#populating-the-content
|
||||
set (FETCHCONTENT_BASE_DIR ${nih_cache_path} CACHE STRING "" FORCE)
|
||||
@@ -16,20 +16,7 @@ if (is_root_project)
|
||||
message (STATUS "using [${container_label}] as build container tag...")
|
||||
|
||||
file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/packages)
|
||||
file (MAKE_DIRECTORY ${NIH_CACHE_ROOT}/pkgbuild)
|
||||
if (is_linux)
|
||||
execute_process (COMMAND id -u
|
||||
OUTPUT_VARIABLE DOCKER_USER_ID
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message (STATUS "docker local user id: ${DOCKER_USER_ID}")
|
||||
execute_process (COMMAND id -g
|
||||
OUTPUT_VARIABLE DOCKER_GROUP_ID
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message (STATUS "docker local group id: ${DOCKER_GROUP_ID}")
|
||||
endif ()
|
||||
if (DOCKER_USER_ID AND DOCKER_GROUP_ID)
|
||||
set(map_user TRUE)
|
||||
endif ()
|
||||
|
||||
#[===================================================================[
|
||||
rpm
|
||||
#]===================================================================]
|
||||
@@ -37,7 +24,7 @@ if (is_root_project)
|
||||
docker build
|
||||
--pull
|
||||
--build-arg GIT_COMMIT=${commit_hash}
|
||||
-t rippled-rpm-builder:${container_label}
|
||||
-t rippleci/rippled-rpm-builder:${container_label}
|
||||
$<$<BOOL:${rpm_cache_from}>:--cache-from=${rpm_cache_from}>
|
||||
-f centos-builder/Dockerfile .
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Builds/containers
|
||||
@@ -47,23 +34,21 @@ if (is_root_project)
|
||||
SOURCES
|
||||
Builds/containers/centos-builder/Dockerfile
|
||||
Builds/containers/centos-builder/centos_setup.sh
|
||||
Builds/containers/centos-builder/extras.sh
|
||||
Builds/containers/shared/build_deps.sh
|
||||
Builds/containers/shared/rippled.service
|
||||
Builds/containers/shared/update_sources.sh
|
||||
Builds/containers/shared/update-rippled.sh
|
||||
Builds/containers/shared/update_sources.sh
|
||||
Builds/containers/shared/rippled.service
|
||||
Builds/containers/shared/rippled-reporting.service
|
||||
Builds/containers/packaging/rpm/rippled.spec
|
||||
Builds/containers/packaging/rpm/build_rpm.sh
|
||||
Builds/containers/packaging/rpm/50-rippled.preset
|
||||
Builds/containers/packaging/rpm/50-rippled-reporting.preset
|
||||
bin/getRippledInfo
|
||||
)
|
||||
exclude_from_default (rpm_container)
|
||||
add_custom_target (rpm
|
||||
docker run
|
||||
-e NIH_CACHE_ROOT=/opt/rippled_bld/pkg/.nih_c
|
||||
-v ${NIH_CACHE_ROOT}/pkgbuild:/opt/rippled_bld/pkg/.nih_c
|
||||
-v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
|
||||
-v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
|
||||
"$<$<BOOL:${map_user}>:--volume=/etc/passwd:/etc/passwd;--volume=/etc/group:/etc/group;--user=${DOCKER_USER_ID}:${DOCKER_GROUP_ID}>"
|
||||
-t rippled-rpm-builder:${container_label}
|
||||
/bin/bash -c "cp -fpu rippled/Builds/containers/packaging/rpm/build_rpm.sh . && ./build_rpm.sh"
|
||||
VERBATIM
|
||||
@@ -79,14 +64,14 @@ if (is_root_project)
|
||||
#[===================================================================[
|
||||
dpkg
|
||||
#]===================================================================]
|
||||
# currently use ubuntu 16.04 as a base b/c it has one of
|
||||
# currently use ubuntu 18.04 as a base b/c it has one of
|
||||
# the lower versions of libc among ubuntu and debian releases.
|
||||
# we could change this in the future and build with some other deb
|
||||
# based system.
|
||||
add_custom_target (dpkg_container
|
||||
docker build
|
||||
--pull
|
||||
--build-arg DIST_TAG=16.04
|
||||
--build-arg DIST_TAG=18.04
|
||||
--build-arg GIT_COMMIT=${commit_hash}
|
||||
-t rippled-dpkg-builder:${container_label}
|
||||
$<$<BOOL:${dpkg_cache_from}>:--cache-from=${dpkg_cache_from}>
|
||||
@@ -96,37 +81,44 @@ if (is_root_project)
|
||||
USES_TERMINAL
|
||||
COMMAND_EXPAND_LISTS
|
||||
SOURCES
|
||||
Builds/containers/packaging/dpkg/debian/rippled-reporting.links
|
||||
Builds/containers/packaging/dpkg/debian/copyright
|
||||
Builds/containers/packaging/dpkg/debian/rules
|
||||
Builds/containers/packaging/dpkg/debian/rippled-reporting.install
|
||||
Builds/containers/packaging/dpkg/debian/rippled-reporting.postinst
|
||||
Builds/containers/packaging/dpkg/debian/rippled.links
|
||||
Builds/containers/packaging/dpkg/debian/rippled.prerm
|
||||
Builds/containers/packaging/dpkg/debian/rippled.postinst
|
||||
Builds/containers/packaging/dpkg/debian/rippled-dev.install
|
||||
Builds/containers/packaging/dpkg/debian/dirs
|
||||
Builds/containers/packaging/dpkg/debian/rippled.postrm
|
||||
Builds/containers/packaging/dpkg/debian/rippled.conffiles
|
||||
Builds/containers/packaging/dpkg/debian/compat
|
||||
Builds/containers/packaging/dpkg/debian/source/format
|
||||
Builds/containers/packaging/dpkg/debian/source/local-options
|
||||
Builds/containers/packaging/dpkg/debian/README.Debian
|
||||
Builds/containers/packaging/dpkg/debian/rippled.install
|
||||
Builds/containers/packaging/dpkg/debian/rippled.preinst
|
||||
Builds/containers/packaging/dpkg/debian/docs
|
||||
Builds/containers/packaging/dpkg/debian/control
|
||||
Builds/containers/packaging/dpkg/debian/rippled-reporting.dirs
|
||||
Builds/containers/packaging/dpkg/build_dpkg.sh
|
||||
Builds/containers/ubuntu-builder/Dockerfile
|
||||
Builds/containers/ubuntu-builder/ubuntu_setup.sh
|
||||
Builds/containers/shared/build_deps.sh
|
||||
Builds/containers/shared/rippled.service
|
||||
Builds/containers/shared/update_sources.sh
|
||||
Builds/containers/shared/update-rippled.sh
|
||||
Builds/containers/packaging/dpkg/build_dpkg.sh
|
||||
Builds/containers/packaging/dpkg/debian/README.Debian
|
||||
Builds/containers/packaging/dpkg/debian/conffiles
|
||||
Builds/containers/packaging/dpkg/debian/control
|
||||
Builds/containers/packaging/dpkg/debian/copyright
|
||||
Builds/containers/packaging/dpkg/debian/dirs
|
||||
Builds/containers/packaging/dpkg/debian/docs
|
||||
Builds/containers/packaging/dpkg/debian/rippled-dev.install
|
||||
Builds/containers/packaging/dpkg/debian/rippled.install
|
||||
Builds/containers/packaging/dpkg/debian/rippled.links
|
||||
Builds/containers/packaging/dpkg/debian/rippled.postinst
|
||||
Builds/containers/packaging/dpkg/debian/rippled.postrm
|
||||
Builds/containers/packaging/dpkg/debian/rippled.preinst
|
||||
Builds/containers/packaging/dpkg/debian/rippled.prerm
|
||||
Builds/containers/packaging/dpkg/debian/rules
|
||||
bin/getRippledInfo
|
||||
Builds/containers/shared/install_cmake.sh
|
||||
Builds/containers/shared/update-rippled.sh
|
||||
Builds/containers/shared/update_sources.sh
|
||||
Builds/containers/shared/rippled.service
|
||||
Builds/containers/shared/rippled-reporting.service
|
||||
Builds/containers/shared/rippled-logrotate
|
||||
Builds/containers/shared/update-rippled-cron
|
||||
)
|
||||
exclude_from_default (dpkg_container)
|
||||
add_custom_target (dpkg
|
||||
docker run
|
||||
-e NIH_CACHE_ROOT=/opt/rippled_bld/pkg/.nih_c
|
||||
-v ${NIH_CACHE_ROOT}/pkgbuild:/opt/rippled_bld/pkg/.nih_c
|
||||
-v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
|
||||
-v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
|
||||
"$<$<BOOL:${map_user}>:--volume=/etc/passwd:/etc/passwd;--volume=/etc/group:/etc/group;--user=${DOCKER_USER_ID}:${DOCKER_GROUP_ID}>"
|
||||
-t rippled-dpkg-builder:${container_label}
|
||||
/bin/bash -c "cp -fpu rippled/Builds/containers/packaging/dpkg/build_dpkg.sh . && ./build_dpkg.sh"
|
||||
VERBATIM
|
||||
@@ -180,11 +172,9 @@ if (is_root_project)
|
||||
SOURCES
|
||||
Builds/containers/ubuntu-builder/Dockerfile
|
||||
Builds/containers/ubuntu-builder/ubuntu_setup.sh
|
||||
Builds/containers/shared/build_deps.sh
|
||||
)
|
||||
exclude_from_default (ci_container)
|
||||
else ()
|
||||
message (STATUS "docker NOT found -- won't be able to build containers for packaging")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -10,12 +10,7 @@ if (NOT ep_procs)
|
||||
message (STATUS "Using ${ep_procs} cores for ExternalProject builds.")
|
||||
endif ()
|
||||
endif ()
|
||||
get_property (is_multiconfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if (is_multiconfig STREQUAL "NOTFOUND")
|
||||
if (${CMAKE_GENERATOR} STREQUAL "Xcode" OR ${CMAKE_GENERATOR} MATCHES "^Visual Studio")
|
||||
set (is_multiconfig TRUE)
|
||||
endif ()
|
||||
endif ()
|
||||
get_property(is_multiconfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
|
||||
set (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
||||
if (NOT is_multiconfig)
|
||||
@@ -49,9 +44,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
message (FATAL_ERROR "This project requires GCC 8 or later")
|
||||
endif ()
|
||||
endif ()
|
||||
if (CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
set (is_xcode TRUE)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set (is_linux TRUE)
|
||||
@@ -72,10 +64,8 @@ if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
"directory from ${CMAKE_CURRENT_SOURCE_DIR} and try building in a separate directory.")
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio" AND
|
||||
NOT ("${CMAKE_GENERATOR}" MATCHES .*Win64.*))
|
||||
message (FATAL_ERROR
|
||||
"Visual Studio 32-bit build is not supported. Use -G\"${CMAKE_GENERATOR} Win64\"")
|
||||
if (MSVC AND CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
|
||||
message (FATAL_ERROR "Visual Studio 32-bit build is not supported.")
|
||||
endif ()
|
||||
|
||||
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
@@ -10,13 +10,8 @@ option (tests "Build tests" ON)
|
||||
|
||||
option (unity "Creates a build using UNITY support in cmake. This is the default" ON)
|
||||
if (unity)
|
||||
if (CMAKE_VERSION VERSION_LESS 3.16)
|
||||
message (WARNING "unity option only supported for with cmake 3.16+ (please upgrade)")
|
||||
set (unity OFF CACHE BOOL "unity only available for cmake 3.16+" FORCE)
|
||||
else ()
|
||||
if (NOT is_ci)
|
||||
set (CMAKE_UNITY_BUILD_BATCH_SIZE 15 CACHE STRING "")
|
||||
endif ()
|
||||
if (NOT is_ci)
|
||||
set (CMAKE_UNITY_BUILD_BATCH_SIZE 15 CACHE STRING "")
|
||||
endif ()
|
||||
endif ()
|
||||
if (is_gcc OR is_clang)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
option (validator_keys "Enables building of validator-keys-tool as a separate target (imported via FetchContent)" OFF)
|
||||
|
||||
if (validator_keys AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
|
||||
if (validator_keys)
|
||||
git_branch (current_branch)
|
||||
# default to tracking VK develop branch unless we are on master/release
|
||||
if (NOT (current_branch STREQUAL "master" OR current_branch STREQUAL "release"))
|
||||
@@ -20,5 +20,3 @@ if (validator_keys AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
|
||||
endif ()
|
||||
add_subdirectory (${validator_keys_src_SOURCE_DIR} ${CMAKE_BINARY_DIR}/validator-keys)
|
||||
endif ()
|
||||
|
||||
|
||||
|
||||
106
Builds/CMake/SociConfig.cmake.patched
Normal file
106
Builds/CMake/SociConfig.cmake.patched
Normal file
@@ -0,0 +1,106 @@
|
||||
################################################################################
|
||||
# SociConfig.cmake - CMake build configuration of SOCI library
|
||||
################################################################################
|
||||
# Copyright (C) 2010 Mateusz Loskot <mateusz@loskot.net>
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
################################################################################
|
||||
|
||||
include(CheckCXXSymbolExists)
|
||||
|
||||
if(WIN32)
|
||||
check_cxx_symbol_exists("_M_AMD64" "" SOCI_TARGET_ARCH_X64)
|
||||
if(NOT RTC_ARCH_X64)
|
||||
check_cxx_symbol_exists("_M_IX86" "" SOCI_TARGET_ARCH_X86)
|
||||
endif(NOT RTC_ARCH_X64)
|
||||
# add check for arm here
|
||||
# see http://msdn.microsoft.com/en-us/library/b0084kay.aspx
|
||||
else(WIN32)
|
||||
check_cxx_symbol_exists("__i386__" "" SOCI_TARGET_ARCH_X86)
|
||||
check_cxx_symbol_exists("__x86_64__" "" SOCI_TARGET_ARCH_X64)
|
||||
check_cxx_symbol_exists("__arm__" "" SOCI_TARGET_ARCH_ARM)
|
||||
endif(WIN32)
|
||||
|
||||
if(NOT DEFINED LIB_SUFFIX)
|
||||
if(SOCI_TARGET_ARCH_X64)
|
||||
set(_lib_suffix "64")
|
||||
else()
|
||||
set(_lib_suffix "")
|
||||
endif()
|
||||
set(LIB_SUFFIX ${_lib_suffix} CACHE STRING "Specifies suffix for the lib directory")
|
||||
endif()
|
||||
|
||||
#
|
||||
# C++11 Option
|
||||
#
|
||||
|
||||
if(NOT SOCI_CXX_C11)
|
||||
set (SOCI_CXX_C11 OFF CACHE BOOL "Build to the C++11 standard")
|
||||
endif()
|
||||
|
||||
#
|
||||
# Force compilation flags and set desired warnings level
|
||||
#
|
||||
|
||||
if (MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions(-D_CRT_NONSTDC_NO_WARNING)
|
||||
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
|
||||
|
||||
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /we4266")
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
set(SOCI_GCC_CLANG_COMMON_FLAGS "")
|
||||
# "-pedantic -Werror -Wno-error=parentheses -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Woverloaded-virtual -Wredundant-decls -Wno-long-long")
|
||||
|
||||
|
||||
if (SOCI_CXX_C11)
|
||||
set(SOCI_CXX_VERSION_FLAGS "-std=c++11")
|
||||
else()
|
||||
set(SOCI_CXX_VERSION_FLAGS "-std=gnu++98")
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "clang")
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION LESS 3.1 AND SOCI_ASAN)
|
||||
set(SOCI_GCC_CLANG_COMMON_FLAGS "${SOCI_GCC_CLANG_COMMON_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
|
||||
# enforce C++11 for Clang
|
||||
set(SOCI_CXX_C11 ON)
|
||||
set(SOCI_CXX_VERSION_FLAGS "-std=c++11")
|
||||
add_definitions(-DCATCH_CONFIG_CPP11_NO_IS_ENUM)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SOCI_GCC_CLANG_COMMON_FLAGS} ${SOCI_CXX_VERSION_FLAGS}")
|
||||
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION LESS 4.8 AND SOCI_ASAN)
|
||||
set(SOCI_GCC_CLANG_COMMON_FLAGS "${SOCI_GCC_CLANG_COMMON_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SOCI_GCC_CLANG_COMMON_FLAGS} ${SOCI_CXX_VERSION_FLAGS} ")
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else()
|
||||
message(WARNING "Unknown toolset - using default flags to build SOCI")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# Set SOCI_HAVE_* variables for soci-config.h generator
|
||||
set(SOCI_HAVE_CXX_C11 ${SOCI_CXX_C11} CACHE INTERNAL "Enables C++11 support")
|
||||
@@ -1,50 +1,4 @@
|
||||
#[===================================================================[
|
||||
NIH dep: boost
|
||||
#]===================================================================]
|
||||
|
||||
if((NOT DEFINED BOOST_ROOT) AND(DEFINED ENV{BOOST_ROOT}))
|
||||
set(BOOST_ROOT $ENV{BOOST_ROOT})
|
||||
endif()
|
||||
file(TO_CMAKE_PATH "${BOOST_ROOT}" BOOST_ROOT)
|
||||
if(WIN32 OR CYGWIN)
|
||||
# Workaround for MSVC having two boost versions - x86 and x64 on same PC in stage folders
|
||||
if(DEFINED BOOST_ROOT)
|
||||
if(IS_DIRECTORY ${BOOST_ROOT}/stage64/lib)
|
||||
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/stage64/lib)
|
||||
elseif(IS_DIRECTORY ${BOOST_ROOT}/stage/lib)
|
||||
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/stage/lib)
|
||||
elseif(IS_DIRECTORY ${BOOST_ROOT}/lib)
|
||||
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib)
|
||||
else()
|
||||
message(WARNING "Did not find expected boost library dir. "
|
||||
"Defaulting to ${BOOST_ROOT}")
|
||||
set(BOOST_LIBRARYDIR ${BOOST_ROOT})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "BOOST_ROOT: ${BOOST_ROOT}")
|
||||
message(STATUS "BOOST_LIBRARYDIR: ${BOOST_LIBRARYDIR}")
|
||||
|
||||
# uncomment the following as needed to debug FindBoost issues:
|
||||
#set(Boost_DEBUG ON)
|
||||
|
||||
#[=========================================================[
|
||||
boost dynamic libraries don't trivially support @rpath
|
||||
linking right now (cmake's default), so just force
|
||||
static linking for macos, or if requested on linux by flag
|
||||
#]=========================================================]
|
||||
if(static)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
endif()
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
if(static AND NOT APPLE)
|
||||
set(Boost_USE_STATIC_RUNTIME ON)
|
||||
else()
|
||||
set(Boost_USE_STATIC_RUNTIME OFF)
|
||||
endif()
|
||||
# TBD:
|
||||
# Boost_USE_DEBUG_RUNTIME: When ON, uses Boost libraries linked against the
|
||||
find_package(Boost 1.70 REQUIRED
|
||||
find_package(Boost 1.82 REQUIRED
|
||||
COMPONENTS
|
||||
chrono
|
||||
container
|
||||
@@ -52,14 +6,16 @@ find_package(Boost 1.70 REQUIRED
|
||||
coroutine
|
||||
date_time
|
||||
filesystem
|
||||
json
|
||||
program_options
|
||||
regex
|
||||
system
|
||||
thread)
|
||||
thread
|
||||
)
|
||||
|
||||
add_library(ripple_boost INTERFACE)
|
||||
add_library(Ripple::boost ALIAS ripple_boost)
|
||||
if(is_xcode)
|
||||
if(XCODE)
|
||||
target_include_directories(ripple_boost BEFORE INTERFACE ${Boost_INCLUDE_DIRS})
|
||||
target_compile_options(ripple_boost INTERFACE --system-header-prefix="boost/")
|
||||
else()
|
||||
@@ -74,6 +30,7 @@ target_link_libraries(ripple_boost
|
||||
Boost::coroutine
|
||||
Boost::date_time
|
||||
Boost::filesystem
|
||||
Boost::json
|
||||
Boost::program_options
|
||||
Boost::regex
|
||||
Boost::system
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: ed25519-donna
|
||||
#]===================================================================]
|
||||
|
||||
add_library (ed25519-donna STATIC
|
||||
src/ed25519-donna/ed25519.c)
|
||||
target_include_directories (ed25519-donna
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ed25519-donna)
|
||||
#[=========================================================[
|
||||
NOTE for macos:
|
||||
https://github.com/floodyberry/ed25519-donna/issues/29
|
||||
our source for ed25519-donna-portable.h has been
|
||||
patched to workaround this.
|
||||
#]=========================================================]
|
||||
target_link_libraries (ed25519-donna PUBLIC OpenSSL::SSL)
|
||||
add_library (NIH::ed25519-donna ALIAS ed25519-donna)
|
||||
target_link_libraries (ripple_libs INTERFACE NIH::ed25519-donna)
|
||||
#[===========================[
|
||||
headers installation
|
||||
#]===========================]
|
||||
install (
|
||||
FILES
|
||||
src/ed25519-donna/ed25519.h
|
||||
DESTINATION include/ed25519-donna)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,47 +0,0 @@
|
||||
# - Try to find jemalloc
|
||||
# Once done this will define
|
||||
# JEMALLOC_FOUND - System has jemalloc
|
||||
# JEMALLOC_INCLUDE_DIRS - The jemalloc include directories
|
||||
# JEMALLOC_LIBRARIES - The libraries needed to use jemalloc
|
||||
|
||||
if(NOT USE_BUNDLED_JEMALLOC)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_JEMALLOC QUIET jemalloc)
|
||||
endif()
|
||||
else()
|
||||
set(PC_JEMALLOC_INCLUDEDIR)
|
||||
set(PC_JEMALLOC_INCLUDE_DIRS)
|
||||
set(PC_JEMALLOC_LIBDIR)
|
||||
set(PC_JEMALLOC_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
set(JEMALLOC_DEFINITIONS ${PC_JEMALLOC_CFLAGS_OTHER})
|
||||
|
||||
find_path(JEMALLOC_INCLUDE_DIR jemalloc/jemalloc.h
|
||||
PATHS ${PC_JEMALLOC_INCLUDEDIR} ${PC_JEMALLOC_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libjemalloc.a as a preferred library name.
|
||||
if(JEMALLOC_USE_STATIC)
|
||||
list(APPEND JEMALLOC_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}jemalloc${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
list(APPEND JEMALLOC_NAMES jemalloc)
|
||||
|
||||
find_library(JEMALLOC_LIBRARY NAMES ${JEMALLOC_NAMES}
|
||||
HINTS ${PC_JEMALLOC_LIBDIR} ${PC_JEMALLOC_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
|
||||
set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(JeMalloc DEFAULT_MSG
|
||||
JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_LIBRARY)
|
||||
@@ -1,22 +0,0 @@
|
||||
find_package (PkgConfig REQUIRED)
|
||||
pkg_search_module (libarchive_PC QUIET libarchive>=3.4.3)
|
||||
|
||||
if(static)
|
||||
set(LIBARCHIVE_LIB libarchive.a)
|
||||
else()
|
||||
set(LIBARCHIVE_LIB archive)
|
||||
endif()
|
||||
|
||||
find_library (archive
|
||||
NAMES ${LIBARCHIVE_LIB}
|
||||
HINTS
|
||||
${libarchive_PC_LIBDIR}
|
||||
${libarchive_PC_LIBRARY_DIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_path (LIBARCHIVE_INCLUDE_DIR
|
||||
NAMES archive.h
|
||||
HINTS
|
||||
${libarchive_PC_INCLUDEDIR}
|
||||
${libarchive_PC_INCLUDEDIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
@@ -1,24 +0,0 @@
|
||||
find_package (PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_search_module (lz4_PC QUIET liblz4>=1.9)
|
||||
endif ()
|
||||
|
||||
if(static)
|
||||
set(LZ4_LIB liblz4.a)
|
||||
else()
|
||||
set(LZ4_LIB lz4.so)
|
||||
endif()
|
||||
|
||||
find_library (lz4
|
||||
NAMES ${LZ4_LIB}
|
||||
HINTS
|
||||
${lz4_PC_LIBDIR}
|
||||
${lz4_PC_LIBRARY_DIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_path (LZ4_INCLUDE_DIR
|
||||
NAMES lz4.h
|
||||
HINTS
|
||||
${lz4_PC_INCLUDEDIR}
|
||||
${lz4_PC_INCLUDEDIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
@@ -1,24 +0,0 @@
|
||||
find_package (PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_search_module (secp256k1_PC QUIET libsecp256k1)
|
||||
endif ()
|
||||
|
||||
if(static)
|
||||
set(SECP256K1_LIB libsecp256k1.a)
|
||||
else()
|
||||
set(SECP256K1_LIB secp256k1)
|
||||
endif()
|
||||
|
||||
find_library(secp256k1
|
||||
NAMES ${SECP256K1_LIB}
|
||||
HINTS
|
||||
${secp256k1_PC_LIBDIR}
|
||||
${secp256k1_PC_LIBRARY_PATHS}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_path (SECP256K1_INCLUDE_DIR
|
||||
NAMES secp256k1.h
|
||||
HINTS
|
||||
${secp256k1_PC_INCLUDEDIR}
|
||||
${secp256k1_PC_INCLUDEDIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
@@ -1,24 +0,0 @@
|
||||
find_package (PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_search_module (snappy_PC QUIET snappy>=1.1.7)
|
||||
endif ()
|
||||
|
||||
if(static)
|
||||
set(SNAPPY_LIB libsnappy.a)
|
||||
else()
|
||||
set(SNAPPY_LIB libsnappy.so)
|
||||
endif()
|
||||
|
||||
find_library (snappy
|
||||
NAMES ${SNAPPY_LIB}
|
||||
HINTS
|
||||
${snappy_PC_LIBDIR}
|
||||
${snappy_PC_LIBRARY_DIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_path (SNAPPY_INCLUDE_DIR
|
||||
NAMES snappy.h
|
||||
HINTS
|
||||
${snappy_PC_INCLUDEDIR}
|
||||
${snappy_PC_INCLUDEDIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
@@ -1,17 +0,0 @@
|
||||
find_package (PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
# TBD - currently no soci pkgconfig
|
||||
#pkg_search_module (soci_PC QUIET libsoci_core>=3.2)
|
||||
endif ()
|
||||
|
||||
if(static)
|
||||
set(SOCI_LIB libsoci.a)
|
||||
else()
|
||||
set(SOCI_LIB libsoci_core.so)
|
||||
endif()
|
||||
|
||||
find_library (soci
|
||||
NAMES ${SOCI_LIB})
|
||||
|
||||
find_path (SOCI_INCLUDE_DIR
|
||||
NAMES soci/soci.h)
|
||||
@@ -1,24 +0,0 @@
|
||||
find_package (PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_search_module (sqlite_PC QUIET sqlite3>=3.26.0)
|
||||
endif ()
|
||||
|
||||
if(static)
|
||||
set(SQLITE_LIB libsqlite3.a)
|
||||
else()
|
||||
set(SQLITE_LIB sqlite3.so)
|
||||
endif()
|
||||
|
||||
find_library (sqlite3
|
||||
NAMES ${SQLITE_LIB}
|
||||
HINTS
|
||||
${sqlite_PC_LIBDIR}
|
||||
${sqlite_PC_LIBRARY_DIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_path (SQLITE_INCLUDE_DIR
|
||||
NAMES sqlite3.h
|
||||
HINTS
|
||||
${sqlite_PC_INCLUDEDIR}
|
||||
${sqlite_PC_INCLUDEDIRS}
|
||||
NO_DEFAULT_PATH)
|
||||
@@ -1,163 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: libarchive
|
||||
#]===================================================================]
|
||||
|
||||
option (local_libarchive "use local build of libarchive." OFF)
|
||||
add_library (archive_lib UNKNOWN IMPORTED GLOBAL)
|
||||
|
||||
if (NOT local_libarchive)
|
||||
if (NOT WIN32)
|
||||
find_package(libarchive_pc REQUIRED)
|
||||
endif ()
|
||||
if (archive)
|
||||
message (STATUS "Found libarchive using pkg-config. Using ${archive}.")
|
||||
set_target_properties (archive_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${archive}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${archive}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${LIBARCHIVE_INCLUDE_DIR})
|
||||
# pkg-config can return extra info for static lib linking
|
||||
# this is probably needed/useful generally, but apply
|
||||
# to APPLE for now (mostly for homebrew)
|
||||
if (APPLE AND static AND libarchive_PC_STATIC_LIBRARIES)
|
||||
message(STATUS "NOTE: libarchive static libs: ${libarchive_PC_STATIC_LIBRARIES}")
|
||||
# also, APPLE seems to need iconv...maybe linux does too (TBD)
|
||||
target_link_libraries (archive_lib
|
||||
INTERFACE iconv ${libarchive_PC_STATIC_LIBRARIES})
|
||||
endif ()
|
||||
else ()
|
||||
## now try searching using the minimal find module that cmake provides
|
||||
find_package(LibArchive 3.4.3 QUIET)
|
||||
if (LibArchive_FOUND)
|
||||
if (static)
|
||||
# find module doesn't find static libs currently, so we re-search
|
||||
get_filename_component(_loc ${LibArchive_LIBRARY} DIRECTORY)
|
||||
find_library(_la_static
|
||||
NAMES libarchive.a archive_static.lib archive.lib
|
||||
PATHS ${_loc})
|
||||
if (_la_static)
|
||||
set (_la_lib ${_la_static})
|
||||
else ()
|
||||
message (WARNING "unable to find libarchive static lib - switching to local build")
|
||||
set (local_libarchive ON CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
else ()
|
||||
set (_la_lib ${LibArchive_LIBRARY})
|
||||
endif ()
|
||||
if (NOT local_libarchive)
|
||||
message (STATUS "Found libarchive using module/config. Using ${_la_lib}.")
|
||||
set_target_properties (archive_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${_la_lib}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${_la_lib}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${LibArchive_INCLUDE_DIRS})
|
||||
endif ()
|
||||
else ()
|
||||
set (local_libarchive ON CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
if (local_libarchive)
|
||||
set (lib_post "")
|
||||
if (MSVC)
|
||||
set (lib_post "_static")
|
||||
endif ()
|
||||
ExternalProject_Add (libarchive
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/libarchive/libarchive.git
|
||||
GIT_TAG v3.4.3
|
||||
CMAKE_ARGS
|
||||
# passing the compiler seems to be needed for windows CI, sadly
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
-DENABLE_LZ4=ON
|
||||
-ULZ4_*
|
||||
-DLZ4_INCLUDE_DIR=$<JOIN:$<TARGET_PROPERTY:lz4_lib,INTERFACE_INCLUDE_DIRECTORIES>,::>
|
||||
# because we are building a static lib, this lz4 library doesn't
|
||||
# actually matter since you can't generally link static libs to other static
|
||||
# libs. The include files are needed, but the library itself is not (until
|
||||
# we link our application, at which point we use the lz4 we built above).
|
||||
# nonetheless, we need to provide a library to libarchive else it will
|
||||
# NOT include lz4 support when configuring
|
||||
-DLZ4_LIBRARY=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:lz4_lib,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:lz4_lib,IMPORTED_LOCATION_RELEASE>>
|
||||
-DENABLE_WERROR=OFF
|
||||
-DENABLE_TAR=OFF
|
||||
-DENABLE_TAR_SHARED=OFF
|
||||
-DENABLE_INSTALL=ON
|
||||
-DENABLE_NETTLE=OFF
|
||||
-DENABLE_OPENSSL=OFF
|
||||
-DENABLE_LZO=OFF
|
||||
-DENABLE_LZMA=OFF
|
||||
-DENABLE_ZLIB=OFF
|
||||
-DENABLE_BZip2=OFF
|
||||
-DENABLE_LIBXML2=OFF
|
||||
-DENABLE_EXPAT=OFF
|
||||
-DENABLE_PCREPOSIX=OFF
|
||||
-DENABLE_LibGCC=OFF
|
||||
-DENABLE_CNG=OFF
|
||||
-DENABLE_CPIO=OFF
|
||||
-DENABLE_CPIO_SHARED=OFF
|
||||
-DENABLE_CAT=OFF
|
||||
-DENABLE_CAT_SHARED=OFF
|
||||
-DENABLE_XATTR=OFF
|
||||
-DENABLE_ACL=OFF
|
||||
-DENABLE_ICONV=OFF
|
||||
-DENABLE_TEST=OFF
|
||||
-DENABLE_COVERAGE=OFF
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
|
||||
"-DCMAKE_C_FLAGS_DEBUG=-MTd"
|
||||
"-DCMAKE_C_FLAGS_RELEASE=-MT"
|
||||
>
|
||||
LIST_SEPARATOR ::
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
--target archive_static
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
$<$<BOOL:${is_multiconfig}>:
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
<BINARY_DIR>/libarchive/$<CONFIG>/${ep_lib_prefix}archive${lib_post}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>/libarchive
|
||||
>
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
DEPENDS lz4_lib
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/libarchive/${ep_lib_prefix}archive${lib_post}${ep_lib_suffix}
|
||||
<BINARY_DIR>/libarchive/${ep_lib_prefix}archive${lib_post}_d${ep_lib_suffix}
|
||||
)
|
||||
ExternalProject_Get_Property (libarchive BINARY_DIR)
|
||||
ExternalProject_Get_Property (libarchive SOURCE_DIR)
|
||||
if (CMAKE_VERBOSE_MAKEFILE)
|
||||
print_ep_logs (libarchive)
|
||||
endif ()
|
||||
file (MAKE_DIRECTORY ${SOURCE_DIR}/libarchive)
|
||||
set_target_properties (archive_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/libarchive/${ep_lib_prefix}archive${lib_post}_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/libarchive/${ep_lib_prefix}archive${lib_post}${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOURCE_DIR}/libarchive
|
||||
INTERFACE_COMPILE_DEFINITIONS
|
||||
LIBARCHIVE_STATIC)
|
||||
endif()
|
||||
|
||||
add_dependencies (archive_lib libarchive)
|
||||
target_link_libraries (archive_lib INTERFACE lz4_lib)
|
||||
target_link_libraries (ripple_libs INTERFACE archive_lib)
|
||||
exclude_if_included (libarchive)
|
||||
exclude_if_included (archive_lib)
|
||||
@@ -1,79 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: lz4
|
||||
#]===================================================================]
|
||||
|
||||
add_library (lz4_lib STATIC IMPORTED GLOBAL)
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(lz4)
|
||||
endif()
|
||||
|
||||
if(lz4)
|
||||
set_target_properties (lz4_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${lz4}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${lz4}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${LZ4_INCLUDE_DIR})
|
||||
|
||||
else()
|
||||
ExternalProject_Add (lz4
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/lz4/lz4.git
|
||||
GIT_TAG v1.9.2
|
||||
SOURCE_SUBDIR contrib/cmake_unofficial
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
-DBUILD_STATIC_LIBS=ON
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
|
||||
"-DCMAKE_C_FLAGS_DEBUG=-MTd"
|
||||
"-DCMAKE_C_FLAGS_RELEASE=-MT"
|
||||
>
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
--target lz4_static
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
$<$<BOOL:${is_multiconfig}>:
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
<BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}lz4$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>
|
||||
>
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/${ep_lib_prefix}lz4${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}lz4_d${ep_lib_suffix}
|
||||
)
|
||||
ExternalProject_Get_Property (lz4 BINARY_DIR)
|
||||
ExternalProject_Get_Property (lz4 SOURCE_DIR)
|
||||
|
||||
file (MAKE_DIRECTORY ${SOURCE_DIR}/lz4)
|
||||
set_target_properties (lz4_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/${ep_lib_prefix}lz4_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/${ep_lib_prefix}lz4${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOURCE_DIR}/lib)
|
||||
|
||||
if (CMAKE_VERBOSE_MAKEFILE)
|
||||
print_ep_logs (lz4)
|
||||
endif ()
|
||||
add_dependencies (lz4_lib lz4)
|
||||
target_link_libraries (ripple_libs INTERFACE lz4_lib)
|
||||
exclude_if_included (lz4)
|
||||
endif()
|
||||
|
||||
exclude_if_included (lz4_lib)
|
||||
@@ -1,47 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: nudb
|
||||
|
||||
NuDB is header-only, thus is an INTERFACE lib in CMake.
|
||||
TODO: move the library definition into NuDB repo and add
|
||||
proper targets and export/install
|
||||
#]===================================================================]
|
||||
|
||||
if (is_root_project) # NuDB not needed in the case of xrpl_core inclusion build
|
||||
add_library (nudb INTERFACE)
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
|
||||
FetchContent_Declare(
|
||||
nudb_src
|
||||
GIT_REPOSITORY https://github.com/CPPAlliance/NuDB.git
|
||||
GIT_TAG 2.0.5
|
||||
)
|
||||
FetchContent_GetProperties(nudb_src)
|
||||
if(NOT nudb_src_POPULATED)
|
||||
message (STATUS "Pausing to download NuDB...")
|
||||
FetchContent_Populate(nudb_src)
|
||||
endif()
|
||||
else ()
|
||||
ExternalProject_Add (nudb_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/CPPAlliance/NuDB.git
|
||||
GIT_TAG 2.0.5
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_Get_Property (nudb_src SOURCE_DIR)
|
||||
set (nudb_src_SOURCE_DIR "${SOURCE_DIR}")
|
||||
file (MAKE_DIRECTORY ${nudb_src_SOURCE_DIR}/include)
|
||||
add_dependencies (nudb nudb_src)
|
||||
endif ()
|
||||
|
||||
file(TO_CMAKE_PATH "${nudb_src_SOURCE_DIR}" nudb_src_SOURCE_DIR)
|
||||
# specify as system includes so as to avoid warnings
|
||||
target_include_directories (nudb SYSTEM INTERFACE ${nudb_src_SOURCE_DIR}/include)
|
||||
target_link_libraries (nudb
|
||||
INTERFACE
|
||||
Boost::thread
|
||||
Boost::system)
|
||||
add_library (NIH::nudb ALIAS nudb)
|
||||
target_link_libraries (ripple_libs INTERFACE NIH::nudb)
|
||||
endif ()
|
||||
@@ -1,48 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: openssl
|
||||
#]===================================================================]
|
||||
|
||||
#[===============================================[
|
||||
OPENSSL_ROOT_DIR is the only variable that
|
||||
FindOpenSSL honors for locating, so convert any
|
||||
OPENSSL_ROOT vars to this
|
||||
#]===============================================]
|
||||
if (NOT DEFINED OPENSSL_ROOT_DIR)
|
||||
if (DEFINED ENV{OPENSSL_ROOT})
|
||||
set (OPENSSL_ROOT_DIR $ENV{OPENSSL_ROOT})
|
||||
elseif (HOMEBREW)
|
||||
execute_process (COMMAND ${HOMEBREW} --prefix openssl
|
||||
OUTPUT_VARIABLE OPENSSL_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif ()
|
||||
file (TO_CMAKE_PATH "${OPENSSL_ROOT_DIR}" OPENSSL_ROOT_DIR)
|
||||
endif ()
|
||||
|
||||
if (static)
|
||||
set (OPENSSL_USE_STATIC_LIBS ON)
|
||||
endif ()
|
||||
set (OPENSSL_MSVC_STATIC_RT ON)
|
||||
find_package (OpenSSL 1.1.1 REQUIRED)
|
||||
target_link_libraries (ripple_libs
|
||||
INTERFACE
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto)
|
||||
# disable SSLv2...this can also be done when building/configuring OpenSSL
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS OPENSSL_NO_SSL2)
|
||||
#[=========================================================[
|
||||
https://gitlab.kitware.com/cmake/cmake/issues/16885
|
||||
depending on how openssl is built, it might depend
|
||||
on zlib. In fact, the openssl find package should
|
||||
figure this out for us, but it does not currently...
|
||||
so let's add zlib ourselves to the lib list
|
||||
TODO: investigate linking to static zlib for static
|
||||
build option
|
||||
#]=========================================================]
|
||||
find_package (ZLIB)
|
||||
set (has_zlib FALSE)
|
||||
if (TARGET ZLIB::ZLIB)
|
||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
|
||||
set (has_zlib TRUE)
|
||||
endif ()
|
||||
@@ -1,70 +0,0 @@
|
||||
if(reporting)
|
||||
find_package(PostgreSQL)
|
||||
if(NOT PostgreSQL_FOUND)
|
||||
message("find_package did not find postgres")
|
||||
find_library(postgres NAMES pq libpq libpq-dev pq-dev postgresql-devel)
|
||||
find_path(libpq-fe NAMES libpq-fe.h PATH_SUFFIXES postgresql pgsql include)
|
||||
|
||||
if(NOT libpq-fe_FOUND OR NOT postgres_FOUND)
|
||||
message("No system installed Postgres found. Will build")
|
||||
add_library(postgres SHARED IMPORTED GLOBAL)
|
||||
add_library(pgport SHARED IMPORTED GLOBAL)
|
||||
add_library(pgcommon SHARED IMPORTED GLOBAL)
|
||||
ExternalProject_Add(postgres_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/postgres/postgres.git
|
||||
GIT_TAG master
|
||||
CONFIGURE_COMMAND ./configure --without-readline > /dev/null
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} -E env --unset=MAKELEVEL make
|
||||
UPDATE_COMMAND ""
|
||||
BUILD_IN_SOURCE 1
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/src/interfaces/libpq/${ep_lib_prefix}pq.a
|
||||
<BINARY_DIR>/src/common/${ep_lib_prefix}pgcommon.a
|
||||
<BINARY_DIR>/src/port/${ep_lib_prefix}pgport.a
|
||||
LOG_BUILD TRUE
|
||||
)
|
||||
ExternalProject_Get_Property (postgres_src SOURCE_DIR)
|
||||
ExternalProject_Get_Property (postgres_src BINARY_DIR)
|
||||
|
||||
set (postgres_src_SOURCE_DIR "${SOURCE_DIR}")
|
||||
file (MAKE_DIRECTORY ${postgres_src_SOURCE_DIR})
|
||||
list(APPEND INCLUDE_DIRS
|
||||
${SOURCE_DIR}/src/include
|
||||
${SOURCE_DIR}/src/interfaces/libpq
|
||||
)
|
||||
set_target_properties(postgres PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
${BINARY_DIR}/src/interfaces/libpq/${ep_lib_prefix}pq.a
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${INCLUDE_DIRS}"
|
||||
)
|
||||
set_target_properties(pgcommon PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
${BINARY_DIR}/src/common/${ep_lib_prefix}pgcommon.a
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${INCLUDE_DIRS}"
|
||||
)
|
||||
set_target_properties(pgport PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
${BINARY_DIR}/src/port/${ep_lib_prefix}pgport.a
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${INCLUDE_DIRS}"
|
||||
)
|
||||
add_dependencies(postgres postgres_src)
|
||||
add_dependencies(pgcommon postgres_src)
|
||||
add_dependencies(pgport postgres_src)
|
||||
file(TO_CMAKE_PATH "${postgres_src_SOURCE_DIR}" postgres_src_SOURCE_DIR)
|
||||
target_link_libraries(ripple_libs INTERFACE postgres pgcommon pgport)
|
||||
else()
|
||||
message("Found system installed Postgres via find_libary")
|
||||
target_include_directories(ripple_libs INTERFACE ${libpq-fe})
|
||||
target_link_libraries(ripple_libs INTERFACE ${postgres})
|
||||
endif()
|
||||
else()
|
||||
message("Found system installed Postgres via find_package")
|
||||
target_include_directories(ripple_libs INTERFACE ${PostgreSQL_INCLUDE_DIRS})
|
||||
target_link_libraries(ripple_libs INTERFACE ${PostgreSQL_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
@@ -1,155 +1,27 @@
|
||||
#[===================================================================[
|
||||
import protobuf (lib and compiler) and create a lib
|
||||
from our proto message definitions. If the system protobuf
|
||||
is not found, fallback on EP to download and build a version
|
||||
from official source.
|
||||
#]===================================================================]
|
||||
find_package(Protobuf 3.8)
|
||||
|
||||
if (static)
|
||||
set (Protobuf_USE_STATIC_LIBS ON)
|
||||
endif ()
|
||||
find_package (Protobuf 3.8)
|
||||
if (is_multiconfig)
|
||||
set(protobuf_protoc_lib ${Protobuf_PROTOC_LIBRARIES})
|
||||
else ()
|
||||
string(TOUPPER ${CMAKE_BUILD_TYPE} upper_cmake_build_type)
|
||||
set(protobuf_protoc_lib ${Protobuf_PROTOC_LIBRARY_${upper_cmake_build_type}})
|
||||
endif ()
|
||||
if (local_protobuf OR NOT (Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE AND protobuf_protoc_lib))
|
||||
include (GNUInstallDirs)
|
||||
message (STATUS "using local protobuf build.")
|
||||
set(protobuf_reqs Protobuf_PROTOC_EXECUTABLE protobuf_protoc_lib)
|
||||
foreach(lib ${protobuf_reqs})
|
||||
if(NOT ${lib})
|
||||
message(STATUS "Couldn't find ${lib}")
|
||||
endif()
|
||||
endforeach()
|
||||
if (WIN32)
|
||||
# protobuf prepends lib even on windows
|
||||
set (pbuf_lib_pre "lib")
|
||||
else ()
|
||||
set (pbuf_lib_pre ${ep_lib_prefix})
|
||||
endif ()
|
||||
# for the external project build of protobuf, we currently ignore the
|
||||
# static option and always build static libs here. This is consistent
|
||||
# with our other EP builds. Dynamic libs in an EP would add complexity
|
||||
# because we'd need to get them into the runtime path, and probably
|
||||
# install them.
|
||||
ExternalProject_Add (protobuf_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
|
||||
GIT_TAG v3.8.0
|
||||
SOURCE_SUBDIR cmake
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_INSTALL_PREFIX=<BINARY_DIR>/_installed_
|
||||
-Dprotobuf_BUILD_TESTS=OFF
|
||||
-Dprotobuf_BUILD_EXAMPLES=OFF
|
||||
-Dprotobuf_BUILD_PROTOC_BINARIES=ON
|
||||
-Dprotobuf_MSVC_STATIC_RUNTIME=ON
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-Dprotobuf_BUILD_SHARED_LIBS=OFF
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-Dprotobuf_DEBUG_POSTFIX=_d
|
||||
-Dprotobuf_WITH_ZLIB=$<IF:$<BOOL:${has_zlib}>,ON,OFF>
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
$<$<BOOL:${unity}>:-DCMAKE_UNITY_BUILD=ON}>
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -EHa -MP"
|
||||
>
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND
|
||||
${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --config $<CONFIG> --target install
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protobuf${ep_lib_suffix}
|
||||
<BINARY_DIR>/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protobuf_d${ep_lib_suffix}
|
||||
<BINARY_DIR>/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protoc${ep_lib_suffix}
|
||||
<BINARY_DIR>/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protoc_d${ep_lib_suffix}
|
||||
<BINARY_DIR>/_installed_/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}
|
||||
)
|
||||
ExternalProject_Get_Property (protobuf_src BINARY_DIR)
|
||||
ExternalProject_Get_Property (protobuf_src SOURCE_DIR)
|
||||
if (CMAKE_VERBOSE_MAKEFILE)
|
||||
print_ep_logs (protobuf_src)
|
||||
endif ()
|
||||
exclude_if_included (protobuf_src)
|
||||
set(output_dir ${CMAKE_BINARY_DIR}/proto_gen)
|
||||
file(MAKE_DIRECTORY ${output_dir})
|
||||
set(ccbd ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(CMAKE_CURRENT_BINARY_DIR ${output_dir})
|
||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS src/ripple/proto/ripple.proto)
|
||||
set(CMAKE_CURRENT_BINARY_DIR ${ccbd})
|
||||
|
||||
if (NOT TARGET protobuf::libprotobuf)
|
||||
add_library (protobuf::libprotobuf STATIC IMPORTED GLOBAL)
|
||||
endif ()
|
||||
file (MAKE_DIRECTORY ${BINARY_DIR}/_installed_/include)
|
||||
set_target_properties (protobuf::libprotobuf PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protobuf_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protobuf${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${BINARY_DIR}/_installed_/include)
|
||||
add_dependencies (protobuf::libprotobuf protobuf_src)
|
||||
exclude_if_included (protobuf::libprotobuf)
|
||||
|
||||
if (NOT TARGET protobuf::libprotoc)
|
||||
add_library (protobuf::libprotoc STATIC IMPORTED GLOBAL)
|
||||
endif ()
|
||||
set_target_properties (protobuf::libprotoc PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protoc_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/_installed_/${CMAKE_INSTALL_LIBDIR}/${pbuf_lib_pre}protoc${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${BINARY_DIR}/_installed_/include)
|
||||
add_dependencies (protobuf::libprotoc protobuf_src)
|
||||
exclude_if_included (protobuf::libprotoc)
|
||||
|
||||
if (NOT TARGET protobuf::protoc)
|
||||
add_executable (protobuf::protoc IMPORTED)
|
||||
exclude_if_included (protobuf::protoc)
|
||||
endif ()
|
||||
set_target_properties (protobuf::protoc PROPERTIES
|
||||
IMPORTED_LOCATION "${BINARY_DIR}/_installed_/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
add_dependencies (protobuf::protoc protobuf_src)
|
||||
else ()
|
||||
if (NOT TARGET protobuf::protoc)
|
||||
if (EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
add_executable (protobuf::protoc IMPORTED)
|
||||
set_target_properties (protobuf::protoc PROPERTIES
|
||||
IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
else ()
|
||||
message (FATAL_ERROR "Protobuf import failed")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/proto_gen)
|
||||
set (save_CBD ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set (CMAKE_CURRENT_BINARY_DIR ${CMAKE_BINARY_DIR}/proto_gen)
|
||||
protobuf_generate_cpp (
|
||||
PROTO_SRCS
|
||||
PROTO_HDRS
|
||||
src/ripple/proto/ripple.proto)
|
||||
set (CMAKE_CURRENT_BINARY_DIR ${save_CBD})
|
||||
|
||||
add_library (pbufs STATIC ${PROTO_SRCS} ${PROTO_HDRS})
|
||||
|
||||
target_include_directories (pbufs PRIVATE src)
|
||||
target_include_directories (pbufs
|
||||
SYSTEM PUBLIC ${CMAKE_BINARY_DIR}/proto_gen)
|
||||
target_link_libraries (pbufs protobuf::libprotobuf)
|
||||
target_compile_options (pbufs
|
||||
target_include_directories(xrpl_core SYSTEM PUBLIC
|
||||
# The generated implementation imports the header relative to the output
|
||||
# directory.
|
||||
$<BUILD_INTERFACE:${output_dir}>
|
||||
$<BUILD_INTERFACE:${output_dir}/src>
|
||||
)
|
||||
target_sources(xrpl_core PRIVATE ${output_dir}/src/ripple/proto/ripple.pb.cc)
|
||||
install(
|
||||
FILES ${output_dir}/src/ripple/proto/ripple.pb.h
|
||||
DESTINATION include/ripple/proto)
|
||||
target_link_libraries(xrpl_core PUBLIC protobuf::libprotobuf)
|
||||
target_compile_options(xrpl_core
|
||||
PUBLIC
|
||||
$<$<BOOL:${is_xcode}>:
|
||||
$<$<BOOL:${XCODE}>:
|
||||
--system-header-prefix="google/protobuf"
|
||||
-Wno-deprecated-dynamic-exception-spec
|
||||
>)
|
||||
add_library (Ripple::pbufs ALIAS pbufs)
|
||||
target_link_libraries (ripple_libs INTERFACE Ripple::pbufs)
|
||||
exclude_if_included (pbufs)
|
||||
>
|
||||
)
|
||||
|
||||
@@ -1,177 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: rocksdb
|
||||
#]===================================================================]
|
||||
|
||||
add_library (rocksdb_lib UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties (rocksdb_lib
|
||||
PROPERTIES INTERFACE_COMPILE_DEFINITIONS RIPPLE_ROCKSDB_AVAILABLE=1)
|
||||
|
||||
option (local_rocksdb "use local build of rocksdb." OFF)
|
||||
if (NOT local_rocksdb)
|
||||
find_package (RocksDB 6.27 QUIET CONFIG)
|
||||
if (TARGET RocksDB::rocksdb)
|
||||
message (STATUS "Found RocksDB using config.")
|
||||
get_target_property (_rockslib_l RocksDB::rocksdb IMPORTED_LOCATION_DEBUG)
|
||||
if (_rockslib_l)
|
||||
set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION_DEBUG ${_rockslib_l})
|
||||
endif ()
|
||||
get_target_property (_rockslib_l RocksDB::rocksdb IMPORTED_LOCATION_RELEASE)
|
||||
if (_rockslib_l)
|
||||
set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION_RELEASE ${_rockslib_l})
|
||||
endif ()
|
||||
get_target_property (_rockslib_l RocksDB::rocksdb IMPORTED_LOCATION)
|
||||
if (_rockslib_l)
|
||||
set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION ${_rockslib_l})
|
||||
endif ()
|
||||
get_target_property (_rockslib_i RocksDB::rocksdb INTERFACE_INCLUDE_DIRECTORIES)
|
||||
if (_rockslib_i)
|
||||
set_target_properties (rocksdb_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${_rockslib_i})
|
||||
endif ()
|
||||
target_link_libraries (ripple_libs INTERFACE RocksDB::rocksdb)
|
||||
else ()
|
||||
# using a find module with rocksdb is difficult because
|
||||
# you have no idea how it was configured (transitive dependencies).
|
||||
# the code below will generally find rocksdb using the module, but
|
||||
# will then result in linker errors for static linkage since the
|
||||
# transitive dependencies are unknown. force local build here for now, but leave the code as
|
||||
# a placeholder for future investigation.
|
||||
if (static)
|
||||
set (local_rocksdb ON CACHE BOOL "" FORCE)
|
||||
# TBD if there is some way to extract transitive deps..then:
|
||||
#set (RocksDB_USE_STATIC ON)
|
||||
else ()
|
||||
find_package (RocksDB 6.27 MODULE)
|
||||
if (ROCKSDB_FOUND)
|
||||
if (RocksDB_LIBRARY_DEBUG)
|
||||
set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION_DEBUG ${RocksDB_LIBRARY_DEBUG})
|
||||
endif ()
|
||||
set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION_RELEASE ${RocksDB_LIBRARIES})
|
||||
set_target_properties (rocksdb_lib PROPERTIES IMPORTED_LOCATION ${RocksDB_LIBRARIES})
|
||||
set_target_properties (rocksdb_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${RocksDB_INCLUDE_DIRS})
|
||||
else ()
|
||||
set (local_rocksdb ON CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (local_rocksdb)
|
||||
message (STATUS "Using local build of RocksDB.")
|
||||
ExternalProject_Add (rocksdb
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/facebook/rocksdb.git
|
||||
GIT_TAG v6.27.3
|
||||
PATCH_COMMAND
|
||||
# only used by windows build
|
||||
${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/rocks_thirdparty.inc
|
||||
<SOURCE_DIR>/thirdparty.inc
|
||||
COMMAND
|
||||
# fixup their build version file to keep the values
|
||||
# from changing always
|
||||
${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/rocksdb_build_version.cc.in
|
||||
<SOURCE_DIR>/util/build_version.cc.in
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
$<$<BOOL:${unity}>:-DCMAKE_UNITY_BUILD=ON}>
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DWITH_JEMALLOC=$<IF:$<BOOL:${jemalloc}>,ON,OFF>
|
||||
-DWITH_SNAPPY=ON
|
||||
-DWITH_LZ4=ON
|
||||
-DWITH_ZLIB=OFF
|
||||
-DUSE_RTTI=ON
|
||||
-DWITH_ZSTD=OFF
|
||||
-DWITH_GFLAGS=OFF
|
||||
-DWITH_BZ2=OFF
|
||||
-ULZ4_*
|
||||
-Ulz4_*
|
||||
-Dlz4_INCLUDE_DIRS=$<JOIN:$<TARGET_PROPERTY:lz4_lib,INTERFACE_INCLUDE_DIRECTORIES>,::>
|
||||
-Dlz4_LIBRARIES=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:lz4_lib,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:lz4_lib,IMPORTED_LOCATION_RELEASE>>
|
||||
-Dlz4_FOUND=ON
|
||||
-USNAPPY_*
|
||||
-Usnappy_*
|
||||
-USnappy_*
|
||||
-Dsnappy_INCLUDE_DIRS=$<JOIN:$<TARGET_PROPERTY:snappy_lib,INTERFACE_INCLUDE_DIRECTORIES>,::>
|
||||
-Dsnappy_LIBRARIES=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:snappy_lib,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:snappy_lib,IMPORTED_LOCATION_RELEASE>>
|
||||
-Dsnappy_FOUND=ON
|
||||
-DSnappy_INCLUDE_DIRS=$<JOIN:$<TARGET_PROPERTY:snappy_lib,INTERFACE_INCLUDE_DIRECTORIES>,::>
|
||||
-DSnappy_LIBRARIES=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:snappy_lib,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:snappy_lib,IMPORTED_LOCATION_RELEASE>>
|
||||
-DSnappy_FOUND=ON
|
||||
-DWITH_MD_LIBRARY=OFF
|
||||
-DWITH_RUNTIME_DEBUG=$<IF:$<CONFIG:Debug>,ON,OFF>
|
||||
-DFAIL_ON_WARNINGS=OFF
|
||||
-DWITH_ASAN=OFF
|
||||
-DWITH_TSAN=OFF
|
||||
-DWITH_UBSAN=OFF
|
||||
-DWITH_NUMA=OFF
|
||||
-DWITH_TBB=OFF
|
||||
-DWITH_WINDOWS_UTF8_FILENAMES=OFF
|
||||
-DWITH_XPRESS=OFF
|
||||
-DPORTABLE=ON
|
||||
-DFORCE_SSE42=OFF
|
||||
-DDISABLE_STALL_NOTIF=OFF
|
||||
-DOPTDBG=ON
|
||||
-DROCKSDB_LITE=OFF
|
||||
-DWITH_FALLOCATE=ON
|
||||
-DWITH_LIBRADOS=OFF
|
||||
-DWITH_JNI=OFF
|
||||
-DROCKSDB_INSTALL_ON_WINDOWS=OFF
|
||||
-DWITH_TESTS=OFF
|
||||
-DWITH_TOOLS=OFF
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -MP /DNDEBUG"
|
||||
>
|
||||
$<$<NOT:$<BOOL:${MSVC}>>:
|
||||
"-DCMAKE_CXX_FLAGS=-DNDEBUG"
|
||||
>
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
$<$<BOOL:${is_multiconfig}>:
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
<BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}rocksdb$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>
|
||||
>
|
||||
LIST_SEPARATOR ::
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
DEPENDS snappy_lib lz4_lib
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/${ep_lib_prefix}rocksdb${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}rocksdb_d${ep_lib_suffix}
|
||||
)
|
||||
ExternalProject_Get_Property (rocksdb BINARY_DIR)
|
||||
ExternalProject_Get_Property (rocksdb SOURCE_DIR)
|
||||
if (CMAKE_VERBOSE_MAKEFILE)
|
||||
print_ep_logs (rocksdb)
|
||||
endif ()
|
||||
file (MAKE_DIRECTORY ${SOURCE_DIR}/include)
|
||||
set_target_properties (rocksdb_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/${ep_lib_prefix}rocksdb_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/${ep_lib_prefix}rocksdb${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOURCE_DIR}/include)
|
||||
add_dependencies (rocksdb_lib rocksdb)
|
||||
exclude_if_included (rocksdb)
|
||||
endif ()
|
||||
|
||||
target_link_libraries (rocksdb_lib
|
||||
INTERFACE
|
||||
snappy_lib
|
||||
lz4_lib
|
||||
$<$<BOOL:${MSVC}>:rpcrt4>)
|
||||
exclude_if_included (rocksdb_lib)
|
||||
target_link_libraries (ripple_libs INTERFACE rocksdb_lib)
|
||||
@@ -1,58 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: secp256k1
|
||||
#]===================================================================]
|
||||
|
||||
add_library (secp256k1_lib STATIC IMPORTED GLOBAL)
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(secp256k1)
|
||||
endif()
|
||||
|
||||
if(secp256k1)
|
||||
set_target_properties (secp256k1_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${secp256k1}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${secp256k1}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SECP256K1_INCLUDE_DIR})
|
||||
|
||||
add_library (secp256k1 ALIAS secp256k1_lib)
|
||||
add_library (NIH::secp256k1 ALIAS secp256k1_lib)
|
||||
|
||||
else()
|
||||
set(INSTALL_SECP256K1 true)
|
||||
|
||||
add_library (secp256k1 STATIC
|
||||
src/secp256k1/src/secp256k1.c)
|
||||
target_compile_definitions (secp256k1
|
||||
PRIVATE
|
||||
USE_NUM_NONE
|
||||
USE_FIELD_10X26
|
||||
USE_FIELD_INV_BUILTIN
|
||||
USE_SCALAR_8X32
|
||||
USE_SCALAR_INV_BUILTIN)
|
||||
target_include_directories (secp256k1
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/secp256k1)
|
||||
target_compile_options (secp256k1
|
||||
PRIVATE
|
||||
$<$<BOOL:${MSVC}>:-wd4319>
|
||||
$<$<NOT:$<BOOL:${MSVC}>>:
|
||||
-Wno-deprecated-declarations
|
||||
-Wno-unused-function
|
||||
>
|
||||
$<$<BOOL:${is_gcc}>:-Wno-nonnull-compare>)
|
||||
target_link_libraries (ripple_libs INTERFACE NIH::secp256k1)
|
||||
#[===========================[
|
||||
headers installation
|
||||
#]===========================]
|
||||
install (
|
||||
FILES
|
||||
src/secp256k1/include/secp256k1.h
|
||||
DESTINATION include/secp256k1/include)
|
||||
|
||||
add_library (NIH::secp256k1 ALIAS secp256k1)
|
||||
endif()
|
||||
@@ -1,77 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: snappy
|
||||
#]===================================================================]
|
||||
|
||||
add_library (snappy_lib STATIC IMPORTED GLOBAL)
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(snappy)
|
||||
endif()
|
||||
|
||||
if(snappy)
|
||||
set_target_properties (snappy_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${snappy}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${snappy}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SNAPPY_INCLUDE_DIR})
|
||||
|
||||
else()
|
||||
ExternalProject_Add (snappy
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/google/snappy.git
|
||||
GIT_TAG 1.1.7
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DSNAPPY_BUILD_TESTS=OFF
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -EHa -MP"
|
||||
"-DCMAKE_CXX_FLAGS_DEBUG=-MTd"
|
||||
"-DCMAKE_CXX_FLAGS_RELEASE=-MT"
|
||||
>
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
$<$<BOOL:${is_multiconfig}>:
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
<BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}snappy$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>
|
||||
>
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND
|
||||
${CMAKE_COMMAND} -E copy_if_different <BINARY_DIR>/config.h <BINARY_DIR>/snappy-stubs-public.h <SOURCE_DIR>
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/${ep_lib_prefix}snappy${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}snappy_d${ep_lib_suffix}
|
||||
)
|
||||
ExternalProject_Get_Property (snappy BINARY_DIR)
|
||||
ExternalProject_Get_Property (snappy SOURCE_DIR)
|
||||
if (CMAKE_VERBOSE_MAKEFILE)
|
||||
print_ep_logs (snappy)
|
||||
endif ()
|
||||
file (MAKE_DIRECTORY ${SOURCE_DIR}/snappy)
|
||||
set_target_properties (snappy_lib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/${ep_lib_prefix}snappy_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/${ep_lib_prefix}snappy${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
add_dependencies (snappy_lib snappy)
|
||||
target_link_libraries (ripple_libs INTERFACE snappy_lib)
|
||||
exclude_if_included (snappy)
|
||||
exclude_if_included (snappy_lib)
|
||||
@@ -1,164 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: soci
|
||||
#]===================================================================]
|
||||
|
||||
foreach (_comp core empty sqlite3)
|
||||
add_library ("soci_${_comp}" STATIC IMPORTED GLOBAL)
|
||||
endforeach ()
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(soci)
|
||||
endif()
|
||||
|
||||
if (soci)
|
||||
foreach (_comp core empty sqlite3)
|
||||
set_target_properties ("soci_${_comp}" PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${soci}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${soci}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOCI_INCLUDE_DIR})
|
||||
endforeach ()
|
||||
|
||||
else()
|
||||
set (soci_lib_pre ${ep_lib_prefix})
|
||||
set (soci_lib_post "")
|
||||
if (WIN32)
|
||||
# for some reason soci on windows still prepends lib (non-standard)
|
||||
set (soci_lib_pre lib)
|
||||
# this version in the name might change if/when we change versions of soci
|
||||
set (soci_lib_post "_4_0")
|
||||
endif ()
|
||||
get_target_property (_boost_incs Boost::date_time INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property (_boost_dt Boost::date_time IMPORTED_LOCATION)
|
||||
if (NOT _boost_dt)
|
||||
get_target_property (_boost_dt Boost::date_time IMPORTED_LOCATION_RELEASE)
|
||||
endif ()
|
||||
if (NOT _boost_dt)
|
||||
get_target_property (_boost_dt Boost::date_time IMPORTED_LOCATION_DEBUG)
|
||||
endif ()
|
||||
|
||||
ExternalProject_Add (soci
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/SOCI/soci.git
|
||||
GIT_TAG 04e1870294918d20761736743bb6136314c42dd5
|
||||
# We had an issue with soci integer range checking for boost::optional
|
||||
# and needed to remove the exception that SOCI throws in this case.
|
||||
# This is *probably* a bug in SOCI, but has never been investigated more
|
||||
# nor reported to the maintainers.
|
||||
# This cmake script comments out the lines in question.
|
||||
# This patch process is likely fragile and should be reviewed carefully
|
||||
# whenever we update the GIT_TAG above.
|
||||
PATCH_COMMAND
|
||||
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/soci_patch.cmake
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
$<$<BOOL:${CMAKE_TOOLCHAIN_FILE}>:-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}>
|
||||
$<$<BOOL:${VCPKG_TARGET_TRIPLET}>:-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}>
|
||||
$<$<BOOL:${unity}>:-DCMAKE_UNITY_BUILD=ON}>
|
||||
-DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/sqlite3
|
||||
-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake
|
||||
-DCMAKE_INCLUDE_PATH=$<JOIN:$<TARGET_PROPERTY:sqlite,INTERFACE_INCLUDE_DIRECTORIES>,::>
|
||||
-DCMAKE_LIBRARY_PATH=${sqlite_BINARY_DIR}
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
-DSOCI_CXX_C11=ON
|
||||
-DSOCI_STATIC=ON
|
||||
-DSOCI_LIBDIR=lib
|
||||
-DSOCI_SHARED=OFF
|
||||
-DSOCI_TESTS=OFF
|
||||
# hacks to workaround the fact that soci doesn't currently use
|
||||
# boost imported targets in its cmake. If they switch to
|
||||
# proper imported targets, this next line can be removed
|
||||
# (as well as the get_property above that sets _boost_incs)
|
||||
-DBoost_INCLUDE_DIRS=$<JOIN:${_boost_incs},::>
|
||||
-DBoost_INCLUDE_DIR=$<JOIN:${_boost_incs},::>
|
||||
-DBOOST_ROOT=${BOOST_ROOT}
|
||||
-DWITH_BOOST=ON
|
||||
-DBoost_FOUND=ON
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
-DBoost_DATE_TIME_FOUND=ON
|
||||
-DSOCI_HAVE_BOOST=ON
|
||||
-DSOCI_HAVE_BOOST_DATE_TIME=ON
|
||||
-DBoost_DATE_TIME_LIBRARY=${_boost_dt}
|
||||
-DSOCI_DB2=OFF
|
||||
-DSOCI_FIREBIRD=OFF
|
||||
-DSOCI_MYSQL=OFF
|
||||
-DSOCI_ODBC=OFF
|
||||
-DSOCI_ORACLE=OFF
|
||||
-DSOCI_POSTGRESQL=OFF
|
||||
-DSOCI_SQLITE3=ON
|
||||
-DSQLITE3_INCLUDE_DIR=$<JOIN:$<TARGET_PROPERTY:sqlite,INTERFACE_INCLUDE_DIRECTORIES>,::>
|
||||
-DSQLITE3_LIBRARY=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:sqlite,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:sqlite,IMPORTED_LOCATION_RELEASE>>
|
||||
$<$<BOOL:${APPLE}>:-DCMAKE_FIND_FRAMEWORK=LAST>
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -EHa -MP"
|
||||
"-DCMAKE_CXX_FLAGS_DEBUG=-MTd"
|
||||
"-DCMAKE_CXX_FLAGS_RELEASE=-MT"
|
||||
>
|
||||
$<$<NOT:$<BOOL:${MSVC}>>:
|
||||
"-DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations"
|
||||
>
|
||||
# SEE: https://github.com/SOCI/soci/issues/640
|
||||
$<$<AND:$<BOOL:${is_gcc}>,$<VERSION_GREATER_EQUAL:${CMAKE_CXX_COMPILER_VERSION},8>>:
|
||||
"-DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -Wno-error=format-overflow -Wno-format-overflow -Wno-error=format-truncation"
|
||||
>
|
||||
LIST_SEPARATOR ::
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
$<$<BOOL:${is_multiconfig}>:
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
<BINARY_DIR>/lib/$<CONFIG>/${soci_lib_pre}soci_core${soci_lib_post}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>/lib/$<CONFIG>/${soci_lib_pre}soci_empty${soci_lib_post}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>/lib/$<CONFIG>/${soci_lib_pre}soci_sqlite3${soci_lib_post}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>/lib
|
||||
>
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
DEPENDS sqlite
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/lib/${soci_lib_pre}soci_core${soci_lib_post}${ep_lib_suffix}
|
||||
<BINARY_DIR>/lib/${soci_lib_pre}soci_core${soci_lib_post}_d${ep_lib_suffix}
|
||||
<BINARY_DIR>/lib/${soci_lib_pre}soci_empty${soci_lib_post}${ep_lib_suffix}
|
||||
<BINARY_DIR>/lib/${soci_lib_pre}soci_empty${soci_lib_post}_d${ep_lib_suffix}
|
||||
<BINARY_DIR>/lib/${soci_lib_pre}soci_sqlite3${soci_lib_post}${ep_lib_suffix}
|
||||
<BINARY_DIR>/lib/${soci_lib_pre}soci_sqlite3${soci_lib_post}_d${ep_lib_suffix}
|
||||
)
|
||||
ExternalProject_Get_Property (soci BINARY_DIR)
|
||||
ExternalProject_Get_Property (soci SOURCE_DIR)
|
||||
if (CMAKE_VERBOSE_MAKEFILE)
|
||||
print_ep_logs (soci)
|
||||
endif ()
|
||||
file (MAKE_DIRECTORY ${SOURCE_DIR}/include)
|
||||
file (MAKE_DIRECTORY ${BINARY_DIR}/include)
|
||||
foreach (_comp core empty sqlite3)
|
||||
set_target_properties ("soci_${_comp}" PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/lib/${soci_lib_pre}soci_${_comp}${soci_lib_post}_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/lib/${soci_lib_pre}soci_${_comp}${soci_lib_post}${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${SOURCE_DIR}/include;${BINARY_DIR}/include")
|
||||
add_dependencies ("soci_${_comp}" soci) # something has to depend on the ExternalProject to trigger it
|
||||
target_link_libraries (ripple_libs INTERFACE "soci_${_comp}")
|
||||
if (NOT _comp STREQUAL "core")
|
||||
target_link_libraries ("soci_${_comp}" INTERFACE soci_core)
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif()
|
||||
|
||||
foreach (_comp core empty sqlite3)
|
||||
exclude_if_included ("soci_${_comp}")
|
||||
endforeach ()
|
||||
|
||||
|
||||
exclude_if_included (soci)
|
||||
@@ -1,93 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: sqlite
|
||||
#]===================================================================]
|
||||
|
||||
add_library (sqlite STATIC IMPORTED GLOBAL)
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(sqlite)
|
||||
endif()
|
||||
|
||||
|
||||
if(sqlite3)
|
||||
set_target_properties (sqlite PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${sqlite3}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${sqlite3}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SQLITE_INCLUDE_DIR})
|
||||
|
||||
else()
|
||||
ExternalProject_Add (sqlite3
|
||||
PREFIX ${nih_cache_path}
|
||||
# sqlite doesn't use git, but it provides versioned tarballs
|
||||
URL https://www.sqlite.org/2018/sqlite-amalgamation-3260000.zip
|
||||
http://www.sqlite.org/2018/sqlite-amalgamation-3260000.zip
|
||||
https://www2.sqlite.org/2018/sqlite-amalgamation-3260000.zip
|
||||
http://www2.sqlite.org/2018/sqlite-amalgamation-3260000.zip
|
||||
# ^^^ version is apparent in the URL: 3260000 => 3.26.0
|
||||
URL_HASH SHA256=de5dcab133aa339a4cf9e97c40aa6062570086d6085d8f9ad7bc6ddf8a52096e
|
||||
# Don't need to worry about MITM attacks too much because the download
|
||||
# is checked against a strong hash
|
||||
TLS_VERIFY false
|
||||
# we wrote a very simple CMake file to build sqlite
|
||||
# so that's what we copy here so that we can build with
|
||||
# CMake. sqlite doesn't generally provided a build system
|
||||
# for the single amalgamation source file.
|
||||
PATCH_COMMAND
|
||||
${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/CMake_sqlite3.txt
|
||||
<SOURCE_DIR>/CMakeLists.txt
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
|
||||
"-DCMAKE_C_FLAGS_DEBUG=-MTd"
|
||||
"-DCMAKE_C_FLAGS_RELEASE=-MT"
|
||||
>
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
$<$<BOOL:${is_multiconfig}>:
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
<BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}sqlite3$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>
|
||||
>
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/${ep_lib_prefix}sqlite3${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}sqlite3_d${ep_lib_suffix}
|
||||
)
|
||||
ExternalProject_Get_Property (sqlite3 BINARY_DIR)
|
||||
ExternalProject_Get_Property (sqlite3 SOURCE_DIR)
|
||||
if (CMAKE_VERBOSE_MAKEFILE)
|
||||
print_ep_logs (sqlite3)
|
||||
endif ()
|
||||
|
||||
set_target_properties (sqlite PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/${ep_lib_prefix}sqlite3_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/${ep_lib_prefix}sqlite3${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOURCE_DIR})
|
||||
|
||||
add_dependencies (sqlite sqlite3)
|
||||
exclude_if_included (sqlite3)
|
||||
endif()
|
||||
|
||||
target_link_libraries (sqlite INTERFACE $<$<NOT:$<BOOL:${MSVC}>>:dl>)
|
||||
target_link_libraries (ripple_libs INTERFACE sqlite)
|
||||
exclude_if_included (sqlite)
|
||||
set(sqlite_BINARY_DIR ${BINARY_DIR})
|
||||
@@ -1,165 +0,0 @@
|
||||
if(reporting)
|
||||
find_library(cassandra NAMES cassandra)
|
||||
if(NOT cassandra)
|
||||
|
||||
message("System installed Cassandra cpp driver not found. Will build")
|
||||
|
||||
find_library(zlib NAMES zlib1g-dev zlib-devel zlib z)
|
||||
if(NOT zlib)
|
||||
message("zlib not found. will build")
|
||||
add_library(zlib STATIC IMPORTED GLOBAL)
|
||||
ExternalProject_Add(zlib_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/madler/zlib.git
|
||||
GIT_TAG master
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS <BINARY_DIR>/${ep_lib_prefix}z.a
|
||||
LOG_BUILD TRUE
|
||||
LOG_CONFIGURE TRUE
|
||||
)
|
||||
|
||||
|
||||
ExternalProject_Get_Property (zlib_src SOURCE_DIR)
|
||||
ExternalProject_Get_Property (zlib_src BINARY_DIR)
|
||||
set (zlib_src_SOURCE_DIR "${SOURCE_DIR}")
|
||||
file (MAKE_DIRECTORY ${zlib_src_SOURCE_DIR}/include)
|
||||
|
||||
set_target_properties (zlib PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
${BINARY_DIR}/${ep_lib_prefix}z.a
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOURCE_DIR}/include)
|
||||
add_dependencies(zlib zlib_src)
|
||||
|
||||
file(TO_CMAKE_PATH "${zlib_src_SOURCE_DIR}" zlib_src_SOURCE_DIR)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
find_library(krb5 NAMES krb5-dev libkrb5-dev)
|
||||
|
||||
if(NOT krb5)
|
||||
message("krb5 not found. will build")
|
||||
add_library(krb5 STATIC IMPORTED GLOBAL)
|
||||
ExternalProject_Add(krb5_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/krb5/krb5.git
|
||||
GIT_TAG master
|
||||
UPDATE_COMMAND ""
|
||||
CONFIGURE_COMMAND autoreconf src && CFLAGS=-fcommon ./src/configure --enable-static --disable-shared > /dev/null
|
||||
BUILD_IN_SOURCE 1
|
||||
BUILD_COMMAND make
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/${ep_lib_prefix}krb5.a
|
||||
LOG_BUILD TRUE
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property (krb5_src SOURCE_DIR)
|
||||
ExternalProject_Get_Property (krb5_src BINARY_DIR)
|
||||
set (krb5_src_SOURCE_DIR "${SOURCE_DIR}")
|
||||
file (MAKE_DIRECTORY ${krb5_src_SOURCE_DIR}/include)
|
||||
|
||||
set_target_properties (krb5 PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
${BINARY_DIR}/lib/${ep_lib_prefix}krb5.a
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOURCE_DIR}/include)
|
||||
add_dependencies(krb5 krb5_src)
|
||||
|
||||
file(TO_CMAKE_PATH "${krb5_src_SOURCE_DIR}" krb5_src_SOURCE_DIR)
|
||||
endif()
|
||||
|
||||
|
||||
find_library(libuv1 NAMES uv1 libuv1 liubuv1-dev libuv1:amd64)
|
||||
|
||||
|
||||
if(NOT libuv1)
|
||||
message("libuv1 not found, will build")
|
||||
add_library(libuv1 STATIC IMPORTED GLOBAL)
|
||||
ExternalProject_Add(libuv_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/libuv/libuv.git
|
||||
GIT_TAG v1.x
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS <BINARY_DIR>/${ep_lib_prefix}uv_a.a
|
||||
LOG_BUILD TRUE
|
||||
LOG_CONFIGURE TRUE
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property (libuv_src SOURCE_DIR)
|
||||
ExternalProject_Get_Property (libuv_src BINARY_DIR)
|
||||
set (libuv_src_SOURCE_DIR "${SOURCE_DIR}")
|
||||
file (MAKE_DIRECTORY ${libuv_src_SOURCE_DIR}/include)
|
||||
|
||||
set_target_properties (libuv1 PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
${BINARY_DIR}/${ep_lib_prefix}uv_a.a
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOURCE_DIR}/include)
|
||||
add_dependencies(libuv1 libuv_src)
|
||||
|
||||
file(TO_CMAKE_PATH "${libuv_src_SOURCE_DIR}" libuv_src_SOURCE_DIR)
|
||||
endif()
|
||||
|
||||
add_library (cassandra STATIC IMPORTED GLOBAL)
|
||||
ExternalProject_Add(cassandra_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/datastax/cpp-driver.git
|
||||
GIT_TAG master
|
||||
CMAKE_ARGS
|
||||
-DLIBUV_ROOT_DIR=${BINARY_DIR}
|
||||
-DLIBUV_LIBARY=${BINARY_DIR}/libuv_a.a
|
||||
-DLIBUV_INCLUDE_DIR=${SOURCE_DIR}/include
|
||||
-DCASS_BUILD_STATIC=ON
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS <BINARY_DIR>/${ep_lib_prefix}cassandra_static.a
|
||||
LOG_BUILD TRUE
|
||||
LOG_CONFIGURE TRUE
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property (cassandra_src SOURCE_DIR)
|
||||
ExternalProject_Get_Property (cassandra_src BINARY_DIR)
|
||||
set (cassandra_src_SOURCE_DIR "${SOURCE_DIR}")
|
||||
file (MAKE_DIRECTORY ${cassandra_src_SOURCE_DIR}/include)
|
||||
|
||||
set_target_properties (cassandra PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
${BINARY_DIR}/${ep_lib_prefix}cassandra_static.a
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${SOURCE_DIR}/include)
|
||||
add_dependencies(cassandra cassandra_src)
|
||||
|
||||
if(NOT libuv1)
|
||||
ExternalProject_Add_StepDependencies(cassandra_src build libuv1)
|
||||
target_link_libraries(cassandra INTERFACE libuv1)
|
||||
else()
|
||||
target_link_libraries(cassandra INTERFACE ${libuv1})
|
||||
endif()
|
||||
if(NOT krb5)
|
||||
|
||||
ExternalProject_Add_StepDependencies(cassandra_src build krb5)
|
||||
target_link_libraries(cassandra INTERFACE krb5)
|
||||
else()
|
||||
target_link_libraries(cassandra INTERFACE ${krb5})
|
||||
endif()
|
||||
|
||||
if(NOT zlib)
|
||||
ExternalProject_Add_StepDependencies(cassandra_src build zlib)
|
||||
target_link_libraries(cassandra INTERFACE zlib)
|
||||
else()
|
||||
target_link_libraries(cassandra INTERFACE ${zlib})
|
||||
endif()
|
||||
|
||||
file(TO_CMAKE_PATH "${cassandra_src_SOURCE_DIR}" cassandra_src_SOURCE_DIR)
|
||||
target_link_libraries(ripple_libs INTERFACE cassandra)
|
||||
else()
|
||||
message("Found system installed cassandra cpp driver")
|
||||
|
||||
find_path(cassandra_includes NAMES cassandra.h REQUIRED)
|
||||
target_link_libraries (ripple_libs INTERFACE ${cassandra})
|
||||
target_include_directories(ripple_libs INTERFACE ${cassandra_includes})
|
||||
endif()
|
||||
|
||||
exclude_if_included (cassandra)
|
||||
endif()
|
||||
@@ -1,49 +0,0 @@
|
||||
#[===================================================================[
|
||||
NIH dep: date
|
||||
|
||||
the main library is header-only, thus is an INTERFACE lib in CMake.
|
||||
|
||||
NOTE: this has been accepted into c++20 so can likely be replaced
|
||||
when we update to that standard
|
||||
#]===================================================================]
|
||||
|
||||
find_package (date QUIET)
|
||||
if (NOT TARGET date::date)
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
|
||||
FetchContent_Declare(
|
||||
hh_date_src
|
||||
GIT_REPOSITORY https://github.com/HowardHinnant/date.git
|
||||
GIT_TAG fc4cf092f9674f2670fb9177edcdee870399b829
|
||||
)
|
||||
FetchContent_MakeAvailable(hh_date_src)
|
||||
else ()
|
||||
ExternalProject_Add (hh_date_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/HowardHinnant/date.git
|
||||
GIT_TAG fc4cf092f9674f2670fb9177edcdee870399b829
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_Get_Property (hh_date_src SOURCE_DIR)
|
||||
set (hh_date_src_SOURCE_DIR "${SOURCE_DIR}")
|
||||
file (MAKE_DIRECTORY ${hh_date_src_SOURCE_DIR}/include)
|
||||
add_library (date_interface INTERFACE)
|
||||
add_library (date::date ALIAS date_interface)
|
||||
add_dependencies (date_interface hh_date_src)
|
||||
file (TO_CMAKE_PATH "${hh_date_src_SOURCE_DIR}" hh_date_src_SOURCE_DIR)
|
||||
target_include_directories (date_interface
|
||||
SYSTEM INTERFACE
|
||||
$<BUILD_INTERFACE:${hh_date_src_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
install (
|
||||
FILES
|
||||
${hh_date_src_SOURCE_DIR}/include/date/date.h
|
||||
DESTINATION include/date)
|
||||
install (TARGETS date_interface
|
||||
EXPORT RippleExports
|
||||
INCLUDES DESTINATION include)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -1,333 +1,38 @@
|
||||
|
||||
# currently linking to unsecure versions...if we switch, we'll
|
||||
# need to add ssl as a link dependency to the grpc targets
|
||||
option (use_secure_grpc "use TLS version of grpc libs." OFF)
|
||||
if (use_secure_grpc)
|
||||
set (grpc_suffix "")
|
||||
else ()
|
||||
set (grpc_suffix "_unsecure")
|
||||
endif ()
|
||||
|
||||
find_package (gRPC 1.23 CONFIG QUIET)
|
||||
if (TARGET gRPC::gpr AND NOT local_grpc)
|
||||
get_target_property (_grpc_l gRPC::gpr IMPORTED_LOCATION_DEBUG)
|
||||
if (NOT _grpc_l)
|
||||
get_target_property (_grpc_l gRPC::gpr IMPORTED_LOCATION_RELEASE)
|
||||
endif ()
|
||||
if (NOT _grpc_l)
|
||||
get_target_property (_grpc_l gRPC::gpr IMPORTED_LOCATION)
|
||||
endif ()
|
||||
message (STATUS "Found cmake config for gRPC. Using ${_grpc_l}.")
|
||||
else ()
|
||||
find_package (PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules (grpc QUIET "grpc${grpc_suffix}>=1.25" "grpc++${grpc_suffix}" gpr)
|
||||
endif ()
|
||||
|
||||
if (grpc_FOUND)
|
||||
message (STATUS "Found gRPC using pkg-config. Using ${grpc_gpr_PREFIX}.")
|
||||
endif ()
|
||||
|
||||
add_executable (gRPC::grpc_cpp_plugin IMPORTED)
|
||||
exclude_if_included (gRPC::grpc_cpp_plugin)
|
||||
|
||||
if (grpc_FOUND AND NOT local_grpc)
|
||||
# use installed grpc (via pkg-config)
|
||||
macro (add_imported_grpc libname_)
|
||||
if (static)
|
||||
set (_search "${CMAKE_STATIC_LIBRARY_PREFIX}${libname_}${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
else ()
|
||||
set (_search "${CMAKE_SHARED_LIBRARY_PREFIX}${libname_}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
find_library(_found_${libname_}
|
||||
NAMES ${_search}
|
||||
HINTS ${grpc_LIBRARY_DIRS})
|
||||
if (_found_${libname_})
|
||||
message (STATUS "importing ${libname_} as ${_found_${libname_}}")
|
||||
else ()
|
||||
message (FATAL_ERROR "using pkg-config for grpc, can't find ${_search}")
|
||||
endif ()
|
||||
add_library ("gRPC::${libname_}" STATIC IMPORTED GLOBAL)
|
||||
set_target_properties ("gRPC::${libname_}" PROPERTIES IMPORTED_LOCATION ${_found_${libname_}})
|
||||
if (grpc_INCLUDE_DIRS)
|
||||
set_target_properties ("gRPC::${libname_}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${grpc_INCLUDE_DIRS})
|
||||
endif ()
|
||||
target_link_libraries (ripple_libs INTERFACE "gRPC::${libname_}")
|
||||
exclude_if_included ("gRPC::${libname_}")
|
||||
endmacro ()
|
||||
|
||||
set_target_properties (gRPC::grpc_cpp_plugin PROPERTIES
|
||||
IMPORTED_LOCATION "${grpc_gpr_PREFIX}/bin/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
|
||||
pkg_check_modules (cares QUIET libcares)
|
||||
if (cares_FOUND)
|
||||
if (static)
|
||||
set (_search "${CMAKE_STATIC_LIBRARY_PREFIX}cares${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
set (_prefix cares_STATIC)
|
||||
set (_static STATIC)
|
||||
else ()
|
||||
set (_search "${CMAKE_SHARED_LIBRARY_PREFIX}cares${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set (_prefix cares)
|
||||
set (_static)
|
||||
endif()
|
||||
find_library(_location NAMES ${_search} HINTS ${cares_LIBRARY_DIRS})
|
||||
if (NOT _location)
|
||||
message (FATAL_ERROR "using pkg-config for grpc, can't find c-ares")
|
||||
endif ()
|
||||
add_library (c-ares::cares ${_static} IMPORTED GLOBAL)
|
||||
set_target_properties (c-ares::cares PROPERTIES
|
||||
IMPORTED_LOCATION ${_location}
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${${_prefix}_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_OPTIONS "${${_prefix}_LDFLAGS}"
|
||||
)
|
||||
exclude_if_included (c-ares::cares)
|
||||
else ()
|
||||
message (FATAL_ERROR "using pkg-config for grpc, can't find c-ares")
|
||||
endif ()
|
||||
else ()
|
||||
#[===========================[
|
||||
c-ares (grpc requires)
|
||||
#]===========================]
|
||||
ExternalProject_Add (c-ares_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/c-ares/c-ares.git
|
||||
GIT_TAG cares-1_15_0
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
-DCMAKE_INSTALL_PREFIX=<BINARY_DIR>/_installed_
|
||||
-DCARES_SHARED=OFF
|
||||
-DCARES_STATIC=ON
|
||||
-DCARES_STATIC_PIC=ON
|
||||
-DCARES_INSTALL=ON
|
||||
-DCARES_MSVC_STATIC_RUNTIME=ON
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
|
||||
>
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND
|
||||
${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --config $<CONFIG> --target install
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/_installed_/lib/${ep_lib_prefix}cares${ep_lib_suffix}
|
||||
<BINARY_DIR>/_installed_/lib/${ep_lib_prefix}cares_d${ep_lib_suffix}
|
||||
)
|
||||
exclude_if_included (c-ares_src)
|
||||
ExternalProject_Get_Property (c-ares_src BINARY_DIR)
|
||||
set (cares_binary_dir "${BINARY_DIR}")
|
||||
|
||||
add_library (c-ares::cares STATIC IMPORTED GLOBAL)
|
||||
file (MAKE_DIRECTORY ${BINARY_DIR}/_installed_/include)
|
||||
set_target_properties (c-ares::cares PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/_installed_/lib/${ep_lib_prefix}cares_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/_installed_/lib/${ep_lib_prefix}cares${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${BINARY_DIR}/_installed_/include)
|
||||
add_dependencies (c-ares::cares c-ares_src)
|
||||
exclude_if_included (c-ares::cares)
|
||||
|
||||
if (NOT has_zlib)
|
||||
#[===========================[
|
||||
zlib (grpc requires)
|
||||
#]===========================]
|
||||
if (MSVC)
|
||||
set (zlib_debug_postfix "d") # zlib cmake sets this internally for MSVC, so we really don't have a choice
|
||||
set (zlib_base "zlibstatic")
|
||||
else ()
|
||||
set (zlib_debug_postfix "_d")
|
||||
set (zlib_base "z")
|
||||
endif ()
|
||||
ExternalProject_Add (zlib_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/madler/zlib.git
|
||||
GIT_TAG v1.2.11
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
-DCMAKE_DEBUG_POSTFIX=${zlib_debug_postfix}
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
-DCMAKE_INSTALL_PREFIX=<BINARY_DIR>/_installed_
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
|
||||
"-DCMAKE_C_FLAGS_DEBUG=-MTd"
|
||||
"-DCMAKE_C_FLAGS_RELEASE=-MT"
|
||||
>
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND
|
||||
${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --config $<CONFIG> --target install
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/_installed_/lib/${ep_lib_prefix}${zlib_base}${ep_lib_suffix}
|
||||
<BINARY_DIR>/_installed_/lib/${ep_lib_prefix}${zlib_base}${zlib_debug_postfix}${ep_lib_suffix}
|
||||
)
|
||||
exclude_if_included (zlib_src)
|
||||
ExternalProject_Get_Property (zlib_src BINARY_DIR)
|
||||
set (zlib_binary_dir "${BINARY_DIR}")
|
||||
|
||||
add_library (ZLIB::ZLIB STATIC IMPORTED GLOBAL)
|
||||
file (MAKE_DIRECTORY ${BINARY_DIR}/_installed_/include)
|
||||
set_target_properties (ZLIB::ZLIB PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${BINARY_DIR}/_installed_/lib/${ep_lib_prefix}${zlib_base}${zlib_debug_postfix}${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${BINARY_DIR}/_installed_/lib/${ep_lib_prefix}${zlib_base}${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${BINARY_DIR}/_installed_/include)
|
||||
add_dependencies (ZLIB::ZLIB zlib_src)
|
||||
exclude_if_included (ZLIB::ZLIB)
|
||||
endif ()
|
||||
|
||||
#[===========================[
|
||||
grpc
|
||||
#]===========================]
|
||||
ExternalProject_Add (grpc_src
|
||||
PREFIX ${nih_cache_path}
|
||||
GIT_REPOSITORY https://github.com/grpc/grpc.git
|
||||
GIT_TAG v1.25.0
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:-DCMAKE_VERBOSE_MAKEFILE=ON>
|
||||
$<$<BOOL:${CMAKE_TOOLCHAIN_FILE}>:-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}>
|
||||
$<$<BOOL:${VCPKG_TARGET_TRIPLET}>:-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}>
|
||||
$<$<BOOL:${unity}>:-DCMAKE_UNITY_BUILD=ON}>
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
$<$<NOT:$<BOOL:${is_multiconfig}>>:-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}>
|
||||
-DgRPC_BUILD_TESTS=OFF
|
||||
-DgRPC_BENCHMARK_PROVIDER=""
|
||||
-DgRPC_BUILD_CSHARP_EXT=OFF
|
||||
-DgRPC_MSVC_STATIC_RUNTIME=ON
|
||||
-DgRPC_INSTALL=OFF
|
||||
-DgRPC_CARES_PROVIDER=package
|
||||
-Dc-ares_DIR=${cares_binary_dir}/_installed_/lib/cmake/c-ares
|
||||
-DgRPC_SSL_PROVIDER=package
|
||||
-DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
|
||||
-DgRPC_PROTOBUF_PROVIDER=package
|
||||
-DProtobuf_USE_STATIC_LIBS=$<IF:$<AND:$<BOOL:${Protobuf_FOUND}>,$<NOT:$<BOOL:${static}>>>,OFF,ON>
|
||||
-DProtobuf_INCLUDE_DIR=$<JOIN:$<TARGET_PROPERTY:protobuf::libprotobuf,INTERFACE_INCLUDE_DIRECTORIES>,:_:>
|
||||
-DProtobuf_LIBRARY=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:protobuf::libprotobuf,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:protobuf::libprotobuf,IMPORTED_LOCATION_RELEASE>>
|
||||
-DProtobuf_PROTOC_LIBRARY=$<IF:$<CONFIG:Debug>,$<TARGET_PROPERTY:protobuf::libprotoc,IMPORTED_LOCATION_DEBUG>,$<TARGET_PROPERTY:protobuf::libprotoc,IMPORTED_LOCATION_RELEASE>>
|
||||
-DProtobuf_PROTOC_EXECUTABLE=$<TARGET_PROPERTY:protobuf::protoc,IMPORTED_LOCATION>
|
||||
-DgRPC_ZLIB_PROVIDER=package
|
||||
$<$<NOT:$<BOOL:${has_zlib}>>:-DZLIB_ROOT=${zlib_binary_dir}/_installed_>
|
||||
$<$<BOOL:${MSVC}>:
|
||||
"-DCMAKE_CXX_FLAGS=-GR -Gd -fp:precise -FS -EHa -MP"
|
||||
"-DCMAKE_C_FLAGS=-GR -Gd -fp:precise -FS -MP"
|
||||
>
|
||||
LOG_BUILD ON
|
||||
LOG_CONFIGURE ON
|
||||
BUILD_COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config $<CONFIG>
|
||||
$<$<VERSION_GREATER_EQUAL:${CMAKE_VERSION},3.12>:--parallel ${ep_procs}>
|
||||
$<$<BOOL:${is_multiconfig}>:
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
<BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}grpc${grpc_suffix}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}grpc++${grpc_suffix}$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}address_sorting$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>/$<CONFIG>/${ep_lib_prefix}gpr$<$<CONFIG:Debug>:_d>${ep_lib_suffix}
|
||||
<BINARY_DIR>/$<CONFIG>/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX}
|
||||
<BINARY_DIR>
|
||||
>
|
||||
LIST_SEPARATOR :_:
|
||||
TEST_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
DEPENDS c-ares_src
|
||||
BUILD_BYPRODUCTS
|
||||
<BINARY_DIR>/${ep_lib_prefix}grpc${grpc_suffix}${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}grpc${grpc_suffix}_d${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}grpc++${grpc_suffix}${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}grpc++${grpc_suffix}_d${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}address_sorting${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}address_sorting_d${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}gpr${ep_lib_suffix}
|
||||
<BINARY_DIR>/${ep_lib_prefix}gpr_d${ep_lib_suffix}
|
||||
<BINARY_DIR>/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX}
|
||||
)
|
||||
if (TARGET protobuf_src)
|
||||
ExternalProject_Add_StepDependencies(grpc_src build protobuf_src)
|
||||
endif ()
|
||||
exclude_if_included (grpc_src)
|
||||
ExternalProject_Get_Property (grpc_src BINARY_DIR)
|
||||
ExternalProject_Get_Property (grpc_src SOURCE_DIR)
|
||||
set (grpc_binary_dir "${BINARY_DIR}")
|
||||
set (grpc_source_dir "${SOURCE_DIR}")
|
||||
if (CMAKE_VERBOSE_MAKEFILE)
|
||||
print_ep_logs (grpc_src)
|
||||
endif ()
|
||||
file (MAKE_DIRECTORY ${SOURCE_DIR}/include)
|
||||
|
||||
macro (add_imported_grpc libname_)
|
||||
add_library ("gRPC::${libname_}" STATIC IMPORTED GLOBAL)
|
||||
set_target_properties ("gRPC::${libname_}" PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
${grpc_binary_dir}/${ep_lib_prefix}${libname_}_d${ep_lib_suffix}
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
${grpc_binary_dir}/${ep_lib_prefix}${libname_}${ep_lib_suffix}
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
${grpc_source_dir}/include)
|
||||
add_dependencies ("gRPC::${libname_}" grpc_src)
|
||||
target_link_libraries (ripple_libs INTERFACE "gRPC::${libname_}")
|
||||
exclude_if_included ("gRPC::${libname_}")
|
||||
endmacro ()
|
||||
|
||||
set_target_properties (gRPC::grpc_cpp_plugin PROPERTIES
|
||||
IMPORTED_LOCATION "${grpc_binary_dir}/grpc_cpp_plugin${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
add_dependencies (gRPC::grpc_cpp_plugin grpc_src)
|
||||
endif ()
|
||||
|
||||
add_imported_grpc (gpr)
|
||||
add_imported_grpc ("grpc${grpc_suffix}")
|
||||
add_imported_grpc ("grpc++${grpc_suffix}")
|
||||
add_imported_grpc (address_sorting)
|
||||
|
||||
target_link_libraries ("gRPC::grpc${grpc_suffix}" INTERFACE c-ares::cares gRPC::gpr gRPC::address_sorting ZLIB::ZLIB)
|
||||
target_link_libraries ("gRPC::grpc++${grpc_suffix}" INTERFACE "gRPC::grpc${grpc_suffix}" gRPC::gpr)
|
||||
endif ()
|
||||
find_package(gRPC 1.23)
|
||||
|
||||
#[=================================[
|
||||
generate protobuf sources for
|
||||
grpc defs and bundle into a
|
||||
static lib
|
||||
#]=================================]
|
||||
set (GRPC_GEN_DIR "${CMAKE_BINARY_DIR}/proto_gen_grpc")
|
||||
file (MAKE_DIRECTORY ${GRPC_GEN_DIR})
|
||||
set (GRPC_PROTO_SRCS)
|
||||
set (GRPC_PROTO_HDRS)
|
||||
set (GRPC_PROTO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/src/ripple/proto/org")
|
||||
file(GLOB_RECURSE GRPC_DEFINITION_FILES LIST_DIRECTORIES false "${GRPC_PROTO_ROOT}/*.proto")
|
||||
set(output_dir "${CMAKE_BINARY_DIR}/proto_gen_grpc")
|
||||
set(GRPC_GEN_DIR "${output_dir}/ripple/proto")
|
||||
file(MAKE_DIRECTORY ${GRPC_GEN_DIR})
|
||||
set(GRPC_PROTO_SRCS)
|
||||
set(GRPC_PROTO_HDRS)
|
||||
set(GRPC_PROTO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/src/ripple/proto/org")
|
||||
file(GLOB_RECURSE GRPC_DEFINITION_FILES "${GRPC_PROTO_ROOT}/*.proto")
|
||||
foreach(file ${GRPC_DEFINITION_FILES})
|
||||
# /home/user/rippled/src/ripple/proto/org/.../v1/get_ledger.proto
|
||||
get_filename_component(_abs_file ${file} ABSOLUTE)
|
||||
# /home/user/rippled/src/ripple/proto/org/.../v1
|
||||
get_filename_component(_abs_dir ${_abs_file} DIRECTORY)
|
||||
# get_ledger
|
||||
get_filename_component(_basename ${file} NAME_WE)
|
||||
# /home/user/rippled/src/ripple/proto
|
||||
get_filename_component(_proto_inc ${GRPC_PROTO_ROOT} DIRECTORY) # updir one level
|
||||
# org/.../v1/get_ledger.proto
|
||||
file(RELATIVE_PATH _rel_root_file ${_proto_inc} ${_abs_file})
|
||||
# org/.../v1
|
||||
get_filename_component(_rel_root_dir ${_rel_root_file} DIRECTORY)
|
||||
# src/ripple/proto/org/.../v1
|
||||
file(RELATIVE_PATH _rel_dir ${CMAKE_CURRENT_SOURCE_DIR} ${_abs_dir})
|
||||
|
||||
set (src_1 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.grpc.pb.cc")
|
||||
set (src_2 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.pb.cc")
|
||||
set (hdr_1 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.grpc.pb.h")
|
||||
set (hdr_2 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.pb.h")
|
||||
# .cmake/proto_gen_grpc/ripple/proto/org/.../v1/get_ledger.grpc.pb.cc
|
||||
set(src_1 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.grpc.pb.cc")
|
||||
set(src_2 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.pb.cc")
|
||||
set(hdr_1 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.grpc.pb.h")
|
||||
set(hdr_2 "${GRPC_GEN_DIR}/${_rel_root_dir}/${_basename}.pb.h")
|
||||
add_custom_command(
|
||||
OUTPUT ${src_1} ${src_2} ${hdr_1} ${hdr_2}
|
||||
COMMAND protobuf::protoc
|
||||
@@ -340,25 +45,38 @@ foreach(file ${GRPC_DEFINITION_FILES})
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Running gRPC C++ protocol buffer compiler on ${file}"
|
||||
VERBATIM)
|
||||
set_source_files_properties(${src_1} ${src_2} ${hdr_1} ${hdr_2} PROPERTIES GENERATED TRUE)
|
||||
set_source_files_properties(${src_1} ${src_2} ${hdr_1} ${hdr_2} PROPERTIES
|
||||
GENERATED TRUE
|
||||
SKIP_UNITY_BUILD_INCLUSION ON
|
||||
)
|
||||
list(APPEND GRPC_PROTO_SRCS ${src_1} ${src_2})
|
||||
list(APPEND GRPC_PROTO_HDRS ${hdr_1} ${hdr_2})
|
||||
endforeach()
|
||||
|
||||
add_library (grpc_pbufs STATIC ${GRPC_PROTO_SRCS} ${GRPC_PROTO_HDRS})
|
||||
#target_include_directories (grpc_pbufs PRIVATE src)
|
||||
target_include_directories (grpc_pbufs SYSTEM PUBLIC ${GRPC_GEN_DIR})
|
||||
target_link_libraries (grpc_pbufs protobuf::libprotobuf "gRPC::grpc++${grpc_suffix}")
|
||||
target_compile_options (grpc_pbufs
|
||||
target_include_directories(xrpl_core SYSTEM PUBLIC
|
||||
$<BUILD_INTERFACE:${output_dir}>
|
||||
$<BUILD_INTERFACE:${output_dir}/ripple/proto>
|
||||
# The generated sources include headers relative to this path. Fix it later.
|
||||
$<INSTALL_INTERFACE:include/ripple/proto>
|
||||
)
|
||||
target_sources(xrpl_core PRIVATE ${GRPC_PROTO_SRCS})
|
||||
install(
|
||||
DIRECTORY ${output_dir}/ripple
|
||||
DESTINATION include/
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
target_link_libraries(xrpl_core PUBLIC
|
||||
"gRPC::grpc++"
|
||||
# libgrpc is missing references.
|
||||
absl::random_random
|
||||
)
|
||||
target_compile_options(xrpl_core
|
||||
PRIVATE
|
||||
$<$<BOOL:${MSVC}>:-wd4065>
|
||||
$<$<NOT:$<BOOL:${MSVC}>>:-Wno-deprecated-declarations>
|
||||
PUBLIC
|
||||
$<$<BOOL:${MSVC}>:-wd4996>
|
||||
$<$<BOOL:${is_xcode}>:
|
||||
$<$<BOOL:${XCODE}>:
|
||||
--system-header-prefix="google/protobuf"
|
||||
-Wno-deprecated-dynamic-exception-spec
|
||||
>)
|
||||
add_library (Ripple::grpc_pbufs ALIAS grpc_pbufs)
|
||||
target_link_libraries (ripple_libs INTERFACE Ripple::grpc_pbufs)
|
||||
exclude_if_included (grpc_pbufs)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
set (THIRDPARTY_LIBS "")
|
||||
|
||||
if(WITH_SNAPPY)
|
||||
add_definitions(-DSNAPPY)
|
||||
include_directories(${snappy_INCLUDE_DIRS})
|
||||
set (THIRDPARTY_LIBS ${THIRDPARTY_LIBS} ${snappy_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_LZ4)
|
||||
add_definitions(-DLZ4)
|
||||
include_directories(${lz4_INCLUDE_DIRS})
|
||||
set (THIRDPARTY_LIBS ${THIRDPARTY_LIBS} ${lz4_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "rocksdb/version.h"
|
||||
#include "util/string_util.h"
|
||||
|
||||
// The build script may replace these values with real values based
|
||||
// on whether or not GIT is available and the platform settings
|
||||
static const std::string rocksdb_build_git_sha = "rocksdb_build_git_sha:@GIT_SHA@";
|
||||
static const std::string rocksdb_build_git_tag = "rocksdb_build_git_tag:@GIT_TAG@";
|
||||
#define HAS_GIT_CHANGES @GIT_MOD@
|
||||
#if HAS_GIT_CHANGES == 0
|
||||
// If HAS_GIT_CHANGES is 0, the GIT date is used.
|
||||
// Use the time the branch/tag was last modified
|
||||
static const std::string rocksdb_build_date = "rocksdb_build_date:@GIT_DATE@";
|
||||
#else
|
||||
// If HAS_GIT_CHANGES is > 0, the branch/tag has modifications.
|
||||
// Use the time the build was created.
|
||||
static const std::string rocksdb_build_date = "rocksdb_build_date:@BUILD_DATE@";
|
||||
#endif
|
||||
|
||||
namespace ROCKSDB_NAMESPACE {
|
||||
static void AddProperty(std::unordered_map<std::string, std::string> *props, const std::string& name) {
|
||||
size_t colon = name.find(":");
|
||||
if (colon != std::string::npos && colon > 0 && colon < name.length() - 1) {
|
||||
// If we found a "@:", then this property was a build-time substitution that failed. Skip it
|
||||
size_t at = name.find("@", colon);
|
||||
if (at != colon + 1) {
|
||||
// Everything before the colon is the name, after is the value
|
||||
(*props)[name.substr(0, colon)] = name.substr(colon + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static std::unordered_map<std::string, std::string>* LoadPropertiesSet() {
|
||||
auto * properties = new std::unordered_map<std::string, std::string>();
|
||||
AddProperty(properties, rocksdb_build_git_sha);
|
||||
AddProperty(properties, rocksdb_build_git_tag);
|
||||
AddProperty(properties, rocksdb_build_date);
|
||||
return properties;
|
||||
}
|
||||
|
||||
const std::unordered_map<std::string, std::string>& GetRocksBuildProperties() {
|
||||
static std::unique_ptr<std::unordered_map<std::string, std::string>> props(LoadPropertiesSet());
|
||||
return *props;
|
||||
}
|
||||
|
||||
std::string GetRocksVersionAsString(bool with_patch) {
|
||||
std::string version = ToString(ROCKSDB_MAJOR) + "." + ToString(ROCKSDB_MINOR);
|
||||
if (with_patch) {
|
||||
return version + "." + ToString(ROCKSDB_PATCH);
|
||||
} else {
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
std::string GetRocksBuildInfoAsString(const std::string& program, bool verbose) {
|
||||
std::string info = program + " (RocksDB) " + GetRocksVersionAsString(true);
|
||||
if (verbose) {
|
||||
for (const auto& it : GetRocksBuildProperties()) {
|
||||
info.append("\n ");
|
||||
info.append(it.first);
|
||||
info.append(": ");
|
||||
info.append(it.second);
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
} // namespace ROCKSDB_NAMESPACE
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# This patches unsigned-types.h in the soci official sources
|
||||
# so as to remove type range check exceptions that cause
|
||||
# us trouble when using boost::optional to select int values
|
||||
|
||||
# Some versions of CMake erroneously patch external projects on every build.
|
||||
# If the patch makes no changes, skip it. This workaround can be
|
||||
# removed once we stop supporting vulnerable versions of CMake.
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/21086
|
||||
file (STRINGS include/soci/unsigned-types.h sourcecode)
|
||||
# Delete the .patched file if it exists, so it doesn't end up duplicated.
|
||||
# Trying to remove a file that does not exist is not a problem.
|
||||
file (REMOVE include/soci/unsigned-types.h.patched)
|
||||
foreach (line_ ${sourcecode})
|
||||
if (line_ MATCHES "^[ \\t]+throw[ ]+soci_error[ ]*\\([ ]*\"Value outside of allowed.+$")
|
||||
set (line_ "//${CMAKE_MATCH_0}")
|
||||
endif ()
|
||||
file (APPEND include/soci/unsigned-types.h.patched "${line_}\n")
|
||||
endforeach ()
|
||||
execute_process( COMMAND ${CMAKE_COMMAND} -E compare_files
|
||||
include/soci/unsigned-types.h include/soci/unsigned-types.h.patched
|
||||
RESULT_VARIABLE compare_result
|
||||
)
|
||||
if( compare_result EQUAL 0)
|
||||
message(DEBUG "The soci source and patch files are identical. Make no changes.")
|
||||
file (REMOVE include/soci/unsigned-types.h.patched)
|
||||
return()
|
||||
endif()
|
||||
file (RENAME include/soci/unsigned-types.h include/soci/unsigned-types.h.orig)
|
||||
file (RENAME include/soci/unsigned-types.h.patched include/soci/unsigned-types.h)
|
||||
# also fix Boost.cmake so that it just returns when we override the Boost_FOUND var
|
||||
file (APPEND cmake/dependencies/Boost.cmake.patched "if (Boost_FOUND)\n")
|
||||
file (APPEND cmake/dependencies/Boost.cmake.patched " return ()\n")
|
||||
file (APPEND cmake/dependencies/Boost.cmake.patched "endif ()\n")
|
||||
file (STRINGS cmake/dependencies/Boost.cmake sourcecode)
|
||||
foreach (line_ ${sourcecode})
|
||||
file (APPEND cmake/dependencies/Boost.cmake.patched "${line_}\n")
|
||||
endforeach ()
|
||||
file (RENAME cmake/dependencies/Boost.cmake.patched cmake/dependencies/Boost.cmake)
|
||||
|
||||
1
Builds/README.md
Normal file
1
Builds/README.md
Normal file
@@ -0,0 +1 @@
|
||||
[Please see the BUILD instructions here](../BUILD.md)
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
// See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file.
|
||||
"configurations": [
|
||||
{
|
||||
"name": "x64-Debug",
|
||||
"generator": "Visual Studio 15 2017 Win64",
|
||||
"configurationType": "Debug",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"buildRoot": "${thisFileDir}\\build\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "-v:minimal",
|
||||
"ctestCommandArgs": "",
|
||||
"variables": [
|
||||
{
|
||||
"name": "BOOST_ROOT",
|
||||
"value": "C:\\lib\\boost"
|
||||
},
|
||||
{
|
||||
"name": "OPENSSL_ROOT",
|
||||
"value": "C:\\lib\\OpenSSL-Win64"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "x64-Release",
|
||||
"generator": "Visual Studio 15 2017 Win64",
|
||||
"configurationType": "Release",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"buildRoot": "${thisFileDir}\\build\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "-v:minimal",
|
||||
"ctestCommandArgs": "",
|
||||
"variables": [
|
||||
{
|
||||
"name": "BOOST_ROOT",
|
||||
"value": "C:\\lib\\boost"
|
||||
},
|
||||
{
|
||||
"name": "OPENSSL_ROOT",
|
||||
"value": "C:\\lib\\OpenSSL-Win64"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
# Visual Studio 2017 Build Instructions
|
||||
|
||||
## Important
|
||||
|
||||
We do not recommend Windows for rippled production use at this time. Currently,
|
||||
the Ubuntu platform has received the highest level of quality assurance,
|
||||
testing, and support. Additionally, 32-bit Windows versions are not supported.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To clone the source code repository, create branches for inspection or
|
||||
modification, build rippled under Visual Studio, and run the unit tests you will
|
||||
need these software components
|
||||
|
||||
| Component | Minimum Recommended Version |
|
||||
|-----------|-----------------------|
|
||||
| [Visual Studio 2017](README.md#install-visual-studio-2017)| 15.5.4 |
|
||||
| [Git for Windows](README.md#install-git-for-windows)| 2.16.1 |
|
||||
| [OpenSSL Library](README.md#install-openssl) | 1.1.1L |
|
||||
| [Boost library](README.md#build-boost) | 1.70.0 |
|
||||
| [CMake for Windows](README.md#optional-install-cmake-for-windows)* | 3.12 |
|
||||
|
||||
\* Only needed if not using the integrated CMake in VS 2017 and prefer generating dedicated project/solution files.
|
||||
|
||||
## Install Software
|
||||
|
||||
### Install Visual Studio 2017
|
||||
|
||||
If not already installed on your system, download your choice of installer from
|
||||
the [Visual Studio 2017
|
||||
Download](https://www.visualstudio.com/downloads/download-visual-studio-vs)
|
||||
page, run the installer, and follow the directions. **You may need to choose the
|
||||
`Desktop development with C++` workload to install all necessary C++ features.**
|
||||
|
||||
Any version of Visual Studio 2017 may be used to build rippled. The **Visual
|
||||
Studio 2017 Community** edition is available free of charge (see [the product
|
||||
page](https://www.visualstudio.com/products/visual-studio-community-vs) for
|
||||
licensing details), while paid editions may be used for an initial free-trial
|
||||
period.
|
||||
|
||||
### Install Git for Windows
|
||||
|
||||
Git is a distributed revision control system. The Windows version also provides
|
||||
the bash shell and many Windows versions of Unix commands. While there are other
|
||||
varieties of Git (such as TortoiseGit, which has a native Windows interface and
|
||||
integrates with the Explorer shell), we recommend installing [Git for
|
||||
Windows](https://git-scm.com/) since it provides a Unix-like command line
|
||||
environment useful for running shell scripts. Use of the bash shell under
|
||||
Windows is mandatory for running the unit tests.
|
||||
|
||||
### Install OpenSSL
|
||||
|
||||
[Download the latest version of
|
||||
OpenSSL.](http://slproweb.com/products/Win32OpenSSL.html) There will
|
||||
several `Win64` bit variants available, you want the non-light
|
||||
`v1.1` line. As of this writing, you **should** select
|
||||
|
||||
* Win64 OpenSSL v1.1.1L
|
||||
|
||||
and should **not** select
|
||||
|
||||
* Anything with "Win32" in the name
|
||||
* Anything with "light" in the name
|
||||
* Anything with "EXPERIMENTAL" in the name
|
||||
* Anything in the 3.0 line - rippled won't currently build with this version.
|
||||
|
||||
Run the installer, and choose an appropriate location for your OpenSSL
|
||||
installation. In this guide we use `C:\lib\OpenSSL-Win64` as the destination
|
||||
location.
|
||||
|
||||
You may be informed on running the installer that "Visual C++ 2008
|
||||
Redistributables" must first be installed first. If so, download it from the
|
||||
[same page](http://slproweb.com/products/Win32OpenSSL.html), again making sure
|
||||
to get the correct 32-/64-bit variant.
|
||||
|
||||
* NOTE: Since rippled links statically to OpenSSL, it does not matter where the
|
||||
OpenSSL .DLL files are placed, or what version they are. rippled does not use
|
||||
or require any external .DLL files to run other than the standard operating
|
||||
system ones.
|
||||
|
||||
### Build Boost
|
||||
|
||||
Boost 1.70 or later is required.
|
||||
|
||||
After [downloading boost](http://www.boost.org/users/download/) and unpacking it
|
||||
to `c:\lib`. As of this writing, the most recent version of boost is 1.70.0,
|
||||
which will unpack into a directory named `boost_1_70_0`. We recommended either
|
||||
renaming this directory to `boost`, or creating a junction link `mklink /J boost
|
||||
boost_1_70_0`, so that you can more easily switch between versions.
|
||||
|
||||
Next, open **Developer Command Prompt** and type the following commands
|
||||
|
||||
```powershell
|
||||
cd C:\lib\boost
|
||||
bootstrap
|
||||
```
|
||||
|
||||
The rippled application is linked statically to the standard runtimes and
|
||||
external dependencies on Windows, to ensure that the behavior of the executable
|
||||
is not affected by changes in outside files. Therefore, it is necessary to build
|
||||
the required boost static libraries using this command:
|
||||
|
||||
```powershell
|
||||
bjam -j<Num Parallel> --toolset=msvc-14.1 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared,static stage
|
||||
```
|
||||
|
||||
where you should replace `<Num Parallel>` with the number of parallel
|
||||
invocations to use build, e.g. `bjam -j4 ...` would use up to 4 concurrent build
|
||||
shell commands for the build.
|
||||
|
||||
Building the boost libraries may take considerable time. When the build process
|
||||
is completed, take note of both the reported compiler include paths and linker
|
||||
library paths as they will be required later.
|
||||
|
||||
### (Optional) Install CMake for Windows
|
||||
|
||||
[CMake](http://cmake.org) is a cross platform build system generator. Visual
|
||||
Studio 2017 includes an integrated version of CMake that avoids having to
|
||||
manually run CMake, but it is undergoing continuous improvement. Users that
|
||||
prefer to use standard Visual Studio project and solution files need to install
|
||||
a dedicated version of CMake to generate them. The latest version can be found
|
||||
at the [CMake download site](https://cmake.org/download/). It is recommended you
|
||||
select the install option to add CMake to your path.
|
||||
|
||||
## Clone the rippled repository
|
||||
|
||||
If you are familiar with cloning github repositories, just follow your normal
|
||||
process and clone `git@github.com:ripple/rippled.git`. Otherwise follow this
|
||||
section for instructions.
|
||||
|
||||
1. If you don't have a github account, sign up for one at
|
||||
[github.com](https://github.com/).
|
||||
2. Make sure you have Github ssh keys. For help see
|
||||
[generating-ssh-keys](https://help.github.com/articles/generating-ssh-keys).
|
||||
|
||||
Open the "Git Bash" shell that was installed with "Git for Windows" in the step
|
||||
above. Navigate to the directory where you want to clone rippled (git bash uses
|
||||
`/c` for windows's `C:` and forward slash where windows uses backslash, so
|
||||
`C:\Users\joe\projs` would be `/c/Users/joe/projs` in git bash). Now clone the
|
||||
repository and optionally switch to the *master* branch. Type the following at
|
||||
the bash prompt:
|
||||
|
||||
```powershell
|
||||
git clone git@github.com:ripple/rippled.git
|
||||
cd rippled
|
||||
```
|
||||
If you receive an error about not having the "correct access rights" make sure
|
||||
you have Github ssh keys, as described above.
|
||||
|
||||
For a stable release, choose the `master` branch or one of the tagged releases
|
||||
listed on [rippled's GitHub page](https://github.com/ripple/rippled/releases).
|
||||
|
||||
```
|
||||
git checkout master
|
||||
```
|
||||
|
||||
To test the latest release candidate, choose the `release` branch.
|
||||
|
||||
```
|
||||
git checkout release
|
||||
```
|
||||
|
||||
If you are doing development work and want the latest set of untested features,
|
||||
you can consider using the `develop` branch instead.
|
||||
|
||||
```
|
||||
git checkout develop
|
||||
```
|
||||
|
||||
# Build using Visual Studio integrated CMake
|
||||
|
||||
In Visual Studio 2017, Microsoft added [integrated IDE support for
|
||||
cmake](https://blogs.msdn.microsoft.com/vcblog/2016/10/05/cmake-support-in-visual-studio/).
|
||||
To begin, simply:
|
||||
|
||||
1. Launch Visual Studio and choose **File | Open | Folder**, navigating to the
|
||||
cloned rippled folder.
|
||||
2. Right-click on `CMakeLists.txt` in the **Solution Explorer - Folder View** to
|
||||
generate a `CMakeSettings.json` file. A sample settings file is provided
|
||||
[here](/Builds/VisualStudio2017/CMakeSettings-example.json). Customize the
|
||||
settings for `BOOST_ROOT`, `OPENSSL_ROOT` to match the install paths if they
|
||||
differ from those in the file.
|
||||
4. Select either the `x64-Release` or `x64-Debug` configuration from the
|
||||
**Project Setings** drop-down. This should invoke the built-in CMake project
|
||||
generator. If not, you can right-click on the `CMakeLists.txt` file and
|
||||
choose **Cache | Generate Cache**.
|
||||
5. Select either the `rippled.exe` (unity) or `rippled_classic.exe` (non-unity)
|
||||
option in the **Select Startup Item** drop-down. This will be the target
|
||||
built when you press F7. Alternatively, you can choose a target to build from
|
||||
the top-level **CMake | Build** menu. Note that at this time, there are other
|
||||
targets listed that come from third party visual studio files embedded in the
|
||||
rippled repo, e.g. `datagen.vcxproj`. Please ignore them.
|
||||
|
||||
For details on configuring debugging sessions or further customization of CMake,
|
||||
please refer to the [CMake tools for VS
|
||||
documentation](https://docs.microsoft.com/en-us/cpp/ide/cmake-tools-for-visual-cpp).
|
||||
|
||||
If using the provided `CMakeSettings.json` file, the executable will be in
|
||||
```
|
||||
.\build\x64-Release\Release\rippled.exe
|
||||
```
|
||||
or
|
||||
```
|
||||
.\build\x64-Debug\Debug\rippled.exe
|
||||
```
|
||||
These paths are relative to your cloned git repository.
|
||||
|
||||
# Build using stand-alone CMake
|
||||
|
||||
This requires having installed [CMake for
|
||||
Windows](README.md#optional-install-cmake-for-windows). We do not recommend
|
||||
mixing this method with the integrated CMake method for the same repository
|
||||
clone. Assuming you included the cmake executable folder in your path,
|
||||
execute the following commands within your `rippled` cloned repository:
|
||||
|
||||
```
|
||||
mkdir build\cmake
|
||||
cd build\cmake
|
||||
cmake ..\.. -G"Visual Studio 15 2017 Win64" -DBOOST_ROOT="C:\lib\boost_1_70_0" -DOPENSSL_ROOT="C:\lib\OpenSSL-Win64" -DCMAKE_GENERATOR_TOOLSET=host=x64
|
||||
```
|
||||
Now launch Visual Studio 2017 and select **File | Open | Project/Solution**.
|
||||
Navigate to the `build\cmake` folder created above and select the `rippled.sln`
|
||||
file. You can then choose whether to build the `Debug` or `Release` solution
|
||||
configuration.
|
||||
|
||||
The executable will be in
|
||||
```
|
||||
.\build\cmake\Release\rippled.exe
|
||||
```
|
||||
or
|
||||
```
|
||||
.\build\cmake\Debug\rippled.exe
|
||||
```
|
||||
These paths are relative to your cloned git repository.
|
||||
|
||||
# Unity/No-Unity Builds
|
||||
|
||||
The rippled build system defaults to using
|
||||
[unity source files](http://onqtam.com/programming/2018-07-07-unity-builds/)
|
||||
to improve build times. In some cases it might be desirable to disable the
|
||||
unity build and compile individual translation units. Here is how you can
|
||||
switch to a "no-unity" build configuration:
|
||||
|
||||
## Visual Studio Integrated CMake
|
||||
|
||||
Edit your `CmakeSettings.json` (described above) by adding `-Dunity=OFF`
|
||||
to the `cmakeCommandArgs` entry for each build configuration.
|
||||
|
||||
## Standalone CMake Builds
|
||||
|
||||
When running cmake to generate the Visual Studio project files, add
|
||||
`-Dunity=OFF` to the command line options passed to cmake.
|
||||
|
||||
**Note:** you will need to re-run the cmake configuration step anytime you
|
||||
want to switch between unity/no-unity builds.
|
||||
|
||||
# Unit Test (Recommended)
|
||||
|
||||
`rippled` builds a set of unit tests into the server executable. To run these
|
||||
unit tests after building, pass the `--unittest` option to the compiled
|
||||
`rippled` executable. The executable will exit with summary info after running
|
||||
the unit tests.
|
||||
|
||||
@@ -1,43 +1,26 @@
|
||||
FROM centos:7
|
||||
FROM rippleci/centos:7
|
||||
ARG GIT_COMMIT=unknown
|
||||
ARG CI_USE=false
|
||||
|
||||
LABEL git-commit=$GIT_COMMIT
|
||||
|
||||
COPY centos-builder/centos_setup.sh /tmp/
|
||||
COPY shared/build_deps.sh /tmp/
|
||||
COPY shared/install_cmake.sh /tmp/
|
||||
COPY centos-builder/extras.sh /tmp/
|
||||
COPY shared/install_boost.sh /tmp/
|
||||
RUN chmod +x /tmp/centos_setup.sh && \
|
||||
chmod +x /tmp/build_deps.sh && \
|
||||
chmod +x /tmp/install_boost.sh && \
|
||||
chmod +x /tmp/install_cmake.sh && \
|
||||
chmod +x /tmp/extras.sh
|
||||
chmod +x /tmp/install_cmake.sh
|
||||
RUN /tmp/centos_setup.sh
|
||||
|
||||
RUN /tmp/install_cmake.sh 3.16.1 /opt/local/cmake-3.16
|
||||
RUN /tmp/install_cmake.sh 3.16.3 /opt/local/cmake-3.16
|
||||
RUN ln -s /opt/local/cmake-3.16 /opt/local/cmake
|
||||
ENV PATH="/opt/local/cmake/bin:$PATH"
|
||||
# also install min supported cmake for testing
|
||||
RUN if [ "${CI_USE}" = true ] ; then /tmp/install_cmake.sh 3.9.0 /opt/local/cmake-3.9; fi
|
||||
# TODO: Install latest CMake for testing
|
||||
RUN if [ "${CI_USE}" = true ] ; then /tmp/install_cmake.sh 3.16.3 /opt/local/cmake-3.16; fi
|
||||
|
||||
RUN source scl_source enable devtoolset-7 python27 && \
|
||||
/tmp/build_deps.sh
|
||||
ENV BOOST_ROOT="/opt/local/boost/_INSTALLED_"
|
||||
ENV PLANTUML_JAR="/opt/plantuml/plantuml.jar"
|
||||
ENV OPENSSL_ROOT="/opt/local/openssl"
|
||||
ENV GDB_ROOT="/opt/local/gdb"
|
||||
RUN source scl_source enable devtoolset-7 python27 && \
|
||||
/tmp/extras.sh
|
||||
|
||||
# prep files for package building
|
||||
RUN mkdir -m 777 -p /opt/rippled_bld/pkg
|
||||
|
||||
WORKDIR /opt/rippled_bld/pkg
|
||||
RUN mkdir -m 777 ./rpmbuild
|
||||
RUN mkdir -m 777 ./rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
|
||||
COPY packaging/rpm/build_rpm.sh ./
|
||||
CMD ./build_rpm.sh
|
||||
|
||||
|
||||
|
||||
@@ -7,31 +7,16 @@ yum -y upgrade
|
||||
yum -y update
|
||||
yum -y install epel-release centos-release-scl
|
||||
yum -y install \
|
||||
wget curl time gcc-c++ time yum-utils autoconf automake pkgconfig libtool \
|
||||
wget curl time gcc-c++ yum-utils autoconf automake pkgconfig libtool \
|
||||
libstdc++-static rpm-build gnupg which make cmake \
|
||||
devtoolset-7 devtoolset-7-gdb devtoolset-7-libasan-devel devtoolset-7-libtsan-devel devtoolset-7-libubsan-devel \
|
||||
devtoolset-8 devtoolset-8-gdb devtoolset-8-binutils devtoolset-8-libstdc++-devel \
|
||||
devtoolset-8-libasan-devel devtoolset-8-libtsan-devel devtoolset-8-libubsan-devel devtoolset-8-liblsan-devel \
|
||||
devtoolset-11 devtoolset-11-gdb devtoolset-11-binutils devtoolset-11-libstdc++-devel \
|
||||
devtoolset-11-libasan-devel devtoolset-11-libtsan-devel devtoolset-11-libubsan-devel devtoolset-11-liblsan-devel \
|
||||
flex flex-devel bison bison-devel parallel \
|
||||
ncurses ncurses-devel ncurses-libs graphviz graphviz-devel \
|
||||
lzip p7zip bzip2 bzip2-devel lzma-sdk lzma-sdk-devel xz-devel \
|
||||
zlib zlib-devel zlib-static texinfo openssl openssl-static \
|
||||
jemalloc jemalloc-devel \
|
||||
libicu-devel htop \
|
||||
python27-python rh-python35-python \
|
||||
python-devel python27-python-devel rh-python35-python-devel \
|
||||
python27 rh-python35 \
|
||||
rh-python38 \
|
||||
ninja-build git svn \
|
||||
swig perl-Digest-MD5 python2-pip
|
||||
|
||||
if [ "${CI_USE}" = true ] ; then
|
||||
# TODO need permanent link
|
||||
yum -y install ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora-secondary/updates/26/i386/Packages/p/python2-six-1.10.0-9.fc26.noarch.rpm
|
||||
|
||||
yum -y install \
|
||||
llvm-toolset-7 llvm-toolset-7-runtime llvm-toolset-7-build llvm-toolset-7-clang \
|
||||
llvm-toolset-7-clang-analyzer llvm-toolset-7-clang-devel llvm-toolset-7-clang-libs \
|
||||
llvm-toolset-7-clang-tools-extra llvm-toolset-7-compiler-rt llvm-toolset-7-lldb \
|
||||
llvm-toolset-7-lldb-devel llvm-toolset-7-python-lldb
|
||||
|
||||
fi
|
||||
swig perl-Digest-MD5
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
if [ "${CI_USE}" = true ] ; then
|
||||
cd /tmp
|
||||
wget https://ftp.gnu.org/gnu/gdb/gdb-8.3.1.tar.xz
|
||||
tar xf gdb-8.3.1.tar.xz
|
||||
cd gdb-8.3
|
||||
./configure CFLAGS="-w -O2" CXXFLAGS="-std=gnu++11 -g -O2 -w" --prefix=/opt/local/gdb-8.3
|
||||
make -j$(nproc)
|
||||
make install
|
||||
ln -s /opt/local/gdb-8.3 /opt/local/gdb
|
||||
cd ..
|
||||
rm -f gdb-8.3.tar.xz
|
||||
rm -rf gdb-8.3
|
||||
|
||||
# clang from source
|
||||
cd /tmp
|
||||
git clone https://github.com/llvm/llvm-project.git
|
||||
cd llvm-project
|
||||
git checkout llvmorg-9.0.0
|
||||
INSTALL=/opt/llvm-9/
|
||||
mkdir mybuilddir && cd mybuilddir
|
||||
# TODO figure out necessary options
|
||||
cmake ../llvm -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;libcxx;libcxxabi;lldb;compiler-rt;lld;polly' \
|
||||
-DCMAKE_INSTALL_PREFIX=${INSTALL} \
|
||||
-DLLVM_LIBDIR_SUFFIX=64
|
||||
cmake --build . --parallel --target install
|
||||
cd /tmp
|
||||
rm -rf llvm-project
|
||||
fi
|
||||
@@ -22,6 +22,7 @@ time cmake \
|
||||
-Dpackages_only=ON \
|
||||
-Dcontainer_label="${container_tag}" \
|
||||
-Dhave_package_container=ON \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=OFF \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-Dunity=OFF \
|
||||
-G Ninja ../..
|
||||
time cmake --build . --target ${pkgtype}
|
||||
time cmake --build . --target ${pkgtype} -- -v
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
set -ex
|
||||
set -e
|
||||
# used as a before/setup script for docker steps in gitlab-ci
|
||||
# expects to be run in standard alpine/dind image
|
||||
echo $(nproc)
|
||||
@@ -13,4 +13,3 @@ apk add \
|
||||
pip3 install awscli
|
||||
# list curdir contents to build log:
|
||||
ls -la
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ variables:
|
||||
# these containers are built manually using the rippled
|
||||
# cmake build (container targets) and tagged/pushed so they
|
||||
# can be used here
|
||||
RPM_CONTAINER_TAG: "2020-02-10"
|
||||
RPM_CONTAINER_TAG: "2023-02-13"
|
||||
RPM_CONTAINER_NAME: "rippled-rpm-builder"
|
||||
RPM_CONTAINER_FULLNAME: "${RPM_CONTAINER_NAME}:${RPM_CONTAINER_TAG}"
|
||||
DPKG_CONTAINER_TAG: "2020-02-10"
|
||||
DPKG_CONTAINER_TAG: "2023-07-31"
|
||||
DPKG_CONTAINER_NAME: "rippled-dpkg-builder"
|
||||
DPKG_CONTAINER_FULLNAME: "${DPKG_CONTAINER_NAME}:${DPKG_CONTAINER_TAG}"
|
||||
ARTIFACTORY_HOST: "artifactory.ops.ripple.com"
|
||||
@@ -83,6 +83,7 @@ stages:
|
||||
#########################################################################
|
||||
|
||||
rpm_build:
|
||||
timeout: "1h 30m"
|
||||
stage: build_packages
|
||||
<<: *dind_param
|
||||
artifacts:
|
||||
@@ -92,6 +93,7 @@ rpm_build:
|
||||
- . ./Builds/containers/gitlab-ci/build_package.sh rpm
|
||||
|
||||
dpkg_build:
|
||||
timeout: "1h 30m"
|
||||
stage: build_packages
|
||||
<<: *dind_param
|
||||
artifacts:
|
||||
@@ -179,47 +181,38 @@ centos_7_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- rpm_build
|
||||
- rpm_sign
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/centos:7
|
||||
<<: *run_local_smoketest
|
||||
|
||||
# TODO: Remove "allow_failure" when tests fixed
|
||||
rocky_8_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- rpm_build
|
||||
- rpm_sign
|
||||
image:
|
||||
name: rockylinux/rockylinux:8
|
||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
|
||||
<<: *run_local_smoketest
|
||||
allow_failure: true
|
||||
|
||||
fedora_34_smoketest:
|
||||
fedora_37_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- rpm_build
|
||||
- rpm_sign
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/fedora:34
|
||||
name: artifactory.ops.ripple.com/fedora:37
|
||||
<<: *run_local_smoketest
|
||||
allow_failure: true
|
||||
|
||||
fedora_35_smoketest:
|
||||
fedora_38_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- rpm_build
|
||||
- rpm_sign
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/fedora:35
|
||||
name: artifactory.ops.ripple.com/fedora:38
|
||||
<<: *run_local_smoketest
|
||||
allow_failure: true
|
||||
|
||||
ubuntu_18_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- dpkg_build
|
||||
- dpkg_sign
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/ubuntu:18.04
|
||||
<<: *run_local_smoketest
|
||||
@@ -228,36 +221,22 @@ ubuntu_20_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- dpkg_build
|
||||
- dpkg_sign
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/ubuntu:20.04
|
||||
<<: *run_local_smoketest
|
||||
|
||||
# TODO: remove "allow_failure" when 22.04 released in 4/2022...
|
||||
ubuntu_22_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- dpkg_build
|
||||
- dpkg_sign
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/ubuntu:22.04
|
||||
<<: *run_local_smoketest
|
||||
allow_failure: true
|
||||
|
||||
debian_9_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- dpkg_build
|
||||
- dpkg_sign
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/debian:9
|
||||
<<: *run_local_smoketest
|
||||
|
||||
debian_10_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- dpkg_build
|
||||
- dpkg_sign
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/debian:10
|
||||
<<: *run_local_smoketest
|
||||
@@ -266,7 +245,6 @@ debian_11_smoketest:
|
||||
stage: smoketest
|
||||
dependencies:
|
||||
- dpkg_build
|
||||
- dpkg_sign
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/debian:11
|
||||
<<: *run_local_smoketest
|
||||
@@ -367,41 +345,39 @@ centos_7_verify_repo_test:
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
|
||||
|
||||
rocky_8_verify_repo_test:
|
||||
stage: verify_from_test
|
||||
variables:
|
||||
RPM_REPO: "rippled-rpm-test-mirror"
|
||||
image:
|
||||
name: rockylinux/rockylinux:8
|
||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
|
||||
dependencies:
|
||||
- rpm_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
allow_failure: true
|
||||
|
||||
fedora_34_verify_repo_test:
|
||||
fedora_37_verify_repo_test:
|
||||
stage: verify_from_test
|
||||
variables:
|
||||
RPM_REPO: "rippled-rpm-test-mirror"
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/fedora:34
|
||||
name: artifactory.ops.ripple.com/fedora:37
|
||||
dependencies:
|
||||
- rpm_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
allow_failure: true
|
||||
|
||||
fedora_35_verify_repo_test:
|
||||
fedora_38_verify_repo_test:
|
||||
stage: verify_from_test
|
||||
variables:
|
||||
RPM_REPO: "rippled-rpm-test-mirror"
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/fedora:35
|
||||
name: artifactory.ops.ripple.com/fedora:38
|
||||
dependencies:
|
||||
- rpm_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
allow_failure: true
|
||||
|
||||
ubuntu_18_verify_repo_test:
|
||||
stage: verify_from_test
|
||||
@@ -427,7 +403,6 @@ ubuntu_20_verify_repo_test:
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
|
||||
# TODO: remove "allow_failure" when 22.04 released in 4/2022...
|
||||
ubuntu_22_verify_repo_test:
|
||||
stage: verify_from_test
|
||||
variables:
|
||||
@@ -439,19 +414,6 @@ ubuntu_22_verify_repo_test:
|
||||
- dpkg_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
allow_failure: true
|
||||
|
||||
debian_9_verify_repo_test:
|
||||
stage: verify_from_test
|
||||
variables:
|
||||
DISTRO: "stretch"
|
||||
DEB_REPO: "rippled-deb-test-mirror"
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/debian:9
|
||||
dependencies:
|
||||
- dpkg_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
|
||||
debian_10_verify_repo_test:
|
||||
stage: verify_from_test
|
||||
@@ -542,41 +504,38 @@ centos_7_verify_repo_prod:
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
|
||||
rocky_8_verify_repo_test:
|
||||
stage: verify_from_test
|
||||
variables:
|
||||
RPM_REPO: "rippled-rpm-test-mirror"
|
||||
image:
|
||||
name: rockylinux/rockylinux:8
|
||||
dependencies:
|
||||
- rpm_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
allow_failure: true
|
||||
|
||||
fedora_34_verify_repo_prod:
|
||||
rocky_8_verify_repo_prod:
|
||||
stage: verify_from_prod
|
||||
variables:
|
||||
RPM_REPO: "rippled-rpm"
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/fedora:34
|
||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
|
||||
dependencies:
|
||||
- rpm_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
allow_failure: true
|
||||
|
||||
fedora_35_verify_repo_prod:
|
||||
fedora_37_verify_repo_prod:
|
||||
stage: verify_from_prod
|
||||
variables:
|
||||
RPM_REPO: "rippled-rpm"
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/fedora:35
|
||||
name: artifactory.ops.ripple.com/fedora:37
|
||||
dependencies:
|
||||
- rpm_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
|
||||
fedora_38_verify_repo_prod:
|
||||
stage: verify_from_prod
|
||||
variables:
|
||||
RPM_REPO: "rippled-rpm"
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/fedora:38
|
||||
dependencies:
|
||||
- rpm_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
allow_failure: true
|
||||
|
||||
ubuntu_18_verify_repo_prod:
|
||||
stage: verify_from_prod
|
||||
@@ -602,7 +561,6 @@ ubuntu_20_verify_repo_prod:
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
|
||||
# TODO: remove "allow_failure" when 22.04 released in 4/2022...
|
||||
ubuntu_22_verify_repo_prod:
|
||||
stage: verify_from_prod
|
||||
variables:
|
||||
@@ -614,19 +572,6 @@ ubuntu_22_verify_repo_prod:
|
||||
- dpkg_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
allow_failure: true
|
||||
|
||||
debian_9_verify_repo_prod:
|
||||
stage: verify_from_prod
|
||||
variables:
|
||||
DISTRO: "stretch"
|
||||
DEB_REPO: "rippled-deb"
|
||||
image:
|
||||
name: artifactory.ops.ripple.com/debian:9
|
||||
dependencies:
|
||||
- dpkg_sign
|
||||
<<: *only_primary
|
||||
<<: *run_repo_smoketest
|
||||
|
||||
debian_10_verify_repo_prod:
|
||||
stage: verify_from_prod
|
||||
@@ -693,11 +638,9 @@ build_centos_container:
|
||||
<<: *dind_param
|
||||
script:
|
||||
- . ./Builds/containers/gitlab-ci/build_container.sh rpm
|
||||
allow_failure: true
|
||||
|
||||
build_ubuntu_container:
|
||||
stage: build_containers
|
||||
<<: *dind_param
|
||||
script:
|
||||
- . ./Builds/containers/gitlab-ci/build_container.sh dpkg
|
||||
allow_failure: true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
set -ex
|
||||
set -e
|
||||
action=$1
|
||||
filter=$2
|
||||
|
||||
@@ -14,16 +14,17 @@ cd $TOPDIR
|
||||
cd build/dpkg/packages
|
||||
CURLARGS="-sk -X${action} -urippled:${ARTIFACTORY_DEPLOY_KEY_RIPPLED}"
|
||||
RIPPLED_PKG=$(ls rippled_*.deb)
|
||||
RIPPLED_DEV_PKG=$(ls rippled-dev_*.deb)
|
||||
RIPPLED_DBG_PKG=$(ls rippled-dbgsym_*.deb)
|
||||
RIPPLED_REPORTING_PKG=$(ls rippled-reporting_*.deb)
|
||||
RIPPLED_DBG_PKG=$(ls rippled-dbgsym_*.*deb)
|
||||
RIPPLED_REPORTING_DBG_PKG=$(ls rippled-reporting-dbgsym_*.*deb)
|
||||
# TODO - where to upload src tgz?
|
||||
RIPPLED_SRC=$(ls rippled_*.orig.tar.gz)
|
||||
DEB_MATRIX=";deb.component=${COMPONENT};deb.architecture=amd64"
|
||||
for dist in stretch buster bullseye bionic focal jammy; do
|
||||
for dist in buster bullseye bionic focal jammy; do
|
||||
DEB_MATRIX="${DEB_MATRIX};deb.distribution=${dist}"
|
||||
done
|
||||
echo "{ \"debs\": {" > "${TOPDIR}/files.info"
|
||||
for deb in ${RIPPLED_PKG} ${RIPPLED_DEV_PKG} ${RIPPLED_DBG_PKG} ; do
|
||||
for deb in ${RIPPLED_PKG} ${RIPPLED_DBG_PKG} ${RIPPLED_REPORTING_PKG} ${RIPPLED_REPORTING_DBG_PKG}; do
|
||||
# first item doesn't get a comma separator
|
||||
if [ $deb != $RIPPLED_PKG ] ; then
|
||||
echo "," >> "${TOPDIR}/files.info"
|
||||
@@ -48,10 +49,11 @@ cd build/rpm/packages
|
||||
RIPPLED_PKG=$(ls rippled-[0-9]*.x86_64.rpm)
|
||||
RIPPLED_DEV_PKG=$(ls rippled-devel*.rpm)
|
||||
RIPPLED_DBG_PKG=$(ls rippled-debuginfo*.rpm)
|
||||
RIPPLED_REPORTING_PKG=$(ls rippled-reporting*.rpm)
|
||||
# TODO - where to upload src rpm ?
|
||||
RIPPLED_SRC=$(ls rippled-[0-9]*.src.rpm)
|
||||
echo "\"rpms\": {" >> "${TOPDIR}/files.info"
|
||||
for rpm in ${RIPPLED_PKG} ${RIPPLED_DEV_PKG} ${RIPPLED_DBG_PKG} ; do
|
||||
for rpm in ${RIPPLED_PKG} ${RIPPLED_DEV_PKG} ${RIPPLED_DBG_PKG} ${RIPPLED_REPORTING_PKG}; do
|
||||
# first item doesn't get a comma separator
|
||||
if [ $rpm != $RIPPLED_PKG ] ; then
|
||||
echo "," >> "${TOPDIR}/files.info"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
set -ex
|
||||
set -e
|
||||
install_from=$1
|
||||
use_private=${2:-0} # this option not currently needed by any CI scripts,
|
||||
# reserved for possible future use
|
||||
@@ -61,7 +61,11 @@ if [ "${pkgtype}" = "dpkg" ] ; then
|
||||
else
|
||||
yum -y update
|
||||
if [ "${install_from}" = "repo" ] ; then
|
||||
yum -y install yum-utils coreutils util-linux
|
||||
pkgs=("yum-utils coreutils util-linux")
|
||||
if [ "$ID" = "rocky" ]; then
|
||||
pkgs="${pkgs[@]/coreutils}"
|
||||
fi
|
||||
yum install -y $pkgs
|
||||
REPOFILE="/etc/yum.repos.d/artifactory.repo"
|
||||
echo "[Artifactory]" > ${REPOFILE}
|
||||
echo "name=Artifactory" >> ${REPOFILE}
|
||||
@@ -77,8 +81,10 @@ else
|
||||
elif [ "${install_from}" = "local" ] ; then
|
||||
# cached pkg install
|
||||
pkgs=("yum-utils openssl-static zlib-static")
|
||||
if [ "$ID" = "rocky" ]; then
|
||||
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/Rocky-PowerTools.repo
|
||||
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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
set -ex
|
||||
set -e
|
||||
docker login -u rippled \
|
||||
-p ${ARTIFACTORY_DEPLOY_KEY_RIPPLED} "${ARTIFACTORY_HUB}"
|
||||
# this gives us rippled_version :
|
||||
@@ -19,4 +19,3 @@ for label in ${rippled_version} latest ; do
|
||||
docker push \
|
||||
"${ARTIFACTORY_HUB}/${DPKG_CONTAINER_NAME}:${label}_${CI_COMMIT_REF_SLUG}"
|
||||
done
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ set -ex
|
||||
# make sure pkg source files are up to date with repo
|
||||
cd /opt/rippled_bld/pkg
|
||||
cp -fpru rippled/Builds/containers/packaging/dpkg/debian/. debian/
|
||||
cp -fpu rippled/Builds/containers/shared/rippled.service debian/
|
||||
cp -fpu rippled/Builds/containers/shared/rippled*.service debian/
|
||||
cp -fpu rippled/Builds/containers/shared/update_sources.sh .
|
||||
source update_sources.sh
|
||||
|
||||
@@ -15,7 +15,7 @@ RIPPLED_DPKG_VERSION=$(echo "${RIPPLED_VERSION}" | sed 's!-!~!g')
|
||||
# TODO - decide how to handle the trailing/release
|
||||
# version here (hardcoded to 1). Does it ever need to change?
|
||||
RIPPLED_DPKG_FULL_VERSION="${RIPPLED_DPKG_VERSION}-1"
|
||||
|
||||
git config --global --add safe.directory /opt/rippled_bld/pkg/rippled
|
||||
cd /opt/rippled_bld/pkg/rippled
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
git status
|
||||
@@ -45,21 +45,19 @@ CHANGELOG
|
||||
# PATH must be preserved for our more modern cmake in /opt/local
|
||||
# TODO : consider allowing lintian to run in future ?
|
||||
export DH_BUILD_DDEBS=1
|
||||
export CC=gcc-8
|
||||
export CXX=g++-8
|
||||
debuild --no-lintian --preserve-envvar PATH --preserve-env -us -uc
|
||||
rc=$?; if [[ $rc != 0 ]]; then
|
||||
error "error building dpkg"
|
||||
fi
|
||||
cd ..
|
||||
ls -latr
|
||||
|
||||
# copy artifacts
|
||||
cp rippled-dev_${RIPPLED_DPKG_FULL_VERSION}_amd64.deb ${PKG_OUTDIR}
|
||||
cp rippled-reporting_${RIPPLED_DPKG_FULL_VERSION}_amd64.deb ${PKG_OUTDIR}
|
||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.deb ${PKG_OUTDIR}
|
||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}.dsc ${PKG_OUTDIR}
|
||||
# dbgsym suffix is ddeb under newer debuild, but just deb under earlier
|
||||
cp rippled-dbgsym_${RIPPLED_DPKG_FULL_VERSION}_amd64.* ${PKG_OUTDIR}
|
||||
cp rippled-reporting-dbgsym_${RIPPLED_DPKG_FULL_VERSION}_amd64.* ${PKG_OUTDIR}
|
||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.changes ${PKG_OUTDIR}
|
||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.build ${PKG_OUTDIR}
|
||||
cp rippled_${RIPPLED_DPKG_VERSION}.orig.tar.gz ${PKG_OUTDIR}
|
||||
@@ -69,6 +67,10 @@ if [ -e rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.buildinfo ] ; then
|
||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.buildinfo ${PKG_OUTDIR}
|
||||
fi
|
||||
|
||||
pushd ${PKG_OUTDIR}
|
||||
for f in *.ddeb; do mv -- "$f" "${f%.ddeb}.deb"; done
|
||||
popd
|
||||
|
||||
cat rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.changes
|
||||
# extract the text in the .changes file that appears between
|
||||
# Checksums-Sha256: ...
|
||||
@@ -81,15 +83,17 @@ DEB_SHA256=$(cat shasums | \
|
||||
grep "rippled_${RIPPLED_DPKG_VERSION}-1_amd64.deb" | cut -d " " -f 1)
|
||||
DBG_SHA256=$(cat shasums | \
|
||||
grep "rippled-dbgsym_${RIPPLED_DPKG_VERSION}-1_amd64.*" | cut -d " " -f 1)
|
||||
DEV_SHA256=$(cat shasums | \
|
||||
grep "rippled-dev_${RIPPLED_DPKG_VERSION}-1_amd64.deb" | cut -d " " -f 1)
|
||||
REPORTING_DBG_SHA256=$(cat shasums | \
|
||||
grep "rippled-reporting-dbgsym_${RIPPLED_DPKG_VERSION}-1_amd64.*" | cut -d " " -f 1)
|
||||
REPORTING_SHA256=$(cat shasums | \
|
||||
grep "rippled-reporting_${RIPPLED_DPKG_VERSION}-1_amd64.deb" | cut -d " " -f 1)
|
||||
SRC_SHA256=$(cat shasums | \
|
||||
grep "rippled_${RIPPLED_DPKG_VERSION}.orig.tar.gz" | cut -d " " -f 1)
|
||||
echo "deb_sha256=${DEB_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "dbg_sha256=${DBG_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "dev_sha256=${DEV_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "reporting_sha256=${REPORTING_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "reporting_dbg_sha256=${REPORTING_DBG_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "src_sha256=${SRC_SHA256}" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "rippled_version=${RIPPLED_VERSION}" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "dpkg_version=${RIPPLED_DPKG_VERSION}" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "dpkg_full_version=${RIPPLED_DPKG_FULL_VERSION}" >> ${PKG_OUTDIR}/build_vars
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
9
|
||||
10
|
||||
|
||||
@@ -12,10 +12,8 @@ Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: rippled daemon
|
||||
|
||||
Package: rippled-dev
|
||||
Section: devel
|
||||
Recommends: rippled (= ${binary:Version})
|
||||
Package: rippled-reporting
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}, libprotobuf-dev, libprotoc-dev, protobuf-compiler
|
||||
Description: development files for applications using xrpl core library (serialize + sign)
|
||||
Multi-Arch: foreign
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: rippled reporting daemon
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/var/log/rippled-reporting/
|
||||
/var/lib/rippled-reporting/
|
||||
/etc/systemd/system/rippled-reporting.service.d/
|
||||
@@ -0,0 +1,8 @@
|
||||
build.rippled-reporting/rippled-reporting opt/rippled-reporting/bin
|
||||
cfg/rippled-reporting.cfg opt/rippled-reporting/etc
|
||||
debian/tmp/opt/rippled-reporting/etc/validators.txt opt/rippled-reporting/etc
|
||||
|
||||
opt/rippled-reporting/bin/update-rippled-reporting.sh
|
||||
opt/rippled-reporting/bin/getRippledReportingInfo
|
||||
opt/rippled-reporting/etc/update-rippled-reporting-cron
|
||||
etc/logrotate.d/rippled-reporting
|
||||
@@ -0,0 +1,3 @@
|
||||
opt/rippled-reporting/etc/rippled-reporting.cfg etc/opt/rippled-reporting/rippled-reporting.cfg
|
||||
opt/rippled-reporting/etc/validators.txt etc/opt/rippled-reporting/validators.txt
|
||||
opt/rippled-reporting/bin/rippled-reporting usr/local/bin/rippled-reporting
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
USER_NAME=rippled-reporting
|
||||
GROUP_NAME=rippled-reporting
|
||||
case "$1" in
|
||||
configure)
|
||||
id -u $USER_NAME >/dev/null 2>&1 || \
|
||||
adduser --system --quiet \
|
||||
--home /nonexistent --no-create-home \
|
||||
--disabled-password \
|
||||
--group "$GROUP_NAME"
|
||||
chown -R $USER_NAME:$GROUP_NAME /var/log/rippled-reporting/
|
||||
chown -R $USER_NAME:$GROUP_NAME /var/lib/rippled-reporting/
|
||||
chmod 755 /var/log/rippled-reporting/
|
||||
chmod 755 /var/lib/rippled-reporting/
|
||||
chown -R $USER_NAME:$GROUP_NAME /opt/rippled-reporting
|
||||
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
@@ -1,3 +1,2 @@
|
||||
/opt/ripple/etc/rippled.cfg
|
||||
/opt/ripple/etc/validators.txt
|
||||
/etc/logrotate.d/rippled
|
||||
@@ -15,29 +15,67 @@ override_dh_systemd_start:
|
||||
dh_systemd_start --no-restart-on-upgrade
|
||||
|
||||
override_dh_auto_configure:
|
||||
env
|
||||
rm -rf bld
|
||||
mkdir -p bld
|
||||
cd bld && \
|
||||
cmake .. -G Ninja \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/ripple \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-Dstatic=ON \
|
||||
-Dunity=OFF \
|
||||
-Dvalidator_keys=ON \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=OFF
|
||||
/root/.pyenv/shims/conan export external/snappy snappy/1.1.10@
|
||||
/root/.pyenv/shims/conan export external/soci soci/4.0.3@
|
||||
|
||||
mkdir build.rippled
|
||||
|
||||
cd build.rippled && \
|
||||
/root/.pyenv/shims/conan install .. \
|
||||
--profile gcc \
|
||||
--output-folder . \
|
||||
--build missing \
|
||||
--settings build_type=Release
|
||||
|
||||
cd build.rippled && \
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-Dvalidator_keys=ON \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake
|
||||
|
||||
mkdir build.rippled-reporting
|
||||
|
||||
cd build.rippled-reporting && \
|
||||
/root/.pyenv/shims/conan install .. \
|
||||
--profile gcc \
|
||||
--output-folder . \
|
||||
--settings compiler.cppstd=17 \
|
||||
--settings build_type=Release \
|
||||
--build missing \
|
||||
--build boost \
|
||||
--build sqlite3 \
|
||||
--build libuv \
|
||||
--options reporting=True
|
||||
|
||||
cd build.rippled-reporting && \
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-Dvalidator_keys=ON \
|
||||
-Dstatic=ON \
|
||||
-Dunity=OFF \
|
||||
-Dreporting=ON \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake
|
||||
|
||||
override_dh_auto_build:
|
||||
cd bld && \
|
||||
cmake --build . --target rippled --target validator-keys --parallel
|
||||
cmake --build build.rippled --target rippled --target validator-keys --parallel 8
|
||||
cmake --build build.rippled-reporting --target rippled --parallel 8
|
||||
|
||||
override_dh_auto_install:
|
||||
cd bld && DESTDIR=../debian/tmp cmake --build . --target install
|
||||
install -D bld/validator-keys/validator-keys debian/tmp/opt/ripple/bin/validator-keys
|
||||
cmake --install build.rippled --prefix debian/tmp/opt/ripple
|
||||
install -D build.rippled/validator-keys/validator-keys debian/tmp/opt/ripple/bin/validator-keys
|
||||
install -D Builds/containers/shared/update-rippled.sh debian/tmp/opt/ripple/bin/update-rippled.sh
|
||||
install -D bin/getRippledInfo debian/tmp/opt/ripple/bin/getRippledInfo
|
||||
install -D Builds/containers/shared/update-rippled-cron debian/tmp/opt/ripple/etc/update-rippled-cron
|
||||
install -D Builds/containers/shared/rippled-logrotate debian/tmp/etc/logrotate.d/rippled
|
||||
rm -rf debian/tmp/opt/ripple/lib64/cmake/date
|
||||
rm -rf bld
|
||||
rm -rf bld_vl
|
||||
|
||||
mkdir -p debian/tmp/opt/rippled-reporting/etc
|
||||
mkdir -p debian/tmp/opt/rippled-reporting/bin
|
||||
cp cfg/validators-example.txt debian/tmp/opt/rippled-reporting/etc/validators.txt
|
||||
|
||||
sed -E 's/rippled?/rippled-reporting/g' Builds/containers/shared/update-rippled.sh > debian/tmp/opt/rippled-reporting/bin/update-rippled-reporting.sh
|
||||
sed -E 's/rippled?/rippled-reporting/g' bin/getRippledInfo > debian/tmp/opt/rippled-reporting/bin/getRippledReportingInfo
|
||||
sed -E 's/rippled?/rippled-reporting/g' Builds/containers/shared/update-rippled-cron > debian/tmp/opt/rippled-reporting/etc/update-rippled-reporting-cron
|
||||
sed -E 's/rippled?/rippled-reporting/g' Builds/containers/shared/rippled-logrotate > debian/tmp/etc/logrotate.d/rippled-reporting
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
enable rippled-reporting.service
|
||||
@@ -29,17 +29,20 @@ if [[ $RPM_PATCH ]]; then
|
||||
fi
|
||||
|
||||
cd /opt/rippled_bld/pkg/rippled
|
||||
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
git status
|
||||
error "Unstaged changes in this repo - please commit first"
|
||||
git status
|
||||
error "Unstaged changes in this repo - please commit first"
|
||||
fi
|
||||
|
||||
git archive --format tar.gz --prefix rippled/ -o ../rpmbuild/SOURCES/rippled.tar.gz HEAD
|
||||
# TODO include validator-keys sources
|
||||
|
||||
cd ..
|
||||
|
||||
source /opt/rh/devtoolset-8/enable
|
||||
source /opt/rh/devtoolset-11/enable
|
||||
|
||||
rpmbuild --define "_topdir ${PWD}/rpmbuild" -ba rippled.spec
|
||||
|
||||
rc=$?; if [[ $rc != 0 ]]; then
|
||||
error "error building rpm"
|
||||
fi
|
||||
@@ -54,18 +57,22 @@ cp ./rpmbuild/SRPMS/* ${PKG_OUTDIR}
|
||||
RPM_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/RPMS/x86_64/rippled-[0-9]*.rpm 2>/dev/null)
|
||||
DBG_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/RPMS/x86_64/rippled-debuginfo*.rpm 2>/dev/null)
|
||||
DEV_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/RPMS/x86_64/rippled-devel*.rpm 2>/dev/null)
|
||||
REP_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/RPMS/x86_64/rippled-reporting*.rpm 2>/dev/null)
|
||||
SRC_MD5SUM=$(rpm -q --queryformat '%{SIGMD5}\n' -p ./rpmbuild/SRPMS/*.rpm 2>/dev/null)
|
||||
|
||||
RPM_SHA256="$(sha256sum ./rpmbuild/RPMS/x86_64/rippled-[0-9]*.rpm | awk '{ print $1}')"
|
||||
DBG_SHA256="$(sha256sum ./rpmbuild/RPMS/x86_64/rippled-debuginfo*.rpm | awk '{ print $1}')"
|
||||
REP_SHA256="$(sha256sum ./rpmbuild/RPMS/x86_64/rippled-reporting*.rpm | awk '{ print $1}')"
|
||||
DEV_SHA256="$(sha256sum ./rpmbuild/RPMS/x86_64/rippled-devel*.rpm | awk '{ print $1}')"
|
||||
SRC_SHA256="$(sha256sum ./rpmbuild/SRPMS/*.rpm | awk '{ print $1}')"
|
||||
|
||||
echo "rpm_md5sum=$RPM_MD5SUM" > ${PKG_OUTDIR}/build_vars
|
||||
echo "rep_md5sum=$REP_MD5SUM" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "dbg_md5sum=$DBG_MD5SUM" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "dev_md5sum=$DEV_MD5SUM" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "src_md5sum=$SRC_MD5SUM" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "rpm_sha256=$RPM_SHA256" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "rep_sha256=$REP_SHA256" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "dbg_sha256=$DBG_SHA256" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "dev_sha256=$DEV_SHA256" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "src_sha256=$SRC_SHA256" >> ${PKG_OUTDIR}/build_vars
|
||||
@@ -73,4 +80,3 @@ echo "rippled_version=$RIPPLED_VERSION" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "rpm_version=$RIPPLED_RPM_VERSION" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "rpm_file_name=$tar_file" >> ${PKG_OUTDIR}/build_vars
|
||||
echo "rpm_version_release=$RPM_VERSION_RELEASE" >> ${PKG_OUTDIR}/build_vars
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
%define rpm_release %(echo $RPM_RELEASE)
|
||||
%define rpm_patch %(echo $RPM_PATCH)
|
||||
%define _prefix /opt/ripple
|
||||
|
||||
Name: rippled
|
||||
# Dashes in Version extensions must be converted to underscores
|
||||
Version: %{rippled_version}
|
||||
@@ -25,29 +26,97 @@ Requires: zlib-static
|
||||
%description devel
|
||||
core library for development of standalone applications that sign transactions.
|
||||
|
||||
%package reporting
|
||||
Summary: Reporting Server for rippled
|
||||
|
||||
%description reporting
|
||||
History server for XRP Ledger
|
||||
|
||||
%prep
|
||||
%setup -c -n rippled
|
||||
|
||||
%build
|
||||
|
||||
source /opt/rh/devtoolset-11/enable
|
||||
source /opt/rh/rh-python38/enable
|
||||
|
||||
pip install "conan<2"
|
||||
|
||||
conan profile new default --detect
|
||||
conan profile update settings.compiler.cppstd=20 default
|
||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
||||
|
||||
cd rippled
|
||||
mkdir -p bld.release
|
||||
cd bld.release
|
||||
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=Release -Dstatic=true -Dunity=OFF -DCMAKE_VERBOSE_MAKEFILE=OFF -Dvalidator_keys=ON
|
||||
cmake --build . --parallel --target rippled --target validator-keys
|
||||
|
||||
conan export external/snappy snappy/1.1.10@
|
||||
conan export external/soci soci/4.0.3@
|
||||
|
||||
mkdir -p bld.rippled
|
||||
pushd bld.rippled
|
||||
|
||||
cp /opt/libcstd/libstdc++.so.6.0.22 /usr/lib64
|
||||
cp /opt/libcstd/libstdc++.so.6.0.22 /lib64
|
||||
ln -sf /usr/lib64/libstdc++.so.6.0.22 /usr/lib64/libstdc++.so.6
|
||||
ln -sf /lib64/libstdc++.so.6.0.22 /usr/lib64/libstdc++.so.6
|
||||
|
||||
conan install .. \
|
||||
--profile default \
|
||||
--output-folder . \
|
||||
--build missing \
|
||||
--settings build_type=Release
|
||||
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-Dvalidator_keys=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake
|
||||
|
||||
cmake --build . --parallel $(nproc) --target rippled --target validator-keys
|
||||
|
||||
popd
|
||||
|
||||
mkdir -p bld.rippled-reporting
|
||||
pushd bld.rippled-reporting
|
||||
|
||||
conan install .. \
|
||||
--settings build_type=Release \
|
||||
--output-folder . \
|
||||
--build missing \
|
||||
--settings compiler.cppstd=17 \
|
||||
--options reporting=True
|
||||
|
||||
cmake .. \
|
||||
-G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-Dunity=OFF \
|
||||
-Dstatic=ON \
|
||||
-Dvalidator_keys=ON \
|
||||
-Dreporting=ON \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
|
||||
cmake --build . --parallel $(nproc) --target rippled
|
||||
|
||||
%pre
|
||||
test -e /etc/pki/tls || { mkdir -p /etc/pki; ln -s /usr/lib/ssl /etc/pki/tls; }
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
DESTDIR=$RPM_BUILD_ROOT cmake --build rippled/bld.release --target install
|
||||
rm -rf ${RPM_BUILD_ROOT}/%{_prefix}/lib64/cmake/date
|
||||
DESTDIR=$RPM_BUILD_ROOT cmake --build rippled/bld.rippled --target install #-- -v
|
||||
mkdir -p $RPM_BUILD_ROOT
|
||||
rm -rf ${RPM_BUILD_ROOT}%{_prefix}/lib64/
|
||||
install -d ${RPM_BUILD_ROOT}/etc/opt/ripple
|
||||
install -d ${RPM_BUILD_ROOT}/usr/local/bin
|
||||
ln -s %{_prefix}/etc/rippled.cfg ${RPM_BUILD_ROOT}/etc/opt/ripple/rippled.cfg
|
||||
ln -s %{_prefix}/etc/validators.txt ${RPM_BUILD_ROOT}/etc/opt/ripple/validators.txt
|
||||
ln -s %{_prefix}/bin/rippled ${RPM_BUILD_ROOT}/usr/local/bin/rippled
|
||||
install -D rippled/bld.release/validator-keys/validator-keys ${RPM_BUILD_ROOT}%{_bindir}/validator-keys
|
||||
|
||||
install -D ./rippled/cfg/rippled-example.cfg ${RPM_BUILD_ROOT}/%{_prefix}/etc/rippled.cfg
|
||||
install -D ./rippled/cfg/validators-example.txt ${RPM_BUILD_ROOT}/%{_prefix}/etc/validators.txt
|
||||
|
||||
ln -sf %{_prefix}/etc/rippled.cfg ${RPM_BUILD_ROOT}/etc/opt/ripple/rippled.cfg
|
||||
ln -sf %{_prefix}/etc/validators.txt ${RPM_BUILD_ROOT}/etc/opt/ripple/validators.txt
|
||||
ln -sf %{_prefix}/bin/rippled ${RPM_BUILD_ROOT}/usr/local/bin/rippled
|
||||
install -D rippled/bld.rippled/validator-keys/validator-keys ${RPM_BUILD_ROOT}%{_bindir}/validator-keys
|
||||
install -D ./rippled/Builds/containers/shared/rippled.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/rippled.service
|
||||
install -D ./rippled/Builds/containers/packaging/rpm/50-rippled.preset ${RPM_BUILD_ROOT}/usr/lib/systemd/system-preset/50-rippled.preset
|
||||
install -D ./rippled/Builds/containers/shared/update-rippled.sh ${RPM_BUILD_ROOT}%{_bindir}/update-rippled.sh
|
||||
@@ -57,7 +126,27 @@ install -D ./rippled/Builds/containers/shared/rippled-logrotate ${RPM_BUILD_ROOT
|
||||
install -d $RPM_BUILD_ROOT/var/log/rippled
|
||||
install -d $RPM_BUILD_ROOT/var/lib/rippled
|
||||
|
||||
# reporting mode
|
||||
%define _prefix /opt/rippled-reporting
|
||||
mkdir -p ${RPM_BUILD_ROOT}/etc/opt/rippled-reporting/
|
||||
install -D rippled/bld.rippled-reporting/rippled-reporting ${RPM_BUILD_ROOT}%{_bindir}/rippled-reporting
|
||||
install -D ./rippled/cfg/rippled-reporting.cfg ${RPM_BUILD_ROOT}%{_prefix}/etc/rippled-reporting.cfg
|
||||
install -D ./rippled/cfg/validators-example.txt ${RPM_BUILD_ROOT}%{_prefix}/etc/validators.txt
|
||||
install -D ./rippled/Builds/containers/packaging/rpm/50-rippled-reporting.preset ${RPM_BUILD_ROOT}/usr/lib/systemd/system-preset/50-rippled-reporting.preset
|
||||
ln -sf %{_prefix}/bin/rippled-reporting ${RPM_BUILD_ROOT}/usr/local/bin/rippled-reporting
|
||||
ln -sf %{_prefix}/etc/rippled-reporting.cfg ${RPM_BUILD_ROOT}/etc/opt/rippled-reporting/rippled-reporting.cfg
|
||||
ln -sf %{_prefix}/etc/validators.txt ${RPM_BUILD_ROOT}/etc/opt/rippled-reporting/validators.txt
|
||||
install -d $RPM_BUILD_ROOT/var/log/rippled-reporting
|
||||
install -d $RPM_BUILD_ROOT/var/lib/rippled-reporting
|
||||
install -D ./rippled/Builds/containers/shared/rippled-reporting.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/rippled-reporting.service
|
||||
sed -E 's/rippled?/rippled-reporting/g' ./rippled/Builds/containers/shared/update-rippled.sh > ${RPM_BUILD_ROOT}%{_bindir}/update-rippled-reporting.sh
|
||||
sed -E 's/rippled?/rippled-reporting/g' ./rippled/bin/getRippledInfo > ${RPM_BUILD_ROOT}%{_bindir}/getRippledReportingInfo
|
||||
sed -E 's/rippled?/rippled-reporting/g' ./rippled/Builds/containers/shared/update-rippled-cron > ${RPM_BUILD_ROOT}%{_prefix}/etc/update-rippled-reporting-cron
|
||||
sed -E 's/rippled?/rippled-reporting/g' ./rippled/Builds/containers/shared/rippled-logrotate > ${RPM_BUILD_ROOT}/etc/logrotate.d/rippled-reporting
|
||||
|
||||
|
||||
%post
|
||||
%define _prefix /opt/ripple
|
||||
USER_NAME=rippled
|
||||
GROUP_NAME=rippled
|
||||
|
||||
@@ -75,7 +164,25 @@ chmod 644 %{_prefix}/etc/update-rippled-cron
|
||||
chmod 644 /etc/logrotate.d/rippled
|
||||
chown -R root:$GROUP_NAME %{_prefix}/etc/update-rippled-cron
|
||||
|
||||
%post reporting
|
||||
%define _prefix /opt/rippled-reporting
|
||||
USER_NAME=rippled-reporting
|
||||
GROUP_NAME=rippled-reporting
|
||||
|
||||
getent passwd $USER_NAME &>/dev/null || useradd -r $USER_NAME
|
||||
getent group $GROUP_NAME &>/dev/null || groupadd $GROUP_NAME
|
||||
|
||||
chown -R $USER_NAME:$GROUP_NAME /var/log/rippled-reporting/
|
||||
chown -R $USER_NAME:$GROUP_NAME /var/lib/rippled-reporting/
|
||||
chown -R $USER_NAME:$GROUP_NAME %{_prefix}/
|
||||
|
||||
chmod 755 /var/log/rippled-reporting/
|
||||
chmod 755 /var/lib/rippled-reporting/
|
||||
chmod -x /usr/lib/systemd/system/rippled-reporting.service
|
||||
|
||||
|
||||
%files
|
||||
%define _prefix /opt/ripple
|
||||
%doc rippled/README.md rippled/LICENSE.md
|
||||
%{_bindir}/rippled
|
||||
/usr/local/bin/rippled
|
||||
@@ -90,6 +197,7 @@ chown -R root:$GROUP_NAME %{_prefix}/etc/update-rippled-cron
|
||||
%config(noreplace) /etc/logrotate.d/rippled
|
||||
%config(noreplace) /usr/lib/systemd/system/rippled.service
|
||||
%config(noreplace) /usr/lib/systemd/system-preset/50-rippled.preset
|
||||
|
||||
%dir /var/log/rippled/
|
||||
%dir /var/lib/rippled/
|
||||
|
||||
@@ -98,6 +206,25 @@ chown -R root:$GROUP_NAME %{_prefix}/etc/update-rippled-cron
|
||||
%{_prefix}/lib/*.a
|
||||
%{_prefix}/lib/cmake/ripple
|
||||
|
||||
%files reporting
|
||||
%define _prefix /opt/rippled-reporting
|
||||
%doc rippled/README.md rippled/LICENSE.md
|
||||
|
||||
%{_bindir}/rippled-reporting
|
||||
/usr/local/bin/rippled-reporting
|
||||
%config(noreplace) /etc/opt/rippled-reporting/rippled-reporting.cfg
|
||||
%config(noreplace) %{_prefix}/etc/rippled-reporting.cfg
|
||||
%config(noreplace) %{_prefix}/etc/validators.txt
|
||||
%config(noreplace) /etc/opt/rippled-reporting/validators.txt
|
||||
%config(noreplace) /usr/lib/systemd/system/rippled-reporting.service
|
||||
%config(noreplace) /usr/lib/systemd/system-preset/50-rippled-reporting.preset
|
||||
%dir /var/log/rippled-reporting/
|
||||
%dir /var/lib/rippled-reporting/
|
||||
%{_bindir}/update-rippled-reporting.sh
|
||||
%{_bindir}/getRippledReportingInfo
|
||||
%{_prefix}/etc/update-rippled-reporting-cron
|
||||
%config(noreplace) /etc/logrotate.d/rippled-reporting
|
||||
|
||||
%changelog
|
||||
* Wed Aug 28 2019 Mike Ellery <mellery451@gmail.com>
|
||||
- Switch to subproject build for validator-keys
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
function build_boost()
|
||||
{
|
||||
local boost_ver=$1
|
||||
local do_link=$2
|
||||
local boost_path=$(echo "${boost_ver}" | sed -e 's!\.!_!g')
|
||||
mkdir -p /opt/local
|
||||
cd /opt/local
|
||||
BOOST_ROOT=/opt/local/boost_${boost_path}
|
||||
BOOST_URL="https://boostorg.jfrog.io/artifactory/main/release/${boost_ver}/source/boost_${boost_path}.tar.gz"
|
||||
BOOST_BUILD_ALL=true
|
||||
. /tmp/install_boost.sh
|
||||
if [ "$do_link" = true ] ; then
|
||||
ln -s ./boost_${boost_path} boost
|
||||
fi
|
||||
}
|
||||
|
||||
build_boost "1.70.0" true
|
||||
|
||||
# installed in opt, so won't be used
|
||||
# unless specified by OPENSSL_ROOT_DIR
|
||||
cd /tmp
|
||||
OPENSSL_VER=1.1.1d
|
||||
wget https://www.openssl.org/source/openssl-${OPENSSL_VER}.tar.gz
|
||||
tar xf openssl-${OPENSSL_VER}.tar.gz
|
||||
cd openssl-${OPENSSL_VER}
|
||||
# NOTE: add -g to the end of the following line if we want debug symbols for openssl
|
||||
SSLDIR=$(openssl version -d | cut -d: -f2 | tr -d [:space:]\")
|
||||
./config -fPIC --prefix=/opt/local/openssl --openssldir=${SSLDIR} zlib shared
|
||||
make -j$(nproc) >> make_output.txt 2>&1
|
||||
make install
|
||||
cd ..
|
||||
rm -f openssl-${OPENSSL_VER}.tar.gz
|
||||
rm -rf openssl-${OPENSSL_VER}
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:/opt/local/openssl/lib /opt/local/openssl/bin/openssl version -a
|
||||
|
||||
cd /tmp
|
||||
wget https://libarchive.org/downloads/libarchive-3.4.1.tar.gz
|
||||
tar xzf libarchive-3.4.1.tar.gz
|
||||
cd libarchive-3.4.1
|
||||
mkdir _bld && cd _bld
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j$(nproc) >> make_output.txt 2>&1
|
||||
make install
|
||||
cd ../..
|
||||
rm -f libarchive-3.4.1.tar.gz
|
||||
rm -rf libarchive-3.4.1
|
||||
|
||||
cd /tmp
|
||||
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.10.1/protobuf-all-3.10.1.tar.gz
|
||||
tar xf protobuf-all-3.10.1.tar.gz
|
||||
cd protobuf-3.10.1
|
||||
./autogen.sh
|
||||
./configure
|
||||
make -j$(nproc) >> make_output.txt 2>&1
|
||||
make install
|
||||
ldconfig
|
||||
cd ..
|
||||
rm -f protobuf-all-3.10.1.tar.gz
|
||||
rm -rf protobuf-3.10.1
|
||||
|
||||
cd /tmp
|
||||
wget https://c-ares.haxx.se/download/c-ares-1.15.0.tar.gz
|
||||
tar xf c-ares-1.15.0.tar.gz
|
||||
cd c-ares-1.15.0
|
||||
mkdir _bld && cd _bld
|
||||
cmake \
|
||||
-DHAVE_LIBNSL=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCARES_STATIC=ON \
|
||||
-DCARES_SHARED=OFF \
|
||||
-DCARES_INSTALL=ON \
|
||||
-DCARES_STATIC_PIC=ON \
|
||||
-DCARES_BUILD_TOOLS=OFF \
|
||||
-DCARES_BUILD_TESTS=OFF \
|
||||
-DCARES_BUILD_CONTAINER_TESTS=OFF \
|
||||
..
|
||||
make -j$(nproc) >> make_output.txt 2>&1
|
||||
make install
|
||||
cd ../..
|
||||
rm -f c-ares-1.15.0.tar.gz
|
||||
rm -rf c-ares-1.15.0
|
||||
|
||||
cd /tmp
|
||||
wget https://github.com/grpc/grpc/archive/v1.25.0.tar.gz
|
||||
tar xf v1.25.0.tar.gz
|
||||
cd grpc-1.25.0
|
||||
mkdir _bld && cd _bld
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DgRPC_ZLIB_PROVIDER=package \
|
||||
-DgRPC_CARES_PROVIDER=package \
|
||||
-DgRPC_SSL_PROVIDER=package \
|
||||
-DgRPC_PROTOBUF_PROVIDER=package \
|
||||
-DProtobuf_USE_STATIC_LIBS=ON \
|
||||
..
|
||||
make -j$(nproc) >> make_output.txt 2>&1
|
||||
make install
|
||||
cd ../..
|
||||
rm -f xf v1.25.0.tar.gz
|
||||
rm -rf grpc-1.25.0
|
||||
|
||||
if [ "${CI_USE}" = true ] ; then
|
||||
|
||||
build_boost "1.71.0" false
|
||||
|
||||
cd /tmp
|
||||
wget https://github.com/doxygen/doxygen/archive/Release_1_8_16.tar.gz
|
||||
tar xf Release_1_8_16.tar.gz
|
||||
cd doxygen-Release_1_8_16
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make -j$(nproc) >> make_output.txt 2>&1
|
||||
make install
|
||||
cd ../..
|
||||
rm -f Release_1_8_16.tar.gz
|
||||
rm -rf doxygen-Release_1_8_16
|
||||
|
||||
mkdir -p /opt/plantuml
|
||||
wget -O /opt/plantuml/plantuml.jar https://downloads.sourceforge.net/project/plantuml/plantuml.jar
|
||||
|
||||
cd /tmp
|
||||
wget https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz
|
||||
tar xfz lcov-1.14.tar.gz
|
||||
cd lcov-1.14
|
||||
make install PREFIX=/usr/local
|
||||
cd ..
|
||||
rm -r lcov-1.14 lcov-1.14.tar.gz
|
||||
|
||||
cd /tmp
|
||||
wget https://github.com/ccache/ccache/releases/download/v3.7.6/ccache-3.7.6.tar.gz
|
||||
tar xf ccache-3.7.6.tar.gz
|
||||
cd ccache-3.7.6
|
||||
./configure --prefix=/usr/local
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
rm -f ccache-3.7.6.tar.gz
|
||||
rm -rf ccache-3.7.6
|
||||
|
||||
pip install requests
|
||||
pip install https://github.com/codecov/codecov-python/archive/master.zip
|
||||
fi
|
||||
@@ -1,93 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Assumptions:
|
||||
# 1) BOOST_ROOT and BOOST_URL are already defined,
|
||||
# and contain valid values. BOOST_URL2 may be defined
|
||||
# as a fallback. BOOST_WGET_OPTIONS may be defined with
|
||||
# retry options if the download(s) fail on the first try.
|
||||
# 2) The last namepart of BOOST_ROOT matches the
|
||||
# folder name internal to boost's .tar.gz
|
||||
# When testing you can force a boost build by clearing travis caches:
|
||||
# https://travis-ci.org/ripple/rippled/caches
|
||||
set -exu
|
||||
|
||||
odir=$(pwd)
|
||||
: ${BOOST_TOOLSET:=msvc-14.1}
|
||||
|
||||
if [[ -d "$BOOST_ROOT/lib" || -d "${BOOST_ROOT}/stage/lib" ]] ; then
|
||||
echo "Using cached boost at $BOOST_ROOT"
|
||||
exit
|
||||
fi
|
||||
|
||||
#fetch/unpack:
|
||||
fn=$(basename -- "$BOOST_URL")
|
||||
ext="${fn##*.}"
|
||||
wopt="--quiet"
|
||||
wget ${wopt} $BOOST_URL -O /tmp/boost.tar.${ext} || \
|
||||
( [ -n "${BOOST_URL2}" ] && \
|
||||
wget ${wopt} $BOOST_URL2 -O /tmp/boost.tar.${ext} ) || \
|
||||
( [ -n "${BOOST_WGET_OPTIONS}" ] &&
|
||||
( wget ${wopt} ${BOOST_WGET_OPTIONS} $BOOST_URL -O /tmp/boost.tar.${ext} || \
|
||||
( [ -n "${BOOST_URL2}" ] && \
|
||||
wget ${wopt} ${BOOST_WGET_OPTIONS} $BOOST_URL2 -O /tmp/boost.tar.${ext} )
|
||||
)
|
||||
)
|
||||
cd $(dirname $BOOST_ROOT)
|
||||
rm -fr ${BOOST_ROOT}
|
||||
mkdir ${BOOST_ROOT}
|
||||
tar xf /tmp/boost.tar.${ext} -C ${BOOST_ROOT} --strip-components 1
|
||||
cd $BOOST_ROOT
|
||||
|
||||
BLDARGS=()
|
||||
if [[ ${BOOST_BUILD_ALL:-false} == "true" ]]; then
|
||||
# we never need boost-python...so even for ALL
|
||||
# option we can skip it
|
||||
BLDARGS+=(--without-python)
|
||||
else
|
||||
BLDARGS+=(--with-chrono)
|
||||
BLDARGS+=(--with-container)
|
||||
BLDARGS+=(--with-context)
|
||||
BLDARGS+=(--with-coroutine)
|
||||
BLDARGS+=(--with-date_time)
|
||||
BLDARGS+=(--with-filesystem)
|
||||
BLDARGS+=(--with-program_options)
|
||||
BLDARGS+=(--with-regex)
|
||||
BLDARGS+=(--with-system)
|
||||
BLDARGS+=(--with-atomic)
|
||||
BLDARGS+=(--with-thread)
|
||||
fi
|
||||
BLDARGS+=(-j$((2*${NUM_PROCESSORS:-2})))
|
||||
BLDARGS+=(--prefix=${BOOST_ROOT}/_INSTALLED_)
|
||||
BLDARGS+=(-d0) # suppress messages/output
|
||||
|
||||
if [[ -z ${COMSPEC:-} ]]; then
|
||||
if [[ "$(uname)" == "Darwin" ]] ; then
|
||||
BLDARGS+=(cxxflags="-std=c++14 -fvisibility=default")
|
||||
else
|
||||
BLDARGS+=(cxxflags="-std=c++14")
|
||||
BLDARGS+=(runtime-link="static,shared")
|
||||
fi
|
||||
BLDARGS+=(--layout=tagged)
|
||||
./bootstrap.sh
|
||||
./b2 "${BLDARGS[@]}" stage
|
||||
./b2 "${BLDARGS[@]}" install
|
||||
else
|
||||
BLDARGS+=(runtime-link="static,shared")
|
||||
BLDARGS+=(--layout=versioned)
|
||||
BLDARGS+=(--toolset="${BOOST_TOOLSET}")
|
||||
BLDARGS+=(address-model=64)
|
||||
BLDARGS+=(architecture=x86)
|
||||
BLDARGS+=(link=static)
|
||||
BLDARGS+=(threading=multi)
|
||||
cmd /E:ON /D /S /C"bootstrap.bat"
|
||||
./b2.exe "${BLDARGS[@]}" stage
|
||||
./b2.exe "${BLDARGS[@]}" install
|
||||
fi
|
||||
|
||||
if [[ ${CI:-false} == "true" ]]; then
|
||||
# save some disk space...these are mostly
|
||||
# obj files and don't need to be kept in CI contexts
|
||||
rm -rf bin.v2
|
||||
fi
|
||||
|
||||
cd $odir
|
||||
|
||||
@@ -21,8 +21,13 @@ if [[ "${installed}" != "" && ${installed} =~ ${cm_maj}.${cm_min}.${cm_rel} ]] ;
|
||||
echo "cmake already installed: ${installed}"
|
||||
exit
|
||||
fi
|
||||
|
||||
pkgname="cmake-${cm_maj}.${cm_min}.${cm_rel}-$(uname)-x86_64.tar.gz"
|
||||
# From CMake 20+ "Linux" is lowercase so using `uname` won't create be the correct path
|
||||
if [ ${cm_min} -gt 19 ]; then
|
||||
linux="linux"
|
||||
else
|
||||
linux=$(uname)
|
||||
fi
|
||||
pkgname="cmake-${cm_maj}.${cm_min}.${cm_rel}-${linux}-x86_64.tar.gz"
|
||||
tmppkg="/tmp/cmake.tar.gz"
|
||||
wget --quiet https://cmake.org/files/v${cm_maj}.${cm_min}/${pkgname} -O ${tmppkg}
|
||||
mkdir -p ${CMAKE_ROOT}
|
||||
@@ -30,5 +35,3 @@ cd ${CMAKE_ROOT}
|
||||
tar --strip-components 1 -xf ${tmppkg}
|
||||
rm -f ${tmppkg}
|
||||
echo "installed: $(cmake_version)"
|
||||
|
||||
|
||||
|
||||
15
Builds/containers/shared/rippled-reporting.service
Normal file
15
Builds/containers/shared/rippled-reporting.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Ripple Daemon
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/opt/rippled-reporting/bin/rippled-reporting --silent --conf /etc/opt/rippled-reporting/rippled-reporting.cfg
|
||||
Restart=on-failure
|
||||
User=rippled-reporting
|
||||
Group=rippled-reporting
|
||||
LimitNOFILE=65536
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -4,33 +4,19 @@ ARG GIT_COMMIT=unknown
|
||||
ARG CI_USE=false
|
||||
LABEL git-commit=$GIT_COMMIT
|
||||
|
||||
# install/setup prerequisites:
|
||||
COPY ubuntu-builder/ubuntu_setup.sh /tmp/
|
||||
COPY shared/build_deps.sh /tmp/
|
||||
COPY shared/install_cmake.sh /tmp/
|
||||
COPY shared/install_boost.sh /tmp/
|
||||
RUN chmod +x /tmp/ubuntu_setup.sh && \
|
||||
chmod +x /tmp/build_deps.sh && \
|
||||
chmod +x /tmp/install_boost.sh && \
|
||||
chmod +x /tmp/install_cmake.sh
|
||||
RUN /tmp/ubuntu_setup.sh
|
||||
WORKDIR /root
|
||||
COPY ubuntu-builder/ubuntu_setup.sh .
|
||||
COPY ubuntu-builder/ubuntu_setup2.sh .
|
||||
|
||||
RUN /tmp/install_cmake.sh 3.16.1 /opt/local/cmake-3.16
|
||||
RUN ln -s /opt/local/cmake-3.16 /opt/local/cmake
|
||||
ENV PATH="/opt/local/cmake/bin:$PATH"
|
||||
# also install min supported cmake for testing
|
||||
RUN if [ "${CI_USE}" = true ] ; then /tmp/install_cmake.sh 3.9.0 /opt/local/cmake-3.9; fi
|
||||
RUN ./ubuntu_setup.sh && rm ubuntu_setup.sh
|
||||
|
||||
RUN /tmp/build_deps.sh
|
||||
ENV PLANTUML_JAR="/opt/plantuml/plantuml.jar"
|
||||
ENV BOOST_ROOT="/opt/local/boost/_INSTALLED_"
|
||||
ENV OPENSSL_ROOT="/opt/local/openssl"
|
||||
RUN ./ubuntu_setup2.sh && rm ubuntu_setup2.sh
|
||||
|
||||
# prep files for package building
|
||||
RUN mkdir -m 777 -p /opt/rippled_bld/pkg/debian
|
||||
RUN update-alternatives --set gcc /usr/bin/gcc-8
|
||||
COPY ubuntu-builder/ubuntu_setup3.sh .
|
||||
RUN ./ubuntu_setup3.sh && rm ubuntu_setup3.sh
|
||||
|
||||
RUN mkdir -m 777 -p /opt/rippled_bld/pkg/
|
||||
WORKDIR /opt/rippled_bld/pkg
|
||||
|
||||
COPY packaging/dpkg/build_dpkg.sh ./
|
||||
CMD ./build_dpkg.sh
|
||||
|
||||
|
||||
@@ -1,189 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
source /etc/os-release
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o xtrace
|
||||
|
||||
if [[ ${VERSION_ID} =~ ^18\. || ${VERSION_ID} =~ ^16\. ]] ; then
|
||||
echo "setup for ${PRETTY_NAME}"
|
||||
else
|
||||
echo "${VERSION} not supported"
|
||||
exit 1
|
||||
fi
|
||||
# Parameters
|
||||
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
echo "Acquire::Retries 3;" > /etc/apt/apt.conf.d/80-retries
|
||||
echo "Acquire::http::Pipeline-Depth 0;" >> /etc/apt/apt.conf.d/80-retries
|
||||
echo "Acquire::http::No-Cache true;" >> /etc/apt/apt.conf.d/80-retries
|
||||
echo "Acquire::BrokenProxy true;" >> /etc/apt/apt.conf.d/80-retries
|
||||
apt-get update -o Acquire::CompressionTypes::Order::=gz
|
||||
gcc_version=${GCC_VERSION:-11}
|
||||
|
||||
apt-get -y update
|
||||
apt-get -y install apt-utils
|
||||
apt-get -y install software-properties-common wget
|
||||
apt-get -y upgrade
|
||||
if [[ ${VERSION_ID} =~ ^18\. ]] ; then
|
||||
apt-add-repository -y multiverse
|
||||
apt-add-repository -y universe
|
||||
fi
|
||||
add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
apt-get -y clean
|
||||
apt-get -y update
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get -y --fix-missing install \
|
||||
make cmake ninja-build autoconf automake libtool pkg-config libtool \
|
||||
openssl libssl-dev \
|
||||
liblzma-dev libbz2-dev zlib1g-dev \
|
||||
libjemalloc-dev \
|
||||
python-pip \
|
||||
gdb gdbserver \
|
||||
libstdc++6 \
|
||||
flex bison parallel \
|
||||
libicu-dev texinfo \
|
||||
java-common javacc \
|
||||
dpkg-dev debhelper devscripts fakeroot \
|
||||
debmake git-buildpackage dh-make gitpkg debsums gnupg \
|
||||
dh-buildinfo dh-make dh-systemd \
|
||||
apt-transport-https
|
||||
apt update
|
||||
# Iteratively build the list of packages to install so that we can interleave
|
||||
# the lines with comments explaining their inclusion.
|
||||
dependencies=''
|
||||
# - for add-apt-repository
|
||||
dependencies+=' software-properties-common'
|
||||
# - to download CMake
|
||||
dependencies+=' curl'
|
||||
# - to build CMake
|
||||
dependencies+=' libssl-dev'
|
||||
# - for Python
|
||||
dependencies+=' libbz2-dev liblzma-dev libsqlite3-dev'
|
||||
# - to download rippled
|
||||
dependencies+=' git'
|
||||
# - CMake generators (but not CMake itself)
|
||||
dependencies+=' make ninja-build'
|
||||
apt-get install --yes ${dependencies}
|
||||
|
||||
apt-get -y install gcc-7 g++-7
|
||||
add-apt-repository --yes ppa:ubuntu-toolchain-r/test
|
||||
apt-get install --yes gcc-${gcc_version} g++-${gcc_version}
|
||||
apt-get install --yes build-essential libssl-dev zlib1g-dev \
|
||||
libbz2-dev libreadline-dev libsqlite3-dev curl \
|
||||
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
|
||||
|
||||
# Give us nice unversioned aliases for gcc and company.
|
||||
update-alternatives --install \
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-7 40 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-7 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-7 \
|
||||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-7 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-7 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-7 \
|
||||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-dump-7 \
|
||||
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-tool-7
|
||||
|
||||
apt-get -y install gcc-8 g++-8
|
||||
update-alternatives --install \
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-8 20 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-8 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-8 \
|
||||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-8 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-8 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-8 \
|
||||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-dump-8 \
|
||||
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-tool-8
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-${gcc_version} 100 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-${gcc_version} \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-${gcc_version} \
|
||||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-${gcc_version} \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-${gcc_version} \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-${gcc_version} \
|
||||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-dump-${gcc_version} \
|
||||
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-tool-${gcc_version}
|
||||
update-alternatives --auto gcc
|
||||
|
||||
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-7 40
|
||||
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-8 20
|
||||
update-alternatives --auto cpp
|
||||
|
||||
if [ "${CI_USE}" = true ] ; then
|
||||
apt-get -y install gcc-6 g++-6
|
||||
update-alternatives --install \
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-6 10 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-6 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-6 \
|
||||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-6 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-6 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-6 \
|
||||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-dump-6 \
|
||||
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-tool-6
|
||||
|
||||
apt-get -y install gcc-9 g++-9
|
||||
update-alternatives --install \
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-9 15 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-9 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-9 \
|
||||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-9 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-9 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-9 \
|
||||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-dump-9 \
|
||||
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-tool-9
|
||||
fi
|
||||
|
||||
if [[ ${VERSION_ID} =~ ^18\. ]] ; then
|
||||
apt-get -y install binutils
|
||||
elif [[ ${VERSION_ID} =~ ^16\. ]] ; then
|
||||
apt-get -y install python-software-properties binutils-gold
|
||||
fi
|
||||
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
||||
if [[ ${VERSION_ID} =~ ^18\. ]] ; then
|
||||
cat << EOF > /etc/apt/sources.list.d/llvm.list
|
||||
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main
|
||||
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main
|
||||
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main
|
||||
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main
|
||||
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main
|
||||
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main
|
||||
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main
|
||||
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main
|
||||
EOF
|
||||
elif [[ ${VERSION_ID} =~ ^16\. ]] ; then
|
||||
cat << EOF > /etc/apt/sources.list.d/llvm.list
|
||||
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main
|
||||
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main
|
||||
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main
|
||||
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main
|
||||
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
|
||||
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
|
||||
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main
|
||||
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main
|
||||
EOF
|
||||
fi
|
||||
apt-get -y update
|
||||
|
||||
apt-get -y install \
|
||||
clang-7 libclang-common-7-dev libclang-7-dev libllvm7 llvm-7 \
|
||||
llvm-7-dev llvm-7-runtime clang-format-7 python-clang-7 \
|
||||
lld-7 libfuzzer-7-dev libc++-7-dev
|
||||
update-alternatives --install \
|
||||
/usr/bin/clang clang /usr/bin/clang-7 40 \
|
||||
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-7 \
|
||||
--slave /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-7 \
|
||||
--slave /usr/bin/asan-symbolize asan-symbolize /usr/bin/asan_symbolize-7 \
|
||||
--slave /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-7 \
|
||||
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-7 \
|
||||
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-7 \
|
||||
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-7 \
|
||||
--slave /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-7
|
||||
apt-get -y install \
|
||||
clang-8 libclang-common-8-dev libclang-8-dev libllvm8 llvm-8 \
|
||||
llvm-8-dev llvm-8-runtime clang-format-8 python-clang-8 \
|
||||
lld-8 libfuzzer-8-dev libc++-8-dev
|
||||
update-alternatives --install \
|
||||
/usr/bin/clang clang /usr/bin/clang-8 20 \
|
||||
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-8 \
|
||||
--slave /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-8 \
|
||||
--slave /usr/bin/asan-symbolize asan-symbolize /usr/bin/asan_symbolize-8 \
|
||||
--slave /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-8 \
|
||||
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-8 \
|
||||
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-8 \
|
||||
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-8 \
|
||||
--slave /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-8
|
||||
update-alternatives --auto clang
|
||||
|
||||
if [ "${CI_USE}" = true ] ; then
|
||||
apt-get -y install \
|
||||
clang-9 libclang-common-9-dev libclang-9-dev libllvm9 llvm-9 \
|
||||
llvm-9-dev llvm-9-runtime clang-format-9 python-clang-9 \
|
||||
lld-9 libfuzzer-9-dev libc++-9-dev
|
||||
update-alternatives --install \
|
||||
/usr/bin/clang clang /usr/bin/clang-9 20 \
|
||||
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-9 \
|
||||
--slave /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-9 \
|
||||
--slave /usr/bin/asan-symbolize asan-symbolize /usr/bin/asan_symbolize-9 \
|
||||
--slave /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-9 \
|
||||
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-9 \
|
||||
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-9 \
|
||||
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-9 \
|
||||
--slave /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-9
|
||||
|
||||
# only install latest lldb
|
||||
apt-get -y install lldb-9 python-lldb-9 liblldb-9-dev
|
||||
update-alternatives --install \
|
||||
/usr/bin/lldb lldb /usr/bin/lldb-9 50 \
|
||||
--slave /usr/bin/lldb-server lldb-server /usr/bin/lldb-server-9 \
|
||||
--slave /usr/bin/lldb-argdumper lldb-argdumper /usr/bin/lldb-argdumper-9 \
|
||||
--slave /usr/bin/lldb-instr lldb-instr /usr/bin/lldb-instr-9 \
|
||||
--slave /usr/bin/lldb-mi lldb-mi /usr/bin/lldb-mi-9
|
||||
update-alternatives --auto clang
|
||||
fi
|
||||
|
||||
apt-get -y autoremove
|
||||
|
||||
|
||||
49
Builds/containers/ubuntu-builder/ubuntu_setup2.sh
Executable file
49
Builds/containers/ubuntu-builder/ubuntu_setup2.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o xtrace
|
||||
|
||||
# Parameters
|
||||
|
||||
gcc_version=${GCC_VERSION:-11}
|
||||
cmake_version=${CMAKE_VERSION:-3.25.1}
|
||||
cmake_sha256=1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8
|
||||
conan_version=${CONAN_VERSION:-1.60}
|
||||
|
||||
curl https://pyenv.run | bash
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
pyenv install 3.11.2
|
||||
pyenv global 3.11.2
|
||||
|
||||
# Download and unpack CMake.
|
||||
cmake_slug="cmake-${cmake_version}"
|
||||
cmake_archive="${cmake_slug}.tar.gz"
|
||||
curl --location --remote-name \
|
||||
"https://github.com/Kitware/CMake/releases/download/v${cmake_version}/${cmake_archive}"
|
||||
echo "${cmake_sha256} ${cmake_archive}" | sha256sum --check
|
||||
tar -xzf ${cmake_archive}
|
||||
rm ${cmake_archive}
|
||||
|
||||
# Build and install CMake.
|
||||
cd ${cmake_slug}
|
||||
./bootstrap --parallel=$(nproc)
|
||||
make --jobs $(nproc)
|
||||
make install
|
||||
cd ..
|
||||
rm --recursive --force ${cmake_slug}
|
||||
|
||||
# Install Conan.
|
||||
pip install --upgrade pip
|
||||
pip install conan==${conan_version}
|
||||
|
||||
conan profile new --detect gcc
|
||||
conan profile update settings.compiler=gcc gcc
|
||||
conan profile update settings.compiler.version=${gcc_version} gcc
|
||||
conan profile update settings.compiler.libcxx=libstdc++11 gcc
|
||||
conan profile update settings.compiler.cppstd=20 gcc
|
||||
conan profile update env.CC=/usr/bin/gcc gcc
|
||||
conan profile update env.CXX=/usr/bin/g++ gcc
|
||||
7
Builds/containers/ubuntu-builder/ubuntu_setup3.sh
Executable file
7
Builds/containers/ubuntu-builder/ubuntu_setup3.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o xtrace
|
||||
|
||||
apt-get install --yes build-essential fakeroot devscripts cmake debhelper dh-systemd
|
||||
@@ -14,7 +14,7 @@ Loop: ripple.app ripple.overlay
|
||||
ripple.overlay ~= ripple.app
|
||||
|
||||
Loop: ripple.app ripple.peerfinder
|
||||
ripple.peerfinder ~= ripple.app
|
||||
ripple.app > ripple.peerfinder
|
||||
|
||||
Loop: ripple.app ripple.rpc
|
||||
ripple.rpc > ripple.app
|
||||
|
||||
@@ -14,6 +14,7 @@ ripple.consensus > ripple.basics
|
||||
ripple.consensus > ripple.beast
|
||||
ripple.consensus > ripple.json
|
||||
ripple.consensus > ripple.protocol
|
||||
ripple.consensus > ripple.shamap
|
||||
ripple.core > ripple.beast
|
||||
ripple.core > ripple.json
|
||||
ripple.core > ripple.protocol
|
||||
@@ -113,7 +114,6 @@ test.consensus > ripple.basics
|
||||
test.consensus > ripple.beast
|
||||
test.consensus > ripple.consensus
|
||||
test.consensus > ripple.ledger
|
||||
test.consensus > ripple.rpc
|
||||
test.consensus > test.csf
|
||||
test.consensus > test.toplevel
|
||||
test.consensus > test.unit_test
|
||||
@@ -126,11 +126,13 @@ test.core > ripple.server
|
||||
test.core > test.jtx
|
||||
test.core > test.toplevel
|
||||
test.core > test.unit_test
|
||||
test.csf > ripple.app
|
||||
test.csf > ripple.basics
|
||||
test.csf > ripple.beast
|
||||
test.csf > ripple.consensus
|
||||
test.csf > ripple.json
|
||||
test.csf > ripple.protocol
|
||||
test.csf > test.jtx
|
||||
test.json > ripple.beast
|
||||
test.json > ripple.json
|
||||
test.json > test.jtx
|
||||
@@ -143,6 +145,8 @@ test.jtx > ripple.json
|
||||
test.jtx > ripple.ledger
|
||||
test.jtx > ripple.net
|
||||
test.jtx > ripple.protocol
|
||||
test.jtx > ripple.resource
|
||||
test.jtx > ripple.rpc
|
||||
test.jtx > ripple.server
|
||||
test.ledger > ripple.app
|
||||
test.ledger > ripple.basics
|
||||
|
||||
@@ -1,241 +0,0 @@
|
||||
# Linux Build Instructions
|
||||
|
||||
This document focuses on building rippled for development purposes under recent
|
||||
Ubuntu linux distributions. To build rippled for Redhat, Fedora or Centos
|
||||
builds, including docker based builds for those distributions, please consult
|
||||
the [rippled-package-builder](https://github.com/ripple/rippled-package-builder)
|
||||
repository.
|
||||
|
||||
Note: Ubuntu 16.04 users may need to update their compiler (see the dependencies
|
||||
section). For non Ubuntu distributions, the steps below should work be
|
||||
installing the appropriate dependencies using that distribution's package
|
||||
management tools.
|
||||
|
||||
## Dependencies
|
||||
|
||||
gcc-8 or later is required.
|
||||
|
||||
Use `apt-get` to install the dependencies provided by the distribution
|
||||
|
||||
```
|
||||
$ apt-get update
|
||||
$ apt-get install -y gcc g++ wget git cmake pkg-config libprotoc-dev protobuf-compiler libprotobuf-dev libssl-dev
|
||||
```
|
||||
|
||||
To build the software in reporting mode, install these additional dependencies:
|
||||
```
|
||||
$ apt-get install -y autoconf flex bison
|
||||
```
|
||||
|
||||
Advanced users can choose to install newer versions of gcc, or the clang compiler.
|
||||
At this time, rippled only supports protobuf version 2. Using version 3 of
|
||||
protobuf will give errors.
|
||||
|
||||
### Build Boost
|
||||
|
||||
Boost 1.70 or later is required. We recommend downloading and compiling boost
|
||||
with the following process: After changing to the directory where
|
||||
you wish to download and compile boost, run
|
||||
```
|
||||
$ wget https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.gz
|
||||
$ tar -xzf boost_1_70_0.tar.gz
|
||||
$ cd boost_1_70_0
|
||||
$ ./bootstrap.sh
|
||||
$ ./b2 headers
|
||||
$ ./b2 -j<Num Parallel>
|
||||
```
|
||||
|
||||
### (Optional) Dependencies for Building Source Documentation
|
||||
|
||||
Source code documentation is not required for running/debugging rippled. That
|
||||
said, the documentation contains some helpful information about specific
|
||||
components of the application. For more information on how to install and run
|
||||
the necessary components, see [this document](../../docs/README.md)
|
||||
|
||||
## Build
|
||||
|
||||
### Clone the rippled repository
|
||||
|
||||
From a shell:
|
||||
|
||||
```
|
||||
git clone git@github.com:ripple/rippled.git
|
||||
cd rippled
|
||||
```
|
||||
|
||||
For a stable release, choose the `master` branch or one of the tagged releases
|
||||
listed on [GitHub](https://github.com/ripple/rippled/releases).
|
||||
|
||||
```
|
||||
git checkout master
|
||||
```
|
||||
|
||||
or to test the latest release candidate, choose the `release` branch.
|
||||
|
||||
```
|
||||
git checkout release
|
||||
```
|
||||
|
||||
If you are doing development work and want the latest set of untested
|
||||
features, you can consider using the `develop` branch instead.
|
||||
|
||||
```
|
||||
git checkout develop
|
||||
```
|
||||
|
||||
### Configure Library Paths
|
||||
|
||||
If you didn't persistently set the `BOOST_ROOT` environment variable to the
|
||||
directory in which you compiled boost, then you should set it temporarily.
|
||||
|
||||
For example, you built Boost in your home directory `~/boost_1_70_0`, you
|
||||
would do for any shell in which you want to build:
|
||||
|
||||
```
|
||||
export BOOST_ROOT=~/boost_1_70_0
|
||||
```
|
||||
|
||||
Alternatively, you can add `DBOOST_ROOT=~/boost_1_70_0` to the command line when
|
||||
invoking `cmake`.
|
||||
|
||||
### Generate Configuration
|
||||
|
||||
All builds should be done in a separate directory from the source tree root
|
||||
(a subdirectory is fine). For example, from the root of the ripple source tree:
|
||||
|
||||
```
|
||||
mkdir my_build
|
||||
cd my_build
|
||||
```
|
||||
|
||||
followed by:
|
||||
|
||||
```
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug ..
|
||||
```
|
||||
|
||||
If your operating system does not provide static libraries (Arch Linux, and
|
||||
Manjaro Linux, for example), you must configure a non-static build by adding
|
||||
`-Dstatic=OFF` to the above cmake line.
|
||||
|
||||
`CMAKE_BUILD_TYPE` can be changed as desired for `Debug` vs.
|
||||
`Release` builds (all four standard cmake build types are supported).
|
||||
|
||||
To select a different compiler (most likely gcc will be found by default), pass
|
||||
`-DCMAKE_C_COMPILER=<path/to/c-compiler>` and
|
||||
`-DCMAKE_CXX_COMPILER=</path/to/cxx-compiler>` when configuring. If you prefer,
|
||||
you can instead set `CC` and `CXX` environment variables which cmake will honor.
|
||||
|
||||
#### Options During Configuration:
|
||||
|
||||
The CMake file defines a number of configure-time options which can be
|
||||
examined by running `cmake-gui` or `ccmake` to generated the build. In
|
||||
particular, the `unity` option allows you to select between the unity and
|
||||
non-unity builds. `unity` builds are faster to compile since they combine
|
||||
multiple sources into a single compiliation unit - this is the default if you
|
||||
don't specify. `nounity` builds can be helpful for detecting include omissions
|
||||
or for finding other build-related issues, but aren't generally needed for
|
||||
testing and running.
|
||||
|
||||
* `-Dunity=ON` to enable/disable unity builds (defaults to ON)
|
||||
* `-Dassert=ON` to enable asserts
|
||||
* `-Djemalloc=ON` to enable jemalloc support for heap checking
|
||||
* `-Dsan=thread` to enable the thread sanitizer with clang
|
||||
* `-Dsan=address` to enable the address sanitizer with clang
|
||||
* `-Dstatic=ON` to enable static linking library dependencies
|
||||
* `-Dreporting=ON` to build code necessary for reporting mode (defaults to OFF)
|
||||
|
||||
Several other infrequently used options are available - run `ccmake` or
|
||||
`cmake-gui` for a list of all options.
|
||||
|
||||
### Build
|
||||
|
||||
Once you have generated the build system, you can run the build via cmake:
|
||||
|
||||
```
|
||||
cmake --build . -- -j <parallel jobs>
|
||||
```
|
||||
|
||||
the `-j` parameter in this example tells the build tool to compile several
|
||||
files in parallel. This value should be chosen roughly based on the number of
|
||||
cores you have available and/or want to use for building.
|
||||
|
||||
When the build completes successfully, you will have a `rippled` executable in
|
||||
the current directory, which can be used to connect to the network (when
|
||||
properly configured) or to run unit tests.
|
||||
|
||||
|
||||
#### Optional Installation
|
||||
|
||||
The rippled cmake build supports an installation target that will install
|
||||
rippled as well as a support library that can be used to sign transactions. In
|
||||
order to build and install the files, specify the `install` target when
|
||||
building, e.g.:
|
||||
|
||||
```
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/local ..
|
||||
cmake --build . --target install -- -j <parallel jobs>
|
||||
```
|
||||
|
||||
We recommend specifying `CMAKE_INSTALL_PREFIX` when configuring in order to
|
||||
explicitly control the install location for your files. Without this setting,
|
||||
cmake will typically install in `/usr/local`. It is also possible to "rehome"
|
||||
the installation by specifying the `DESTDIR` env variable during the install phase,
|
||||
e.g.:
|
||||
|
||||
```
|
||||
DESTDIR=~/mylibs cmake --build . --target install -- -j <parallel jobs>
|
||||
```
|
||||
|
||||
in which case, the files would be installed in the `CMAKE_INSTALL_PREFIX` within
|
||||
the specified `DESTDIR` path.
|
||||
|
||||
#### Signing Library
|
||||
|
||||
If you want to use the signing support library to create an application, there
|
||||
are two simple mechanisms with cmake + git that facilitate this.
|
||||
|
||||
With either option below, you will have access to a library from the
|
||||
rippled project that you can link to in your own project's CMakeLists.txt, e.g.:
|
||||
|
||||
```
|
||||
target_link_libraries (my-signing-app Ripple::xrpl_core)
|
||||
```
|
||||
|
||||
##### Option 1: git submodules + add_subdirectory
|
||||
|
||||
First, add the rippled repo as a submodule to your project repo:
|
||||
|
||||
```
|
||||
git submodule add -b master https://github.com/ripple/rippled.git vendor/rippled
|
||||
```
|
||||
|
||||
change the `vendor/rippled` path as desired for your repo layout. Furthermore,
|
||||
change the branch name if you want to track a different rippled branch, such
|
||||
as `develop`.
|
||||
|
||||
Second, to bring this submodule into your project, just add the rippled subdirectory:
|
||||
|
||||
```
|
||||
add_subdirectory (vendor/rippled)
|
||||
```
|
||||
|
||||
##### Option 2: installed rippled + find_package
|
||||
|
||||
First, follow the "Optional Installation" instructions above to
|
||||
build and install the desired version of rippled.
|
||||
|
||||
To make use of the installed files, add the following to your CMakeLists.txt file:
|
||||
|
||||
```
|
||||
set (CMAKE_MODULE_PATH /opt/local/lib/cmake/ripple ${CMAKE_MODULE_PATH})
|
||||
find_package(Ripple REQUIRED)
|
||||
```
|
||||
|
||||
change the `/opt/local` module path above to match your chosen installation prefix.
|
||||
|
||||
## Unit Tests (Recommended)
|
||||
|
||||
`rippled` builds a set of unit tests into the server executable. To run these unit
|
||||
tests after building, pass the `--unittest` option to the compiled `rippled`
|
||||
executable. The executable will exit with summary info after running the unit tests.
|
||||
@@ -1,3 +0,0 @@
|
||||
# macOS Build Instructions
|
||||
|
||||
[Build and Run rippled on macOS](https://xrpl.org/build-run-rippled-macos.html)
|
||||
116
CMakeLists.txt
116
CMakeLists.txt
@@ -1,18 +1,25 @@
|
||||
cmake_minimum_required (VERSION 3.16)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
if (POLICY CMP0074)
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif ()
|
||||
endif()
|
||||
if(POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
endif()
|
||||
|
||||
project (rippled)
|
||||
# Fix "unrecognized escape" issues when passing CMAKE_MODULE_PATH on Windows.
|
||||
file(TO_CMAKE_PATH "${CMAKE_MODULE_PATH}" CMAKE_MODULE_PATH)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake")
|
||||
|
||||
project(rippled)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# make GIT_COMMIT_HASH define available to all sources
|
||||
find_package(Git)
|
||||
if(Git_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --abbrev=40
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git describe --always --abbrev=40
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE gch)
|
||||
if(gch)
|
||||
set(GIT_COMMIT_HASH "${gch}")
|
||||
@@ -21,16 +28,14 @@ if(Git_FOUND)
|
||||
endif()
|
||||
endif() #git
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Builds/CMake/deps")
|
||||
if(thread_safety_analysis)
|
||||
add_compile_options(-Wthread-safety -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -DRIPPLE_ENABLE_THREAD_SAFETY_ANNOTATIONS)
|
||||
add_compile_options("-stdlib=libc++")
|
||||
add_link_options("-stdlib=libc++")
|
||||
endif()
|
||||
|
||||
include (CheckCXXCompilerFlag)
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
|
||||
include (FetchContent)
|
||||
endif ()
|
||||
if (MSVC AND CMAKE_VERSION VERSION_LESS 3.12)
|
||||
message (FATAL_ERROR "MSVC requires cmake 3.12 or greater for proper boost support")
|
||||
endif ()
|
||||
include (FetchContent)
|
||||
include (ExternalProject)
|
||||
include (CMakeFuncs) # must come *after* ExternalProject b/c it overrides one function in EP
|
||||
include (ProcessorCount)
|
||||
@@ -41,7 +46,6 @@ endif ()
|
||||
include(RippledSanity)
|
||||
include(RippledVersion)
|
||||
include(RippledSettings)
|
||||
include(RippledNIH)
|
||||
include(RippledRelease)
|
||||
# this check has to remain in the top-level cmake
|
||||
# because of the early return statement
|
||||
@@ -54,30 +58,80 @@ endif ()
|
||||
include(RippledCompiler)
|
||||
include(RippledInterface)
|
||||
|
||||
option(only_docs "Include only the docs target?" FALSE)
|
||||
include(RippledDocs)
|
||||
if(only_docs)
|
||||
return()
|
||||
endif()
|
||||
|
||||
###
|
||||
|
||||
include(deps/Boost)
|
||||
include(deps/OpenSSL)
|
||||
include(deps/Secp256k1)
|
||||
include(deps/Ed25519-donna)
|
||||
include(deps/Lz4)
|
||||
include(deps/Libarchive)
|
||||
include(deps/Sqlite)
|
||||
include(deps/Soci)
|
||||
include(deps/Snappy)
|
||||
include(deps/Rocksdb)
|
||||
include(deps/Nudb)
|
||||
include(deps/date)
|
||||
include(deps/Protobuf)
|
||||
include(deps/gRPC)
|
||||
include(deps/cassandra)
|
||||
include(deps/Postgres)
|
||||
find_package(OpenSSL 1.1.1 REQUIRED)
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS OPENSSL_NO_SSL2
|
||||
)
|
||||
set(SECP256K1_INSTALL TRUE)
|
||||
add_subdirectory(src/secp256k1)
|
||||
add_library(secp256k1::secp256k1 ALIAS secp256k1)
|
||||
add_subdirectory(src/ed25519-donna)
|
||||
find_package(lz4 REQUIRED)
|
||||
# Target names with :: are not allowed in a generator expression.
|
||||
# We need to pull the include directories and imported location properties
|
||||
# from separate targets.
|
||||
find_package(LibArchive REQUIRED)
|
||||
find_package(SOCI REQUIRED)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
find_package(Snappy REQUIRED)
|
||||
|
||||
option(rocksdb "Enable RocksDB" ON)
|
||||
if(rocksdb)
|
||||
find_package(RocksDB REQUIRED)
|
||||
set_target_properties(RocksDB::rocksdb PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS RIPPLE_ROCKSDB_AVAILABLE=1
|
||||
)
|
||||
target_link_libraries(ripple_libs INTERFACE RocksDB::rocksdb)
|
||||
endif()
|
||||
|
||||
find_package(nudb REQUIRED)
|
||||
find_package(date REQUIRED)
|
||||
|
||||
target_link_libraries(ripple_libs INTERFACE
|
||||
ed25519::ed25519
|
||||
LibArchive::LibArchive
|
||||
lz4::lz4
|
||||
OpenSSL::Crypto
|
||||
OpenSSL::SSL
|
||||
secp256k1::secp256k1
|
||||
soci::soci
|
||||
SQLite::SQLite3
|
||||
)
|
||||
|
||||
# Work around changes to Conan recipe for now.
|
||||
if(TARGET nudb::core)
|
||||
set(nudb nudb::core)
|
||||
elseif(TARGET NuDB::nudb)
|
||||
set(nudb NuDB::nudb)
|
||||
else()
|
||||
message(FATAL_ERROR "unknown nudb target")
|
||||
endif()
|
||||
target_link_libraries(ripple_libs INTERFACE ${nudb})
|
||||
|
||||
if(reporting)
|
||||
find_package(cassandra-cpp-driver REQUIRED)
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
target_link_libraries(ripple_libs INTERFACE
|
||||
cassandra-cpp-driver::cassandra-cpp-driver
|
||||
PostgreSQL::PostgreSQL
|
||||
)
|
||||
endif()
|
||||
|
||||
###
|
||||
|
||||
include(RippledCore)
|
||||
include(deps/Protobuf)
|
||||
include(deps/gRPC)
|
||||
include(RippledInstall)
|
||||
include(RippledCov)
|
||||
include(RippledMultiConfig)
|
||||
include(RippledDocs)
|
||||
include(RippledValidatorKeys)
|
||||
|
||||
194
CONTRIBUTING.md
Normal file
194
CONTRIBUTING.md
Normal file
@@ -0,0 +1,194 @@
|
||||
The XRP Ledger has many and diverse stakeholders, and everyone deserves
|
||||
a chance to contribute meaningful changes to the code that runs the
|
||||
XRPL.
|
||||
|
||||
# Contributing
|
||||
|
||||
We assume you are familiar with the general practice of [making
|
||||
contributions on GitHub][1]. This file includes only special
|
||||
instructions specific to this project.
|
||||
|
||||
|
||||
## Before you start
|
||||
|
||||
In general, contributions should be developed in your personal
|
||||
[fork](https://github.com/XRPLF/rippled/fork).
|
||||
|
||||
The following branches exist in the main project repository:
|
||||
|
||||
- `develop`: The latest set of unreleased features, and the most common
|
||||
starting point for contributions.
|
||||
- `release`: The latest beta release or release candidate.
|
||||
- `master`: The latest stable release.
|
||||
- `gh-pages`: The documentation for this project, built by Doxygen.
|
||||
|
||||
The tip of each branch must be signed. In order for GitHub to sign a
|
||||
squashed commit that it builds from your pull request, GitHub must know
|
||||
your verifying key. Please set up [signature verification][signing].
|
||||
|
||||
[rippled]: https://github.com/XRPLF/rippled
|
||||
[signing]:
|
||||
https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification
|
||||
|
||||
|
||||
## Major contributions
|
||||
|
||||
If your contribution is a major feature or breaking change, then you
|
||||
must first write an XRP Ledger Standard (XLS) describing it. Go to
|
||||
[XRPL-Standards](https://github.com/XRPLF/XRPL-Standards/discussions),
|
||||
choose the next available standard number, and open a discussion with an
|
||||
appropriate title to propose your draft standard.
|
||||
|
||||
When you submit a pull request, please link the corresponding XLS in the
|
||||
description. An XLS still in draft status is considered a
|
||||
work-in-progress and open for discussion. Please allow time for
|
||||
questions, suggestions, and changes to the XLS draft. It is the
|
||||
responsibility of the XLS author to update the draft to match the final
|
||||
implementation when its corresponding pull request is merged, unless the
|
||||
author delegates that responsibility to others.
|
||||
|
||||
|
||||
## Before making a pull request
|
||||
|
||||
Changes that alter transaction processing must be guarded by an
|
||||
[Amendment](https://xrpl.org/amendments.html).
|
||||
All other changes that maintain the existing behavior do not need an
|
||||
Amendment.
|
||||
|
||||
Ensure that your code compiles according to the build instructions in
|
||||
[`BUILD.md`](./BUILD.md).
|
||||
If you create new source files, they must go under `src/ripple`.
|
||||
You will need to add them to one of the
|
||||
[source lists](./Builds/CMake/RippledCore.cmake) in CMake.
|
||||
|
||||
Please write tests for your code.
|
||||
If you create new test source files, they must go under `src/test`.
|
||||
You will need to add them to one of the
|
||||
[source lists](./Builds/CMake/RippledCore.cmake) in CMake.
|
||||
If your test can be run offline, in under 60 seconds, then it can be an
|
||||
automatic test run by `rippled --unittest`.
|
||||
Otherwise, it must be a manual test.
|
||||
|
||||
The source must be formatted according to the style guide below.
|
||||
|
||||
Header includes must be [levelized](./Builds/levelization).
|
||||
|
||||
|
||||
## Pull requests
|
||||
|
||||
In general, pull requests use `develop` as the base branch.
|
||||
|
||||
(Hotfixes are an exception.)
|
||||
|
||||
Changes to pull requests must be added as new commits.
|
||||
Once code reviewers have started looking at your code, please avoid
|
||||
force-pushing a branch in a pull request.
|
||||
This preserves the ability for reviewers to filter changes since their last
|
||||
review.
|
||||
|
||||
A pull request must obtain **approvals from at least two reviewers** before it
|
||||
can be considered for merge by a Maintainer.
|
||||
Maintainers retain discretion to require more approvals if they feel the
|
||||
credibility of the existing approvals is insufficient.
|
||||
|
||||
Pull requests must be merged by [squash-and-merge][2]
|
||||
to preserve a linear history for the `develop` branch.
|
||||
|
||||
|
||||
# Style guide
|
||||
|
||||
This is a non-exhaustive list of recommended style guidelines. These are
|
||||
not always strictly enforced and serve as a way to keep the codebase
|
||||
coherent rather than a set of _thou shalt not_ commandments.
|
||||
|
||||
|
||||
## Formatting
|
||||
|
||||
All code must conform to `clang-format` version 10,
|
||||
according to the settings in [`.clang-format`](./.clang-format),
|
||||
unless the result would be unreasonably difficult to read or maintain.
|
||||
To demarcate lines that should be left as-is, surround them with comments like
|
||||
this:
|
||||
|
||||
```
|
||||
// clang-format off
|
||||
...
|
||||
// clang-format on
|
||||
```
|
||||
|
||||
You can format individual files in place by running `clang-format -i <file>...`
|
||||
from any directory within this project.
|
||||
|
||||
You can install a pre-commit hook to automatically run `clang-format` before every commit:
|
||||
```
|
||||
pip3 install pre-commit
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
## Avoid
|
||||
|
||||
1. Proliferation of nearly identical code.
|
||||
2. Proliferation of new files and classes.
|
||||
3. Complex inheritance and complex OOP patterns.
|
||||
4. Unmanaged memory allocation and raw pointers.
|
||||
5. Macros and non-trivial templates (unless they add significant value).
|
||||
6. Lambda patterns (unless these add significant value).
|
||||
7. CPU or architecture-specific code unless there is a good reason to
|
||||
include it, and where it is used, guard it with macros and provide
|
||||
explanatory comments.
|
||||
8. Importing new libraries unless there is a very good reason to do so.
|
||||
|
||||
|
||||
## Seek to
|
||||
|
||||
9. Extend functionality of existing code rather than creating new code.
|
||||
10. Prefer readability over terseness where important logic is
|
||||
concerned.
|
||||
11. Inline functions that are not used or are not likely to be used
|
||||
elsewhere in the codebase.
|
||||
12. Use clear and self-explanatory names for functions, variables,
|
||||
structs and classes.
|
||||
13. Use TitleCase for classes, structs and filenames, camelCase for
|
||||
function and variable names, lower case for namespaces and folders.
|
||||
14. Provide as many comments as you feel that a competent programmer
|
||||
would need to understand what your code does.
|
||||
|
||||
|
||||
# Maintainers
|
||||
|
||||
Maintainers are ecosystem participants with elevated access to the repository.
|
||||
They are able to push new code, make decisions on when a release should be
|
||||
made, etc.
|
||||
|
||||
|
||||
## Adding and removing
|
||||
|
||||
New maintainers can be proposed by two existing maintainers, subject to a vote
|
||||
by a quorum of the existing maintainers.
|
||||
A minimum of 50% support and a 50% participation is required.
|
||||
In the event of a tie vote, the addition of the new maintainer will be
|
||||
rejected.
|
||||
|
||||
Existing maintainers can resign, or be subject to a vote for removal at the
|
||||
behest of two existing maintainers.
|
||||
A minimum of 60% agreement and 50% participation are required.
|
||||
The XRP Ledger Foundation will have the ability, for cause, to remove an
|
||||
existing maintainer without a vote.
|
||||
|
||||
|
||||
## Current Maintainers
|
||||
|
||||
* [JoelKatz](https://github.com/JoelKatz) (Ripple)
|
||||
* [manojsdoshi](https://github.com/manojsdoshi) (Ripple)
|
||||
* [n3tc4t](https://github.com/n3tc4t) (XRPL Labs)
|
||||
* [Nik Bougalis](https://github.com/nbougalis)
|
||||
* [nixer89](https://github.com/nixer89) (XRP Ledger Foundation)
|
||||
* [RichardAH](https://github.com/RichardAH) (XRPL Labs + XRP Ledger Foundation)
|
||||
* [seelabs](https://github.com/seelabs) (Ripple)
|
||||
* [Silkjaer](https://github.com/Silkjaer) (XRP Ledger Foundation)
|
||||
* [WietseWind](https://github.com/WietseWind) (XRPL Labs + XRP Ledger Foundation)
|
||||
* [Ed Hennis](https://github.com/ximinez) (Ripple)
|
||||
|
||||
|
||||
[1]: https://docs.github.com/en/get-started/quickstart/contributing-to-projects
|
||||
[2]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits
|
||||
28
README.md
28
README.md
@@ -3,16 +3,17 @@
|
||||
The [XRP Ledger](https://xrpl.org/) is a decentralized cryptographic ledger powered by a network of peer-to-peer nodes. The XRP Ledger uses a novel Byzantine Fault Tolerant consensus algorithm to settle and record transactions in a secure distributed database without a central operator.
|
||||
|
||||
## XRP
|
||||
[XRP](https://xrpl.org/xrp.html) is a public, counterparty-free asset native to the XRP Ledger, and is designed to bridge the many different currencies in use worldwide. XRP is traded on the open-market and is available for anyone to access. The XRP Ledger was created in 2012 with a finite supply of 100 billion units of XRP. Its creators gifted 80 billion XRP to a company, now called [Ripple](https://ripple.com/), to develop the XRP Ledger and its ecosystem. Ripple uses XRP to help build the Internet of Value, ushering in a world in which money moves as fast and efficiently as information does today.
|
||||
[XRP](https://xrpl.org/xrp.html) is a public, counterparty-free asset native to the XRP Ledger, and is designed to bridge the many different currencies in use worldwide. XRP is traded on the open-market and is available for anyone to access. The XRP Ledger was created in 2012 with a finite supply of 100 billion units of XRP.
|
||||
|
||||
## rippled
|
||||
The server software that powers the XRP Ledger is called `rippled` and is available in this repository under the permissive [ISC open-source license](LICENSE.md). The `rippled` server software is written primarily in C++ and runs on a variety of platforms. The `rippled` server software can run in several modes depending on its [configuration](https://xrpl.org/rippled-server-modes.html).
|
||||
The server software that powers the XRP Ledger is called `rippled` and is available in this repository under the permissive [ISC open-source license](LICENSE.md). The `rippled` server software is written primarily in C++ and runs on a variety of platforms. The `rippled` server software can run in several modes depending on its [configuration](https://xrpl.org/rippled-server-modes.html).
|
||||
|
||||
If you are interested in running an **API Server** (including a **Full History Server**) or a **Reporting Mode** server, take a look at [Clio](https://github.com/XRPLF/clio). rippled Reporting Mode is expected to be replaced by Clio.
|
||||
|
||||
### Build from Source
|
||||
|
||||
* [Linux](Builds/linux/README.md)
|
||||
* [Mac](Builds/macos/README.md) (Not recommended for production)
|
||||
* [Windows](Builds/VisualStudio2017/README.md) (Not recommended for production)
|
||||
* [Read the build instructions in `BUILD.md`](BUILD.md)
|
||||
* If you encounter any issues, please [open an issue](https://github.com/XRPLF/rippled/issues)
|
||||
|
||||
## Key Features of the XRP Ledger
|
||||
|
||||
@@ -34,8 +35,12 @@ The server software that powers the XRP Ledger is called `rippled` and is availa
|
||||
|
||||
|
||||
## Source Code
|
||||
[](https://travis-ci.com/ripple/rippled)
|
||||
[](https://codecov.io/gh/ripple/rippled)
|
||||
|
||||
Here are some good places to start learning the source code:
|
||||
|
||||
- Read the markdown files in the source tree: `src/ripple/**/*.md`.
|
||||
- Read [the levelization document](./Builds/levelization) to get an idea of the internal dependency graph.
|
||||
- In the big picture, the `main` function constructs an `ApplicationImp` object, which implements the `Application` virtual interface. Almost every component in the application takes an `Application&` parameter in its constructor, typically named `app` and stored as a member variable `app_`. This allows most components to depend on any other component.
|
||||
|
||||
### Repository Contents
|
||||
|
||||
@@ -51,9 +56,14 @@ Some of the directories under `src` are external repositories included using
|
||||
git-subtree. See those directories' README files for more details.
|
||||
|
||||
|
||||
## See Also
|
||||
## Additional Documentation
|
||||
|
||||
* [XRP Ledger Dev Portal](https://xrpl.org/)
|
||||
* [Setup and Installation](https://xrpl.org/install-rippled.html)
|
||||
* [Source Documentation (Doxygen)](https://ripple.github.io/rippled)
|
||||
* [Source Documentation (Doxygen)](https://xrplf.github.io/rippled/)
|
||||
|
||||
## See Also
|
||||
|
||||
* [Clio API Server for the XRP Ledger](https://github.com/XRPLF/clio)
|
||||
* [Mailing List for Release Announcements](https://groups.google.com/g/ripple-server)
|
||||
* [Learn more about the XRP Ledger (YouTube)](https://www.youtube.com/playlist?list=PLJQ55Tj1hIVZtJ_JdTvSum2qMTsedWkNi)
|
||||
|
||||
732
RELEASENOTES.md
732
RELEASENOTES.md
@@ -5,7 +5,675 @@
|
||||
This document contains the release notes for `rippled`, the reference server implementation of the XRP Ledger protocol. To learn more about how to build, run or update a `rippled` server, visit https://xrpl.org/install-rippled.html
|
||||
|
||||
|
||||
Have new ideas? Need help with setting up your node? Come visit us [here](https://github.com/ripple/rippled/issues/new/choose)
|
||||
Have new ideas? Need help with setting up your node? [Please open an issue here](https://github.com/xrplf/rippled/issues/new/choose).
|
||||
|
||||
# Introducing XRP Ledger version 1.12.0
|
||||
|
||||
Version 1.12.0 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available. This release adds new features and bug fixes, and introduces these amendments:
|
||||
|
||||
- `AMM`
|
||||
- `Clawback`
|
||||
- `fixReducedOffersV1`
|
||||
|
||||
[Sign Up for Future Release Announcements](https://groups.google.com/g/ripple-server)
|
||||
|
||||
<!-- BREAK -->
|
||||
|
||||
## Action Required
|
||||
|
||||
Three new amendments are now open for voting according to the XRP Ledger's [amendment process](https://xrpl.org/amendments.html), which enables protocol changes following two weeks of >80% support from trusted validators.
|
||||
|
||||
If you operate an XRP Ledger server, upgrade to version 1.12.0 by September 20, 2023 to ensure service continuity. The exact time that protocol changes take effect depends on the voting decisions of the decentralized network.
|
||||
|
||||
|
||||
## Install / Upgrade
|
||||
|
||||
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
|
||||
|
||||
The XRPL Foundation publishes portable binaries, which are drop-in replacements for the `rippled` daemon. [See information and downloads for the portable binaries](https://github.com/XRPLF/rippled-portable-builds#portable-builds-of-the-rippled-server). This will work on most distributions, including Ubuntu 16.04, 18.04, 20.04, and 22.04; CentOS; and others. Please test and open issues on GitHub if there are problems.
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
### Amendments, New Features, and Changes
|
||||
(These are changes which may impact or be useful to end users. For example, you may be able to update your code/workflow to take advantage of these changes.)
|
||||
|
||||
- **`AMM`**: Introduces an automated market maker (AMM) protocol to the XRP Ledger's decentralized exchange, enabling you to trade assets without a counterparty. For more information about AMMs, see: [Automated Market Maker](https://opensource.ripple.com/docs/xls-30d-amm/amm-uc/). [#4294](https://github.com/XRPLF/rippled/pull/4294)
|
||||
|
||||
- **`Clawback`**: Adds a setting, *Allow Clawback*, which lets an issuer recover, or _claw back_, tokens that they previously issued. Issuers cannot enable this setting if they have issued tokens already. For additional documentation on this feature, see: [#4553](https://github.com/XRPLF/rippled/pull/4553).
|
||||
|
||||
- **`fixReducedOffersV1`**: Reduces the occurrence of order books that are blocked by reduced offers. [#4512](https://github.com/XRPLF/rippled/pull/4512)
|
||||
|
||||
- Added WebSocket and RPC port info to `server_info` responses. [#4427](https://github.com/XRPLF/rippled/pull/4427)
|
||||
|
||||
- Removed the deprecated `accepted`, `seqNum`, `hash`, and `totalCoins` fields from the `ledger` method. [#4244](https://github.com/XRPLF/rippled/pull/4244)
|
||||
|
||||
|
||||
### Bug Fixes and Performance Improvements
|
||||
(These are behind-the-scenes improvements, such as internal changes to the code, which are not expected to impact end users.)
|
||||
|
||||
- Added a pre-commit hook that runs the clang-format linter locally before committing changes. To install this feature, see: [CONTRIBUTING](https://github.com/XRPLF/xrpl-dev-portal/blob/master/CONTRIBUTING.md). [#4599](https://github.com/XRPLF/rippled/pull/4599)
|
||||
|
||||
- In order to make it more straightforward to catch and handle overflows: changed the output type of the `mulDiv()` function from `std::pair<bool, uint64_t>` to `std::optional`. [#4243](https://github.com/XRPLF/rippled/pull/4243)
|
||||
|
||||
- Updated `Handler::Condition` enum values to make the code less brittle. [#4239](https://github.com/XRPLF/rippled/pull/4239)
|
||||
|
||||
- Renamed `ServerHandlerImp` to `ServerHandler`. [#4516](https://github.com/XRPLF/rippled/pull/4516), [#4592](https://github.com/XRPLF/rippled/pull/4592)
|
||||
|
||||
- Replaced hand-rolled code with `std::from_chars` for better maintainability. [#4473](https://github.com/XRPLF/rippled/pull/4473)
|
||||
|
||||
- Removed an unused `TypedField` move constructor. [#4567](https://github.com/XRPLF/rippled/pull/4567)
|
||||
|
||||
|
||||
### Docs and Build System
|
||||
|
||||
- Updated checkout versions to resolve warnings during GitHub jobs. [#4598](https://github.com/XRPLF/rippled/pull/4598)
|
||||
|
||||
- Fixed an issue with the Debian package build. [#4591](https://github.com/XRPLF/rippled/pull/4591)
|
||||
|
||||
- Updated build instructions with additional steps to take after updating dependencies. [#4623](https://github.com/XRPLF/rippled/pull/4623)
|
||||
|
||||
- Updated contributing doc to clarify that beta releases should also be pushed to the `release` branch. [#4589](https://github.com/XRPLF/rippled/pull/4589)
|
||||
|
||||
- Enabled the `BETA_RPC_API` flag in the default unit tests config, making the API v2 (beta) available to unit tests. [#4573](https://github.com/XRPLF/rippled/pull/4573)
|
||||
|
||||
- Conan dependency management.
|
||||
- Fixed package definitions for Conan. [#4485](https://github.com/XRPLF/rippled/pull/4485)
|
||||
- Updated build dependencies to the most recent versions in Conan Center. [#4595](https://github.com/XRPLF/rippled/pull/4595)
|
||||
- Updated Conan recipe for NuDB. [#4615](https://github.com/XRPLF/rippled/pull/4615)
|
||||
|
||||
- Added binary hardening and linker flags to enhance security during the build process. [#4603](https://github.com/XRPLF/rippled/pull/4603)
|
||||
|
||||
- Added an Artifactory to the `nix` workflow to improve build times. [#4556](https://github.com/XRPLF/rippled/pull/4556)
|
||||
|
||||
- Added quality-of-life improvements to workflows, using new [concurrency control](https://docs.github.com/en/actions/using-jobs/using-concurrency) features. [#4597](https://github.com/XRPLF/rippled/pull/4597)
|
||||
|
||||
|
||||
[Full Commit Log](https://github.com/XRPLF/rippled/compare/1.11.0...1.12.0)
|
||||
|
||||
|
||||
### GitHub
|
||||
|
||||
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
|
||||
|
||||
We welcome all contributions and invite everyone to join the community of XRP Ledger developers to help build the Internet of Value.
|
||||
|
||||
|
||||
## Credits
|
||||
|
||||
The following people contributed directly to this release:
|
||||
|
||||
- Alphonse N. Mousse <39067955+a-noni-mousse@users.noreply.github.com>
|
||||
- Arihant Kothari <arihantkothari17@gmail.com>
|
||||
- Chenna Keshava B S <21219765+ckeshava@users.noreply.github.com>
|
||||
- Denis Angell <dangell@transia.co>
|
||||
- Ed Hennis <ed@ripple.com>
|
||||
- Elliot Lee <github.public@intelliot.com>
|
||||
- Gregory Tsipenyuk <gregtatcam@users.noreply.github.com>
|
||||
- Howard Hinnant <howard.hinnant@gmail.com>
|
||||
- Ikko Eltociear Ashimine <eltociear@gmail.com>
|
||||
- John Freeman <jfreeman08@gmail.com>
|
||||
- Manoj Doshi <mdoshi@ripple.com>
|
||||
- Mark Travis <mtravis@ripple.com>
|
||||
- Mayukha Vadari <mvadari@gmail.com>
|
||||
- Michael Legleux <legleux@users.noreply.github.com>
|
||||
- Peter Chen <34582813+PeterChen13579@users.noreply.github.com>
|
||||
- RichardAH <richard.holland@starstone.co.nz>
|
||||
- Rome Reginelli <rome@ripple.com>
|
||||
- Scott Schurr <scott@ripple.com>
|
||||
- Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
|
||||
- drlongle <drlongle@gmail.com>
|
||||
|
||||
Bug Bounties and Responsible Disclosures:
|
||||
|
||||
We welcome reviews of the rippled code and urge researchers to responsibly disclose any issues they may find.
|
||||
|
||||
To report a bug, please send a detailed report to: <bugs@xrpl.org>
|
||||
|
||||
|
||||
# Introducing XRP Ledger version 1.11.0
|
||||
|
||||
Version 1.11.0 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available.
|
||||
|
||||
This release reduces memory usage, introduces the `fixNFTokenRemint` amendment, and adds new features and bug fixes. For example, the new NetworkID field in transactions helps to prevent replay attacks with side-chains.
|
||||
|
||||
[Sign Up for Future Release Announcements](https://groups.google.com/g/ripple-server)
|
||||
|
||||
<!-- BREAK -->
|
||||
|
||||
## Action Required
|
||||
|
||||
The `fixNFTokenRemint` amendment is now open for voting according to the XRP Ledger's [amendment process](https://xrpl.org/amendments.html), which enables protocol changes following two weeks of >80% support from trusted validators.
|
||||
|
||||
If you operate an XRP Ledger server, upgrade to version 1.11.0 by July 5 to ensure service continuity. The exact time that protocol changes take effect depends on the voting decisions of the decentralized network.
|
||||
|
||||
|
||||
## Install / Upgrade
|
||||
|
||||
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
|
||||
|
||||
|
||||
## What's Changed
|
||||
|
||||
### New Features and Improvements
|
||||
|
||||
* Allow port numbers be be specified using a either a colon or a space by @RichardAH in https://github.com/XRPLF/rippled/pull/4328
|
||||
* Eliminate memory allocation from critical path: by @nbougalis in https://github.com/XRPLF/rippled/pull/4353
|
||||
* Make it easy for projects to depend on libxrpl by @thejohnfreeman in https://github.com/XRPLF/rippled/pull/4449
|
||||
* Add the ability to mark amendments as obsolete by @ximinez in https://github.com/XRPLF/rippled/pull/4291
|
||||
* Always create the FeeSettings object in genesis ledger by @ximinez in https://github.com/XRPLF/rippled/pull/4319
|
||||
* Log exception messages in several locations by @drlongle in https://github.com/XRPLF/rippled/pull/4400
|
||||
* Parse flags in account_info method by @drlongle in https://github.com/XRPLF/rippled/pull/4459
|
||||
* Add NFTokenPages to account_objects RPC by @RichardAH in https://github.com/XRPLF/rippled/pull/4352
|
||||
* add jss fields used by clio `nft_info` by @ledhed2222 in https://github.com/XRPLF/rippled/pull/4320
|
||||
* Introduce a slab-based memory allocator and optimize SHAMapItem by @nbougalis in https://github.com/XRPLF/rippled/pull/4218
|
||||
* Add NetworkID field to transactions to help prevent replay attacks on and from side-chains by @RichardAH in https://github.com/XRPLF/rippled/pull/4370
|
||||
* If present, set quorum based on command line. by @mtrippled in https://github.com/XRPLF/rippled/pull/4489
|
||||
* API does not accept seed or public key for account by @drlongle in https://github.com/XRPLF/rippled/pull/4404
|
||||
* Add `nftoken_id`, `nftoken_ids` and `offer_id` meta fields into NFT `Tx` responses by @shawnxie999 in https://github.com/XRPLF/rippled/pull/4447
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix(gateway_balances): handle overflow exception by @RichardAH in https://github.com/XRPLF/rippled/pull/4355
|
||||
* fix(ValidatorSite): handle rare null pointer dereference in timeout by @ximinez in https://github.com/XRPLF/rippled/pull/4420
|
||||
* RPC commands understand markers derived from all ledger object types by @ximinez in https://github.com/XRPLF/rippled/pull/4361
|
||||
* `fixNFTokenRemint`: prevent NFT re-mint: by @shawnxie999 in https://github.com/XRPLF/rippled/pull/4406
|
||||
* Fix a case where ripple::Expected returned a json array, not a value by @scottschurr in https://github.com/XRPLF/rippled/pull/4401
|
||||
* fix: Ledger data returns an empty list (instead of null) when all entries are filtered out by @drlongle in https://github.com/XRPLF/rippled/pull/4398
|
||||
* Fix unit test ripple.app.LedgerData by @drlongle in https://github.com/XRPLF/rippled/pull/4484
|
||||
* Fix the fix for std::result_of by @thejohnfreeman in https://github.com/XRPLF/rippled/pull/4496
|
||||
* Fix errors for Clang 16 by @thejohnfreeman in https://github.com/XRPLF/rippled/pull/4501
|
||||
* Ensure that switchover vars are initialized before use: by @seelabs in https://github.com/XRPLF/rippled/pull/4527
|
||||
* Move faulty assert by @ximinez in https://github.com/XRPLF/rippled/pull/4533
|
||||
* Fix unaligned load and stores: (#4528) by @seelabs in https://github.com/XRPLF/rippled/pull/4531
|
||||
* fix node size estimation by @dangell7 in https://github.com/XRPLF/rippled/pull/4536
|
||||
* fix: remove redundant moves by @ckeshava in https://github.com/XRPLF/rippled/pull/4565
|
||||
|
||||
### Code Cleanup and Testing
|
||||
|
||||
* Replace compare() with the three-way comparison operator in base_uint, Issue and Book by @drlongle in https://github.com/XRPLF/rippled/pull/4411
|
||||
* Rectify the import paths of boost::function_output_iterator by @ckeshava in https://github.com/XRPLF/rippled/pull/4293
|
||||
* Expand Linux test matrix by @thejohnfreeman in https://github.com/XRPLF/rippled/pull/4454
|
||||
* Add patched recipe for SOCI by @thejohnfreeman in https://github.com/XRPLF/rippled/pull/4510
|
||||
* Switch to self-hosted runners for macOS by @thejohnfreeman in https://github.com/XRPLF/rippled/pull/4511
|
||||
* [TRIVIAL] Add missing includes by @seelabs in https://github.com/XRPLF/rippled/pull/4555
|
||||
|
||||
### Docs
|
||||
|
||||
* Refactor build instructions by @thejohnfreeman in https://github.com/XRPLF/rippled/pull/4381
|
||||
* Add install instructions for package managers by @thejohnfreeman in https://github.com/XRPLF/rippled/pull/4472
|
||||
* Fix typo by @solmsted in https://github.com/XRPLF/rippled/pull/4508
|
||||
* Update environment.md by @sappenin in https://github.com/XRPLF/rippled/pull/4498
|
||||
* Update BUILD.md by @oeggert in https://github.com/XRPLF/rippled/pull/4514
|
||||
* Trivial: add comments for NFToken-related invariants by @scottschurr in https://github.com/XRPLF/rippled/pull/4558
|
||||
|
||||
## New Contributors
|
||||
* @drlongle made their first contribution in https://github.com/XRPLF/rippled/pull/4411
|
||||
* @ckeshava made their first contribution in https://github.com/XRPLF/rippled/pull/4293
|
||||
* @solmsted made their first contribution in https://github.com/XRPLF/rippled/pull/4508
|
||||
* @sappenin made their first contribution in https://github.com/XRPLF/rippled/pull/4498
|
||||
* @oeggert made their first contribution in https://github.com/XRPLF/rippled/pull/4514
|
||||
|
||||
**Full Changelog**: https://github.com/XRPLF/rippled/compare/1.10.1...1.11.0
|
||||
|
||||
|
||||
### GitHub
|
||||
|
||||
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
|
||||
|
||||
We welcome all contributions and invite everyone to join the community of XRP Ledger developers to help build the Internet of Value.
|
||||
|
||||
### Credits
|
||||
|
||||
The following people contributed directly to this release:
|
||||
- Alloy Networks <45832257+alloynetworks@users.noreply.github.com>
|
||||
- Brandon Wilson <brandon@coil.com>
|
||||
- Chenna Keshava B S <21219765+ckeshava@users.noreply.github.com>
|
||||
- David Fuelling <sappenin@gmail.com>
|
||||
- Denis Angell <dangell@transia.co>
|
||||
- Ed Hennis <ed@ripple.com>
|
||||
- Elliot Lee <github.public@intelliot.com>
|
||||
- John Freeman <jfreeman08@gmail.com>
|
||||
- Mark Travis <mtrippled@users.noreply.github.com>
|
||||
- Nik Bougalis <nikb@bougalis.net>
|
||||
- RichardAH <richard.holland@starstone.co.nz>
|
||||
- Scott Determan <scott.determan@yahoo.com>
|
||||
- Scott Schurr <scott@ripple.com>
|
||||
- Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
|
||||
- drlongle <drlongle@gmail.com>
|
||||
- ledhed2222 <ledhed2222@users.noreply.github.com>
|
||||
- oeggert <117319296+oeggert@users.noreply.github.com>
|
||||
- solmsted <steven.olm@gmail.com>
|
||||
|
||||
|
||||
Bug Bounties and Responsible Disclosures:
|
||||
We welcome reviews of the rippled code and urge researchers to
|
||||
responsibly disclose any issues they may find.
|
||||
|
||||
To report a bug, please send a detailed report to:
|
||||
|
||||
bugs@xrpl.org
|
||||
|
||||
|
||||
# Introducing XRP Ledger version 1.10.1
|
||||
|
||||
Version 1.10.1 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available. This release restores packages for Ubuntu 18.04.
|
||||
|
||||
Compared to version 1.10.0, the only C++ code change fixes an edge case in Reporting Mode.
|
||||
|
||||
If you are already running version 1.10.0, then upgrading to version 1.10.1 is generally not required.
|
||||
|
||||
[Sign Up for Future Release Announcements](https://groups.google.com/g/ripple-server)
|
||||
|
||||
<!-- BREAK -->
|
||||
|
||||
## Install / Upgrade
|
||||
|
||||
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
|
||||
|
||||
## Changelog
|
||||
|
||||
- [`da18c86cbf`](https://github.com/ripple/rippled/commit/da18c86cbfea1d8fe6940035f9103e15890d47ce) Build packages with Ubuntu 18.04
|
||||
- [`f7b3ddd87b`](https://github.com/ripple/rippled/commit/f7b3ddd87b8ef093a06ab1420bea57ed1e77643a) Reporting Mode: Do not attempt to acquire missing data from peer network (#4458)
|
||||
|
||||
### GitHub
|
||||
|
||||
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
|
||||
|
||||
We welcome all contributions and invite everyone to join the community of XRP Ledger developers to help build the Internet of Value.
|
||||
|
||||
### Credits
|
||||
|
||||
The following people contributed directly to this release:
|
||||
|
||||
- John Freeman <jfreeman08@gmail.com>
|
||||
- Mark Travis <mtrippled@users.noreply.github.com>
|
||||
- Michael Legleux <mlegleux@ripple.com>
|
||||
|
||||
Bug Bounties and Responsible Disclosures:
|
||||
We welcome reviews of the rippled code and urge researchers to
|
||||
responsibly disclose any issues they may find.
|
||||
|
||||
To report a bug, please send a detailed report to:
|
||||
|
||||
bugs@xrpl.org
|
||||
|
||||
|
||||
# Introducing XRP Ledger version 1.10.0
|
||||
|
||||
Version 1.10.0 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available. This release introduces six new amendments, detailed below, and cleans up code to improve performance.
|
||||
|
||||
[Sign Up for Future Release Announcements](https://groups.google.com/g/ripple-server)
|
||||
|
||||
<!-- BREAK -->
|
||||
|
||||
## Action Required
|
||||
|
||||
Six new amendments are now open for voting according to the XRP Ledger's [amendment process](https://xrpl.org/amendments.html), which enables protocol changes following two weeks of >80% support from trusted validators.
|
||||
|
||||
If you operate an XRP Ledger server, upgrade to version 1.10.0 by March 21 to ensure service continuity. The exact time that protocol changes take effect depends on the voting decisions of the decentralized network.
|
||||
|
||||
|
||||
## Install / Upgrade
|
||||
|
||||
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
|
||||
|
||||
|
||||
## New Amendments
|
||||
|
||||
- **`featureImmediateOfferKilled`**: Changes the response code of an `OfferCreate` transaction with the `tfImmediateOrCancel` flag to return `tecKILLED` when no funds are moved. The previous return code of `tecSUCCESS` was unintuitive. [#4157](https://github.com/XRPLF/rippled/pull/4157)
|
||||
|
||||
- **`featureDisallowIncoming`**: Enables an account to block incoming checks, payment channels, NFToken offers, and trust lines. [#4336](https://github.com/XRPLF/rippled/pull/4336)
|
||||
|
||||
- **`featureXRPFees`**: Simplifies transaction cost calculations to use XRP directly, rather than calculating indirectly in "fee units" and translating the results to XRP. Updates all instances of "fee units" in the protocol and ledger data to be drops of XRP instead. [#4247](https://github.com/XRPLF/rippled/pull/4247)
|
||||
|
||||
- **`fixUniversalNumber`**: Simplifies and unifies the code for decimal floating point math. In some cases, this provides slightly better accuracy than the previous code, resulting in calculations whose least significant digits are different than when calculated with the previous code. The different results may cause other edge case differences where precise calculations are used, such as ranking of offers or processing of payments that use several different paths. [#4192](https://github.com/XRPLF/rippled/pull/4192)
|
||||
|
||||
- **`fixNonFungibleTokensV1_2`**: This amendment is a combination of NFToken fixes. [#4417](https://github.com/XRPLF/rippled/pull/4417)
|
||||
- Fixes unburnable NFTokens when it has over 500 offers. [#4346](https://github.com/XRPLF/rippled/pull/4346)
|
||||
- Fixes 3 NFToken offer acceptance issues. [#4380](https://github.com/XRPLF/rippled/pull/4380)
|
||||
- Prevents brokered sales of NFTokens to owners. [#4403](https://github.com/XRPLF/rippled/pull/4403)
|
||||
- Only allows the destination to settle NFToken offers through brokerage. [#4399](https://github.com/XRPLF/rippled/pull/4399)
|
||||
|
||||
- **`fixTrustLinesToSelf`**: Trust lines must be between two different accounts, but two exceptions exist because of a bug that briefly existed. This amendment removes those trust lines. [69bb2be](https://github.com/XRPLF/rippled/pull/4270/commits/69bb2be446e3cc24c694c0835b48bd2ecd3d119e)
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
### New Features and Improvements
|
||||
|
||||
- **Improve Handshake in the peer protocol**: Switched to using a cryptographically secure PRNG for the Instance Cookie. `rippled` now uses hex encoding for the `Closed-Ledger` and `Previous-Ledger` fields in the Handshake. Also added `--newnodeid` and `--nodeid` command line options. [5a15229](https://github.com/XRPLF/rippled/pull/4270/commits/5a15229eeb13b69c8adf1f653b88a8f8b9480546)
|
||||
|
||||
- **RPC tooBusy response now has 503 HTTP status code**: Added ripplerpc 3.0, enabling RPC tooBusy responses to return relevant HTTP status codes. This is a non-breaking change that only applies to JSON-RPC when you include `"ripplerpc": "3.0"` in the request. [#4143](https://github.com/XRPLF/rippled/pull/4143)
|
||||
|
||||
- **Use the Conan package manager**: Added a `conanfile.py` and Conan recipe for Snappy. Removed the RocksDB recipe from the repo; you can now get it from Conan Center. [#4367](https://github.com/XRPLF/rippled/pull/4367), [c2b03fe](https://github.com/XRPLF/rippled/commit/c2b03fecca19a304b37467b01fa78593d3dce3fb)
|
||||
|
||||
- **Update Build Instructions**: Updated the build instructions to build with the Conan package manager and restructured info for easier comprehension. [#4376](https://github.com/XRPLF/rippled/pull/4376), [#4383](https://github.com/XRPLF/rippled/pull/4383)
|
||||
|
||||
- **Revise CONTRIBUTING**: Updated code contribution guidelines. `rippled` is an open source project and contributions are very welcome. [#4382](https://github.com/XRPLF/rippled/pull/4382)
|
||||
|
||||
- **Update documented pathfinding configuration defaults**: `417cfc2` changed the default Path Finding configuration values, but missed updating the values documented in rippled-example.cfg. Updated those defaults and added recommended values for nodes that want to support advanced pathfinding. [#4409](https://github.com/XRPLF/rippled/pull/4409)
|
||||
|
||||
- **Remove gRPC code previously used for the Xpring SDK**: Removed gRPC code used for the Xpring SDK. The gRPC API is also enabled locally by default in `rippled-example.cfg`. This API is used for [Reporting Mode](https://xrpl.org/build-run-rippled-in-reporting-mode.html) and [Clio](https://github.com/XRPLF/clio). [28f4cc7](https://github.com/XRPLF/rippled/pull/4321/commits/28f4cc7817c2e477f0d7e9ade8f07a45ff2b81f1)
|
||||
|
||||
- **Switch from C++17 to C++20**: Updated `rippled` to use C++20. [92d35e5](https://github.com/XRPLF/rippled/pull/4270/commits/92d35e54c7de6bbe44ff6c7c52cc0765b3f78258)
|
||||
|
||||
- **Support for Boost 1.80.0:**: [04ef885](https://github.com/XRPLF/rippled/pull/4321/commits/04ef8851081f6ee9176783ad3725960b8a931ebb)
|
||||
|
||||
- **Reduce default reserves to 10/2**: Updated the hard-coded default reserves to match the current settings on Mainnet. [#4329](https://github.com/XRPLF/rippled/pull/4329)
|
||||
|
||||
- **Improve self-signed certificate generation**: Improved speed and security of TLS certificate generation on fresh startup. [0ecfc7c](https://github.com/XRPLF/rippled/pull/4270/commits/0ecfc7cb1a958b731e5f184876ea89ae2d4214ee)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Update command-line usage help message**: Added `manifest` and `validator_info` to the `rippled` CLI usage statement. [b88ed5a](https://github.com/XRPLF/rippled/pull/4270/commits/b88ed5a8ec2a0735031ca23dc6569d54787dc2f2)
|
||||
|
||||
- **Work around gdb bug by changing a template parameter**: Added a workaround for a bug in gdb, where unsigned template parameters caused issues with RTTI. [#4332](https://github.com/XRPLF/rippled/pull/4332)
|
||||
|
||||
- **Fix clang 15 warnings**: [#4325](https://github.com/XRPLF/rippled/pull/4325)
|
||||
|
||||
- **Catch transaction deserialization error in doLedgerGrpc**: Fixed an issue in the gRPC API, so `Clio` can extract ledger headers and state objects from specific transactions that can't be deserialized by `rippled` code. [#4323](https://github.com/XRPLF/rippled/pull/4323)
|
||||
|
||||
- **Update dependency: gRPC**: New Conan recipes broke the old version of gRPC, so the dependency was updated. [#4407](https://github.com/XRPLF/rippled/pull/4407)
|
||||
|
||||
- **Fix Doxygen workflow**: Added options to build documentation that don't depend on the library dependencies of `rippled`. [#4372](https://github.com/XRPLF/rippled/pull/4372)
|
||||
|
||||
- **Don't try to read SLE with key 0 from the ledger**: Fixed the `preclaim` function to check for 0 in `NFTokenSellOffer` and `NFTokenBuyOffer` before calling `Ledger::read`. This issue only affected debug builds. [#4351](https://github.com/XRPLF/rippled/pull/4351)
|
||||
|
||||
- **Update broken link to hosted Doxygen content**: [5e1cb09](https://github.com/XRPLF/rippled/pull/4270/commits/5e1cb09b8892e650f6c34a66521b6b1673bd6b65)
|
||||
|
||||
|
||||
### Code Cleanup
|
||||
|
||||
- **Prevent unnecessary `shared_ptr` copies by accepting a value in `SHAMapInnerNode::setChild`**: [#4266](https://github.com/XRPLF/rippled/pull/4266)
|
||||
|
||||
- **Release TaggedCache object memory outside the lock**: [3726f8b](https://github.com/XRPLF/rippled/pull/4321/commits/3726f8bf31b3eab8bab39dce139656fd705ae9a0)
|
||||
|
||||
- **Rename SHAMapStoreImp::stopping() to healthWait()**: [7e9e910](https://github.com/XRPLF/rippled/pull/4321/commits/7e9e9104eabbf0391a0837de5630af17a788e233)
|
||||
|
||||
- **Improve wrapper around OpenSSL RAND**: [7b3507b](https://github.com/XRPLF/rippled/pull/4270/commits/7b3507bb873495a974db33c57a888221ddabcacc)
|
||||
|
||||
- **Improve AccountID string conversion caching**: Improved memory cache usage. [e2eed96](https://github.com/XRPLF/rippled/pull/4270/commits/e2eed966b0ecb6445027e6a023b48d702c5f4832)
|
||||
|
||||
- **Build the command map at compile time**: [9aaa0df](https://github.com/XRPLF/rippled/pull/4270/commits/9aaa0dff5fd422e5f6880df8e20a1fd5ad3b4424)
|
||||
|
||||
- **Avoid unnecessary copying and dynamic memory allocations**: [d318ab6](https://github.com/XRPLF/rippled/pull/4270/commits/d318ab612adc86f1fd8527a50af232f377ca89ef)
|
||||
|
||||
- **Use constexpr to check memo validity**: [e67f905](https://github.com/XRPLF/rippled/pull/4270/commits/e67f90588a9050162881389d7e7d1d0fb31066b0)
|
||||
|
||||
- **Remove charUnHex**: [83ac141](https://github.com/XRPLF/rippled/pull/4270/commits/83ac141f656b1a95b5661853951ebd95b3ffba99)
|
||||
|
||||
- **Remove deprecated AccountTxOld.cpp**: [ce64f7a](https://github.com/XRPLF/rippled/pull/4270/commits/ce64f7a90f99c6b5e68d3c3d913443023de061a6)
|
||||
|
||||
- **Remove const_cast usage**: [23ce431](https://github.com/XRPLF/rippled/pull/4321/commits/23ce4318768b718c82e01004d23f1abc9a9549ff)
|
||||
|
||||
- **Remove inaccessible code paths and outdated data format wchar_t**: [95fabd5](https://github.com/XRPLF/rippled/pull/4321/commits/95fabd5762a4917753c06268192e4d4e4baef8e4)
|
||||
|
||||
- **Improve move semantics in Expected**: [#4326](https://github.com/XRPLF/rippled/pull/4326)
|
||||
|
||||
|
||||
### GitHub
|
||||
|
||||
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
|
||||
|
||||
We welcome all contributions and invite everyone to join the community of XRP Ledger developers to help build the Internet of Value.
|
||||
|
||||
### Credits
|
||||
|
||||
The following people contributed directly to this release:
|
||||
|
||||
- Alexander Kremer <akremer@ripple.com>
|
||||
- Alloy Networks <45832257+alloynetworks@users.noreply.github.com>
|
||||
- CJ Cobb <46455409+cjcobb23@users.noreply.github.com>
|
||||
- Chenna Keshava B S <ckbs.keshava56@gmail.com>
|
||||
- Crypto Brad Garlinghouse <cryptobradgarlinghouse@protonmail.com>
|
||||
- Denis Angell <dangell@transia.co>
|
||||
- Ed Hennis <ed@ripple.com>
|
||||
- Elliot Lee <github.public@intelliot.com>
|
||||
- Gregory Popovitch <greg7mdp@gmail.com>
|
||||
- Howard Hinnant <howard.hinnant@gmail.com>
|
||||
- J. Scott Branson <18340247+crypticrabbit@users.noreply.github.com>
|
||||
- John Freeman <jfreeman08@gmail.com>
|
||||
- ledhed2222 <ledhed2222@users.noreply.github.com>
|
||||
- Levin Winter <33220502+levinwinter@users.noreply.github.com>
|
||||
- manojsdoshi <mdoshi@ripple.com>
|
||||
- Nik Bougalis <nikb@bougalis.net>
|
||||
- RichardAH <richard.holland@starstone.co.nz>
|
||||
- Scott Determan <scott.determan@yahoo.com>
|
||||
- Scott Schurr <scott@ripple.com>
|
||||
- Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
|
||||
|
||||
Security Bug Bounty Acknowledgements:
|
||||
- Aaron Hook
|
||||
- Levin Winter
|
||||
|
||||
Bug Bounties and Responsible Disclosures:
|
||||
We welcome reviews of the rippled code and urge researchers to
|
||||
responsibly disclose any issues they may find.
|
||||
|
||||
To report a bug, please send a detailed report to:
|
||||
|
||||
bugs@xrpl.org
|
||||
|
||||
|
||||
# Introducing XRP Ledger version 1.9.4
|
||||
|
||||
Version 1.9.4 of `rippled`, the reference implementation of the XRP Ledger protocol is now available. This release introduces an amendment that removes the ability for an NFT issuer to indicate that trust lines should be automatically created for royalty payments from secondary sales of NFTs, in response to a bug report that indicated how this functionality could be abused to mount a denial of service attack against the issuer.
|
||||
|
||||
## Action Required
|
||||
|
||||
This release introduces a new amendment to the XRP Ledger protocol, **`fixRemoveNFTokenAutoTrustLine`** to mitigate a potential denial-of-service attack against NFT issuers that minted NFTs and allowed secondary trading of those NFTs to create trust lines for any asset.
|
||||
|
||||
This amendment is open for voting according to the XRP Ledger's [amendment process](https://xrpl.org/amendments.html), which enables protocol changes following two weeks of >80% support from trusted validators.
|
||||
|
||||
If you operate an XRP Ledger server, then you should upgrade to version 1.9.4 within two weeks, to ensure service continuity. The exact time that protocol changes take effect depends on the voting decisions of the decentralized network.
|
||||
|
||||
For more information about NFTs on the XRP Ledger, see [NFT Conceptual Overview](https://xrpl.org/nft-conceptual-overview.html).
|
||||
|
||||
|
||||
## Install / Upgrade
|
||||
|
||||
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
|
||||
|
||||
## Changelog
|
||||
|
||||
## Contributions
|
||||
|
||||
The primary change in this release is the following bug fix:
|
||||
|
||||
- **Introduce fixRemoveNFTokenAutoTrustLine amendment**: Introduces the `fixRemoveNFTokenAutoTrustLine` amendment, which disables the `tfTrustLine` flag, which a malicious attacker could exploit to mount denial-of-service attacks against NFT issuers that specified the flag on their NFTs. ([#4301](https://github.com/XRPLF/rippled/4301))
|
||||
|
||||
|
||||
### GitHub
|
||||
|
||||
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
|
||||
|
||||
We welcome all contributions and invite everyone to join the community of XRP Ledger developers and help us build the Internet of Value.
|
||||
|
||||
### Credits
|
||||
|
||||
The following people contributed directly to this release:
|
||||
|
||||
- Scott Schurr <scott@ripple.com>
|
||||
- Howard Hinnant <howard@ripple.com>
|
||||
- Scott Determan <scott.determan@yahoo.com>
|
||||
- Ikko Ashimine <eltociear@gmail.com>
|
||||
|
||||
|
||||
# Introducing XRP Ledger version 1.9.3
|
||||
|
||||
Version 1.9.3 of `rippled`, the reference server implementation of the XRP Ledger protocol is now available. This release corrects minor technical flaws with the code that loads configured amendment votes after a startup and the copy constructor of `PublicKey`.
|
||||
|
||||
## Install / Upgrade
|
||||
|
||||
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
|
||||
|
||||
## Changelog
|
||||
|
||||
## Contributions
|
||||
|
||||
This release contains the following bug fixes:
|
||||
|
||||
- **Change by-value to by-reference to persist vote**: A minor technical flaw, caused by use of a copy instead of a reference, resulted in operator-configured "yes" votes to not be properly loaded after a restart. ([#4256](https://github.com/XRPLF/rippled/pull/4256))
|
||||
- **Properly handle self-assignment of PublicKey**: The `PublicKey` copy assignment operator mishandled the case where a `PublicKey` would be assigned to itself, and could result in undefined behavior.
|
||||
|
||||
### GitHub
|
||||
|
||||
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
|
||||
|
||||
We welcome contributions, big and small, and invite everyone to join the community of XRP Ledger developers and help us build the Internet of Value.
|
||||
|
||||
### Credits
|
||||
|
||||
The following people contributed directly to this release:
|
||||
|
||||
- Howard Hinnant <howard@ripple.com>
|
||||
- Crypto Brad Garlinghouse <cryptobradgarlinghouse@protonmail.com>
|
||||
- Wo Jake <87929946+wojake@users.noreply.github.com>
|
||||
|
||||
|
||||
# Introducing XRP Ledger version 1.9.2
|
||||
|
||||
Version 1.9.2 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available. This release includes several fixes and improvements, including a second new fix amendment to correct a bug in Non-Fungible Tokens (NFTs) code, a new API method for order book changes, less noisy logging, and other small fixes.
|
||||
|
||||
<!-- BREAK -->
|
||||
|
||||
|
||||
## Action Required
|
||||
|
||||
This release introduces a two new amendments to the XRP Ledger protocol. The first, **fixNFTokenNegOffer**, fixes a bug in code associated with the **NonFungibleTokensV1** amendment, originally introduced in [version 1.9.0](https://xrpl.org/blog/2022/rippled-1.9.0.html). The second, **NonFungibleTokensV1_1**, is a "roll-up" amendment that enables the **NonFungibleTokensV1** feature plus the two fix amendments associated with it, **fixNFTokenDirV1** and **fixNFTokenNegOffer**.
|
||||
|
||||
If you want to enable NFT code on the XRP Ledger Mainnet, you can vote in favor of only the **NonFungibleTokensV1_1** amendment to support enabling the feature and fixes together, without risk that the unfixed NFT code may become enabled first.
|
||||
|
||||
These amendments are now open for voting according to the XRP Ledger's [amendment process](https://xrpl.org/amendments.html), which enables protocol changes following two weeks of >80% support from trusted validators.
|
||||
|
||||
If you operate an XRP Ledger server, then you should upgrade to version 1.9.2 within two weeks, to ensure service continuity. The exact time that protocol changes take effect depends on the voting decisions of the decentralized network.
|
||||
|
||||
For more information about NFTs on the XRP Ledger, see [NFT Conceptual Overview](https://xrpl.org/nft-conceptual-overview.html).
|
||||
|
||||
## Install / Upgrade
|
||||
|
||||
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
|
||||
|
||||
## Changelog
|
||||
|
||||
This release contains the following features and improvements.
|
||||
|
||||
- **Introduce fixNFTokenNegOffer amendment.** This amendment fixes a bug in the Non-Fungible Tokens (NFTs) functionality provided by the NonFungibleTokensV1 amendment (not currently enabled on Mainnet). The bug allowed users to place offers to buy tokens for negative amounts of money when using Brokered Mode. Anyone who accepted such an offer would transfer the token _and_ pay money. This amendment explicitly disallows offers to buy or sell NFTs for negative amounts of money, and returns an appropriate error code. This also corrects the error code returned when placing offers to buy or sell NFTs for negative amounts in Direct Mode. ([8266d9d](https://github.com/XRPLF/rippled/commit/8266d9d598d19f05e1155956b30ca443c27e119e))
|
||||
- **Introduce `NonFungibleTokensV1_1` amendment.** This amendment encompasses three NFT-related amendments: the original NonFungibleTokensV1 amendment (from version 1.9.0), the fixNFTokenDirV1 amendment (from version 1.9.1), and the new fixNFTokenNegOffer amendment from this release. This amendment contains no changes other than enabling those three amendments together; this allows validators to vote in favor of _only_ enabling the feature and fixes at the same time. ([59326bb](https://github.com/XRPLF/rippled/commit/59326bbbc552287e44b3a0d7b8afbb1ddddb3e3b))
|
||||
- **Handle invalid port numbers.** If the user specifies a URL with an invalid port number, the server would silently attempt to use port 0 instead. Now it raises an error instead. This affects admin API methods and config file parameters for downloading history shards and specifying validator list sites. ([#4213](https://github.com/XRPLF/rippled/pull/4213))
|
||||
- **Reduce log noisiness.** Decreased the severity of benign log messages in several places: "addPathsForType" messages during regular operation, expected errors during unit tests, and missing optional documentation components when compiling from source. ([#4178](https://github.com/XRPLF/rippled/pull/4178), [#4166](https://github.com/XRPLF/rippled/pull/4166), [#4180](https://github.com/XRPLF/rippled/pull/4180))
|
||||
- **Fix race condition in history shard implementation and support clang's ThreadSafetyAnalysis tool.** Added build settings so that developers can use this feature of the clang compiler to analyze the code for correctness, and fix an error found by this tool, which was the source of rare crashes in unit tests. ([#4188](https://github.com/XRPLF/rippled/pull/4188))
|
||||
- **Prevent crash when rotating a database with missing data.** When rotating databases, a missing entry could cause the server to crash. While there should never be a missing database entry, this change keeps the server running by aborting database rotation. ([#4182](https://github.com/XRPLF/rippled/pull/4182))
|
||||
- **Fix bitwise comparison in OfferCreate.** Fixed an expression that incorrectly used a bitwise comparison for two boolean values rather than a true boolean comparison. The outcome of the two comparisons is equivalent, so this is not a transaction processing change, but the bitwise comparison relied on compilers to implicitly fix the expression. ([#4183](https://github.com/XRPLF/rippled/pull/4183))
|
||||
- **Disable cluster timer when not in a cluster.** Disabled a timer that was unused on servers not running in clustered mode. The functionality of clustered servers is unchanged. ([#4173](https://github.com/XRPLF/rippled/pull/4173))
|
||||
- **Limit how often to process peer discovery messages.** In the peer-to-peer network, servers periodically share IP addresses of their peers with each other to facilitate peer discovery. It is not necessary to process these types of messages too often; previously, the code tracked whether it needed to process new messages of this type but always processed them anyway. With this change, the server no longer processes peer discovery messages if it has done so recently. ([#4202](https://github.com/XRPLF/rippled/pull/4202))
|
||||
- **Improve STVector256 deserialization.** Optimized the processing of this data type in protocol messages. This data type is used in several types of ledger entry that are important for bookkeeping, including directory pages that track other ledger types, amendments tracking, and the ledger hashes history. ([#4204](https://github.com/XRPLF/rippled/pull/4204))
|
||||
- **Fix and refactor spinlock code.** The spinlock code, which protects the `SHAMapInnerNode` child lists, had a mistake that allowed the same child to be repeatedly locked under some circumstances. Fixed this bug and improved the spinlock code to make it easier to use correctly and easier to verify that the code works correctly. ([#4201](https://github.com/XRPLF/rippled/pull/4201))
|
||||
- **Improve comments and contributor documentation.** Various minor documentation changes including some to reflect the fact that the source code repository is now owned by the XRP Ledger Foundation. ([#4214](https://github.com/XRPLF/rippled/pull/4214), [#4179](https://github.com/XRPLF/rippled/pull/4179), [#4222](https://github.com/XRPLF/rippled/pull/4222))
|
||||
- **Introduces a new API book_changes to provide information in a format that is useful for building charts that highlight DEX activity at a per-ledger level.** ([#4212](https://github.com/XRPLF/rippled/pull/4212))
|
||||
|
||||
## Contributions
|
||||
|
||||
### GitHub
|
||||
|
||||
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
|
||||
|
||||
We welcome contributions, big and small, and invite everyone to join the community of XRP Ledger developers and help us build the Internet of Value.
|
||||
|
||||
### Credits
|
||||
|
||||
The following people contributed directly to this release:
|
||||
|
||||
- Chenna Keshava B S <ckbs.keshava56@gmail.com>
|
||||
- Ed Hennis <ed@ripple.com>
|
||||
- Ikko Ashimine <eltociear@gmail.com>
|
||||
- Nik Bougalis <nikb@bougalis.net>
|
||||
- Richard Holland <richard.holland@starstone.co.nz>
|
||||
- Scott Schurr <scott@ripple.com>
|
||||
- Scott Determan <scott.determan@yahoo.com>
|
||||
|
||||
For a real-time view of all lifetime contributors, including links to the commits made by each, please visit the "Contributors" section of the GitHub repository: <https://github.com/XRPLF/rippled/graphs/contributors>.
|
||||
|
||||
# Introducing XRP Ledger version 1.9.1
|
||||
|
||||
Version 1.9.1 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available. This release includes several important fixes, including a fix for a syncing issue from 1.9.0, a new fix amendment to correct a bug in the new Non-Fungible Tokens (NFTs) code, and a new amendment to allow multi-signing by up to 32 signers.
|
||||
|
||||
<!-- BREAK -->
|
||||
|
||||
|
||||
## Action Required
|
||||
|
||||
This release introduces two new amendments to the XRP Ledger protocol. These amendments are now open for voting according to the XRP Ledger's [amendment process](https://xrpl.org/amendments.html), which enables protocol changes following two weeks of >80% support from trusted validators.
|
||||
|
||||
If you operate an XRP Ledger server, then you should upgrade to version 1.9.1 within two weeks, to ensure service continuity. The exact time that protocol changes take effect depends on the voting decisions of the decentralized network.
|
||||
|
||||
The **fixNFTokenDirV1** amendment fixes a bug in code associated with the **NonFungibleTokensV1** amendment, so the fixNFTokenDirV1 amendment should be enabled first. All validator operators are encouraged to [configure amendment voting](https://xrpl.org/configure-amendment-voting.html) to oppose the NonFungibleTokensV1 amendment until _after_ the fixNFTokenDirV1 amendment has become enabled. For more information about NFTs on the XRP Ledger, see [NFT Conceptual Overview](https://xrpl.org/nft-conceptual-overview.html).
|
||||
|
||||
The **ExpandedSignerList** amendment extends the ledger's built-in multi-signing functionality so that each list can contain up to 32 entries instead of the current limit of 8. Additionally, this amendment allows each signer to have an arbitrary 256-bit data field associated with it. This data can be used to identify the signer or provide other metadata that is useful for organizations, smart contracts, or other purposes.
|
||||
|
||||
## Install / Upgrade
|
||||
|
||||
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
|
||||
|
||||
## Changelog
|
||||
|
||||
This release contains the following features and improvements.
|
||||
|
||||
## New Features and Amendments
|
||||
|
||||
- **Introduce fixNFTokenDirV1 Amendment** - This amendment fixes an off-by-one error that occurred in some corner cases when determining which `NFTokenPage` an `NFToken` object belongs on. It also adjusts the constraints of `NFTokenPage` invariant checks, so that certain error cases fail with a suitable error code such as `tecNO_SUITABLE_TOKEN_PAGE` instead of failing with a `tecINVARIANT_FAILED` error code. ([#4155](https://github.com/ripple/rippled/pull/4155))
|
||||
|
||||
- **Introduce ExpandedSignerList Amendment** - This amendment expands the maximum signer list size to 32 entries and allows each signer to have an optional 256-bit `WalletLocator` field containing arbitrary data. ([#4097](https://github.com/ripple/rippled/pull/4097))
|
||||
|
||||
- **Pause online deletion rather than canceling it if the server fails health check** - The server stops performing online deletion of old ledger history if the server fails its internal health check during this time. Online deletion can now resume after the server recovers, rather than having to start over. ([#4139](https://github.com/ripple/rippled/pull/4139))
|
||||
|
||||
|
||||
## Bug Fixes and Performance Improvements
|
||||
|
||||
- **Fix performance issues introduced in 1.9.0** - Readjusts some parameters of the ledger acquisition engine to revert some changes introduced in 1.9.0 that had adverse effects on some systems, including causing some systems to fail to sync to the network. ([#4152](https://github.com/ripple/rippled/pull/4152))
|
||||
|
||||
- **Improve Memory Efficiency of Path Finding** - Finding paths for cross-currency payments is a resource-intensive operation. While that remains true, this fix improves memory usage of pathfinding by discarding trust line results that cannot be used before those results are fully loaded or cached. ([#4111](https://github.com/ripple/rippled/pull/4111))
|
||||
|
||||
- **Fix incorrect CMake behavior on Windows when platform is unspecified or x64** - Fixes handling of platform selection when using the cmake-gui tool to build on Windows. The generator expects `Win64` but the GUI only provides `x64` as an option, which raises an error. This fix only raises an error if the platform is `Win32` instead, allowing the generation of solution files to succeed. ([#4150](https://github.com/ripple/rippled/pull/4150))
|
||||
|
||||
- **Fix test failures with newer MSVC compilers on Windows** - Fixes some cases where the API handler code used string pointer comparisons, which may not work correctly with some versions of the MSVC compiler. ([#4149](https://github.com/ripple/rippled/pull/4149))
|
||||
|
||||
- **Update minimum Boost version to 1.71.0** - This release is compatible with Boost library versions 1.71.0 through 1.77.0. The build configuration and documentation have been updated to reflect this. ([#4134](https://github.com/ripple/rippled/pull/4134))
|
||||
|
||||
- **Fix unit test failures for DatabaseDownloader** - Increases a timeout in the `DatabaseDownloader` code and adjusts unit tests so that the code does not return spurious failures, and more data is logged if it does fail. ([#4021](https://github.com/ripple/rippled/pull/4021))
|
||||
|
||||
- **Refactor relational database interface** - Improves code comments, naming, and organization of the module that interfaces with relational databases (such as the SQLite database used for tracking transaction history). ([#3965](https://github.com/ripple/rippled/pull/3965))
|
||||
|
||||
|
||||
## Contributions
|
||||
|
||||
### GitHub
|
||||
|
||||
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/ripple/rippled>.
|
||||
|
||||
We welcome contributions, big and small, and invite everyone to join the community of XRP Ledger developers and help us build the Internet of Value.
|
||||
|
||||
|
||||
### Credits
|
||||
|
||||
The following people contributed directly to this release:
|
||||
|
||||
- Devon White <dwhite@ripple.com>
|
||||
- Ed Hennis <ed@ripple.com>
|
||||
- Gregory Popovitch <greg7mdp@gmail.com>
|
||||
- Mark Travis <mtravis@ripple.com>
|
||||
- Manoj Doshi <mdoshi@ripple.com>
|
||||
- Nik Bougalis <nikb@bougalis.net>
|
||||
- Richard Holland <richard.holland@starstone.co.nz>
|
||||
- Scott Schurr <scott@ripple.com>
|
||||
|
||||
For a real-time view of all lifetime contributors, including links to the commits made by each, please visit the "Contributors" section of the GitHub repository: <https://github.com/ripple/rippled/graphs/contributors>.
|
||||
|
||||
We welcome external contributions and are excited to see the broader XRP Ledger community continue to grow and thrive.
|
||||
|
||||
|
||||
# Change log
|
||||
|
||||
@@ -13,6 +681,68 @@ Have new ideas? Need help with setting up your node? Come visit us [here](https:
|
||||
|
||||
# Releases
|
||||
|
||||
## Version 1.9.0
|
||||
This is the 1.9.0 release of `rippled`, the reference implementation of the XRP Ledger protocol. This release brings several features and improvements.
|
||||
|
||||
### New and Improved Features
|
||||
- **Introduce NFT support (XLS020):** This release introduces support for non-fungible tokens, currently available to the developer community for broader review and testing. Developers can create applications that allow users to mint, transfer, and ultimately burn (if desired) NFTs on the XRP Ledger. You can try out the new NFT transactions using the [nft-devnet](https://xrpl.org/xrp-testnet-faucet.html). Note that some fields and error codes from earlier releases of the supporting code have been refactored for this release, shown in the Code Refactoring section, below. [70779f](https://github.com/ripple/rippled/commit/70779f6850b5f33cdbb9cf4129bc1c259af0013e)
|
||||
|
||||
- **Simplify the Job Queue:** This is a refactor aimed at cleaning up and simplifying the existing job queue. Currently, all jobs are canceled at the same time and in the same way, so this commit removes the unnecessary per-job cancellation token. [#3656](https://github.com/ripple/rippled/pull/3656)
|
||||
|
||||
- **Optimize trust line caching:** The existing trust line caching code was suboptimal in that it stored redundant information, pinned SLEs into memory, and required multiple memory allocations per cached object. This commit eliminates redundant data, reduces the size of cached objects and unpinning SLEs from memory, and uses value types to avoid the need for `std::shared_ptr`. As a result of these changes, the effective size of a cached object includes the overhead of the memory allocator, and the `std::shared_ptr` should be reduced by at least 64 bytes. This is significant, as there can easily be tens of millions of these objects. [4d5459](https://github.com/ripple/rippled/commit/4d5459d041da8f5a349c5f458d664e5865e1f1b5)
|
||||
|
||||
- **Incremental improvements to pathfinding memory usage:** This commit aborts background pathfinding when closed or disconnected, exits the pathfinding job thread if there are no requests left, does not create the path find a job if there are no requests, and refactors to remove the circular dependency between InfoSub and PathRequest. [#4111](https://github.com/ripple/rippled/pull/4111)
|
||||
|
||||
- **Improve deterministic transaction sorting in TxQ:** This commit ensures that transactions with the same fee level are sorted by TxID XORed with the parent ledger hash, the TxQ is re-sorted after every ledger, and attempts to future-proof the TxQ tie-breaking test. [#4077](https://github.com/ripple/rippled/pull/4077)
|
||||
|
||||
- **Improve stop signaling for Application:** [34ca45](https://github.com/ripple/rippled/commit/34ca45713244d0defc39549dd43821784b2a5c1d)
|
||||
|
||||
- **Eliminate SHAMapInnerNode lock contention:** The `SHAMapInnerNode` class had a global mutex to protect the array of node children. Profiling suggested that around 4% of all attempts to lock the global would block. This commit removes that global mutex, and replaces it with a new per-node 16-way spinlock (implemented so as not to affect the size of an inner node object), effectively eliminating the lock contention. [1b9387](https://github.com/ripple/rippled/commit/1b9387eddc1f52165d3243d2ace9be0c62495eea)
|
||||
|
||||
- **Improve ledger-fetching logic:** When fetching ledgers, the existing code would isolate the peer that sent the most useful responses, and issue follow-up queries only to that peer. This commit increases the query aggressiveness, and changes the mechanism used to select which peers to issue follow-up queries to so as to more evenly spread the load among those peers that provided useful responses. [48803a](https://github.com/ripple/rippled/commit/48803a48afc3bede55d71618c2ee38fd9dbfd3b0)
|
||||
|
||||
- **Simplify and improve order book tracking:** The order book tracking code would use `std::shared_ptr` to track the lifetime of objects. This commit changes the logic to eliminate the overhead of `std::shared_ptr` by using value types, resulting in significant memory savings. [b9903b](https://github.com/ripple/rippled/commit/b9903bbcc483a384decf8d2665f559d123baaba2)
|
||||
|
||||
- **Negative cache support for node store:** This commit allows the cache to service requests for nodes that were previously looked up but not found, reducing the need to perform I/O in several common scenarios. [3eb8aa](https://github.com/ripple/rippled/commit/3eb8aa8b80bd818f04c99cee2cfc243192709667)
|
||||
|
||||
- **Improve asynchronous database handlers:** This commit optimizes the way asynchronous node store operations are processed, both by reducing the number of times locks are held and by minimizing the number of memory allocations and data copying. [6faaa9](https://github.com/ripple/rippled/commit/6faaa91850d6b2eb9fbf16c1256bf7ef11ac4646)
|
||||
|
||||
- **Cleanup AcceptedLedger and AcceptedLedgerTx:** This commit modernizes the `AcceptedLedger` and `AcceptedLedgerTx` classes, reduces their memory footprint, and reduces unnecessary dynamic memory allocations. [8f5868](https://github.com/ripple/rippled/commit/8f586870917818133924bf2e11acab5321c2b588)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
This release includes name changes in the NFToken API for SFields, RPC return labels, and error codes for clarity and consistency. To refactor your code, migrate the names of these items to the new names as listed below.
|
||||
|
||||
#### `SField` name changes:
|
||||
* `TokenTaxon -> NFTokenTaxon`
|
||||
* `MintedTokens -> MintedNFTokens`
|
||||
* `BurnedTokens -> BurnedNFTokens`
|
||||
* `TokenID -> NFTokenID`
|
||||
* `TokenOffers -> NFTokenOffers`
|
||||
* `BrokerFee -> NFTokenBrokerFee`
|
||||
* `Minter -> NFTokenMinter`
|
||||
* `NonFungibleToken -> NFToken`
|
||||
* `NonFungibleTokens -> NFTokens`
|
||||
* `BuyOffer -> NFTokenBuyOffer`
|
||||
* `SellOffer -> NFTokenSellOffer`
|
||||
* `OfferNode -> NFTokenOfferNode`
|
||||
|
||||
#### RPC return labels
|
||||
* `tokenid -> nft_id`
|
||||
* `index -> nft_offer_index`
|
||||
|
||||
#### Error codes
|
||||
* `temBAD_TRANSFER_FEE -> temBAD_NFTOKEN_TRANSFER_FEE`
|
||||
* `tefTOKEN_IS_NOT_TRANSFERABLE -> tefNFTOKEN_IS_NOT_TRANSFERABLE`
|
||||
* `tecNO_SUITABLE_PAGE -> tecNO_SUITABLE_NFTOKEN_PAGE`
|
||||
* `tecBUY_SELL_MISMATCH -> tecNFTOKEN_BUY_SELL_MISMATCH`
|
||||
* `tecOFFER_TYPE_MISMATCH -> tecNFTOKEN_OFFER_TYPE_MISMATCH`
|
||||
* `tecCANT_ACCEPT_OWN_OFFER -> tecCANT_ACCEPT_OWN_NFTOKEN_OFFER`
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
- **Fix deletion of orphan node store directories:** Orphaned node store directories should only be deleted if the proper node store directories are confirmed to exist. [06e87e](https://github.com/ripple/rippled/commit/06e87e0f6add5b880d647e14ab3d950decfcf416)
|
||||
|
||||
## Version 1.8.5
|
||||
This is the 1.8.5 release of `rippled`, the reference implementation of the XRP Ledger protocol. This release includes fixes and updates for stability and security, and improvements to build scripts. There are no user-facing API or protocol changes in this release.
|
||||
|
||||
|
||||
10
SECURITY.md
10
SECURITY.md
@@ -60,15 +60,15 @@ While we commit to responding with 24 hours of your initial report with our tria
|
||||
|
||||
## Bug Bounty Program
|
||||
|
||||
[Ripple](https://ripple.com) is generously sponsoring a bug bounty program for vulnerabilities in [`rippled`](https://github.com/ripple/rippled) (and other related projects, like [`ripple-lib`](https://github.com/ripple/ripple-lib)).
|
||||
[Ripple](https://ripple.com) is generously sponsoring a bug bounty program for vulnerabilities in [`rippled`](https://github.com/XRPLF/rippled) (and other related projects, like [`xrpl.js`](https://github.com/XRPLF/xrpl.js), [`xrpl-py`](https://github.com/XRPLF/xrpl-py), [`xrpl4j`](https://github.com/XRPLF/xrpl4j)).
|
||||
|
||||
This program allows us to recognize and reward individuals or groups that identify and report bugs. In summary, order to qualify for a bounty, the bug must be:
|
||||
This program allows us to recognize and reward individuals or groups that identify and report bugs. In summary, in order to qualify for a bounty, the bug must be:
|
||||
|
||||
1. **In scope**. Only bugs in software under the scope of the program qualify. Currently, that means `rippled` and `ripple-lib`.
|
||||
2. **Relevant**. A security issue, posing a danger to user funds, privacy or the operation of the XRP Ledger.
|
||||
1. **In scope**. Only bugs in software under the scope of the program qualify. Currently, that means `rippled`, `xrpl.js`, `xrpl-py`, `xrpl4j`.
|
||||
2. **Relevant**. A security issue, posing a danger to user funds, privacy, or the operation of the XRP Ledger.
|
||||
3. **Original and previously unknown**. Bugs that are already known and discussed in public do not qualify. Previously reported bugs, even if publicly unknown, are not eligible.
|
||||
4. **Specific**. We welcome general security advice or recommendations, but we cannot pay bounties for that.
|
||||
5. **Fixable**. There has to be something we can do to permanently fix the problem. Note that bugs in other people’s software may still qualify in some cases. For example, if you find a bug in a library that we use which can compromises the security of software that is in scope and we can get it fixed, you may qualify for a bounty.
|
||||
5. **Fixable**. There has to be something we can do to permanently fix the problem. Note that bugs in other people’s software may still qualify in some cases. For example, if you find a bug in a library that we use which can compromise the security of software that is in scope and we can get it fixed, you may qualify for a bounty.
|
||||
6. **Unused**. If you use the exploit to attack the XRP Ledger, you do not qualify for a bounty. If you report a vulnerability used in an ongoing or past attack and there is specific, concrete evidence that suggests you are the attacker we reserve the right not to pay a bounty.
|
||||
|
||||
The amount paid varies dramatically. Vulnerabilities that are harmless on their own, but could form part of a critical exploit will usually receive a bounty. Full-blown exploits can receive much higher bounties. Please don’t hold back partial vulnerabilities while trying to construct a full-blown exploit. We will pay a bounty to anyone who reports a complete chain of vulnerabilities even if they have reported each component of the exploit separately and those vulnerabilities have been fixed in the meantime. However, to qualify for a the full bounty, you must to have been the first to report each of the partial exploits.
|
||||
|
||||
@@ -283,12 +283,14 @@
|
||||
# ssl_cert
|
||||
#
|
||||
# Specifies the path to the SSL certificate file in PEM format.
|
||||
# This is not needed if the chain includes it.
|
||||
# This is not needed if the chain includes it. Use ssl_chain if
|
||||
# your certificate includes one or more intermediates.
|
||||
#
|
||||
# ssl_chain
|
||||
#
|
||||
# If you need a certificate chain, specify the path to the
|
||||
# certificate chain here. The chain may include the end certificate.
|
||||
# This must be used if the certificate includes intermediates.
|
||||
#
|
||||
# ssl_ciphers = <cipherlist>
|
||||
#
|
||||
@@ -478,7 +480,7 @@
|
||||
#
|
||||
# Configure the maximum number of transactions to have in the job queue
|
||||
#
|
||||
# Must be a number between 100 and 1000, defaults to 250
|
||||
# Must be a number between 1000 and 100000, defaults to 10000
|
||||
#
|
||||
#
|
||||
# [overlay]
|
||||
@@ -758,7 +760,9 @@
|
||||
# When searching for paths, the default search aggressiveness. This can take
|
||||
# exponentially more resources as the size is increased.
|
||||
#
|
||||
# The default is: 7
|
||||
# The recommended value to support advanced pathfinding is: 7
|
||||
#
|
||||
# The default is: 2
|
||||
#
|
||||
# [path_search_fast]
|
||||
# [path_search_max]
|
||||
@@ -767,12 +771,19 @@
|
||||
# If you do not need pathfinding, you can set path_search_max to zero to
|
||||
# disable it and avoid some expensive bookkeeping.
|
||||
#
|
||||
# The default for 'path_search_fast' is 2. The default for 'path_search_max' is 10.
|
||||
# To support advanced pathfinding the recommended value for
|
||||
# 'path_search_fast' is 2, and for 'path_search_max' is 10.
|
||||
#
|
||||
# The default for 'path_search_fast' is 2. The default for 'path_search_max' is 3.
|
||||
#
|
||||
# [path_search_old]
|
||||
#
|
||||
# For clients that use the legacy path finding interfaces, the search
|
||||
# aggressiveness to use. The default is 7.
|
||||
# aggressiveness to use.
|
||||
#
|
||||
# The recommended value to support advanced pathfinding is: 7.
|
||||
#
|
||||
# The default is: 2
|
||||
#
|
||||
#
|
||||
#
|
||||
@@ -1140,17 +1151,10 @@
|
||||
# The online delete process checks periodically
|
||||
# that rippled is still in sync with the network,
|
||||
# and that the validated ledger is less than
|
||||
# 'age_threshold_seconds' old. By default, if it
|
||||
# is not the online delete process aborts and
|
||||
# tries again later. If 'recovery_wait_seconds'
|
||||
# is set and rippled is out of sync, but likely to
|
||||
# recover quickly, then online delete will wait
|
||||
# this number of seconds for rippled to get back
|
||||
# into sync before it aborts.
|
||||
# Set this value if the node is otherwise staying
|
||||
# in sync, or recovering quickly, but the online
|
||||
# delete process is unable to finish.
|
||||
# Default is unset.
|
||||
# 'age_threshold_seconds' old. If not, then continue
|
||||
# sleeping for this number of seconds and
|
||||
# checking until healthy.
|
||||
# Default is 5.
|
||||
#
|
||||
# Optional keys for Cassandra:
|
||||
#
|
||||
@@ -1439,7 +1443,7 @@
|
||||
# default. Don't change this without understanding the consequences.
|
||||
#
|
||||
# Example:
|
||||
# account_reserve = 20000000 # 20 XRP
|
||||
# account_reserve = 10000000 # 10 XRP
|
||||
#
|
||||
# owner_reserve = <drops>
|
||||
#
|
||||
@@ -1451,7 +1455,7 @@
|
||||
# default. Don't change this without understanding the consequences.
|
||||
#
|
||||
# Example:
|
||||
# owner_reserve = 5000000 # 5 XRP
|
||||
# owner_reserve = 2000000 # 2 XRP
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
@@ -1636,10 +1640,10 @@ ip = 127.0.0.1
|
||||
admin = 127.0.0.1
|
||||
protocol = ws
|
||||
|
||||
#[port_grpc]
|
||||
#port = 50051
|
||||
#ip = 0.0.0.0
|
||||
#secure_gateway = 127.0.0.1
|
||||
[port_grpc]
|
||||
port = 50051
|
||||
ip = 127.0.0.1
|
||||
secure_gateway = 127.0.0.1
|
||||
|
||||
#[port_ws_public]
|
||||
#port = 6005
|
||||
|
||||
1703
cfg/rippled-reporting.cfg
Normal file
1703
cfg/rippled-reporting.cfg
Normal file
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,6 @@
|
||||
#
|
||||
# Examples:
|
||||
# https://vl.ripple.com
|
||||
# https://vl.coil.com
|
||||
# https://vl.xrplf.org
|
||||
# http://127.0.0.1:8000
|
||||
# file:///etc/opt/ripple/vl.txt
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user