From 400cac80c080e56e1b37dbf30d73edd325c252cf Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Mon, 11 Sep 2023 09:44:10 -0500 Subject: [PATCH 1/2] Add remaining plugins without external deps --- plugins/experimental/CMakeLists.txt | 4 +++ plugins/experimental/geoip_acl/CMakeLists.txt | 22 ++++++++++++++++ plugins/experimental/memcache/CMakeLists.txt | 19 ++++++++++++++ .../experimental/rate_limit/CMakeLists.txt | 26 +++++++++++++++++++ plugins/experimental/url_sig/CMakeLists.txt | 19 ++++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 plugins/experimental/geoip_acl/CMakeLists.txt create mode 100644 plugins/experimental/memcache/CMakeLists.txt create mode 100644 plugins/experimental/rate_limit/CMakeLists.txt create mode 100644 plugins/experimental/url_sig/CMakeLists.txt diff --git a/plugins/experimental/CMakeLists.txt b/plugins/experimental/CMakeLists.txt index 9e5cfc25b9d..0dae5154a24 100644 --- a/plugins/experimental/CMakeLists.txt +++ b/plugins/experimental/CMakeLists.txt @@ -21,17 +21,21 @@ add_subdirectory(cert_reporting_tool) add_subdirectory(cookie_remap) add_subdirectory(custom_redirect) add_subdirectory(fq_pacing) +add_subdirectory(geoip_acl) add_subdirectory(header_freq) add_subdirectory(hook-trace) add_subdirectory(http_stats) add_subdirectory(icap) add_subdirectory(inliner) add_subdirectory(maxmind_acl) +add_subdirectory(memcache) add_subdirectory(memory_profile) add_subdirectory(money_trace) add_subdirectory(mp4) +add_subdirectory(rate_limit) add_subdirectory(redo_cache_lookup) add_subdirectory(slice) add_subdirectory(stream_editor) add_subdirectory(system_stats) add_subdirectory(tls_bridge) +add_subdirectory(url_sig) diff --git a/plugins/experimental/geoip_acl/CMakeLists.txt b/plugins/experimental/geoip_acl/CMakeLists.txt new file mode 100644 index 00000000000..4b5fe26f5d9 --- /dev/null +++ b/plugins/experimental/geoip_acl/CMakeLists.txt @@ -0,0 +1,22 @@ +####################### +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor license +# agreements. See the NOTICE file distributed with this work for additional information regarding +# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. +# +####################### + +add_atsplugin(geoip_acl + geoip_acl.cc + acl.cc +) +target_link_libraries(geoip_acl PRIVATE PCRE::PCRE) diff --git a/plugins/experimental/memcache/CMakeLists.txt b/plugins/experimental/memcache/CMakeLists.txt new file mode 100644 index 00000000000..e85e1035894 --- /dev/null +++ b/plugins/experimental/memcache/CMakeLists.txt @@ -0,0 +1,19 @@ +####################### +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor license +# agreements. See the NOTICE file distributed with this work for additional information regarding +# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. +# +####################### + +add_atsplugin(memcache tsmemcache.cc) +target_link_libraries(memcache PRIVATE ts::inkevent ts::inknet) diff --git a/plugins/experimental/rate_limit/CMakeLists.txt b/plugins/experimental/rate_limit/CMakeLists.txt new file mode 100644 index 00000000000..4e14921b378 --- /dev/null +++ b/plugins/experimental/rate_limit/CMakeLists.txt @@ -0,0 +1,26 @@ +####################### +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor license +# agreements. See the NOTICE file distributed with this work for additional information regarding +# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. +# +####################### + +add_atsplugin(rate_limit + ip_reputation.cc + rate_limit.cc + sni_limiter.cc + sni_selector.cc + txn_limiter.cc + utilities.cc +) +target_link_libraries(rate_limit PRIVATE OpenSSL::SSL) diff --git a/plugins/experimental/url_sig/CMakeLists.txt b/plugins/experimental/url_sig/CMakeLists.txt new file mode 100644 index 00000000000..e4ac652614d --- /dev/null +++ b/plugins/experimental/url_sig/CMakeLists.txt @@ -0,0 +1,19 @@ +####################### +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor license +# agreements. See the NOTICE file distributed with this work for additional information regarding +# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. +# +####################### + +add_atsplugin(url_sig url_sig.cc) +target_link_libraries(url_sig PRIVATE OpenSSL::SSL PCRE::PCRE) From 75b89cbd2a4de7c762bf20480bbda598ecd34fba Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Mon, 11 Sep 2023 11:30:33 -0500 Subject: [PATCH 2/2] Don't link static libs for plugin, but just include headers --- plugins/experimental/memcache/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/experimental/memcache/CMakeLists.txt b/plugins/experimental/memcache/CMakeLists.txt index e85e1035894..c5db5b0227c 100644 --- a/plugins/experimental/memcache/CMakeLists.txt +++ b/plugins/experimental/memcache/CMakeLists.txt @@ -16,4 +16,11 @@ ####################### add_atsplugin(memcache tsmemcache.cc) -target_link_libraries(memcache PRIVATE ts::inkevent ts::inknet) + +get_target_property(EVENT_INCLUDES ts::inkevent INCLUDE_DIRECTORIES) +get_target_property(NET_INCLUDES ts::inknet INCLUDE_DIRECTORIES) + +target_include_directories(memcache PRIVATE + $ + $ + $)