mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove packaging scripts
This commit is contained in:
@@ -1,180 +0,0 @@
|
|||||||
#[===================================================================[
|
|
||||||
package/container targets - (optional)
|
|
||||||
#]===================================================================]
|
|
||||||
|
|
||||||
if (is_root_project)
|
|
||||||
if (NOT DOCKER)
|
|
||||||
find_program (DOCKER docker)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (DOCKER)
|
|
||||||
# if no container label is provided, use current git hash
|
|
||||||
git_hash (commit_hash)
|
|
||||||
if (NOT container_label)
|
|
||||||
set (container_label ${commit_hash})
|
|
||||||
endif ()
|
|
||||||
message (STATUS "using [${container_label}] as build container tag...")
|
|
||||||
|
|
||||||
file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/packages)
|
|
||||||
|
|
||||||
#[===================================================================[
|
|
||||||
rpm
|
|
||||||
#]===================================================================]
|
|
||||||
add_custom_target (rpm_container
|
|
||||||
docker build
|
|
||||||
--pull
|
|
||||||
--build-arg GIT_COMMIT=${commit_hash}
|
|
||||||
-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
|
|
||||||
VERBATIM
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
SOURCES
|
|
||||||
Builds/containers/centos-builder/Dockerfile
|
|
||||||
Builds/containers/centos-builder/centos_setup.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
|
|
||||||
-v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
|
|
||||||
-v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
|
|
||||||
-t rippled-rpm-builder:${container_label}
|
|
||||||
/bin/bash -c "cp -fpu rippled/Builds/containers/packaging/rpm/build_rpm.sh . && ./build_rpm.sh"
|
|
||||||
VERBATIM
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
SOURCES
|
|
||||||
Builds/containers/packaging/rpm/rippled.spec
|
|
||||||
)
|
|
||||||
exclude_from_default (rpm)
|
|
||||||
if (NOT have_package_container)
|
|
||||||
add_dependencies(rpm rpm_container)
|
|
||||||
endif ()
|
|
||||||
#[===================================================================[
|
|
||||||
dpkg
|
|
||||||
#]===================================================================]
|
|
||||||
# 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=18.04
|
|
||||||
--build-arg GIT_COMMIT=${commit_hash}
|
|
||||||
-t rippled-dpkg-builder:${container_label}
|
|
||||||
$<$<BOOL:${dpkg_cache_from}>:--cache-from=${dpkg_cache_from}>
|
|
||||||
-f ubuntu-builder/Dockerfile .
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Builds/containers
|
|
||||||
VERBATIM
|
|
||||||
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
|
|
||||||
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
|
|
||||||
-v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
|
|
||||||
-v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
|
|
||||||
-t rippled-dpkg-builder:${container_label}
|
|
||||||
/bin/bash -c "cp -fpu rippled/Builds/containers/packaging/dpkg/build_dpkg.sh . && ./build_dpkg.sh"
|
|
||||||
VERBATIM
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
SOURCES
|
|
||||||
Builds/containers/packaging/dpkg/debian/control
|
|
||||||
)
|
|
||||||
exclude_from_default (dpkg)
|
|
||||||
if (NOT have_package_container)
|
|
||||||
add_dependencies(dpkg dpkg_container)
|
|
||||||
endif ()
|
|
||||||
#[===================================================================[
|
|
||||||
ci container
|
|
||||||
#]===================================================================]
|
|
||||||
# now use the same ubuntu image for our travis-ci docker images,
|
|
||||||
# but we use a newer distro (18.04 vs 16.04).
|
|
||||||
#
|
|
||||||
# the following steps assume the github pkg repo, but it's possible to
|
|
||||||
# adapt these for other docker hub repositories.
|
|
||||||
#
|
|
||||||
# steps for publishing a new CI image when you make changes:
|
|
||||||
#
|
|
||||||
# mkdir bld.ci && cd bld.ci && cmake -Dpackages_only=ON -Dcontainer_label=CI_LATEST
|
|
||||||
# cmake --build . --target ci_container --verbose
|
|
||||||
# docker tag rippled-ci-builder:CI_LATEST <HUB REPO PATH>/rippled-ci-builder:YYYY-MM-DD
|
|
||||||
# (NOTE: change YYYY-MM-DD to match current date, or use a different
|
|
||||||
# tag/version scheme if you prefer)
|
|
||||||
# docker push <HUB REPO PATH>/rippled-ci-builder:YYYY-MM-DD
|
|
||||||
# (NOTE: <HUB REPO PATH> is probably your user or org name if using
|
|
||||||
# docker hub, or it might be something like
|
|
||||||
# docker.pkg.github.com/ripple/rippled if using the github pkg
|
|
||||||
# registry. for any registry, you will need to be logged-in via
|
|
||||||
# docker and have push access.)
|
|
||||||
#
|
|
||||||
# ...then change the DOCKER_IMAGE line in .travis.yml :
|
|
||||||
# - DOCKER_IMAGE="<HUB REPO PATH>/rippled-ci-builder:YYYY-MM-DD"
|
|
||||||
add_custom_target (ci_container
|
|
||||||
docker build
|
|
||||||
--pull
|
|
||||||
--build-arg DIST_TAG=18.04
|
|
||||||
--build-arg GIT_COMMIT=${commit_hash}
|
|
||||||
--build-arg CI_USE=true
|
|
||||||
-t rippled-ci-builder:${container_label}
|
|
||||||
$<$<BOOL:${ci_cache_from}>:--cache-from=${ci_cache_from}>
|
|
||||||
-f ubuntu-builder/Dockerfile .
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Builds/containers
|
|
||||||
VERBATIM
|
|
||||||
USES_TERMINAL
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
SOURCES
|
|
||||||
Builds/containers/ubuntu-builder/Dockerfile
|
|
||||||
Builds/containers/ubuntu-builder/ubuntu_setup.sh
|
|
||||||
)
|
|
||||||
exclude_from_default (ci_container)
|
|
||||||
else ()
|
|
||||||
message (STATUS "docker NOT found -- won't be able to build containers for packaging")
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
# rippled Packaging and Containers
|
|
||||||
|
|
||||||
This folder contains docker container definitions and configuration
|
|
||||||
files to support building rpm and deb packages of rippled. The container
|
|
||||||
definitions include some additional software/packages that are used
|
|
||||||
for general build/test CI workflows of rippled but are not explicitly
|
|
||||||
needed for the package building workflow.
|
|
||||||
|
|
||||||
## CMake Targets
|
|
||||||
|
|
||||||
If you have docker installed on your local system, then the main
|
|
||||||
CMake file will enable several targets related to building packages:
|
|
||||||
`rpm_container`, `rpm`, `dpkg_container`, and `dpkg`. The package targets
|
|
||||||
depend on the container targets and will trigger a build of those first.
|
|
||||||
The container builds can take several dozen minutes to complete (depending
|
|
||||||
on hardware specs), so quick build cycles are not possible currently. As
|
|
||||||
such, these targets are often best suited to CI/automated build systems.
|
|
||||||
|
|
||||||
The package build can be invoked like any other cmake target from the
|
|
||||||
rippled root folder:
|
|
||||||
```
|
|
||||||
mkdir -p build/pkg && cd build/pkg
|
|
||||||
cmake -Dpackages_only=ON ../..
|
|
||||||
cmake --build . --target rpm
|
|
||||||
```
|
|
||||||
Upon successful completion, the generated package files will be in
|
|
||||||
the `build/pkg/packages` directory. For deb packages, simply replace
|
|
||||||
`rpm` with `dpkg` in the build command above.
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
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/install_cmake.sh /tmp/
|
|
||||||
RUN chmod +x /tmp/centos_setup.sh && \
|
|
||||||
chmod +x /tmp/install_cmake.sh
|
|
||||||
RUN /tmp/centos_setup.sh
|
|
||||||
|
|
||||||
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"
|
|
||||||
# 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 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
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
source /etc/os-release
|
|
||||||
|
|
||||||
yum -y upgrade
|
|
||||||
yum -y update
|
|
||||||
yum -y install epel-release centos-release-scl
|
|
||||||
yum -y install \
|
|
||||||
wget curl time gcc-c++ yum-utils autoconf automake pkgconfig libtool \
|
|
||||||
libstdc++-static rpm-build gnupg which make cmake \
|
|
||||||
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 \
|
|
||||||
rh-python38 \
|
|
||||||
ninja-build git svn \
|
|
||||||
swig perl-Digest-MD5
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -ex
|
|
||||||
pkgtype=$1
|
|
||||||
if [ "${pkgtype}" = "rpm" ] ; then
|
|
||||||
container_name="${RPM_CONTAINER_NAME}"
|
|
||||||
elif [ "${pkgtype}" = "dpkg" ] ; then
|
|
||||||
container_name="${DPKG_CONTAINER_NAME}"
|
|
||||||
else
|
|
||||||
echo "invalid package type"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if docker pull "${ARTIFACTORY_HUB}/${container_name}:latest_${CI_COMMIT_REF_SLUG}"; then
|
|
||||||
echo "found container for latest - using as cache."
|
|
||||||
docker tag \
|
|
||||||
"${ARTIFACTORY_HUB}/${container_name}:latest_${CI_COMMIT_REF_SLUG}" \
|
|
||||||
"${container_name}:latest_${CI_COMMIT_REF_SLUG}"
|
|
||||||
CMAKE_EXTRA="-D${pkgtype}_cache_from=${container_name}:latest_${CI_COMMIT_REF_SLUG}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake --version
|
|
||||||
test -d build && rm -rf build
|
|
||||||
mkdir -p build/container && cd build/container
|
|
||||||
eval time \
|
|
||||||
cmake -Dpackages_only=ON -DCMAKE_VERBOSE_MAKEFILE=ON ${CMAKE_EXTRA} \
|
|
||||||
-G Ninja ../..
|
|
||||||
time cmake --build . --target "${pkgtype}_container" -- -v
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -ex
|
|
||||||
pkgtype=$1
|
|
||||||
if [ "${pkgtype}" = "rpm" ] ; then
|
|
||||||
container_name="${RPM_CONTAINER_FULLNAME}"
|
|
||||||
container_tag="${RPM_CONTAINER_TAG}"
|
|
||||||
elif [ "${pkgtype}" = "dpkg" ] ; then
|
|
||||||
container_name="${DPKG_CONTAINER_FULLNAME}"
|
|
||||||
container_tag="${DPKG_CONTAINER_TAG}"
|
|
||||||
else
|
|
||||||
echo "invalid package type"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
time docker pull "${ARTIFACTORY_HUB}/${container_name}"
|
|
||||||
docker tag \
|
|
||||||
"${ARTIFACTORY_HUB}/${container_name}" \
|
|
||||||
"${container_name}"
|
|
||||||
docker images
|
|
||||||
test -d build && rm -rf build
|
|
||||||
mkdir -p build/${pkgtype} && cd build/${pkgtype}
|
|
||||||
time cmake \
|
|
||||||
-Dpackages_only=ON \
|
|
||||||
-Dcontainer_label="${container_tag}" \
|
|
||||||
-Dhave_package_container=ON \
|
|
||||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
||||||
-Dunity=OFF \
|
|
||||||
-G Ninja ../..
|
|
||||||
time cmake --build . --target ${pkgtype} -- -v
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
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)
|
|
||||||
docker login -u rippled \
|
|
||||||
-p ${ARTIFACTORY_DEPLOY_KEY_RIPPLED} ${ARTIFACTORY_HUB}
|
|
||||||
apk add --update py-pip
|
|
||||||
apk add \
|
|
||||||
bash util-linux coreutils binutils grep \
|
|
||||||
make ninja cmake build-base gcc g++ abuild git \
|
|
||||||
python3 python3-dev
|
|
||||||
pip3 install awscli --break-system-packages
|
|
||||||
# list curdir contents to build log:
|
|
||||||
ls -la
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
case ${CI_COMMIT_REF_NAME} in
|
|
||||||
develop)
|
|
||||||
export COMPONENT="nightly"
|
|
||||||
;;
|
|
||||||
release)
|
|
||||||
export COMPONENT="unstable"
|
|
||||||
;;
|
|
||||||
master)
|
|
||||||
export COMPONENT="stable"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
export COMPONENT="_unknown_"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
@@ -1,771 +0,0 @@
|
|||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## gitlab CI defintition for rippled build containers and distro ##
|
|
||||||
## packages (rpm and dpkg). ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
# NOTE: these are sensible defaults for Ripple pipelines. These
|
|
||||||
# can be overridden by project or group variables as needed.
|
|
||||||
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: "2023-02-13"
|
|
||||||
RPM_CONTAINER_NAME: "rippled-rpm-builder"
|
|
||||||
RPM_CONTAINER_FULLNAME: "${RPM_CONTAINER_NAME}:${RPM_CONTAINER_TAG}"
|
|
||||||
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"
|
|
||||||
ARTIFACTORY_HUB: "${ARTIFACTORY_HOST}:6555"
|
|
||||||
GIT_SIGN_PUBKEYS_URL: "https://gitlab.ops.ripple.com/xrpledger/rippled-packages/snippets/49/raw"
|
|
||||||
PUBLIC_REPO_ROOT: "https://repos.ripple.com/repos"
|
|
||||||
# also need to define this variable ONLY for the primary
|
|
||||||
# build/publish pipeline on the mainline repo:
|
|
||||||
# IS_PRIMARY_REPO = "true"
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build_packages
|
|
||||||
- sign_packages
|
|
||||||
- smoketest
|
|
||||||
- verify_sig
|
|
||||||
- tag_images
|
|
||||||
- push_to_test
|
|
||||||
- verify_from_test
|
|
||||||
- wait_approval_prod
|
|
||||||
- push_to_prod
|
|
||||||
- verify_from_prod
|
|
||||||
- get_final_hashes
|
|
||||||
- build_containers
|
|
||||||
|
|
||||||
.dind_template: &dind_param
|
|
||||||
before_script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/docker_alpine_setup.sh
|
|
||||||
variables:
|
|
||||||
docker_driver: overlay2
|
|
||||||
DOCKER_TLS_CERTDIR: ""
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/docker:latest
|
|
||||||
services:
|
|
||||||
# workaround for TLS issues - consider going back
|
|
||||||
# back to unversioned `dind` when issues are resolved
|
|
||||||
- name: artifactory.ops.ripple.com/docker:stable-dind
|
|
||||||
alias: docker
|
|
||||||
tags:
|
|
||||||
- 4xlarge
|
|
||||||
|
|
||||||
.only_primary_template: &only_primary
|
|
||||||
only:
|
|
||||||
refs:
|
|
||||||
- /^(master|release|develop)$/
|
|
||||||
variables:
|
|
||||||
- $IS_PRIMARY_REPO == "true"
|
|
||||||
|
|
||||||
.smoketest_local_template: &run_local_smoketest
|
|
||||||
tags:
|
|
||||||
- xlarge
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/smoketest.sh local
|
|
||||||
|
|
||||||
.smoketest_repo_template: &run_repo_smoketest
|
|
||||||
tags:
|
|
||||||
- xlarge
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/smoketest.sh repo
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: build_packages ##
|
|
||||||
## ##
|
|
||||||
## build packages using containers from previous stage. ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
rpm_build:
|
|
||||||
timeout: "1h 30m"
|
|
||||||
stage: build_packages
|
|
||||||
<<: *dind_param
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/rpm/packages/
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/build_package.sh rpm
|
|
||||||
|
|
||||||
dpkg_build:
|
|
||||||
timeout: "1h 30m"
|
|
||||||
stage: build_packages
|
|
||||||
<<: *dind_param
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/dpkg/packages/
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/build_package.sh dpkg
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: sign_packages ##
|
|
||||||
## ##
|
|
||||||
## build packages using containers from previous stage. ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
rpm_sign:
|
|
||||||
stage: sign_packages
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/centos:7
|
|
||||||
<<: *only_primary
|
|
||||||
before_script:
|
|
||||||
- |
|
|
||||||
# Make sure GnuPG is installed
|
|
||||||
yum -y install gnupg rpm-sign
|
|
||||||
# checking GPG signing support
|
|
||||||
if [ -n "$GPG_KEY_B64" ]; then
|
|
||||||
echo "$GPG_KEY_B64"| base64 -d | gpg --batch --no-tty --allow-secret-key-import --import -
|
|
||||||
unset GPG_KEY_B64
|
|
||||||
export GPG_PASSPHRASE=$(echo $GPG_KEY_PASS_B64 | base64 -di)
|
|
||||||
unset GPG_KEY_PASS_B64
|
|
||||||
export GPG_KEYID=$(gpg --with-colon --list-secret-keys | head -n1 | cut -d : -f 5)
|
|
||||||
else
|
|
||||||
echo -e "\033[0;31m****** GPG signing disabled ******\033[0m"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/rpm/packages/
|
|
||||||
script:
|
|
||||||
- ls -alh build/rpm/packages
|
|
||||||
- . ./Builds/containers/gitlab-ci/sign_package.sh rpm
|
|
||||||
|
|
||||||
dpkg_sign:
|
|
||||||
stage: sign_packages
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:18.04
|
|
||||||
<<: *only_primary
|
|
||||||
before_script:
|
|
||||||
- |
|
|
||||||
# make sure we have GnuPG
|
|
||||||
apt update
|
|
||||||
apt install -y gpg dpkg-sig
|
|
||||||
# checking GPG signing support
|
|
||||||
if [ -n "$GPG_KEY_B64" ]; then
|
|
||||||
echo "$GPG_KEY_B64"| base64 -d | gpg --batch --no-tty --allow-secret-key-import --import -
|
|
||||||
unset GPG_KEY_B64
|
|
||||||
export GPG_PASSPHRASE=$(echo $GPG_KEY_PASS_B64 | base64 -di)
|
|
||||||
unset GPG_KEY_PASS_B64
|
|
||||||
export GPG_KEYID=$(gpg --with-colon --list-secret-keys | head -n1 | cut -d : -f 5)
|
|
||||||
else
|
|
||||||
echo -e "\033[0;31m****** GPG signing disabled ******\033[0m"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/dpkg/packages/
|
|
||||||
script:
|
|
||||||
- ls -alh build/dpkg/packages
|
|
||||||
- . ./Builds/containers/gitlab-ci/sign_package.sh dpkg
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: smoketest ##
|
|
||||||
## ##
|
|
||||||
## install unsigned packages from previous step and run unit tests. ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
centos_7_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/centos:7
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
rocky_8_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
rocky_9_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:9
|
|
||||||
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
alma_8_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/almalinux:8
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
alma_9_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/almalinux:9
|
|
||||||
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
fedora_38_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:38
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
fedora_39_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- rpm_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:39
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
ubuntu_18_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:18.04
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
ubuntu_20_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:20.04
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
ubuntu_22_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:22.04
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
debian_10_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:10
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
debian_11_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:11
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
debian_12_smoketest:
|
|
||||||
stage: smoketest
|
|
||||||
dependencies:
|
|
||||||
- dpkg_build
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:12
|
|
||||||
<<: *run_local_smoketest
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: verify_sig ##
|
|
||||||
## ##
|
|
||||||
## use git/gpg to verify that HEAD is signed by an approved ##
|
|
||||||
## committer. The whitelist of pubkeys is manually mantained ##
|
|
||||||
## and fetched from GIT_SIGN_PUBKEYS_URL (currently a snippet ##
|
|
||||||
## link). ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
verify_head_signed:
|
|
||||||
stage: verify_sig
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:latest
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/verify_head_commit.sh
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: tag_images ##
|
|
||||||
## ##
|
|
||||||
## apply rippled version tag to containers from previous stage. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
tag_bld_images:
|
|
||||||
stage: tag_images
|
|
||||||
variables:
|
|
||||||
docker_driver: overlay2
|
|
||||||
DOCKER_TLS_CERTDIR: ""
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/docker:latest
|
|
||||||
services:
|
|
||||||
# workaround for TLS issues - consider going back
|
|
||||||
# back to unversioned `dind` when issues are resolved
|
|
||||||
- name: artifactory.ops.ripple.com/docker:stable-dind
|
|
||||||
alias: docker
|
|
||||||
tags:
|
|
||||||
- large
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/tag_docker_image.sh
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: push_to_test ##
|
|
||||||
## ##
|
|
||||||
## push packages to artifactory repositories (test) ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
push_test:
|
|
||||||
stage: push_to_test
|
|
||||||
variables:
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/alpine:latest
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- files.info
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/push_to_artifactory.sh "PUT" "."
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: verify_from_test ##
|
|
||||||
## ##
|
|
||||||
## install/test packages from test repos. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
centos_7_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/centos:7
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
rocky_8_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
rocky_9_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:9
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
almalinux_8_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/almalinux:8
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
almalinux_9_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/almalinux:9
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
fedora_38_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:38
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
fedora_39_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/fedora:39
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_18_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "bionic"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:18.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_20_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "focal"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:20.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_22_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "jammy"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:22.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_10_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "buster"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:10
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_11_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "bullseye"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:11
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_12_verify_repo_test:
|
|
||||||
stage: verify_from_test
|
|
||||||
variables:
|
|
||||||
DISTRO: "bookworm"
|
|
||||||
DEB_REPO: "rippled-deb-test-mirror"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:12
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: wait_approval_prod ##
|
|
||||||
## ##
|
|
||||||
## wait for manual approval before proceeding to next stage ##
|
|
||||||
## which pushes to prod repo. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
wait_before_push_prod:
|
|
||||||
stage: wait_approval_prod
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/alpine:latest
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- echo "proceeding to next stage"
|
|
||||||
when: manual
|
|
||||||
allow_failure: false
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: push_to_prod ##
|
|
||||||
## ##
|
|
||||||
## push packages to artifactory repositories (prod) ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
push_prod:
|
|
||||||
variables:
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/alpine:latest
|
|
||||||
stage: push_to_prod
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- files.info
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/push_to_artifactory.sh "PUT" "."
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: verify_from_prod ##
|
|
||||||
## ##
|
|
||||||
## install/test packages from prod repos. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
centos_7_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/centos:7
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
rocky_8_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
rocky_9_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/rockylinux/rockylinux:9
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
alma_8_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/almalinux:8
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
alma_9_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/almalinux:9
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
fedora_37_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
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
|
|
||||||
|
|
||||||
ubuntu_18_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "bionic"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:18.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_20_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "focal"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:20.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
ubuntu_22_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "jammy"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/ubuntu:22.04
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_10_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "buster"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:10
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_11_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "bullseye"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:11
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
debian_12_verify_repo_prod:
|
|
||||||
stage: verify_from_prod
|
|
||||||
variables:
|
|
||||||
DISTRO: "bookworm"
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/debian:12
|
|
||||||
dependencies:
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
<<: *run_repo_smoketest
|
|
||||||
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: get_final_hashes ##
|
|
||||||
## ##
|
|
||||||
## fetch final hashes from artifactory. ##
|
|
||||||
## ONLY RUNS FOR PRIMARY BRANCHES/REPO ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
get_prod_hashes:
|
|
||||||
variables:
|
|
||||||
DEB_REPO: "rippled-deb"
|
|
||||||
RPM_REPO: "rippled-rpm"
|
|
||||||
image:
|
|
||||||
name: artifactory.ops.ripple.com/alpine:latest
|
|
||||||
stage: get_final_hashes
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- files.info
|
|
||||||
dependencies:
|
|
||||||
- rpm_sign
|
|
||||||
- dpkg_sign
|
|
||||||
<<: *only_primary
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/push_to_artifactory.sh "GET" ".checksums"
|
|
||||||
|
|
||||||
#########################################################################
|
|
||||||
## ##
|
|
||||||
## stage: build_containers ##
|
|
||||||
## ##
|
|
||||||
## build containers from docker definitions. These containers are NOT ##
|
|
||||||
## used for the package build. This step is only used to ensure that ##
|
|
||||||
## the package build targets and files are still working properly. ##
|
|
||||||
## ##
|
|
||||||
#########################################################################
|
|
||||||
|
|
||||||
build_centos_container:
|
|
||||||
stage: build_containers
|
|
||||||
<<: *dind_param
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/build_container.sh rpm
|
|
||||||
|
|
||||||
build_ubuntu_container:
|
|
||||||
stage: build_containers
|
|
||||||
<<: *dind_param
|
|
||||||
script:
|
|
||||||
- . ./Builds/containers/gitlab-ci/build_container.sh dpkg
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
action=$1
|
|
||||||
filter=$2
|
|
||||||
|
|
||||||
. ./Builds/containers/gitlab-ci/get_component.sh
|
|
||||||
|
|
||||||
apk add curl jq coreutils util-linux
|
|
||||||
TOPDIR=$(pwd)
|
|
||||||
|
|
||||||
# DPKG
|
|
||||||
|
|
||||||
cd $TOPDIR
|
|
||||||
cd build/dpkg/packages
|
|
||||||
CURLARGS="-sk -X${action} -urippled:${ARTIFACTORY_DEPLOY_KEY_RIPPLED}"
|
|
||||||
RIPPLED_PKG=$(ls rippled_*.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 bookworm 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_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"
|
|
||||||
fi
|
|
||||||
echo "\"${deb}\"": | tee -a "${TOPDIR}/files.info"
|
|
||||||
ca="${CURLARGS}"
|
|
||||||
if [ "${action}" = "PUT" ] ; then
|
|
||||||
url="https://${ARTIFACTORY_HOST}/artifactory/${DEB_REPO}/pool/${COMPONENT}/${deb}${DEB_MATRIX}"
|
|
||||||
ca="${ca} -T${deb}"
|
|
||||||
elif [ "${action}" = "GET" ] ; then
|
|
||||||
url="https://${ARTIFACTORY_HOST}/artifactory/api/storage/${DEB_REPO}/pool/${COMPONENT}/${deb}"
|
|
||||||
fi
|
|
||||||
echo "file info request url --> ${url}"
|
|
||||||
eval "curl ${ca} \"${url}\"" | jq -M "${filter}" | tee -a "${TOPDIR}/files.info"
|
|
||||||
done
|
|
||||||
echo "}," >> "${TOPDIR}/files.info"
|
|
||||||
|
|
||||||
# RPM
|
|
||||||
|
|
||||||
cd $TOPDIR
|
|
||||||
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} ${RIPPLED_REPORTING_PKG}; do
|
|
||||||
# first item doesn't get a comma separator
|
|
||||||
if [ $rpm != $RIPPLED_PKG ] ; then
|
|
||||||
echo "," >> "${TOPDIR}/files.info"
|
|
||||||
fi
|
|
||||||
echo "\"${rpm}\"": | tee -a "${TOPDIR}/files.info"
|
|
||||||
ca="${CURLARGS}"
|
|
||||||
if [ "${action}" = "PUT" ] ; then
|
|
||||||
url="https://${ARTIFACTORY_HOST}/artifactory/${RPM_REPO}/${COMPONENT}/"
|
|
||||||
ca="${ca} -T${rpm}"
|
|
||||||
elif [ "${action}" = "GET" ] ; then
|
|
||||||
url="https://${ARTIFACTORY_HOST}/artifactory/api/storage/${RPM_REPO}/${COMPONENT}/${rpm}"
|
|
||||||
fi
|
|
||||||
echo "file info request url --> ${url}"
|
|
||||||
eval "curl ${ca} \"${url}\"" | jq -M "${filter}" | tee -a "${TOPDIR}/files.info"
|
|
||||||
done
|
|
||||||
echo "}}" >> "${TOPDIR}/files.info"
|
|
||||||
jq '.' "${TOPDIR}/files.info" > "${TOPDIR}/files.info.tmp"
|
|
||||||
mv "${TOPDIR}/files.info.tmp" "${TOPDIR}/files.info"
|
|
||||||
|
|
||||||
if [ ! -z "${SLACK_NOTIFY_URL}" ] && [ "${action}" = "GET" ] ; then
|
|
||||||
# extract files.info content to variable and sanitize so it can
|
|
||||||
# be interpolated into a slack text field below
|
|
||||||
finfo=$(cat ${TOPDIR}/files.info | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g' | sed -E 's/"/\\"/g')
|
|
||||||
# try posting file info to slack.
|
|
||||||
# can add channel field to payload if the
|
|
||||||
# default channel is incorrect. Get rid of
|
|
||||||
# newlines in payload json since slack doesn't accept them
|
|
||||||
CONTENT=$(tr -d '[\n]' <<JSON
|
|
||||||
payload={
|
|
||||||
"username": "GitlabCI",
|
|
||||||
"text": "The package build for branch \`${CI_COMMIT_REF_NAME}\` is complete. File hashes are: \`\`\`${finfo}\`\`\`",
|
|
||||||
"icon_emoji": ":package:"}
|
|
||||||
JSON
|
|
||||||
)
|
|
||||||
curl ${SLACK_NOTIFY_URL} --data-urlencode "${CONTENT}"
|
|
||||||
fi
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
sign_dpkg() {
|
|
||||||
if [ -n "${GPG_KEYID}" ]; then
|
|
||||||
dpkg-sig \
|
|
||||||
-g "--no-tty --digest-algo 'sha512' --passphrase '${GPG_PASSPHRASE}' --pinentry-mode=loopback" \
|
|
||||||
-k "${GPG_KEYID}" \
|
|
||||||
--sign builder \
|
|
||||||
"build/dpkg/packages/*.deb"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
sign_rpm() {
|
|
||||||
if [ -n "${GPG_KEYID}" ] ; then
|
|
||||||
find build/rpm/packages -name "*.rpm" -exec bash -c '
|
|
||||||
echo "yes" | setsid rpm \
|
|
||||||
--define "_gpg_name ${GPG_KEYID}" \
|
|
||||||
--define "_signature gpg" \
|
|
||||||
--define "__gpg_check_password_cmd /bin/true" \
|
|
||||||
--define "__gpg_sign_cmd %{__gpg} gpg --batch --no-armor --digest-algo 'sha512' --passphrase '${GPG_PASSPHRASE}' --no-secmem-warning -u '%{_gpg_name}' --sign --detach-sign --output %{__signature_filename} %{__plaintext_filename}" \
|
|
||||||
--addsign '{} \;
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case "${1}" in
|
|
||||||
dpkg)
|
|
||||||
sign_dpkg
|
|
||||||
;;
|
|
||||||
rpm)
|
|
||||||
sign_rpm
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: ${0} (dpkg|rpm)"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
install_from=$1
|
|
||||||
use_private=${2:-0} # this option not currently needed by any CI scripts,
|
|
||||||
# reserved for possible future use
|
|
||||||
if [ "$use_private" -gt 0 ] ; then
|
|
||||||
REPO_ROOT="https://rippled:${ARTIFACTORY_DEPLOY_KEY_RIPPLED}@${ARTIFACTORY_HOST}/artifactory"
|
|
||||||
else
|
|
||||||
REPO_ROOT="${PUBLIC_REPO_ROOT}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
. ./Builds/containers/gitlab-ci/get_component.sh
|
|
||||||
|
|
||||||
. /etc/os-release
|
|
||||||
case ${ID} in
|
|
||||||
ubuntu|debian)
|
|
||||||
pkgtype="dpkg"
|
|
||||||
;;
|
|
||||||
fedora|centos|rhel|scientific|rocky|almalinux)
|
|
||||||
pkgtype="rpm"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "unrecognized distro!"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# this script provides info variables about pkg version
|
|
||||||
. build/${pkgtype}/packages/build_vars
|
|
||||||
|
|
||||||
if [ "${pkgtype}" = "dpkg" ] ; then
|
|
||||||
# sometimes update fails and requires a cleanup
|
|
||||||
updateWithRetry()
|
|
||||||
{
|
|
||||||
if ! apt-get -y update ; then
|
|
||||||
rm -rvf /var/lib/apt/lists/*
|
|
||||||
apt-get -y clean
|
|
||||||
apt-get -y update
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
if [ "${install_from}" = "repo" ] ; then
|
|
||||||
apt-get -y upgrade
|
|
||||||
updateWithRetry
|
|
||||||
apt-get -y install apt apt-transport-https ca-certificates coreutils util-linux wget gnupg
|
|
||||||
wget -q -O - "${REPO_ROOT}/api/gpg/key/public" | apt-key add -
|
|
||||||
echo "deb ${REPO_ROOT}/${DEB_REPO} ${DISTRO} ${COMPONENT}" >> /etc/apt/sources.list
|
|
||||||
updateWithRetry
|
|
||||||
# uncomment this next line if you want to see the available package versions
|
|
||||||
# apt-cache policy rippled
|
|
||||||
apt-get -y install rippled=${dpkg_full_version}
|
|
||||||
elif [ "${install_from}" = "local" ] ; then
|
|
||||||
# cached pkg install
|
|
||||||
updateWithRetry
|
|
||||||
apt-get -y install libprotobuf-dev libprotoc-dev protobuf-compiler libssl-dev
|
|
||||||
rm -f build/dpkg/packages/rippled-dbgsym*.*
|
|
||||||
dpkg --no-debsig -i build/dpkg/packages/*.deb
|
|
||||||
else
|
|
||||||
echo "unrecognized pkg source!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
yum -y update
|
|
||||||
if [ "${install_from}" = "repo" ] ; then
|
|
||||||
pkgs=("yum-utils coreutils util-linux")
|
|
||||||
case "$ID" in
|
|
||||||
rocky|almalinux)
|
|
||||||
pkgs="${pkgs[@]/coreutils}"
|
|
||||||
esac
|
|
||||||
yum install -y $pkgs
|
|
||||||
REPOFILE="/etc/yum.repos.d/artifactory.repo"
|
|
||||||
echo "[Artifactory]" > ${REPOFILE}
|
|
||||||
echo "name=Artifactory" >> ${REPOFILE}
|
|
||||||
echo "baseurl=${REPO_ROOT}/${RPM_REPO}/${COMPONENT}/" >> ${REPOFILE}
|
|
||||||
echo "enabled=1" >> ${REPOFILE}
|
|
||||||
echo "gpgcheck=0" >> ${REPOFILE}
|
|
||||||
echo "gpgkey=${REPO_ROOT}/${RPM_REPO}/${COMPONENT}/repodata/repomd.xml.key" >> ${REPOFILE}
|
|
||||||
echo "repo_gpgcheck=1" >> ${REPOFILE}
|
|
||||||
yum -y update
|
|
||||||
# uncomment this next line if you want to see the available package versions
|
|
||||||
# yum --showduplicates list rippled
|
|
||||||
yum -y install ${rpm_version_release}
|
|
||||||
elif [ "${install_from}" = "local" ] ; then
|
|
||||||
rm -f build/rpm/packages/rippled-debug*.rpm
|
|
||||||
rm -f build/rpm/packages/rippled-devel*.rpm
|
|
||||||
rm -f build/rpm/packages/*.src.rpm
|
|
||||||
rpm -i build/rpm/packages/*.rpm
|
|
||||||
else
|
|
||||||
echo "unrecognized pkg source!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# verify installed version
|
|
||||||
INSTALLED=$(/opt/ripple/bin/rippled --version | awk '{print $NF}')
|
|
||||||
if [ "${rippled_version}" != "${INSTALLED}" ] ; then
|
|
||||||
echo "INSTALLED version ${INSTALLED} does not match ${rippled_version}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# run unit tests
|
|
||||||
/opt/ripple/bin/rippled --unittest --unittest-jobs $(nproc)
|
|
||||||
/opt/ripple/bin/validator-keys --unittest
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
docker login -u rippled \
|
|
||||||
-p ${ARTIFACTORY_DEPLOY_KEY_RIPPLED} "${ARTIFACTORY_HUB}"
|
|
||||||
# this gives us rippled_version :
|
|
||||||
source build/rpm/packages/build_vars
|
|
||||||
docker pull "${ARTIFACTORY_HUB}/${RPM_CONTAINER_FULLNAME}"
|
|
||||||
docker pull "${ARTIFACTORY_HUB}/${DPKG_CONTAINER_FULLNAME}"
|
|
||||||
# tag/push two labels...one using the current rippled version and one just using "latest"
|
|
||||||
for label in ${rippled_version} latest ; do
|
|
||||||
docker tag \
|
|
||||||
"${ARTIFACTORY_HUB}/${RPM_CONTAINER_FULLNAME}" \
|
|
||||||
"${ARTIFACTORY_HUB}/${RPM_CONTAINER_NAME}:${label}_${CI_COMMIT_REF_SLUG}"
|
|
||||||
docker push \
|
|
||||||
"${ARTIFACTORY_HUB}/${RPM_CONTAINER_NAME}:${label}_${CI_COMMIT_REF_SLUG}"
|
|
||||||
docker tag \
|
|
||||||
"${ARTIFACTORY_HUB}/${DPKG_CONTAINER_FULLNAME}" \
|
|
||||||
"${ARTIFACTORY_HUB}/${DPKG_CONTAINER_NAME}:${label}_${CI_COMMIT_REF_SLUG}"
|
|
||||||
docker push \
|
|
||||||
"${ARTIFACTORY_HUB}/${DPKG_CONTAINER_NAME}:${label}_${CI_COMMIT_REF_SLUG}"
|
|
||||||
done
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -ex
|
|
||||||
apt -y update
|
|
||||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
|
|
||||||
apt -y install software-properties-common curl git gnupg
|
|
||||||
curl -sk -o rippled-pubkeys.txt "${GIT_SIGN_PUBKEYS_URL}"
|
|
||||||
gpg --import rippled-pubkeys.txt
|
|
||||||
if git verify-commit HEAD; then
|
|
||||||
echo "git commit signature check passed"
|
|
||||||
else
|
|
||||||
echo "git commit signature check failed"
|
|
||||||
git log -n 5 --color \
|
|
||||||
--pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an> [%G?]%Creset' \
|
|
||||||
--abbrev-commit
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
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/update_sources.sh .
|
|
||||||
source update_sources.sh
|
|
||||||
|
|
||||||
# Build the dpkg
|
|
||||||
|
|
||||||
#dpkg uses - as separator, so we need to change our -bN versions to tilde
|
|
||||||
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
|
|
||||||
error "Unstaged changes in this repo - please commit first"
|
|
||||||
fi
|
|
||||||
git archive --format tar.gz --prefix rippled-${RIPPLED_DPKG_VERSION}/ -o ../rippled-${RIPPLED_DPKG_VERSION}.tar.gz HEAD
|
|
||||||
cd ..
|
|
||||||
# dpkg debmake would normally create this link, but we do it manually
|
|
||||||
ln -s ./rippled-${RIPPLED_DPKG_VERSION}.tar.gz rippled_${RIPPLED_DPKG_VERSION}.orig.tar.gz
|
|
||||||
tar xvf rippled-${RIPPLED_DPKG_VERSION}.tar.gz
|
|
||||||
cd rippled-${RIPPLED_DPKG_VERSION}
|
|
||||||
cp -pr ../debian .
|
|
||||||
|
|
||||||
# dpkg requires a changelog. We don't currently maintain
|
|
||||||
# a useable one, so let's just fake it with our current version
|
|
||||||
# TODO : not sure if the "unstable" will need to change for
|
|
||||||
# release packages (?)
|
|
||||||
NOWSTR=$(TZ=UTC date -R)
|
|
||||||
cat << CHANGELOG > ./debian/changelog
|
|
||||||
rippled (${RIPPLED_DPKG_FULL_VERSION}) unstable; urgency=low
|
|
||||||
|
|
||||||
* see RELEASENOTES
|
|
||||||
|
|
||||||
-- Ripple Labs Inc. <support@ripple.com> ${NOWSTR}
|
|
||||||
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
|
|
||||||
debuild --no-lintian --preserve-envvar PATH --preserve-env -us -uc
|
|
||||||
rc=$?; if [[ $rc != 0 ]]; then
|
|
||||||
error "error building dpkg"
|
|
||||||
fi
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# copy artifacts
|
|
||||||
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}
|
|
||||||
cp rippled_${RIPPLED_DPKG_FULL_VERSION}.debian.tar.xz ${PKG_OUTDIR}
|
|
||||||
# buildinfo is only generated by later version of debuild
|
|
||||||
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: ...
|
|
||||||
# and
|
|
||||||
# Files: ...
|
|
||||||
awk '/Checksums-Sha256:/{hit=1;next}/Files:/{hit=0}hit' \
|
|
||||||
rippled_${RIPPLED_DPKG_VERSION}-1_amd64.changes | \
|
|
||||||
sed -E 's!^[[:space:]]+!!' > shasums
|
|
||||||
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)
|
|
||||||
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 "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,3 +0,0 @@
|
|||||||
rippled daemon
|
|
||||||
|
|
||||||
-- Mike Ellery <mellery451@gmail.com> Tue, 04 Dec 2018 18:19:03 +0000
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
10
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
Source: rippled
|
|
||||||
Section: misc
|
|
||||||
Priority: extra
|
|
||||||
Maintainer: Ripple Labs Inc. <support@ripple.com>
|
|
||||||
Build-Depends: cmake, debhelper (>=9), zlib1g-dev, dh-systemd, ninja-build
|
|
||||||
Standards-Version: 3.9.7
|
|
||||||
Homepage: http://ripple.com/
|
|
||||||
|
|
||||||
Package: rippled
|
|
||||||
Architecture: any
|
|
||||||
Multi-Arch: foreign
|
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Description: rippled daemon
|
|
||||||
|
|
||||||
Package: rippled-reporting
|
|
||||||
Architecture: any
|
|
||||||
Multi-Arch: foreign
|
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Description: rippled reporting daemon
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: rippled
|
|
||||||
Source: https://github.com/ripple/rippled
|
|
||||||
|
|
||||||
Files: *
|
|
||||||
Copyright: 2012-2019 Ripple Labs Inc.
|
|
||||||
|
|
||||||
License: __UNKNOWN__
|
|
||||||
|
|
||||||
The accompanying files under various copyrights.
|
|
||||||
|
|
||||||
Copyright (c) 2012, 2013, 2014 Ripple Labs Inc.
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
The accompanying files incorporate work covered by the following copyright
|
|
||||||
and previous license notice:
|
|
||||||
|
|
||||||
Copyright (c) 2011 Arthur Britto, David Schwartz, Jed McCaleb,
|
|
||||||
Vinnie Falco, Bob Way, Eric Lombrozo, Nikolaos D. Bougalis, Howard Hinnant
|
|
||||||
|
|
||||||
Some code from Raw Material Software, Ltd., provided under the terms of the
|
|
||||||
ISC License. See the corresponding source files for more details.
|
|
||||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
|
||||||
Please visit http://www.juce.com
|
|
||||||
|
|
||||||
Some code from ASIO examples:
|
|
||||||
// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
|
|
||||||
//
|
|
||||||
// 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)
|
|
||||||
|
|
||||||
Some code from Bitcoin:
|
|
||||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
||||||
// Copyright (c) 2011 The Bitcoin developers
|
|
||||||
// Distributed under the MIT/X11 software license, see the accompanying
|
|
||||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
|
||||||
|
|
||||||
Some code from Tom Wu:
|
|
||||||
This software is covered under the following copyright:
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2003-2005 Tom Wu
|
|
||||||
* All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
* a copy of this software and associated documentation files (the
|
|
||||||
* "Software"), to deal in the Software without restriction, including
|
|
||||||
* without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
* permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
* the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be
|
|
||||||
* included in all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
||||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
*
|
|
||||||
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
|
|
||||||
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
|
|
||||||
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
|
|
||||||
* THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
|
|
||||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*
|
|
||||||
* In addition, the following condition applies:
|
|
||||||
*
|
|
||||||
* All redistributions must retain an intact copy of this copyright notice
|
|
||||||
* and disclaimer.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Address all questions regarding this license to:
|
|
||||||
|
|
||||||
Tom Wu
|
|
||||||
tjw@cs.Stanford.EDU
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/var/log/rippled/
|
|
||||||
/var/lib/rippled/
|
|
||||||
/etc/systemd/system/rippled.service.d/
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
README.md
|
|
||||||
LICENSE.md
|
|
||||||
RELEASENOTES.md
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
opt/ripple/include
|
|
||||||
opt/ripple/lib/*.a
|
|
||||||
opt/ripple/lib/cmake/ripple
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/var/log/rippled-reporting/
|
|
||||||
/var/lib/rippled-reporting/
|
|
||||||
/etc/systemd/system/rippled-reporting.service.d/
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/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,2 +0,0 @@
|
|||||||
/opt/ripple/etc/rippled.cfg
|
|
||||||
/opt/ripple/etc/validators.txt
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
opt/ripple/bin/rippled
|
|
||||||
opt/ripple/bin/validator-keys
|
|
||||||
opt/ripple/bin/update-rippled.sh
|
|
||||||
opt/ripple/bin/getRippledInfo
|
|
||||||
opt/ripple/etc/rippled.cfg
|
|
||||||
opt/ripple/etc/validators.txt
|
|
||||||
opt/ripple/etc/update-rippled-cron
|
|
||||||
etc/logrotate.d/rippled
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
opt/ripple/etc/rippled.cfg etc/opt/ripple/rippled.cfg
|
|
||||||
opt/ripple/etc/validators.txt etc/opt/ripple/validators.txt
|
|
||||||
opt/ripple/bin/rippled usr/local/bin/rippled
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
USER_NAME=rippled
|
|
||||||
GROUP_NAME=rippled
|
|
||||||
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/
|
|
||||||
chown -R $USER_NAME:$GROUP_NAME /var/lib/rippled/
|
|
||||||
chown -R $USER_NAME:$GROUP_NAME /opt/ripple
|
|
||||||
chmod 755 /var/log/rippled/
|
|
||||||
chmod 755 /var/lib/rippled/
|
|
||||||
chmod 644 /opt/ripple/etc/update-rippled-cron
|
|
||||||
chmod 644 /etc/logrotate.d/rippled
|
|
||||||
chown -R root:$GROUP_NAME /opt/ripple/etc/update-rippled-cron
|
|
||||||
;;
|
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "postinst called with unknown argument \`$1'" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "postrm called with unknown argument \`$1'" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
install|upgrade)
|
|
||||||
;;
|
|
||||||
|
|
||||||
abort-upgrade)
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "preinst called with unknown argument \`$1'" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
remove|upgrade|deconfigure)
|
|
||||||
;;
|
|
||||||
|
|
||||||
failed-upgrade)
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "prerm called with unknown argument \`$1'" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
export DH_VERBOSE = 1
|
|
||||||
export DH_OPTIONS = -v
|
|
||||||
# debuild sets some warnings that don't work well
|
|
||||||
# for our curent build..so try to remove those flags here:
|
|
||||||
export CFLAGS:=$(subst -Wformat,,$(CFLAGS))
|
|
||||||
export CFLAGS:=$(subst -Werror=format-security,,$(CFLAGS))
|
|
||||||
export CXXFLAGS:=$(subst -Wformat,,$(CXXFLAGS))
|
|
||||||
export CXXFLAGS:=$(subst -Werror=format-security,,$(CXXFLAGS))
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@ --with systemd
|
|
||||||
|
|
||||||
override_dh_systemd_start:
|
|
||||||
dh_systemd_start --no-restart-on-upgrade
|
|
||||||
|
|
||||||
override_dh_auto_configure:
|
|
||||||
/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:
|
|
||||||
cmake --build build.rippled --target rippled --target validator-keys --parallel 8
|
|
||||||
cmake --build build.rippled-reporting --target rippled --parallel 8
|
|
||||||
|
|
||||||
override_dh_auto_install:
|
|
||||||
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
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
3.0 (quilt)
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#abort-on-upstream-changes
|
|
||||||
#unapply-patches
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
enable rippled-reporting.service
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
enable rippled.service
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
cd /opt/rippled_bld/pkg
|
|
||||||
cp -fpu rippled/Builds/containers/packaging/rpm/rippled.spec .
|
|
||||||
cp -fpu rippled/Builds/containers/shared/update_sources.sh .
|
|
||||||
source update_sources.sh
|
|
||||||
|
|
||||||
# Build the rpm
|
|
||||||
|
|
||||||
IFS='-' read -r RIPPLED_RPM_VERSION RELEASE <<< "$RIPPLED_VERSION"
|
|
||||||
export RIPPLED_RPM_VERSION
|
|
||||||
|
|
||||||
RPM_RELEASE=${RPM_RELEASE-1}
|
|
||||||
|
|
||||||
# post-release version
|
|
||||||
if [ "hf" = "$(echo "$RELEASE" | cut -c -2)" ]; then
|
|
||||||
RPM_RELEASE="${RPM_RELEASE}.${RELEASE}"
|
|
||||||
# pre-release version (-b or -rc)
|
|
||||||
elif [[ $RELEASE ]]; then
|
|
||||||
RPM_RELEASE="0.${RPM_RELEASE}.${RELEASE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export RPM_RELEASE
|
|
||||||
|
|
||||||
if [[ $RPM_PATCH ]]; then
|
|
||||||
RPM_PATCH=".${RPM_PATCH}"
|
|
||||||
export RPM_PATCH
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd /opt/rippled_bld/pkg/rippled
|
|
||||||
|
|
||||||
if [[ -n $(git status --porcelain) ]]; then
|
|
||||||
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
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
source /opt/rh/devtoolset-11/enable
|
|
||||||
|
|
||||||
rpmbuild --define "_topdir ${PWD}/rpmbuild" -ba rippled.spec
|
|
||||||
|
|
||||||
rc=$?; if [[ $rc != 0 ]]; then
|
|
||||||
error "error building rpm"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make a tar of the rpm and source rpm
|
|
||||||
RPM_VERSION_RELEASE=$(rpm -qp --qf='%{NAME}-%{VERSION}-%{RELEASE}' ./rpmbuild/RPMS/x86_64/rippled-[0-9]*.rpm)
|
|
||||||
tar_file=$RPM_VERSION_RELEASE.tar.gz
|
|
||||||
|
|
||||||
cp ./rpmbuild/RPMS/x86_64/* ${PKG_OUTDIR}
|
|
||||||
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
|
|
||||||
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
|
|
||||||
@@ -1,239 +0,0 @@
|
|||||||
%define rippled_version %(echo $RIPPLED_RPM_VERSION)
|
|
||||||
%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}
|
|
||||||
Release: %{rpm_release}%{?dist}%{rpm_patch}
|
|
||||||
Summary: rippled daemon
|
|
||||||
|
|
||||||
License: MIT
|
|
||||||
URL: http://ripple.com/
|
|
||||||
Source0: rippled.tar.gz
|
|
||||||
|
|
||||||
BuildRequires: cmake zlib-static ninja-build
|
|
||||||
|
|
||||||
%description
|
|
||||||
rippled
|
|
||||||
|
|
||||||
%package devel
|
|
||||||
Summary: Files for development of applications using xrpl core library
|
|
||||||
Group: Development/Libraries
|
|
||||||
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
|
|
||||||
|
|
||||||
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.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
|
|
||||||
|
|
||||||
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
|
|
||||||
install -D ./rippled/bin/getRippledInfo ${RPM_BUILD_ROOT}%{_bindir}/getRippledInfo
|
|
||||||
install -D ./rippled/Builds/containers/shared/update-rippled-cron ${RPM_BUILD_ROOT}%{_prefix}/etc/update-rippled-cron
|
|
||||||
install -D ./rippled/Builds/containers/shared/rippled-logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/rippled
|
|
||||||
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
|
|
||||||
|
|
||||||
getent passwd $USER_NAME &>/dev/null || useradd $USER_NAME
|
|
||||||
getent group $GROUP_NAME &>/dev/null || groupadd $GROUP_NAME
|
|
||||||
|
|
||||||
chown -R $USER_NAME:$GROUP_NAME /var/log/rippled/
|
|
||||||
chown -R $USER_NAME:$GROUP_NAME /var/lib/rippled/
|
|
||||||
chown -R $USER_NAME:$GROUP_NAME %{_prefix}/
|
|
||||||
|
|
||||||
chmod 755 /var/log/rippled/
|
|
||||||
chmod 755 /var/lib/rippled/
|
|
||||||
|
|
||||||
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
|
|
||||||
%{_bindir}/update-rippled.sh
|
|
||||||
%{_bindir}/getRippledInfo
|
|
||||||
%{_prefix}/etc/update-rippled-cron
|
|
||||||
%{_bindir}/validator-keys
|
|
||||||
%config(noreplace) %{_prefix}/etc/rippled.cfg
|
|
||||||
%config(noreplace) /etc/opt/ripple/rippled.cfg
|
|
||||||
%config(noreplace) %{_prefix}/etc/validators.txt
|
|
||||||
%config(noreplace) /etc/opt/ripple/validators.txt
|
|
||||||
%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/
|
|
||||||
|
|
||||||
%files devel
|
|
||||||
%{_prefix}/include
|
|
||||||
%{_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
|
|
||||||
|
|
||||||
* Wed May 15 2019 Mike Ellery <mellery451@gmail.com>
|
|
||||||
- Make validator-keys use local rippled build for core lib
|
|
||||||
|
|
||||||
* Wed Aug 01 2018 Mike Ellery <mellery451@gmail.com>
|
|
||||||
- add devel package for signing library
|
|
||||||
|
|
||||||
* Thu Jun 02 2016 Brandon Wilson <bwilson@ripple.com>
|
|
||||||
- Install validators.txt
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
IFS=. read cm_maj cm_min cm_rel <<<"$1"
|
|
||||||
: ${cm_rel:-0}
|
|
||||||
CMAKE_ROOT=${2:-"${HOME}/cmake"}
|
|
||||||
|
|
||||||
function cmake_version ()
|
|
||||||
{
|
|
||||||
if [[ -d ${CMAKE_ROOT} ]] ; then
|
|
||||||
local perms=$(test $(uname) = "Linux" && echo "/111" || echo "+111")
|
|
||||||
local installed=$(find ${CMAKE_ROOT} -perm ${perms} -type f -name cmake)
|
|
||||||
if [[ "${installed}" != "" ]] ; then
|
|
||||||
echo "$(${installed} --version | head -1)"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
installed=$(cmake_version)
|
|
||||||
if [[ "${installed}" != "" && ${installed} =~ ${cm_maj}.${cm_min}.${cm_rel} ]] ; then
|
|
||||||
echo "cmake already installed: ${installed}"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
# 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}
|
|
||||||
cd ${CMAKE_ROOT}
|
|
||||||
tar --strip-components 1 -xf ${tmppkg}
|
|
||||||
rm -f ${tmppkg}
|
|
||||||
echo "installed: $(cmake_version)"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/var/log/rippled/*.log {
|
|
||||||
daily
|
|
||||||
minsize 200M
|
|
||||||
rotate 7
|
|
||||||
nocreate
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
compress
|
|
||||||
compresscmd /usr/bin/nice
|
|
||||||
compressoptions -n19 ionice -c3 gzip
|
|
||||||
compressext .gz
|
|
||||||
postrotate
|
|
||||||
/opt/ripple/bin/rippled --conf /opt/ripple/etc/rippled.cfg logrotate
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
[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
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Ripple Daemon
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/opt/ripple/bin/rippled --net --silent --conf /etc/opt/ripple/rippled.cfg
|
|
||||||
Restart=on-failure
|
|
||||||
User=rippled
|
|
||||||
Group=rippled
|
|
||||||
LimitNOFILE=65536
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# For automatic updates, symlink this file to /etc/cron.d/
|
|
||||||
# Do not remove the newline at the end of this cron script
|
|
||||||
|
|
||||||
# bash required for use of RANDOM below.
|
|
||||||
SHELL=/bin/bash
|
|
||||||
PATH=/sbin;/bin;/usr/sbin;/usr/bin
|
|
||||||
|
|
||||||
# invoke check/update script with random delay up to 59 mins
|
|
||||||
0 * * * * root sleep $((RANDOM*3540/32768)) && /opt/ripple/bin/update-rippled.sh
|
|
||||||
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# auto-update script for rippled daemon
|
|
||||||
|
|
||||||
# Check for sudo/root permissions
|
|
||||||
if [[ $(id -u) -ne 0 ]] ; then
|
|
||||||
echo "This update script must be run as root or sudo"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOCKDIR=/tmp/rippleupdate.lock
|
|
||||||
UPDATELOG=/var/log/rippled/update.log
|
|
||||||
|
|
||||||
function cleanup {
|
|
||||||
# If this directory isn't removed, future updates will fail.
|
|
||||||
rmdir $LOCKDIR
|
|
||||||
}
|
|
||||||
|
|
||||||
# Use mkdir to check if process is already running. mkdir is atomic, as against file create.
|
|
||||||
if ! mkdir $LOCKDIR 2>/dev/null; then
|
|
||||||
echo $(date -u) "lockdir exists - won't proceed." >> $UPDATELOG
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
trap cleanup EXIT
|
|
||||||
|
|
||||||
source /etc/os-release
|
|
||||||
can_update=false
|
|
||||||
|
|
||||||
if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]] ; then
|
|
||||||
# Silent update
|
|
||||||
apt-get update -qq
|
|
||||||
|
|
||||||
# The next line is an "awk"ward way to check if the package needs to be updated.
|
|
||||||
RIPPLE=$(apt-get install -s --only-upgrade rippled | awk '/^Inst/ { print $2 }')
|
|
||||||
test "$RIPPLE" == "rippled" && can_update=true
|
|
||||||
|
|
||||||
function apply_update {
|
|
||||||
apt-get install rippled -qq
|
|
||||||
}
|
|
||||||
elif [[ "$ID" == "fedora" || "$ID" == "centos" || "$ID" == "rhel" || "$ID" == "scientific" ]] ; then
|
|
||||||
RIPPLE_REPO=${RIPPLE_REPO-stable}
|
|
||||||
yum --disablerepo=* --enablerepo=ripple-$RIPPLE_REPO clean expire-cache
|
|
||||||
|
|
||||||
yum check-update -q --enablerepo=ripple-$RIPPLE_REPO rippled || can_update=true
|
|
||||||
|
|
||||||
function apply_update {
|
|
||||||
yum update -y --enablerepo=ripple-$RIPPLE_REPO rippled
|
|
||||||
}
|
|
||||||
else
|
|
||||||
echo "unrecognized distro!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Do the actual update and restart the service after reloading systemctl daemon.
|
|
||||||
if [ "$can_update" = true ] ; then
|
|
||||||
exec 3>&1 1>>${UPDATELOG} 2>&1
|
|
||||||
set -e
|
|
||||||
apply_update
|
|
||||||
systemctl daemon-reload
|
|
||||||
systemctl restart rippled.service
|
|
||||||
echo $(date -u) "rippled daemon updated."
|
|
||||||
else
|
|
||||||
echo $(date -u) "no updates available" >> $UPDATELOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function error {
|
|
||||||
echo $1
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
cd /opt/rippled_bld/pkg/rippled
|
|
||||||
export RIPPLED_VERSION=$(egrep -i -o "\b(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9a-z\-]+(\.[0-9a-z\-]+)*)?(\+[0-9a-z\-]+(\.[0-9a-z\-]+)*)?\b" src/ripple/protocol/impl/BuildInfo.cpp)
|
|
||||||
|
|
||||||
: ${PKG_OUTDIR:=/opt/rippled_bld/pkg/out}
|
|
||||||
export PKG_OUTDIR
|
|
||||||
if [ ! -d ${PKG_OUTDIR} ]; then
|
|
||||||
error "${PKG_OUTDIR} is not mounted"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -x ${OPENSSL_ROOT}/bin/openssl ]; then
|
|
||||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${OPENSSL_ROOT}/lib ${OPENSSL_ROOT}/bin/openssl version -a
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
ARG DIST_TAG=18.04
|
|
||||||
FROM ubuntu:$DIST_TAG
|
|
||||||
ARG GIT_COMMIT=unknown
|
|
||||||
ARG CI_USE=false
|
|
||||||
LABEL git-commit=$GIT_COMMIT
|
|
||||||
|
|
||||||
WORKDIR /root
|
|
||||||
COPY ubuntu-builder/ubuntu_setup.sh .
|
|
||||||
COPY ubuntu-builder/ubuntu_setup2.sh .
|
|
||||||
|
|
||||||
RUN ./ubuntu_setup.sh && rm ubuntu_setup.sh
|
|
||||||
|
|
||||||
RUN ./ubuntu_setup2.sh && rm ubuntu_setup2.sh
|
|
||||||
|
|
||||||
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,47 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Parameters
|
|
||||||
|
|
||||||
gcc_version=${GCC_VERSION:-11}
|
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
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}
|
|
||||||
|
|
||||||
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-${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
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#!/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
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/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
|
|
||||||
@@ -45,7 +45,6 @@ endif ()
|
|||||||
include(RippledSanity)
|
include(RippledSanity)
|
||||||
include(RippledVersion)
|
include(RippledVersion)
|
||||||
include(RippledSettings)
|
include(RippledSettings)
|
||||||
include(RippledRelease)
|
|
||||||
# this check has to remain in the top-level cmake
|
# this check has to remain in the top-level cmake
|
||||||
# because of the early return statement
|
# because of the early return statement
|
||||||
if (packages_only)
|
if (packages_only)
|
||||||
|
|||||||
Reference in New Issue
Block a user