From f9f39803886bd526999a74c985ea58bc235a6423dedbcd263b9d15956582af09 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 18 Feb 2015 10:39:34 +0000 Subject: [PATCH] Accepting request 286482 from network:ha-clustering:Factory 1 OBS-URL: https://build.opensuse.org/request/show/286482 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/haproxy?expand=0&rev=24 --- ...-MINOR-pattern-error-message-missing.patch | 30 +++++++++++++++ ...rn-some-entries-are-not-deleted-with.patch | 38 +++++++++++++++++++ haproxy.changes | 13 +++++++ haproxy.init | 14 +++---- haproxy.spec | 4 ++ 5 files changed, 91 insertions(+), 8 deletions(-) create mode 100644 0001-BUG-MINOR-pattern-error-message-missing.patch create mode 100644 0002-BUG-MEDIUM-pattern-some-entries-are-not-deleted-with.patch diff --git a/0001-BUG-MINOR-pattern-error-message-missing.patch b/0001-BUG-MINOR-pattern-error-message-missing.patch new file mode 100644 index 0000000..105f8f6 --- /dev/null +++ b/0001-BUG-MINOR-pattern-error-message-missing.patch @@ -0,0 +1,30 @@ +From e338a8741983acc9a4501a03ecd593d89e6fade3 Mon Sep 17 00:00:00 2001 +From: Thierry FOURNIER +Date: Fri, 6 Feb 2015 17:50:55 +0100 +Subject: [PATCH 1/2] BUG/MINOR: pattern: error message missing + +This patch must be backported in 1.5 version. +(cherry picked from commit 8aa8384e22dd0b66ded00c70a9c6034278b4bb69) +--- + src/pattern.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/pattern.c b/src/pattern.c +index 208e33a..a6fc52d 100644 +--- a/src/pattern.c ++++ b/src/pattern.c +@@ -989,8 +989,10 @@ int pat_idx_list_ptr(struct pattern_expr *expr, struct pattern *pat, char **err) + + /* allocate pattern */ + patl = calloc(1, sizeof(*patl)); +- if (!patl) ++ if (!patl) { ++ memprintf(err, "out of memory while indexing pattern"); + return 0; ++ } + + /* duplicate pattern */ + memcpy(&patl->pat, pat, sizeof(*pat)); +-- +2.1.4 + diff --git a/0002-BUG-MEDIUM-pattern-some-entries-are-not-deleted-with.patch b/0002-BUG-MEDIUM-pattern-some-entries-are-not-deleted-with.patch new file mode 100644 index 0000000..c502d33 --- /dev/null +++ b/0002-BUG-MEDIUM-pattern-some-entries-are-not-deleted-with.patch @@ -0,0 +1,38 @@ +From 623401b983185c1e0f6507e96557de3bc46fd41b Mon Sep 17 00:00:00 2001 +From: Thierry FOURNIER +Date: Fri, 6 Feb 2015 17:53:54 +0100 +Subject: [PATCH 2/2] BUG/MEDIUM: pattern: some entries are not deleted with + case insensitive match + +ACL or map entries are not deleted with the command "del acl" or "del map" +if the case insentive flag is set. + +This is because the the case insensitive string are stored in a list and the +default delete function associated with string looks in a tree. I add a check +of the case insensitive flag and execute the delete function for lists if it +is set. + +This patch must be backported in 1.5 version. +(cherry picked from commit 73bc285be194f443dc7eab9c949e87e1dbe8f70c) +--- + src/pattern.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/pattern.c b/src/pattern.c +index a6fc52d..b19ffe2 100644 +--- a/src/pattern.c ++++ b/src/pattern.c +@@ -1308,6 +1308,10 @@ void pat_del_tree_str(struct pattern_expr *expr, struct pat_ref_elt *ref) + struct ebmb_node *node, *next_node; + struct pattern_tree *elt; + ++ /* If the flag PAT_F_IGNORE_CASE is set, we cannot use trees */ ++ if (expr->mflags & PAT_MF_IGNORE_CASE) ++ return pat_del_list_ptr(expr, ref); ++ + /* browse each node of the tree. */ + for (node = ebmb_first(&expr->pattern_tree), next_node = node ? ebmb_next(node) : NULL; + node; +-- +2.1.4 + diff --git a/haproxy.changes b/haproxy.changes index 1aec8bc..3b32323 100644 --- a/haproxy.changes +++ b/haproxy.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Feb 11 12:38:06 GMT 2015 - aspiers@suse.com + +- haproxy.init: fix reload and force-reload not to start a stopped + service + +------------------------------------------------------------------- +Fri Feb 6 18:47:17 UTC 2015 - mrueckert@suse.de + +- pulled 2 patches from upstream: + 0001-BUG-MINOR-pattern-error-message-missing.patch + 0002-BUG-MEDIUM-pattern-some-entries-are-not-deleted-with.patch + ------------------------------------------------------------------- Sun Feb 1 08:27:43 UTC 2015 - mrueckert@suse.de diff --git a/haproxy.init b/haproxy.init index 57fd237..748927e 100644 --- a/haproxy.init +++ b/haproxy.init @@ -205,14 +205,12 @@ case "$1" in rc_status -v ;; reload|force-reload) - ## Like force-reload, but if daemon does not support - ## signaling, do nothing (!) - - haproxy_check - # If it supports signaling: - echo -n "Reload service haproxy " - $HAPROXY_BIN -p $HAPROXY_PID -D -f $HAPROXY_CONF -sf $(cat $HAPROXY_PID) - rc_status -v + if checkproc -p $HAPROXY_PID $HAPROXY_BIN; then + haproxy_check + echo -n "Reload service haproxy " + $HAPROXY_BIN -p $HAPROXY_PID -D -f $HAPROXY_CONF -sf $(cat $HAPROXY_PID) + rc_status -v + fi ;; status) echo -n "Checking for service haproxy " diff --git a/haproxy.spec b/haproxy.spec index 9fd6f82..96b2003 100644 --- a/haproxy.spec +++ b/haproxy.spec @@ -61,6 +61,8 @@ Patch1: haproxy-1.2.16_config_haproxy_user.patch Patch2: haproxy-makefile_lib.patch Patch3: sec-options.patch Patch4: haproxy-1.5.8-fix-bashisms.patch +Patch5: 0001-BUG-MINOR-pattern-error-message-missing.patch +Patch6: 0002-BUG-MEDIUM-pattern-some-entries-are-not-deleted-with.patch # Source99: haproxy-rpmlintrc # @@ -95,6 +97,8 @@ the most work done from every CPU cycle. %patch2 %patch3 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build %{__make} \