]> 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>
Fri, 26 Jul 2024 13:23:46 +0000 (15:23 +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`.

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 6fa635a1902fcdca101101553fb95c4d8f7e0f14..6b13d5839d000fa248e05680abd21c581e41e006 100644 (file)
--- a/tasks.py
+++ b/tasks.py
@@ -1059,6 +1059,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')