From ef2bdac74557399024e2956d3f8ad373b8b08bf3 Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Mon, 10 Apr 2023 22:17:11 -0500 Subject: [PATCH 1/6] add install and build/install some plugins --- CMakeLists.txt | 9 +++++ configs/CMakeLists.txt | 21 ++++++++++ iocore/eventsystem/CMakeLists.txt | 2 +- lib/CMakeLists.txt | 3 ++ lib/fastlz/CMakeLists.txt | 1 + plugins/CMakeLists.txt | 38 ++++++++++++++++++ plugins/authproxy/CMakeLists.txt | 18 +++++++++ plugins/background_fetch/CMakeLists.txt | 23 +++++++++++ plugins/cache_promote/CMakeLists.txt | 24 +++++++++++ plugins/cache_range_requests/CMakeLists.txt | 20 ++++++++++ plugins/cachekey/CMakeLists.txt | 24 +++++++++++ plugins/certifier/CMakeLists.txt | 18 +++++++++ plugins/compress/CMakeLists.txt | 22 +++++++++++ plugins/compress/compress.cc | 2 - plugins/compress/configuration.cc | 1 - plugins/conf_remap/CMakeLists.txt | 20 ++++++++++ plugins/generator/CMakeLists.txt | 18 +++++++++ plugins/xdebug/CMakeLists.txt | 18 +++++++++ src/records/CMakeLists.txt | 3 +- src/traffic_server/CMakeLists.txt | 2 + src/tscore/CMakeLists.txt | 2 + src/tscpp/api/CMakeLists.txt | 44 +++++++++++++++++++++ src/tscpp/util/CMakeLists.txt | 1 + 23 files changed, 329 insertions(+), 5 deletions(-) create mode 100644 configs/CMakeLists.txt create mode 100644 plugins/CMakeLists.txt create mode 100644 plugins/authproxy/CMakeLists.txt create mode 100644 plugins/background_fetch/CMakeLists.txt create mode 100644 plugins/cache_promote/CMakeLists.txt create mode 100644 plugins/cache_range_requests/CMakeLists.txt create mode 100644 plugins/cachekey/CMakeLists.txt create mode 100644 plugins/certifier/CMakeLists.txt create mode 100644 plugins/compress/CMakeLists.txt create mode 100644 plugins/conf_remap/CMakeLists.txt create mode 100644 plugins/generator/CMakeLists.txt create mode 100644 plugins/xdebug/CMakeLists.txt create mode 100644 src/tscpp/api/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index cc7bc33c5f2..a256f4f700d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,6 +147,12 @@ if(HOST_OS STREQUAL "linux") link_libraries(dl) endif(HOST_OS STREQUAL "linux") +if (HOST_OS STREQUAL "darwin") + set(CMAKE_MACOSX_RPATH 1) +endif(HOST_OS STREQUAL "darwin") + +set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + add_compile_definitions(${HOST_OS} PACKAGE_NAME="ats" PACKAGE_VERSION="${TS_VERSION_STRING}") add_compile_options(-Wno-invalid-offsetof) @@ -175,6 +181,7 @@ configure_file(include/tscore/ink_config.h.cmake.in include/tscore/ink_config.h) configure_file(include/ts/apidefs.h.in include/ts/apidefs.h) add_subdirectory(src/tscpp/util) +add_subdirectory(src/tscpp/api) add_subdirectory(src/tscore) add_subdirectory(src/records) add_subdirectory(iocore) @@ -183,4 +190,6 @@ add_subdirectory(mgmt/utils) add_subdirectory(mgmt/config) add_subdirectory(mgmt/rpc) add_subdirectory(src/traffic_server) +add_subdirectory(plugins) + add_subdirectory(src/tests) diff --git a/configs/CMakeLists.txt b/configs/CMakeLists.txt new file mode 100644 index 00000000000..9e1a4aeaf49 --- /dev/null +++ b/configs/CMakeLists.txt @@ -0,0 +1,21 @@ +# Makefile.am for config +# +# 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. + +file(GLOB CONFIG_FILES *.default) + +install(FILES CONFIG_FILES TYPE sysconf) \ No newline at end of file diff --git a/iocore/eventsystem/CMakeLists.txt b/iocore/eventsystem/CMakeLists.txt index 0fc3a53a1ba..556336aa1a9 100644 --- a/iocore/eventsystem/CMakeLists.txt +++ b/iocore/eventsystem/CMakeLists.txt @@ -16,7 +16,7 @@ ####################### -add_library(inkevent SHARED +add_library(inkevent STATIC EventSystem.cc IOBuffer.cc Inline.cc diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e5c46c68905..c70cd75e2e0 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -20,8 +20,11 @@ # yamlcpp shadows a bunch of variables but we don't want to hear bout it add_compile_options(-Wno-shadow) set(BUILD_SHARED_LIBS 1) +set(YAML_CPP_INSTALL ON) add_subdirectory(yamlcpp) set(YAML_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/lib/yamlcpp/include PARENT_SCOPE) add_subdirectory(fastlz) add_subdirectory(swoc) set(SWOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lib/swoc/include PARENT_SCOPE) + +install(TARGETS libswoc yaml-cpp) \ No newline at end of file diff --git a/lib/fastlz/CMakeLists.txt b/lib/fastlz/CMakeLists.txt index 38556fc74e4..23bd27efe32 100644 --- a/lib/fastlz/CMakeLists.txt +++ b/lib/fastlz/CMakeLists.txt @@ -18,3 +18,4 @@ add_library(fastlz) target_sources(fastlz PRIVATE fastlz.cc fastlz.h) +install(TARGETS fastlz) \ No newline at end of file diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt new file mode 100644 index 00000000000..a58e4ca4313 --- /dev/null +++ b/plugins/CMakeLists.txt @@ -0,0 +1,38 @@ +####################### +# +# 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. +# +####################### + +set(CMAKE_SHARED_LIBRARY_PREFIX "") + +function(add_atsplugin name) + add_library(${name} MODULE ${ARGN}) + set_target_properties(${name} PROPERTIES PREFIX "") + set_target_properties(${name} PROPERTIES SUFFIX ".so") + set_target_properties(${name} PROPERTIES LINK_FLAGS "-Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib") + install(TARGETS ${name} DESTINATION libexec/trafficserver) +endfunction() + +add_subdirectory(authproxy) +add_subdirectory(background_fetch) +add_subdirectory(cache_promote) +add_subdirectory(cache_range_requests) +add_subdirectory(cachekey) +add_subdirectory(certifier) +add_subdirectory(compress) +add_subdirectory(conf_remap) + +add_subdirectory(generator) +add_subdirectory(xdebug) \ No newline at end of file diff --git a/plugins/authproxy/CMakeLists.txt b/plugins/authproxy/CMakeLists.txt new file mode 100644 index 00000000000..265c6d4fbfc --- /dev/null +++ b/plugins/authproxy/CMakeLists.txt @@ -0,0 +1,18 @@ +####################### +# +# 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(authproxy authproxy.cc utils.cc) \ No newline at end of file diff --git a/plugins/background_fetch/CMakeLists.txt b/plugins/background_fetch/CMakeLists.txt new file mode 100644 index 00000000000..212dd22d270 --- /dev/null +++ b/plugins/background_fetch/CMakeLists.txt @@ -0,0 +1,23 @@ +####################### +# +# 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(background_fetch + background_fetch.cc + configs.cc + headers.cc + rules.cc +) \ No newline at end of file diff --git a/plugins/cache_promote/CMakeLists.txt b/plugins/cache_promote/CMakeLists.txt new file mode 100644 index 00000000000..07879e54a95 --- /dev/null +++ b/plugins/cache_promote/CMakeLists.txt @@ -0,0 +1,24 @@ +####################### +# +# 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(cache_promote + cache_promote.cc + configs.cc + policy.cc + lru_policy.cc + policy_manager.cc +) \ No newline at end of file diff --git a/plugins/cache_range_requests/CMakeLists.txt b/plugins/cache_range_requests/CMakeLists.txt new file mode 100644 index 00000000000..08a7aa1a570 --- /dev/null +++ b/plugins/cache_range_requests/CMakeLists.txt @@ -0,0 +1,20 @@ +####################### +# +# 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(cache_range_requests + cache_range_requests.cc +) \ No newline at end of file diff --git a/plugins/cachekey/CMakeLists.txt b/plugins/cachekey/CMakeLists.txt new file mode 100644 index 00000000000..f03686db1b1 --- /dev/null +++ b/plugins/cachekey/CMakeLists.txt @@ -0,0 +1,24 @@ +####################### +# +# 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(cachekey + cachekey.cc + common.cc + configs.cc + pattern.cc + plugin.cc +) \ No newline at end of file diff --git a/plugins/certifier/CMakeLists.txt b/plugins/certifier/CMakeLists.txt new file mode 100644 index 00000000000..0a13c57cb64 --- /dev/null +++ b/plugins/certifier/CMakeLists.txt @@ -0,0 +1,18 @@ +####################### +# +# 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(certifier certifier.cc) \ No newline at end of file diff --git a/plugins/compress/CMakeLists.txt b/plugins/compress/CMakeLists.txt new file mode 100644 index 00000000000..83b588c6e2f --- /dev/null +++ b/plugins/compress/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(compress + compress.cc + configuration.cc + misc.cc +) \ No newline at end of file diff --git a/plugins/compress/compress.cc b/plugins/compress/compress.cc index 4151e7e94f2..6dcf9f6fb2a 100644 --- a/plugins/compress/compress.cc +++ b/plugins/compress/compress.cc @@ -24,8 +24,6 @@ #include #include -#include "ink_autoconf.h" - #if HAVE_BROTLI_ENCODE_H #include #endif diff --git a/plugins/compress/configuration.cc b/plugins/compress/configuration.cc index f582b710900..db495fb1a38 100644 --- a/plugins/compress/configuration.cc +++ b/plugins/compress/configuration.cc @@ -21,7 +21,6 @@ limitations under the License. */ -#include "ink_autoconf.h" #include "configuration.h" #include #include diff --git a/plugins/conf_remap/CMakeLists.txt b/plugins/conf_remap/CMakeLists.txt new file mode 100644 index 00000000000..8f1916a9e88 --- /dev/null +++ b/plugins/conf_remap/CMakeLists.txt @@ -0,0 +1,20 @@ +####################### +# +# 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(conf_remap + conf_remap.cc +) \ No newline at end of file diff --git a/plugins/generator/CMakeLists.txt b/plugins/generator/CMakeLists.txt new file mode 100644 index 00000000000..21b5195a9ba --- /dev/null +++ b/plugins/generator/CMakeLists.txt @@ -0,0 +1,18 @@ +####################### +# +# 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(generator generator.cc) \ No newline at end of file diff --git a/plugins/xdebug/CMakeLists.txt b/plugins/xdebug/CMakeLists.txt new file mode 100644 index 00000000000..fa23deae149 --- /dev/null +++ b/plugins/xdebug/CMakeLists.txt @@ -0,0 +1,18 @@ +####################### +# +# 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(xdebug xdebug.cc) \ No newline at end of file diff --git a/src/records/CMakeLists.txt b/src/records/CMakeLists.txt index c3a9953fb32..0bac8b816e3 100644 --- a/src/records/CMakeLists.txt +++ b/src/records/CMakeLists.txt @@ -38,4 +38,5 @@ target_include_directories(records_p PRIVATE ${CMAKE_SOURCE_DIR}/iocore/eventsystem ${CMAKE_SOURCE_DIR}/iocore/utils ) -target_link_libraries(records_p tscore libswoc) \ No newline at end of file +target_link_libraries(records_p tscore libswoc) +install(TARGETS records_p) \ No newline at end of file diff --git a/src/traffic_server/CMakeLists.txt b/src/traffic_server/CMakeLists.txt index 904334973fc..f8e97e09ed5 100644 --- a/src/traffic_server/CMakeLists.txt +++ b/src/traffic_server/CMakeLists.txt @@ -65,3 +65,5 @@ if (TS_USE_LINUX_IO_URING) target_link_libraries(traffic_server inkuring uring) endif (TS_USE_LINUX_IO_URING) +install(TARGETS traffic_server) + diff --git a/src/tscore/CMakeLists.txt b/src/tscore/CMakeLists.txt index 0dfae75d228..bccdd4247c5 100644 --- a/src/tscore/CMakeLists.txt +++ b/src/tscore/CMakeLists.txt @@ -142,3 +142,5 @@ add_executable(test_tscore ) target_link_libraries(test_tscore PRIVATE tscore inkevent records_p libswoc) target_include_directories(test_tscore PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/iocore/eventsystem ${CATCH_INCLUDE_DIR}) + +install(TARGETS tscore) \ No newline at end of file diff --git a/src/tscpp/api/CMakeLists.txt b/src/tscpp/api/CMakeLists.txt new file mode 100644 index 00000000000..ad7368d75df --- /dev/null +++ b/src/tscpp/api/CMakeLists.txt @@ -0,0 +1,44 @@ +####################### +# +# 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_library(tscppapi STATIC + AsyncHttpFetch.cc + AsyncTimer.cc + CaseInsensitiveStringComparator.cc + ClientRequest.cc + Continuation.cc + GlobalPlugin.cc + GzipDeflateTransformation.cc + GzipInflateTransformation.cc + Headers.cc + HttpMethod.cc + HttpVersion.cc + InterceptPlugin.cc + Logger.cc + Plugin.cc + RemapPlugin.cc + Request.cc + Response.cc + Stat.cc + Transaction.cc + TransactionPlugin.cc + TransformationPlugin.cc + Url.cc + utils.cc + utils_internal.cc + ) +install(TARGETS tscppapi) \ No newline at end of file diff --git a/src/tscpp/util/CMakeLists.txt b/src/tscpp/util/CMakeLists.txt index 7a2b70acc86..d4df32b2416 100644 --- a/src/tscpp/util/CMakeLists.txt +++ b/src/tscpp/util/CMakeLists.txt @@ -36,3 +36,4 @@ add_executable(test_tscpputil ) target_link_libraries(test_tscpputil PRIVATE tscpputil libswoc) target_include_directories(test_tscpputil PRIVATE ${CMAKE_SOURCE_DIR}/include ${CATCH_INCLUDE_DIR}) +install(TARGETS tscpputil) From 21ba21bb16896ea242ee4e30dc4907ac746ef0ee Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Mon, 10 Apr 2023 22:22:19 -0500 Subject: [PATCH 2/6] fix plugin linking for macos --- plugins/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index a58e4ca4313..d09756dcea0 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -25,6 +25,10 @@ function(add_atsplugin name) install(TARGETS ${name} DESTINATION libexec/trafficserver) endfunction() +if(APPLE) + set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup") +endif() + add_subdirectory(authproxy) add_subdirectory(background_fetch) add_subdirectory(cache_promote) From 46850ec212344953be635c007a7aaea8066dbfc6 Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Tue, 11 Apr 2023 07:45:24 -0500 Subject: [PATCH 3/6] work on installing configs --- CMakeLists.txt | 4 ++-- configs/CMakeLists.txt | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a256f4f700d..daefcf79fd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,6 +190,6 @@ add_subdirectory(mgmt/utils) add_subdirectory(mgmt/config) add_subdirectory(mgmt/rpc) add_subdirectory(src/traffic_server) -add_subdirectory(plugins) - add_subdirectory(src/tests) +add_subdirectory(plugins) +add_subdirectory(configs) diff --git a/configs/CMakeLists.txt b/configs/CMakeLists.txt index 9e1a4aeaf49..f9754f32b79 100644 --- a/configs/CMakeLists.txt +++ b/configs/CMakeLists.txt @@ -18,4 +18,7 @@ file(GLOB CONFIG_FILES *.default) -install(FILES CONFIG_FILES TYPE sysconf) \ No newline at end of file +foreach(CONFIG_FILE ${CONFIG_FILES}) + cmake_path(GET CONFIG_FILE STEM LAST_ONLY CONFIG_FILE_NAME) + install(FILES ${CONFIG_FILE} DESTINATION etc/trafficserver RENAME ${CONFIG_FILE_NAME}) +endforeach() From 3f547e87fe589a6086cd415d7ed4b365e4458856 Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Fri, 14 Apr 2023 15:40:55 -0500 Subject: [PATCH 4/6] restore include for defines --- plugins/CMakeLists.txt | 2 +- plugins/compress/compress.cc | 2 ++ plugins/compress/configuration.cc | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index d09756dcea0..2566eeeb755 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -39,4 +39,4 @@ add_subdirectory(compress) add_subdirectory(conf_remap) add_subdirectory(generator) -add_subdirectory(xdebug) \ No newline at end of file +add_subdirectory(xdebug) diff --git a/plugins/compress/compress.cc b/plugins/compress/compress.cc index 6dcf9f6fb2a..ecfd534dc5b 100644 --- a/plugins/compress/compress.cc +++ b/plugins/compress/compress.cc @@ -24,6 +24,8 @@ #include #include +#include "tscore/ink_config.h" + #if HAVE_BROTLI_ENCODE_H #include #endif diff --git a/plugins/compress/configuration.cc b/plugins/compress/configuration.cc index db495fb1a38..abcf554e9c4 100644 --- a/plugins/compress/configuration.cc +++ b/plugins/compress/configuration.cc @@ -21,6 +21,7 @@ limitations under the License. */ +#include "tscore/ink_config.h" #include "configuration.h" #include #include From 094c49f2846fecf82af09159077bc0e75ef90e2f Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Wed, 19 Apr 2023 14:19:54 -0500 Subject: [PATCH 5/6] Fix newlines at eol --- lib/CMakeLists.txt | 2 +- lib/fastlz/CMakeLists.txt | 2 +- plugins/authproxy/CMakeLists.txt | 2 +- plugins/background_fetch/CMakeLists.txt | 2 +- plugins/cache_promote/CMakeLists.txt | 2 +- plugins/cache_range_requests/CMakeLists.txt | 2 +- plugins/certifier/CMakeLists.txt | 2 +- plugins/compress/CMakeLists.txt | 2 +- plugins/conf_remap/CMakeLists.txt | 2 +- plugins/generator/CMakeLists.txt | 2 +- plugins/xdebug/CMakeLists.txt | 2 +- src/records/CMakeLists.txt | 2 +- src/tscore/CMakeLists.txt | 2 +- src/tscpp/api/CMakeLists.txt | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index c70cd75e2e0..72f185710d3 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -27,4 +27,4 @@ add_subdirectory(fastlz) add_subdirectory(swoc) set(SWOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lib/swoc/include PARENT_SCOPE) -install(TARGETS libswoc yaml-cpp) \ No newline at end of file +install(TARGETS libswoc yaml-cpp) diff --git a/lib/fastlz/CMakeLists.txt b/lib/fastlz/CMakeLists.txt index 23bd27efe32..1a283f50e4c 100644 --- a/lib/fastlz/CMakeLists.txt +++ b/lib/fastlz/CMakeLists.txt @@ -18,4 +18,4 @@ add_library(fastlz) target_sources(fastlz PRIVATE fastlz.cc fastlz.h) -install(TARGETS fastlz) \ No newline at end of file +install(TARGETS fastlz) diff --git a/plugins/authproxy/CMakeLists.txt b/plugins/authproxy/CMakeLists.txt index 265c6d4fbfc..2902e3dcbfc 100644 --- a/plugins/authproxy/CMakeLists.txt +++ b/plugins/authproxy/CMakeLists.txt @@ -15,4 +15,4 @@ # ####################### -add_atsplugin(authproxy authproxy.cc utils.cc) \ No newline at end of file +add_atsplugin(authproxy authproxy.cc utils.cc) diff --git a/plugins/background_fetch/CMakeLists.txt b/plugins/background_fetch/CMakeLists.txt index 212dd22d270..4ebb6db6034 100644 --- a/plugins/background_fetch/CMakeLists.txt +++ b/plugins/background_fetch/CMakeLists.txt @@ -20,4 +20,4 @@ add_atsplugin(background_fetch configs.cc headers.cc rules.cc -) \ No newline at end of file +) diff --git a/plugins/cache_promote/CMakeLists.txt b/plugins/cache_promote/CMakeLists.txt index 07879e54a95..f3c3638de83 100644 --- a/plugins/cache_promote/CMakeLists.txt +++ b/plugins/cache_promote/CMakeLists.txt @@ -21,4 +21,4 @@ add_atsplugin(cache_promote policy.cc lru_policy.cc policy_manager.cc -) \ No newline at end of file +) diff --git a/plugins/cache_range_requests/CMakeLists.txt b/plugins/cache_range_requests/CMakeLists.txt index 08a7aa1a570..b3f526bb656 100644 --- a/plugins/cache_range_requests/CMakeLists.txt +++ b/plugins/cache_range_requests/CMakeLists.txt @@ -17,4 +17,4 @@ add_atsplugin(cache_range_requests cache_range_requests.cc -) \ No newline at end of file +) diff --git a/plugins/certifier/CMakeLists.txt b/plugins/certifier/CMakeLists.txt index 0a13c57cb64..6495cfeb9e1 100644 --- a/plugins/certifier/CMakeLists.txt +++ b/plugins/certifier/CMakeLists.txt @@ -15,4 +15,4 @@ # ####################### -add_atsplugin(certifier certifier.cc) \ No newline at end of file +add_atsplugin(certifier certifier.cc) diff --git a/plugins/compress/CMakeLists.txt b/plugins/compress/CMakeLists.txt index 83b588c6e2f..130e7798ec4 100644 --- a/plugins/compress/CMakeLists.txt +++ b/plugins/compress/CMakeLists.txt @@ -19,4 +19,4 @@ add_atsplugin(compress compress.cc configuration.cc misc.cc -) \ No newline at end of file +) diff --git a/plugins/conf_remap/CMakeLists.txt b/plugins/conf_remap/CMakeLists.txt index 8f1916a9e88..06193c33fc5 100644 --- a/plugins/conf_remap/CMakeLists.txt +++ b/plugins/conf_remap/CMakeLists.txt @@ -17,4 +17,4 @@ add_atsplugin(conf_remap conf_remap.cc -) \ No newline at end of file +) diff --git a/plugins/generator/CMakeLists.txt b/plugins/generator/CMakeLists.txt index 21b5195a9ba..1402a9ec6fc 100644 --- a/plugins/generator/CMakeLists.txt +++ b/plugins/generator/CMakeLists.txt @@ -15,4 +15,4 @@ # ####################### -add_atsplugin(generator generator.cc) \ No newline at end of file +add_atsplugin(generator generator.cc) diff --git a/plugins/xdebug/CMakeLists.txt b/plugins/xdebug/CMakeLists.txt index fa23deae149..6044ea3c152 100644 --- a/plugins/xdebug/CMakeLists.txt +++ b/plugins/xdebug/CMakeLists.txt @@ -15,4 +15,4 @@ # ####################### -add_atsplugin(xdebug xdebug.cc) \ No newline at end of file +add_atsplugin(xdebug xdebug.cc) diff --git a/src/records/CMakeLists.txt b/src/records/CMakeLists.txt index 0bac8b816e3..3dd431afcb8 100644 --- a/src/records/CMakeLists.txt +++ b/src/records/CMakeLists.txt @@ -39,4 +39,4 @@ target_include_directories(records_p PRIVATE ${CMAKE_SOURCE_DIR}/iocore/utils ) target_link_libraries(records_p tscore libswoc) -install(TARGETS records_p) \ No newline at end of file +install(TARGETS records_p) diff --git a/src/tscore/CMakeLists.txt b/src/tscore/CMakeLists.txt index bccdd4247c5..ab5e5b66e6c 100644 --- a/src/tscore/CMakeLists.txt +++ b/src/tscore/CMakeLists.txt @@ -143,4 +143,4 @@ add_executable(test_tscore target_link_libraries(test_tscore PRIVATE tscore inkevent records_p libswoc) target_include_directories(test_tscore PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/iocore/eventsystem ${CATCH_INCLUDE_DIR}) -install(TARGETS tscore) \ No newline at end of file +install(TARGETS tscore) diff --git a/src/tscpp/api/CMakeLists.txt b/src/tscpp/api/CMakeLists.txt index ad7368d75df..a08b5abf2f6 100644 --- a/src/tscpp/api/CMakeLists.txt +++ b/src/tscpp/api/CMakeLists.txt @@ -41,4 +41,4 @@ add_library(tscppapi STATIC utils.cc utils_internal.cc ) -install(TARGETS tscppapi) \ No newline at end of file +install(TARGETS tscppapi) From 9b773c9ebe02c2dc0ddfa31b1417b0890eb09855 Mon Sep 17 00:00:00 2001 From: Chris McFarlen Date: Wed, 19 Apr 2023 14:41:20 -0500 Subject: [PATCH 6/6] one more --- plugins/cachekey/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cachekey/CMakeLists.txt b/plugins/cachekey/CMakeLists.txt index f03686db1b1..4ad2546b6db 100644 --- a/plugins/cachekey/CMakeLists.txt +++ b/plugins/cachekey/CMakeLists.txt @@ -21,4 +21,4 @@ add_atsplugin(cachekey configs.cc pattern.cc plugin.cc -) \ No newline at end of file +)