You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "traeak (via GitHub)" <gi...@apache.org> on 2023/10/31 20:30:30 UTC
[PR] Add CMake support for building uri_signing plugin [trafficserver]
traeak opened a new pull request, #10702:
URL: https://github.com/apache/trafficserver/pull/10702
Checks for jansson/cjose libs before deciding to build the uri_signing plugin.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378857582
##########
cmake/Findjansson.cmake:
##########
@@ -0,0 +1,49 @@
+#######################
+#
+# 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.
+#
+#######################
+
+# Findjansson.cmake
Review Comment:
With a new enough version of `libjansson`, CMake should find the Config file that was installed along with its development headers. It moves the responsibility of setting up the dependency correctly to the dependency itself, instead of putting the burden on us.
However, I have seen a case before where a project correctly `install()`ed their config file, but it was missing from the packaging step. If this is the case here, it's a bug and we should probably report it to the project.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak merged PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#issuecomment-1790996146
Note: We took a look at it, and it turns out the unit_test needs to link the public API. These links cannot be removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1379337198
##########
plugins/experimental/uri_signing/CMakeLists.txt:
##########
@@ -0,0 +1,43 @@
+#######################
+#
+# 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.
+#
+#######################
+
+project(uri_signing)
+
+add_atsplugin(
+ uri_signing
+ common.cc
+ config.cc
+ cookie.cc
+ jwt.cc
+ match.cc
+ normalize.cc
+ parse.cc
+ timing.cc
+ uri_signing.cc
+)
+
+target_link_libraries(
+ uri_signing
+ PRIVATE
+ cjose::cjose
Review Comment:
It looks like `ts::tscpputil` is needed here. #10709 should have fixed an include issue so that we can link it here now.
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,51 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+ ${CMAKE_SOURCE_DIR}/src/shared/overridable_txn_vars.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ uri_signing_test
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ ts::tsapi
+ ts::http
+ ts::hdrs
+ ts::proxy
+ ts::configmanager
+ ts::logging
+ ts::inknet
+ OpenSSL::SSL
+ OpenSSL::Crypto
Review Comment:
These should not be needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "ywkaras (via GitHub)" <gi...@apache.org>.
ywkaras commented on PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#issuecomment-1789739016
[approve ci autest]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1380231892
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,45 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+ ${CMAKE_SOURCE_DIR}/src/shared/overridable_txn_vars.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ uri_signing_test
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ ts::http
+ ts::tsapi
+ ts::tscpputil
Review Comment:
Why are these needed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378927414
##########
cmake/Findjansson.cmake:
##########
@@ -0,0 +1,49 @@
+#######################
+#
+# 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.
+#
+#######################
+
+# Findjansson.cmake
Review Comment:
It should have the name janssonConfig.cmake or jansson-config.cmake. An example from my system is `/usr/lib64/cmake/c-ares-config.cmake`.
It looks like `janssonConfig.cmake` is only packaged on Fedora and Open Mandriva. That renders it effectively useless for any project that also wants to build on Ubuntu. We don't need a comment I guess - we may be needing our own Find module for the foreseeable future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#issuecomment-1788134357
[approve ci autest]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "ywkaras (via GitHub)" <gi...@apache.org>.
ywkaras commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1379370716
##########
plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc:
##########
@@ -34,6 +34,10 @@ extern "C" {
#include "../match.h"
#include "../config.h"
+#include "tscore/Version.h"
+
+AppVersionInfo appVersionInfo;
Review Comment:
Where is this used?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1380198884
##########
plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc:
##########
@@ -34,6 +34,10 @@ extern "C" {
#include "../match.h"
#include "../config.h"
+#include "tscore/Version.h"
+
+AppVersionInfo appVersionInfo;
Review Comment:
i'm not sure. this was put in to resolve missing library symbols.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378761696
##########
plugins/experimental/uri_signing/CMakeLists.txt:
##########
@@ -0,0 +1,37 @@
+#######################
+#
+# 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(
+ uri_signing
+ common.cc
+ config.cc
+ cookie.cc
+ jwt.cc
+ match.cc
+ normalize.cc
+ parse.cc
+ timing.cc
+ uri_signing.cc
+)
+
+target_link_libraries(
+ uri_signing
+ PRIVATE
+ cjose::cjose
+ jansson::jansson
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#issuecomment-1788020078
Running Test uri_signing: Skipped
Warning: Skipping test uri_signing because:
/tmp/ats/libexec/trafficserver/uri_signing.so not found.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378763170
##########
cmake/Findjansson.cmake:
##########
@@ -0,0 +1,49 @@
+#######################
+#
+# 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.
+#
+#######################
+
+# Findjansson.cmake
Review Comment:
i don't understand if i don't have the Findjansson file cmake won't find the library.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1380274796
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,51 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+ ${CMAKE_SOURCE_DIR}/src/shared/overridable_txn_vars.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ uri_signing_test
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ ts::tsapi
+ ts::http
+ ts::hdrs
+ ts::proxy
+ ts::configmanager
+ ts::logging
+ ts::inknet
+ OpenSSL::SSL
+ OpenSSL::Crypto
Review Comment:
they shouldn't be but i'm not going to copy/paste in the pages of link errors that happen without these.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1380295127
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,45 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+ ${CMAKE_SOURCE_DIR}/src/shared/overridable_txn_vars.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ uri_signing_test
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ ts::http
+ ts::tsapi
+ ts::tscpputil
Review Comment:
what is in there with rocky linux 8 and cmake -B build --preset autest it links with what is in there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "ywkaras (via GitHub)" <gi...@apache.org>.
ywkaras commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378309626
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,42 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ test_content_range
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ PCRE::PCRE
Review Comment:
PCRE is linked in the autotools Makefile.inc. Could it be an indirect depedency?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "ywkaras (via GitHub)" <gi...@apache.org>.
ywkaras commented on PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#issuecomment-1790076618
If you cherry pick the tip of this branch, it will hopefully fix the uri_signing test case: https://github.com/ywkaras/trafficserver/tree/fix_uri_signing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378943943
##########
cmake/Findjansson.cmake:
##########
@@ -0,0 +1,49 @@
+#######################
+#
+# 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.
+#
+#######################
+
+# Findjansson.cmake
Review Comment:
Opened akheron/jansson#668.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378246654
##########
cmake/Findjansson.cmake:
##########
@@ -0,0 +1,49 @@
+#######################
+#
+# 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.
+#
+#######################
+
+# Findjansson.cmake
Review Comment:
Since `libjansson=2.7` this Find module is not needed anymore because they provide a config. Could we make note of this in a comment somewhere? That way someone can easily make the call to remove this file in the future when we decide not to support `libjansson<2.7`.
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,42 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ test_content_range
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ PCRE::PCRE
Review Comment:
Here's PCRE again. It shouldn't be here. 🙂
##########
plugins/experimental/uri_signing/CMakeLists.txt:
##########
@@ -0,0 +1,37 @@
+#######################
+#
+# 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(
+ uri_signing
+ common.cc
+ config.cc
+ cookie.cc
+ jwt.cc
+ match.cc
+ normalize.cc
+ parse.cc
+ timing.cc
+ uri_signing.cc
+)
+
+target_link_libraries(
+ uri_signing
+ PRIVATE
+ cjose::cjose
+ jansson::jansson
+ PCRE::PCRE
Review Comment:
The plugin doesn't even use PCRE. If we need to link PCRE to all plugins because of our dependency woes, can we at least do it in `add_ats_plugin` so our mess is all in one place? I would hope we don't need this at all.
##########
plugins/experimental/uri_signing/CMakeLists.txt:
##########
@@ -0,0 +1,37 @@
+#######################
+#
+# 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(
+ uri_signing
+ common.cc
+ config.cc
+ cookie.cc
+ jwt.cc
+ match.cc
+ normalize.cc
+ parse.cc
+ timing.cc
+ uri_signing.cc
+)
+
+target_link_libraries(
+ uri_signing
+ PRIVATE
+ cjose::cjose
+ jansson::jansson
Review Comment:
I think `libjansson` is a PUBLIC dep: `jwt.h` includes it.
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,42 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ test_content_range
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ PCRE::PCRE
Review Comment:
Here's PCRE again. It shouldn't be here. 🙂
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378703272
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,42 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ test_content_range
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ PCRE::PCRE
Review Comment:
Yes, but we should only need to list direct dependencies. CMake will link indirect dependencies for us, if it knows what they are. More concretely, if `PCRE` is listed as a `PUBLIC` dependency of a direct dependency, then it will add it to the link line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378927414
##########
cmake/Findjansson.cmake:
##########
@@ -0,0 +1,49 @@
+#######################
+#
+# 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.
+#
+#######################
+
+# Findjansson.cmake
Review Comment:
It should have the name janssonConfig.cmake or jansson-config.cmake. An example from my system is `/usr/lib64/cmake/c-ares-config.cmake`.
It looks like `janssonConfig.cmake` is only packaged on Fedora and Open Mandriva. That renders it effectively useless for any project that also wants to build on Ubuntu.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1380295127
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,45 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+ ${CMAKE_SOURCE_DIR}/src/shared/overridable_txn_vars.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ uri_signing_test
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ ts::http
+ ts::tsapi
+ ts::tscpputil
Review Comment:
what is in there with rocky linux 8 and cmake -B build --preset autest it links with what is in there. There are more serious problems that go beyond the scope of this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1380231892
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,45 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+ ${CMAKE_SOURCE_DIR}/src/shared/overridable_txn_vars.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ uri_signing_test
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ ts::http
+ ts::tsapi
+ ts::tscpputil
Review Comment:
Why are these needed? If we can remove these it will fix the CI failures.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378887684
##########
cmake/Findjansson.cmake:
##########
@@ -0,0 +1,49 @@
+#######################
+#
+# 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.
+#
+#######################
+
+# Findjansson.cmake
Review Comment:
is that this file? /usr/lib64/pkgconfig/jansson.pc
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378927414
##########
cmake/Findjansson.cmake:
##########
@@ -0,0 +1,49 @@
+#######################
+#
+# 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.
+#
+#######################
+
+# Findjansson.cmake
Review Comment:
It should have the name janssonConfig.cmake or jansson-config.cmake. An example path to a CMake config file from my system is `/usr/lib64/cmake/c-ares-config.cmake`.
It looks like `janssonConfig.cmake` is only packaged on Fedora and Open Mandriva. That renders it effectively useless for any project that also wants to build on Ubuntu. We don't need a comment I guess - we may be needing our own Find module for the foreseeable future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378930644
##########
cmake/Findjansson.cmake:
##########
@@ -0,0 +1,49 @@
+#######################
+#
+# 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.
+#
+#######################
+
+# Findjansson.cmake
Review Comment:
BTW, CMake has integration with pkgconfig. I tried it out with when I added the lua plugin, but there was something unexpected I missed that @cmcfarlen fixed. So, we'll want to review that if we decide to use the pkgconfig integration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#issuecomment-1790920041
> If you cherry pick the tip of this branch, it will hopefully fix the uri_signing test case: https://github.com/ywkaras/trafficserver/tree/fix_uri_signing
I just refactored the function so that it follows a goto free (except for "fail") logical work flow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CMake support for building uri_signing plugin [trafficserver]
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10702:
URL: https://github.com/apache/trafficserver/pull/10702#discussion_r1378703272
##########
plugins/experimental/uri_signing/unit_tests/CMakeLists.txt:
##########
@@ -0,0 +1,42 @@
+#######################
+#
+# 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_executable(
+ uri_signing_test
+ uri_signing_test.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/common.cc
+ ${PROJECT_SOURCE_DIR}/config.cc
+ ${PROJECT_SOURCE_DIR}/cookie.cc
+ ${PROJECT_SOURCE_DIR}/jwt.cc
+ ${PROJECT_SOURCE_DIR}/match.cc
+ ${PROJECT_SOURCE_DIR}/normalize.cc
+ ${PROJECT_SOURCE_DIR}/parse.cc
+ ${PROJECT_SOURCE_DIR}/timing.cc
+ ${PROJECT_SOURCE_DIR}/uri_signing.cc
+)
+target_compile_definitions(uri_signing_test PRIVATE UNITTEST)
+target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})
+target_link_libraries(
+ test_content_range
+ PRIVATE
+ catch2::catch2
+ jansson::jansson
+ cjose::cjose
+ PCRE::PCRE
Review Comment:
Yes, but we should only need to list direct dependencies. CMake will link indirect dependencies for us, if it knows what they are. More concretely, if `PCRE` is listed as a `PUBLIC` dependency of a direct dependency, then it will add it to the link line. If it's listed as a `PRIVATE` dependency of a dependency, but it's not statically compiled in, then it will also add it to the link line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org