Re: [PATCH] bis contrib mod security

2017-07-19 Thread Willy Tarreau
On Tue, Jun 06, 2017 at 11:36:49AM +0200, Thierry Fournier wrote:
> It seems good for me. Willy can you integrate this patch ?

applied, thanks guys!
Willy



Re: [PATCH] bis contrib mod security

2017-06-06 Thread Thierry Fournier
It seems good for me. Willy can you integrate this patch ?

Thanks,
Thierry

—
Thierry Fournier
Web Performance & Security Expert
m: +33 6 68 69 21 85  | e: thierry.fourn...@ozon.io
w: http://www.ozon.io/| b: http://blog.ozon.io/

> On 6 Jun 2017, at 11:22, David CARLIER  wrote:
> 
> <0001-BUG-MINOR-contrib-modsecurity-BSD-build-fix.patch>



Re: [PATCH] bis contrib mod security

2017-06-06 Thread David CARLIER
Hi and thanks. Here a little change. Regards.

On 6 June 2017 at 09:58, Thierry Fournier  wrote:

> Thanks for the ping, I have a lot of work and I dont saw your message.
>
> Your patch seems good except this replacement:
>
>-LDFLAGS += -lpthread  -levent -levent_pthreads -lcurl -lapr-1
> -laprutil-1 -lxml2 -lpcre -lyajl
>+LDFLAGS += -lpthread  -levent_core -levent_pthreads -lcurl -lapr-1
> -laprutil-1 -lxml2 -lpcre -lyajl
>
> I’m afraid that the replacement of -levent by -levent_core will break the
> compilation for Linux systems.
> Maybe it will be better to add some variables like EVENT_INC and EVENT_LIB
>
> Thierry
>
> On 6 Jun 2017, at 09:44, David CARLIER  wrote:
>
> ping
>
> On 4 May 2017 at 21:50, David CARLIER  wrote:
>
>> Hi apologies the patch sent yesterday was not the correct one.
>>
>> Kind regards.
>>
>
>
>
From 6b2d8a973a8a969bc913dfed0145a46a294b19ec Mon Sep 17 00:00:00 2001
From: David Carlier 
Date: Tue, 6 Jun 2017 10:20:51 +0100
Subject: [PATCH] BUG/MINOR: contrib/modsecurity: BSD build fix

previous version introduced in the last commit was not the correct one.
---
 contrib/modsecurity/Makefile | 16 
 contrib/modsecurity/spoa.h   |  2 +-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/contrib/modsecurity/Makefile b/contrib/modsecurity/Makefile
index 7853397..bb918c3 100644
--- a/contrib/modsecurity/Makefile
+++ b/contrib/modsecurity/Makefile
@@ -2,7 +2,7 @@ DESTDIR=
 PREFIX = /usr/local
 BINDIR = $(PREFIX)/bin
 
-CC = gcc
+CC ?= gcc
 LD = $(CC)
 
 ifeq ($(MODSEC_INC),)
@@ -25,9 +25,17 @@ ifeq ($(LIBXML_INC),)
 LIBXML_INC := /usr/include/libxml2
 endif
 
-CFLAGS  = -g -Wall -pthread
-LDFLAGS += -lpthread  -levent -levent_pthreads -lcurl -lapr-1 -laprutil-1 -lxml2 -lpcre -lyajl
-INCS += -I../../include -I../../ebtree -I$(MODSEC_INC) -I$(APACHE2_INC) -I$(APR_INC) -I$(LIBXML_INC)
+ifeq ($(EVENT_LIB),)
+EVENT_LIB := -levent
+endif
+
+ifeq ($(EVENT_INC),)
+EVENT_INC := /usr/include
+endif
+
+CFLAGS  += -g -Wall -pthread
+LDFLAGS += -lpthread  $(EVENT_LIB) -levent_pthreads -lcurl -lapr-1 -laprutil-1 -lxml2 -lpcre -lyajl
+INCS += -I../../include -I../../ebtree -I$(MODSEC_INC) -I$(APACHE2_INC) -I$(APR_INC) -I$(LIBXML_INC) -I$(EVENT_INC)
 LIBS =
 
 OBJS = spoa.o modsec_wrapper.o
diff --git a/contrib/modsecurity/spoa.h b/contrib/modsecurity/spoa.h
index d618f9b..ea7a94e 100644
--- a/contrib/modsecurity/spoa.h
+++ b/contrib/modsecurity/spoa.h
@@ -20,7 +20,7 @@
 #ifndef __SPOA_H__
 #define __SPOA_H__
 
-#include 
+#undef LIST_HEAD
 
 #include 
 #include 
-- 
2.7.4



Re: [PATCH] bis contrib mod security

2017-06-06 Thread Thierry Fournier
Thanks for the ping, I have a lot of work and I dont saw your message.

Your patch seems good except this replacement:

   -LDFLAGS += -lpthread  -levent -levent_pthreads -lcurl -lapr-1 -laprutil-1 
-lxml2 -lpcre -lyajl
   +LDFLAGS += -lpthread  -levent_core -levent_pthreads -lcurl -lapr-1 
-laprutil-1 -lxml2 -lpcre -lyajl

I’m afraid that the replacement of -levent by -levent_core will break the 
compilation for Linux systems.
Maybe it will be better to add some variables like EVENT_INC and EVENT_LIB

Thierry

> On 6 Jun 2017, at 09:44, David CARLIER  wrote:
> 
> ping
> 
> On 4 May 2017 at 21:50, David CARLIER  > wrote:
> Hi apologies the patch sent yesterday was not the correct one.
> 
> Kind regards.
> 



Re: [PATCH] bis contrib mod security

2017-06-06 Thread David CARLIER
ping

On 4 May 2017 at 21:50, David CARLIER  wrote:

> Hi apologies the patch sent yesterday was not the correct one.
>
> Kind regards.
>