Skip to content

Commit

Permalink
fix: deb package build (XRPLF#4591)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
legleux authored and ckeshava committed Sep 25, 2023
1 parent 3bfe81a commit 5089fe4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,4 @@ pkg_out
pkg
CMakeUserPresets.json
bld.rippled/
.vscode
4 changes: 4 additions & 0 deletions Builds/containers/packaging/dpkg/build_dpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ if [ -e rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.buildinfo ] ; then
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.buildinfo ${PKG_OUTDIR}
fi

pushd ${PKG_OUTDIR}
for f in *.ddeb; do mv -- "$f" "${f%.ddeb}.deb"; done
popd

cat rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.changes
# extract the text in the .changes file that appears between
# Checksums-Sha256: ...
Expand Down
18 changes: 16 additions & 2 deletions Builds/containers/packaging/dpkg/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,25 @@ 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 \
Expand All @@ -38,12 +51,14 @@ override_dh_auto_configure:
-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 \
Expand All @@ -58,7 +73,6 @@ override_dh_auto_configure:

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:
Expand Down

0 comments on commit 5089fe4

Please sign in to comment.