From: Remi Gacogne Date: Fri, 19 Jul 2024 12:12:01 +0000 (+0200) Subject: dnsdist: Disable `SONAME` support in Quiche X-Git-Tag: dnsdist-1.9.7~6^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d28b984e9446afa06b8495c8bf55ba0ef398871;p=thirdparty%2Fpdns.git dnsdist: Disable `SONAME` support in Quiche Since 0.22.0 Quiche sets a proper `SONAME` See https://github.com/cloudflare/quiche/pull/1769 but it does not matter in our case since we install the Quiche library in such a way (libdnsdist-quiche.so) that we are the only user, and it will always be updated with DNSdist. Keeping it makes our life significantly harder since several packaging tools look a the `SONAME`. (cherry picked from commit cce2be27bb5a15d28f75349b5d87e31aabd85e09) --- diff --git a/builder-support/helpers/install_quiche.sh b/builder-support/helpers/install_quiche.sh index b09793fcd0..57656bf2c6 100755 --- a/builder-support/helpers/install_quiche.sh +++ b/builder-support/helpers/install_quiche.sh @@ -26,6 +26,9 @@ echo $0: Checking that the hash of ${QUICHE_TARBALL} is ${QUICHE_TARBALL_HASH} echo "${QUICHE_TARBALL_HASH}" "${QUICHE_TARBALL}" | sha256sum -c - tar xf "${QUICHE_TARBALL}" cd "quiche-${QUICHE_VERSION}" +# Disable SONAME in the quiche shared library, we do not intend this library to be used by anyone else and it makes things more complicated since we rename it to libdnsdist-quiche +sed -i 's/ffi = \["dep:cdylib-link-lines"\]/ffi = \[\]/' quiche/Cargo.toml +sed -i 's,cdylib_link_lines::metabuild();,//cdylib_link_lines::metabuild();,' quiche/src/build.rs RUST_BACKTRACE=1 cargo build --release --no-default-features --features ffi,boringssl-boring-crate --package quiche install -m644 quiche/include/quiche.h "${INSTALL_PREFIX}"/include diff --git a/tasks.py b/tasks.py index 15f6072be8..23a8cc58e5 100644 --- a/tasks.py +++ b/tasks.py @@ -935,6 +935,9 @@ def ci_build_and_install_quiche(c, repo): c.run(f'echo {quiche_hash}" "quiche-{quiche_version}.tar.gz | sha256sum -c -') c.run(f'tar xf quiche-{quiche_version}.tar.gz') with c.cd(f'quiche-{quiche_version}'): + # Disable SONAME in the quiche shared library, we do not intend this library to be used by anyone else and it makes things more complicated since we rename it to libdnsdist-quiche + c.run('sed -i \'s/ffi = \["dep:cdylib-link-lines"\]/ffi = \[\]/\' quiche/Cargo.toml') + c.run('sed -i \'s,cdylib_link_lines::metabuild();,//cdylib_link_lines::metabuild();,\' quiche/src/build.rs') c.run('cargo build --release --no-default-features --features ffi,boringssl-boring-crate --package quiche') # cannot use c.sudo() inside a cd() context, see https://github.com/pyinvoke/invoke/issues/687 c.run('sudo install -Dm644 quiche/include/quiche.h /usr/include')