about summary refs log tree commit diff
diff options
context:
space:
mode:
authormidchildan <git@midchildan.org>2022-05-14 02:20:54 +0900
committermidchildan <git@midchildan.org>2022-05-14 03:20:23 +0900
commitea9188a98957259a4c9252e17c31b58d0e44686f (patch)
tree85f06ae221e0ea089a1c4984b039565f9fb31826
parent518cffd23db9d5e46ec0f4932e75a8b621bf248b (diff)
trafficserver: 9.1.1 -> 9.1.2
-rw-r--r--pkgs/servers/http/trafficserver/default.nix13
-rw-r--r--pkgs/servers/http/trafficserver/fix-catch2-version-incompatibility.patch43
2 files changed, 48 insertions, 8 deletions
diff --git a/pkgs/servers/http/trafficserver/default.nix b/pkgs/servers/http/trafficserver/default.nix
index 06d640a5bc00f..083d165d5ba07 100644
--- a/pkgs/servers/http/trafficserver/default.nix
+++ b/pkgs/servers/http/trafficserver/default.nix
@@ -50,11 +50,11 @@
 
 stdenv.mkDerivation rec {
   pname = "trafficserver";
-  version = "9.1.1";
+  version = "9.1.2";
 
   src = fetchzip {
     url = "mirror://apache/trafficserver/trafficserver-${version}.tar.bz2";
-    sha256 = "sha256-oicRqKFE6hOpcNG9o3BmrMujtEzi4hrPhBWaljOW+VI=";
+    sha256 = "sha256-eRpyTdwwO5EzrVpt9fF6VEYGZjHb905nQJd065wY5RU=";
   };
 
   patches = [
@@ -65,12 +65,7 @@ stdenv.mkDerivation rec {
       sha256 = "0z1ikgpp00rzrrcqh97931586yn9wbksgai9xlkcjd5cg8gq0150";
     })
 
-    # Fix build against ncurses-6.3:
-    #  https://github.com/apache/trafficserver/pull/8437
-    (fetchpatch {
-      url = "https://github.com/apache/trafficserver/commit/66c86c6b082903a92b9db33c60e3ed947e77d540.patch";
-      sha256 = "1hgpp80xnnjr4k5i6gcllrb7dw4q4xcdrkwxpc1xk2np5cbyxd16";
-    })
+    ./fix-catch2-version-incompatibility.patch
   ];
 
   # NOTE: The upstream README indicates that flex is needed for some features,
@@ -115,6 +110,8 @@ stdenv.mkDerivation rec {
 
     substituteInPlace configure --replace '/usr/bin/file' '${file}/bin/file'
 
+    # TODO: remove after the following change has been released
+    # https://github.com/apache/trafficserver/pull/8683
     cp ${catch2}/include/catch2/catch.hpp tests/include/catch.hpp
   '' + lib.optionalString stdenv.isLinux ''
     substituteInPlace configure \
diff --git a/pkgs/servers/http/trafficserver/fix-catch2-version-incompatibility.patch b/pkgs/servers/http/trafficserver/fix-catch2-version-incompatibility.patch
new file mode 100644
index 0000000000000..248f9d4ef31ad
--- /dev/null
+++ b/pkgs/servers/http/trafficserver/fix-catch2-version-incompatibility.patch
@@ -0,0 +1,43 @@
+diff --git a/src/tscore/unit_tests/test_History.cc b/src/tscore/unit_tests/test_History.cc
+index 3e699139da0..7505f10aa4c 100644
+--- a/src/tscore/unit_tests/test_History.cc
++++ b/src/tscore/unit_tests/test_History.cc
+@@ -59,10 +59,10 @@ TEST_CASE("History", "[libts][History]")
+   REQUIRE(history[2].reentrancy == static_cast<short>(NO_REENTRANT));
+ 
+   history[0].location.str(buf, sizeof(buf));
+-  REQUIRE(string_view{buf} == "test_History.cc:48 (____C_A_T_C_H____T_E_S_T____0)");
++  REQUIRE(string_view{buf} == "test_History.cc:48 (C_A_T_C_H_T_E_S_T_0)");
+ 
+   history[1].location.str(buf, sizeof(buf));
+-  REQUIRE(string_view{buf} == "test_History.cc:49 (____C_A_T_C_H____T_E_S_T____0)");
++  REQUIRE(string_view{buf} == "test_History.cc:49 (C_A_T_C_H_T_E_S_T_0)");
+ 
+   ts::LocalBufferWriter<128> w;
+   SM<HISTORY_DEFAULT_SIZE> *sm = new SM<HISTORY_DEFAULT_SIZE>;
+@@ -71,10 +71,10 @@ TEST_CASE("History", "[libts][History]")
+   SM_REMEMBER(sm, 3, NO_REENTRANT);
+ 
+   w.print("{}", sm->history[0].location);
+-  REQUIRE(w.view() == "test_History.cc:69 (____C_A_T_C_H____T_E_S_T____0)");
++  REQUIRE(w.view() == "test_History.cc:69 (C_A_T_C_H_T_E_S_T_0)");
+ 
+   w.reset().print("{}", sm->history[1].location);
+-  REQUIRE(w.view() == "test_History.cc:70 (____C_A_T_C_H____T_E_S_T____0)");
++  REQUIRE(w.view() == "test_History.cc:70 (C_A_T_C_H_T_E_S_T_0)");
+ 
+   REQUIRE(sm->history[0].event == 1);
+   REQUIRE(sm->history[0].reentrancy == 1);
+@@ -106,10 +106,10 @@ TEST_CASE("History", "[libts][History]")
+   REQUIRE(sm2->history.overflowed() == true);
+ 
+   w.reset().print("{}", sm2->history[0].location);
+-  REQUIRE(w.view() == "test_History.cc:103 (____C_A_T_C_H____T_E_S_T____0)");
++  REQUIRE(w.view() == "test_History.cc:103 (C_A_T_C_H_T_E_S_T_0)");
+ 
+   w.reset().print("{}", sm2->history[1].location);
+-  REQUIRE(w.view() == "test_History.cc:98 (____C_A_T_C_H____T_E_S_T____0)");
++  REQUIRE(w.view() == "test_History.cc:98 (C_A_T_C_H_T_E_S_T_0)");
+ 
+   sm2->history.clear();
+   REQUIRE(sm2->history.size() == 0);