diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
| commit | 2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch) | |
| tree | 25f0138e1af8902b92dacc8cce09b267447c17db /www/trafficserver/files | |
| parent | f85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff) | |
| parent | 1a30da80670973368b399f2b01fe9c04b91a1273 (diff) | |
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'www/trafficserver/files')
6 files changed, 145 insertions, 13 deletions
diff --git a/www/trafficserver/files/patch-cmake__Findmaxminddb.cmake b/www/trafficserver/files/patch-cmake__Findmaxminddb.cmake new file mode 100644 index 000000000000..cf6c6dd0a16c --- /dev/null +++ b/www/trafficserver/files/patch-cmake__Findmaxminddb.cmake @@ -0,0 +1,18 @@ +--- cmake/Findmaxminddb.cmake.orig 2025-01-29 14:00:25 UTC ++++ cmake/Findmaxminddb.cmake +@@ -31,6 +31,8 @@ + # maxminddb exports their own config since maxminddb-1.5.0, but it isn't + # present in the OpenSUSE libmaxminddb-devel-1.7.1 package and maybe others. + ++if(BUILD_MAXMIND_ACL) ++ + find_library(maxminddb_LIBRARY NAMES maxminddb) + find_path(maxminddb_INCLUDE_DIR NAMES maxminddb.h) + +@@ -47,4 +49,6 @@ if(maxminddb_FOUND AND NOT TARGET maxminddb::maxminddb + add_library(maxminddb::maxminddb INTERFACE IMPORTED) + target_include_directories(maxminddb::maxminddb INTERFACE ${maxminddb_INCLUDE_DIRS}) + target_link_libraries(maxminddb::maxminddb INTERFACE "${maxminddb_LIBRARY}") ++endif() ++ + endif() diff --git a/www/trafficserver/files/patch-cmake__magick_target.cmake b/www/trafficserver/files/patch-cmake__magick_target.cmake new file mode 100644 index 000000000000..cb977055c80d --- /dev/null +++ b/www/trafficserver/files/patch-cmake__magick_target.cmake @@ -0,0 +1,18 @@ +--- cmake/magick_target.cmake.orig 2025-01-29 14:00:25 UTC ++++ cmake/magick_target.cmake +@@ -15,6 +15,8 @@ + # + ####################### + ++if(BUILD_MAGICK) ++ + if(ImageMagick_Magick++_FOUND AND NOT TARGET ImageMagick::Magick++) + add_library(ImageMagick::Magick++ INTERFACE IMPORTED) + target_include_directories(ImageMagick::Magick++ INTERFACE ${ImageMagick_Magick++_INCLUDE_DIRS}) +@@ -40,4 +42,6 @@ if(ImageMagick_MagickCore_FOUND AND NOT TARGET ImageMa + target_link_libraries(ImageMagick::MagickCore INTERFACE ${ImageMagick_LIBRARIES}) + target_compile_options(ImageMagick::MagickCore INTERFACE -fopenmp) + target_compile_definitions(ImageMagick::MagickCore INTERFACE MAGICKCORE_HDRI_ENABLE=0 MAGICKCORE_QUANTUM_DEPTH=16) ++endif() ++ + endif() diff --git a/www/trafficserver/files/patch-configure b/www/trafficserver/files/patch-configure deleted file mode 100644 index 3390ec466b70..000000000000 --- a/www/trafficserver/files/patch-configure +++ /dev/null @@ -1,13 +0,0 @@ ---- configure.orig 2020-01-03 10:44:56 UTC -+++ configure -@@ -23922,7 +23922,9 @@ $as_echo "$as_me: adding ${ssldir}/lib64 to RPATH" >&6 - - fi - else -- OPENSSL_LDFLAGS="-L$ssldir/lib" -+ if [ $ssldir != "/usr" ]; then -+ OPENSSL_LDFLAGS="-L$ssldir/lib" -+ fi - if test "$overriden_with_ssl"; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: adding ${ssldir}/lib to RPATH" >&5 diff --git a/www/trafficserver/files/patch-plugins__CMakeLists.txt b/www/trafficserver/files/patch-plugins__CMakeLists.txt new file mode 100644 index 000000000000..207180d910ad --- /dev/null +++ b/www/trafficserver/files/patch-plugins__CMakeLists.txt @@ -0,0 +1,12 @@ +--- plugins/CMakeLists.txt.orig 2025-02-22 14:01:34 UTC ++++ plugins/CMakeLists.txt +@@ -69,7 +69,9 @@ if(TARGET ImageMagick::Magick++) + endif() + + if(TARGET ImageMagick::Magick++) ++if(BUILD_MAGICK) + add_subdirectory(webp_transform) ++endif() + endif() + + add_subdirectory(experimental) diff --git a/www/trafficserver/files/patch-plugins__experimental__uri_signing__config.cc b/www/trafficserver/files/patch-plugins__experimental__uri_signing__config.cc new file mode 100644 index 000000000000..fbd43221ae9e --- /dev/null +++ b/www/trafficserver/files/patch-plugins__experimental__uri_signing__config.cc @@ -0,0 +1,29 @@ +--- plugins/experimental/uri_signing/config.cc.orig 2024-11-12 19:49:58 UTC ++++ plugins/experimental/uri_signing/config.cc +@@ -104,7 +104,7 @@ config_new(size_t n) + free(cfg); + return nullptr; + } +- PluginDebug("Created table with size %d", cfg->issuers->size); ++ PluginDebug("Created table with size %d", n * 2); + + cfg->jwkis = static_cast<cjose_jwk_t ***>(malloc((n + 1) * sizeof *cfg->jwkis)); + cfg->jwkis[n] = nullptr; +@@ -269,7 +269,7 @@ read_config_from_json(json_t *const issuer_json) + *jwkis = nullptr; + goto cfg_fail; + } +- PluginDebug("Created table with size %d", cfg->issuers->size); ++ PluginDebug("Created table"); + + const char *renewal_kid = nullptr; + json_t *renewal_kid_json = json_object_get(jwks, "renewal_kid"); +@@ -295,7 +295,7 @@ read_config_from_json(json_t *const issuer_json) + + size_t jwks_ct = json_array_size(key_ary); + cjose_jwk_t **jwks = *jwkis++ = static_cast<cjose_jwk_t **>(malloc((jwks_ct + 1) * sizeof *jwks)); +- PluginDebug("Created table with size %d", cfg->issuers->size); ++ PluginDebug("Created table"); + ENTRY *dummy; + if (!hsearch_r(((ENTRY){*issuer, jwks}), ENTER, &dummy, cfg->issuers)) { + PluginDebug("Failed to store keys for issuer %s", *issuer); diff --git a/www/trafficserver/files/patch-plugins__experimental__uri_signing__match.cc b/www/trafficserver/files/patch-plugins__experimental__uri_signing__match.cc new file mode 100644 index 000000000000..56a97cda398a --- /dev/null +++ b/www/trafficserver/files/patch-plugins__experimental__uri_signing__match.cc @@ -0,0 +1,68 @@ +--- plugins/experimental/uri_signing/match.cc.orig 2024-11-12 19:49:58 UTC ++++ plugins/experimental/uri_signing/match.cc +@@ -16,7 +16,8 @@ + * limitations under the License. + */ + +-#include <regex.h> ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include <pcre2.h> + #include "common.h" + + #include <cstring> +@@ -30,27 +31,39 @@ match_regex(const char *pattern, const char *uri) + bool + match_regex(const char *pattern, const char *uri) + { +- struct re_pattern_buffer pat_buff; ++ int errorcode; ++ PCRE2_SIZE erroroffset; + +- pat_buff.translate = nullptr; +- pat_buff.fastmap = nullptr; +- pat_buff.buffer = nullptr; +- pat_buff.allocated = 0; ++ pcre2_code *re = pcre2_compile( ++ (PCRE2_SPTR)pattern, // the pattern to compile ++ PCRE2_ZERO_TERMINATED, // indicates pattern is zero-terminated ++ 0, // default options ++ &errorcode, // for error code ++ &erroroffset, // for error offset ++ nullptr // use default compile context ++ ); + +- re_syntax_options = RE_SYNTAX_POSIX_MINIMAL_EXTENDED; +- +- PluginDebug("Testing regex pattern /%s/ against \"%s\"", pattern, uri); +- +- const char *comp_err = re_compile_pattern(pattern, strlen(pattern), &pat_buff); +- +- if (comp_err) { +- PluginDebug("Regex Compilation ERROR: %s", comp_err); ++ if (re == nullptr) { ++ PCRE2_UCHAR buffer[256]; ++ pcre2_get_error_message(errorcode, buffer, sizeof(buffer)); ++ PluginDebug("Regex Compilation ERROR: %s", buffer); + return false; + } + +- int match_ret; +- match_ret = re_match(&pat_buff, uri, strlen(uri), 0, nullptr); +- regfree(&pat_buff); ++ pcre2_match_data *match_data = pcre2_match_data_create_from_pattern(re, nullptr); ++ ++ int match_ret = pcre2_match( ++ re, // the compiled pattern ++ (PCRE2_SPTR)uri, // the subject string ++ strlen(uri), // the length of the subject ++ 0, // start at offset 0 in the subject ++ 0, // default options ++ match_data, // block for storing the result ++ nullptr // use default match context ++ ); ++ ++ pcre2_match_data_free(match_data); ++ pcre2_code_free(re); + + return match_ret >= 0; + } |
