From f7b7cac13776250be12360403d7acc5f7c34e445 Mon Sep 17 00:00:00 2001
From: Andrew McDermott <amcdermo@redhat.com>
Date: Tue, 8 Nov 2022 08:19:44 +0000
Subject: [PATCH] bump to 2.6.6

- Remove unused carry patch
- Remove reference to ROADMAP file that was removed in 2.6.0
---
 .gitignore                                    |  1 +
 ...tx-prevent-unbounded-loop-in-http_ma.patch | 48 -------------------
 haproxy.spec                                  | 13 +++--
 sources                                       |  2 +-
 4 files changed, 11 insertions(+), 53 deletions(-)
 delete mode 100644 0001-BUG-MAJOR-http-htx-prevent-unbounded-loop-in-http_ma.patch

diff --git a/.gitignore b/.gitignore
index f8d250d..b957e49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
 /haproxy-2.2.20.tar.gz
 /haproxy-2.2.22.tar.gz
 /haproxy-2.2.24.tar.gz
+/haproxy-2.6.6.tar.gz
diff --git a/0001-BUG-MAJOR-http-htx-prevent-unbounded-loop-in-http_ma.patch b/0001-BUG-MAJOR-http-htx-prevent-unbounded-loop-in-http_ma.patch
deleted file mode 100644
index d0bb186..0000000
--- a/0001-BUG-MAJOR-http-htx-prevent-unbounded-loop-in-http_ma.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 86032c309b1f42177826deaa39f7c26903a074ca Mon Sep 17 00:00:00 2001
-From: Andrew McDermott <aim@frobware.com>
-Date: Fri, 11 Feb 2022 18:26:49 +0000
-Subject: [PATCH 1/1] BUG/MAJOR: http/htx: prevent unbounded loop in
- http_manage_server_side_cookies
-
-Ensure calls to http_find_header() terminate. If a "Set-Cookie2"
-header is found then the while(1) loop in
-http_manage_server_side_cookies() will never terminate, resulting in
-the watchdog firing and the process terminating via SIGABRT.
-
-The while(1) loop becomes unbounded because an unmatched call to
-http_find_header("Set-Cookie") will leave ctx->blk=NULL. Subsequent
-calls to check for "Set-Cookie2" will now enumerate from the beginning
-of all the blocks and will once again match on subsequent
-passes (assuming a match first time around), hence the loop becoming
-unbounded.
-
-This issue was introduced with HTX and this fix should be backported
-to all versions supporting HTX.
-
-Many thanks to Grant Spence (gspence@redhat.com) for working through
-this issue with me.
-
-(cherry picked from commit bfb15ab34ead85f64cd6da0e9fb418c9cd14cee8)
-Signed-off-by: Willy Tarreau <w@1wt.eu>
-(cherry picked from commit d8ce72f63e115fa0952e6a58e81c3d15dfc0a509)
-Signed-off-by: Willy Tarreau <w@1wt.eu>
----
- src/http_ana.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/http_ana.c b/src/http_ana.c
-index bcc321ba5..48b25c344 100644
---- a/src/http_ana.c
-+++ b/src/http_ana.c
-@@ -3435,7 +3435,7 @@ static void http_manage_server_side_cookies(struct stream *s, struct channel *re
- 	while (1) {
- 		int is_first = 1;
- 
--		if (!http_find_header(htx, ist("Set-Cookie"), &ctx, 1)) {
-+		if (is_cookie2 || !http_find_header(htx, ist("Set-Cookie"), &ctx, 1)) {
- 			if (!http_find_header(htx, ist("Set-Cookie2"), &ctx, 1))
- 				break;
- 			is_cookie2 = 1;
--- 
-2.35.1
-
diff --git a/haproxy.spec b/haproxy.spec
index e961359..7dfedf6 100644
--- a/haproxy.spec
+++ b/haproxy.spec
@@ -6,17 +6,17 @@
 
 %global _hardened_build 1
 
-%define real_name haproxy22
+%define real_name haproxy26
 
 Name:           haproxy
-Version:        2.2.24
+Version:        2.6.6
 Release:        1%{?dist}
 Summary:        Do not ship, install or use this, use %{real_name} subpackage instead
 
 License:        GPLv2+
 
 URL:            http://www.haproxy.org/
-Source0:        http://www.haproxy.org/download/2.2/src/haproxy-%{version}.tar.gz
+Source0:        http://www.haproxy.org/download/2.6/src/haproxy-%{version}.tar.gz
 
 BuildRequires:  openssl-devel
 BuildRequires:  pcre-devel
@@ -84,11 +84,16 @@ fi
 %files -n %{real_name}
 %defattr(-,root,root,-)
 %doc doc/* examples/
-%doc CHANGELOG LICENSE README ROADMAP VERSION
+%doc CHANGELOG LICENSE README VERSION
 %{_mandir}/man1/*
 %{_sbindir}/%{name}
 
 %changelog
+* Tue Nov 08 2022 Andrew McDermott <amcdermo@redhat.com> - 2.6.6-1
+- bump to 2.6.6
+- Remove unused carry patch
+- Remove reference to ROADMAP file that was removed in 2.6.0
+
 * Wed May 11 2022 Grant Spence <gspence@redhat.com> - 2.2.24-1
 - Bump to 2.2.24
 
diff --git a/sources b/sources
index a98cd72..984e9bc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (haproxy-2.2.24.tar.gz) = 021d065e53503248de122fdd9431786b9f375a5f87aca76f870e17e44c8c4001a778bfb4e430b28af781a3f175f3643a549e363e964210c717f212c5966e68d8
+SHA512 (haproxy-2.6.6.tar.gz) = 0b416d200e9b406a96896d3570483d24e94fdfa3f781bee663476e218a57851aefdf8768f00c8a2e9df1bb028f6398690f07da452f59656327967685787ee5c2
-- 
2.36.2

