]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Disable `SONAME` support in Quiche
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 19 Jul 2024 12:12:01 +0000 (14:12 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 9 Sep 2024 14:31:28 +0000 (16:31 +0200)
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)

builder-support/helpers/install_quiche.sh
tasks.py

index b09793fcd00d9c331425a175ed4596049daa6905..57656bf2c65336b321cc8abb252ff59558527865 100755 (executable)
@@ -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
index 15f6072be80367126a1600aeb3738cab3c0fbfe0..23a8cc58e5d6d0f75f7a054dd4e3dde0a8adfba7 100644 (file)
--- 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')