From 25f714371b73ab81454fe9089f49d4f3601a1d7c Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Wed, 28 Sep 2022 13:28:48 -0300 Subject: [PATCH 1/2] Remove deprecated code - Removes the old lokimq name compatibility shims - Removes the oxenmq::bt* -> oxenc::bt* shim headers --- CMakeLists.txt | 32 ----------------------------- liblokimq.pc.in | 14 ------------- lokimq/address.h | 4 ---- lokimq/auth.h | 4 ---- lokimq/base32z.h | 4 ---- lokimq/base64.h | 4 ---- lokimq/batch.h | 4 ---- lokimq/bt_serialize.h | 4 ---- lokimq/bt_value.h | 4 ---- lokimq/connections.h | 4 ---- lokimq/hex.h | 4 ---- lokimq/lokimq.h | 10 --------- lokimq/message.h | 4 ---- lokimq/variant.h | 2 -- lokimq/version.h | 4 ---- oxenmq/bt_producer.h | 12 ----------- oxenmq/bt_serialize.h | 48 ------------------------------------------- oxenmq/bt_value.h | 45 ---------------------------------------- 18 files changed, 207 deletions(-) delete mode 100644 liblokimq.pc.in delete mode 100644 lokimq/address.h delete mode 100644 lokimq/auth.h delete mode 100644 lokimq/base32z.h delete mode 100644 lokimq/base64.h delete mode 100644 lokimq/batch.h delete mode 100644 lokimq/bt_serialize.h delete mode 100644 lokimq/bt_value.h delete mode 100644 lokimq/connections.h delete mode 100644 lokimq/hex.h delete mode 100644 lokimq/lokimq.h delete mode 100644 lokimq/message.h delete mode 100644 lokimq/variant.h delete mode 100644 lokimq/version.h delete mode 100644 oxenmq/bt_producer.h delete mode 100644 oxenmq/bt_serialize.h delete mode 100644 oxenmq/bt_value.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 269d92d..10667af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,15 +42,11 @@ endif() option(OXENMQ_BUILD_TESTS "Building and perform oxenmq tests" ${oxenmq_IS_TOPLEVEL_PROJECT}) option(OXENMQ_INSTALL "Add oxenmq libraries and headers to cmake install target; defaults to ON if BUILD_SHARED_LIBS is enabled or we are the top-level project; OFF for a static subdirectory build" ${oxenmq_INSTALL_DEFAULT}) option(OXENMQ_INSTALL_CPPZMQ "Install cppzmq header with oxenmq/ headers (requires OXENMQ_INSTALL)" ON) -option(OXENMQ_LOKIMQ_COMPAT "Install lokimq compatibility headers and pkg-config for rename migration" ON) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") configure_file(oxenmq/version.h.in oxenmq/version.h @ONLY) configure_file(liboxenmq.pc.in liboxenmq.pc @ONLY) -if(OXENMQ_LOKIMQ_COMPAT) - configure_file(liblokimq.pc.in liblokimq.pc @ONLY) -endif() add_library(oxenmq @@ -186,9 +182,6 @@ else() endif() add_library(oxenmq::oxenmq ALIAS oxenmq) -if(OXENMQ_LOKIMQ_COMPAT) - add_library(lokimq::lokimq ALIAS oxenmq) -endif() export( TARGETS oxenmq @@ -234,31 +227,6 @@ if(OXENMQ_INSTALL) DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) - if(OXENMQ_LOKIMQ_COMPAT) - install( - FILES lokimq/address.h - lokimq/auth.h - lokimq/base32z.h - lokimq/base64.h - lokimq/batch.h - lokimq/bt_serialize.h - lokimq/bt_value.h - lokimq/connections.h - lokimq/hex.h - lokimq/lokimq.h - lokimq/message.h - lokimq/variant.h - lokimq/version.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lokimq - ) - - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/liblokimq.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig - ) - endif() - - endif() if(OXENMQ_BUILD_TESTS) diff --git a/liblokimq.pc.in b/liblokimq.pc.in deleted file mode 100644 index 8f4c5f0..0000000 --- a/liblokimq.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=${prefix} -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: liblokimq -Description: ZeroMQ-based communication library (compatibility package for liboxenmq) -Version: @PROJECT_VERSION@ - -Libs: -L${libdir} -loxenmq -Libs.private: @PRIVATE_LIBS@ -Requires: liboxenc -Requires.private: libzmq libsodium -Cflags: -I${includedir} diff --git a/lokimq/address.h b/lokimq/address.h deleted file mode 100644 index 5239b39..0000000 --- a/lokimq/address.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/address.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/auth.h b/lokimq/auth.h deleted file mode 100644 index d6c38f6..0000000 --- a/lokimq/auth.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/auth.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/base32z.h b/lokimq/base32z.h deleted file mode 100644 index 0f40acf..0000000 --- a/lokimq/base32z.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/base32z.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/base64.h b/lokimq/base64.h deleted file mode 100644 index 36f2c7d..0000000 --- a/lokimq/base64.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/base64.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/batch.h b/lokimq/batch.h deleted file mode 100644 index bf06f14..0000000 --- a/lokimq/batch.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/batch.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/bt_serialize.h b/lokimq/bt_serialize.h deleted file mode 100644 index 1d904a6..0000000 --- a/lokimq/bt_serialize.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/bt_serialize.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/bt_value.h b/lokimq/bt_value.h deleted file mode 100644 index c311b76..0000000 --- a/lokimq/bt_value.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/bt_value.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/connections.h b/lokimq/connections.h deleted file mode 100644 index 5775338..0000000 --- a/lokimq/connections.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/connections.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/hex.h b/lokimq/hex.h deleted file mode 100644 index 08c3b58..0000000 --- a/lokimq/hex.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/hex.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/lokimq.h b/lokimq/lokimq.h deleted file mode 100644 index 57ed082..0000000 --- a/lokimq/lokimq.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include "../oxenmq/oxenmq.h" - -namespace lokimq = oxenmq; - -namespace oxenmq { - -using LokiMQ = OxenMQ; - -} diff --git a/lokimq/message.h b/lokimq/message.h deleted file mode 100644 index a0e8ad5..0000000 --- a/lokimq/message.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/message.h" - -namespace lokimq = oxenmq; diff --git a/lokimq/variant.h b/lokimq/variant.h deleted file mode 100644 index 08cb791..0000000 --- a/lokimq/variant.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include "../oxenmq/variant.h" diff --git a/lokimq/version.h b/lokimq/version.h deleted file mode 100644 index d49e184..0000000 --- a/lokimq/version.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include "../oxenmq/version.h" - -namespace lokimq = oxenmq; diff --git a/oxenmq/bt_producer.h b/oxenmq/bt_producer.h deleted file mode 100644 index 67325fd..0000000 --- a/oxenmq/bt_producer.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -// Compatibility shim for oxenc includes - -namespace oxenmq { - -using oxenc::bt_list_producer; -using oxenc::bt_dict_producer; - -} // namespace oxenmq diff --git a/oxenmq/bt_serialize.h b/oxenmq/bt_serialize.h deleted file mode 100644 index 07dca2e..0000000 --- a/oxenmq/bt_serialize.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2019-2020, The Oxen Project -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other -// materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its contributors may be -// used to endorse or promote products derived from this software without specific -// prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#pragma once - -// Compatibility shim for oxenc includes - -#include - -namespace oxenmq { - -using oxenc::bt_deserialize_invalid; -using oxenc::bt_deserialize_invalid_type; -using oxenc::bt_serializer; -using oxenc::bt_serialize; -using oxenc::bt_deserialize; -using oxenc::bt_get; -using oxenc::get_int; -using oxenc::get_tuple; -using oxenc::bt_dict_consumer; -using oxenc::bt_list_consumer; - -} // namespace oxenmq diff --git a/oxenmq/bt_value.h b/oxenmq/bt_value.h deleted file mode 100644 index 14cd186..0000000 --- a/oxenmq/bt_value.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2019-2021, The Oxen Project -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other -// materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its contributors may be -// used to endorse or promote products derived from this software without specific -// prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#pragma once - -// Compatibility shim for oxenc includes - -#include - -namespace oxenmq { - -using oxenc::bt_value; -using oxenc::bt_dict; -using oxenc::bt_list; -using oxenc::bt_variant; - -using oxenc::has_alternative; -using oxenc::has_alternative_v; - -} From df19d1dd9448d237d40a13d1746060be1a9db6f2 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Wed, 28 Sep 2022 13:57:07 -0300 Subject: [PATCH 2/2] Add sid workaround lsb_release -sc on sid currently prints 'n/a' because of debian bugs 1020893 and 1008735. Add a workaround. Also bumps clang builds to latest version. --- .drone.jsonnet | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 005da65..e39873d 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -19,6 +19,7 @@ local debian_pipeline(name, cmake_extra='', build_type='Release', extra_cmds=[], + distro='$$(lsb_release -sc)', allow_fail=false) = { kind: 'pipeline', type: 'docker', @@ -39,7 +40,7 @@ local debian_pipeline(name, apt_get_quiet + 'install -y eatmydata', 'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y lsb-release', 'cp contrib/deb.oxen.io.gpg /etc/apt/trusted.gpg.d', - 'echo deb http://deb.oxen.io $$(lsb_release -sc) main >/etc/apt/sources.list.d/oxen.list', + 'echo deb http://deb.oxen.io ' + distro + ' main >/etc/apt/sources.list.d/oxen.list', 'eatmydata ' + apt_get_quiet + ' update', 'eatmydata ' + apt_get_quiet + 'dist-upgrade -y', 'eatmydata ' + apt_get_quiet + 'install -y cmake git ninja-build pkg-config ccache ' + std.join(' ', deps), @@ -56,6 +57,7 @@ local debian_pipeline(name, local clang(version) = debian_pipeline( 'Debian sid/clang-' + version + ' (amd64)', docker_base + 'debian-sid-clang', + distro='sid', deps=['clang-' + version] + default_deps_nocxx, cmake_extra='-DCMAKE_C_COMPILER=clang-' + version + ' -DCMAKE_CXX_COMPILER=clang++-' + version + ' ' ); @@ -63,6 +65,7 @@ local clang(version) = debian_pipeline( local full_llvm(version) = debian_pipeline( 'Debian sid/llvm-' + version + ' (amd64)', docker_base + 'debian-sid-clang', + distro='sid', deps=['clang-' + version, 'lld-' + version, 'libc++-' + version + '-dev', 'libc++abi-' + version + '-dev'] + default_deps_nocxx, cmake_extra='-DCMAKE_C_COMPILER=clang-' + version + @@ -76,13 +79,13 @@ local full_llvm(version) = debian_pipeline( [ - debian_pipeline('Debian sid (amd64)', docker_base + 'debian-sid'), - debian_pipeline('Debian sid/Debug (amd64)', docker_base + 'debian-sid', build_type='Debug'), - clang(13), - full_llvm(13), + debian_pipeline('Debian sid (amd64)', docker_base + 'debian-sid', distro='sid'), + debian_pipeline('Debian sid/Debug (amd64)', docker_base + 'debian-sid', build_type='Debug', distro='sid'), + clang(14), + full_llvm(14), debian_pipeline('Debian buster (amd64)', docker_base + 'debian-buster'), debian_pipeline('Debian stable (i386)', docker_base + 'debian-stable/i386'), - debian_pipeline('Debian sid (ARM64)', docker_base + 'debian-sid', arch='arm64'), + debian_pipeline('Debian sid (ARM64)', docker_base + 'debian-sid', arch='arm64', distro='sid'), debian_pipeline('Debian stable (armhf)', docker_base + 'debian-stable/arm32v7', arch='arm64'), debian_pipeline('Debian buster (armhf)', docker_base + 'debian-buster/arm32v7', arch='arm64'), debian_pipeline('Ubuntu focal (amd64)', docker_base + 'ubuntu-focal'),