mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
The debug packages were named with the extension ".ddeb", but due to a
bug in Artifactory, they need to have the ".deb" extension. Debug symbol
packages with ".ddeb" extensions are not indexed, and thus are not
visible in apt clients.
* Fix the issue by renaming the debug packages in the build script.
* Use GCC-11 and update GCC Conan profile.
* This software requires GCC 11 and C++20. However, reporting mode is
built with C++17.
This is a quick band-aid to fix the build. Later, it will be better to
remove this package-building code.
For context, a Debian (deb) package contains bundled software and
resources necessary for installing and managing software on a
Debian-based system, including Ubuntu and derivatives.
95 lines
3.6 KiB
Makefile
Executable File
95 lines
3.6 KiB
Makefile
Executable File
#!/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:
|
|
apt install --yes gcc-11 g++-11
|
|
update-alternatives --install \
|
|
/usr/bin/gcc gcc /usr/bin/gcc-11 100 \
|
|
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
|
|
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \
|
|
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-11 \
|
|
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 \
|
|
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \
|
|
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-dump-11 \
|
|
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-tool-11
|
|
update-alternatives --set gcc /usr/bin/gcc-11
|
|
env
|
|
rm -rf bld
|
|
conan profile update settings.compiler.cppstd=20 gcc
|
|
conan profile update settings.compiler.version=11 gcc
|
|
conan export external/snappy snappy/1.1.9@
|
|
|
|
conan install . \
|
|
--profile gcc \
|
|
--install-folder bld/rippled \
|
|
--build missing \
|
|
--build boost \
|
|
--build sqlite3 \
|
|
--settings build_type=Release
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
|
-G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/opt/ripple \
|
|
-Dstatic=ON \
|
|
-Dunity=OFF \
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
-Dvalidator_keys=ON \
|
|
-B bld/rippled
|
|
|
|
conan install . \
|
|
--profile gcc \
|
|
--install-folder bld/rippled-reporting \
|
|
--build missing \
|
|
--build boost \
|
|
--build sqlite3 \
|
|
--build libuv \
|
|
--settings build_type=Release \
|
|
--settings compiler.cppstd=17 \
|
|
--options reporting=True
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
|
-G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/opt/rippled-reporting \
|
|
-Dstatic=ON \
|
|
-Dunity=OFF \
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
-Dreporting=ON \
|
|
-B bld/rippled-reporting
|
|
|
|
override_dh_auto_build:
|
|
cmake --build bld/rippled --target rippled --target validator-keys -j${nproc}
|
|
cmake --build bld/rippled-reporting --target rippled -j${nproc}
|
|
|
|
override_dh_auto_install:
|
|
cmake --install bld/rippled --prefix debian/tmp/opt/ripple
|
|
install -D bld/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
|