Bug 110645 - [patch] www/mod_security2 requires pcre.h
Summary: [patch] www/mod_security2 requires pcre.h
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Foxfair Hu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-21 21:00 UTC by Benno
Modified: 2007-09-01 23:00 UTC (History)
0 users

See Also:


Attachments
mod_security2_patch.txt (304 bytes, text/plain)
2007-03-21 21:28 UTC, Benno
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benno 2007-03-21 21:00:10 UTC
When I use 'make install clean' with www/mod_security2 it gives the following error:

-------
===>  Extracting for mod_security2-2.1.0
=> MD5 Checksum OK for modsecurity-apache_2.1.0.tar.gz.
=> SHA256 Checksum OK for modsecurity-apache_2.1.0.tar.gz.
===>  Patching for mod_security2-2.1.0
===>   mod_security2-2.1.0 depends on file: /usr/local/sbin/apxs - found
===>   mod_security2-2.1.0 depends on file: /usr/local/sbin/apxs - found
===>  Configuring for mod_security2-2.1.0
===>  Building for mod_security2-2.1.0
===>  Generating apache plist
/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O2 -fno-strict-aliasing -pipe    -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include  -c -o apache2_config.lo apache2_config.c && touch apache2_config.slo
In file included from modsecurity.h:37,
                 from apache2_config.c:15:
msc_pcre.h:18:18: pcre.h: No such file or directory
apache2_config.c: In function `cmd_audit_log_relevant_status':
apache2_config.c:583: error: `PCRE_DOTALL' undeclared (first use in this function)
apache2_config.c:583: error: (Each undeclared identifier is reported only once
apache2_config.c:583: error: for each function it appears in.)
apxs:Error: Command failed with rc=65536
Comment 1 Edwin Groothuis freebsd_committer 2007-03-21 21:00:18 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Benno 2007-03-21 21:28:54 UTC
I seem to have forgotten a few things... the synopsis should have been
'[patch] www/mod_security2 requires pcre.h'

Also it seems not all fields are in the PM and the attachment didn't
get through.

msc_pcre.h needs pcre.h, which isnt present on my machine. So I think
it should have a build dependency with devel/pcre.

How-To-Repeat:
(without having devel/pcre)
cd /usr/ports/www/mod_security2/ && make

I apologize for the mistakes and hope this (and future times) will be better.

Benno
Comment 3 Foxfair Hu freebsd_committer 2007-04-15 10:03:58 UTC
Review requested: Add BUILD_DEPENDS in Makefile to prevent this error.
Upgrade to the latest version 2.1.1 as well.
------ patch start -----
diff -rubN /usr/ports/www/mod_security2/Makefile ./Makefile
--- /usr/ports/www/mod_security2/Makefile	Sat Mar 10 00:04:36 2007
+++ ./Makefile	Sun Apr 15 17:00:18 2007
@@ -6,13 +6,15 @@
 #
 
 PORTNAME=	mod_security2
-PORTVERSION=	2.1.0
+PORTVERSION=	2.1.1
 CATEGORIES=	www security
 MASTER_SITES=	http://www.modsecurity.org/download/
 DISTNAME=	${PORTNAME:S/_//:S/2//}-apache_${PORTVERSION}
 
 MAINTAINER=	dom@happygiraffe.net
 COMMENT=	An intrusion detection and prevention engine
+
+BUILD_DEPENDS=	pcretest:${PORTSDIR}/devel/pcre
 
 USE_APACHE=	2.0+
 AP_FAST_BUILD=	yes
diff -rubN /usr/ports/www/mod_security2/distinfo ./distinfo
--- /usr/ports/www/mod_security2/distinfo	Wed Mar  7 00:04:30 2007
+++ ./distinfo	Sun Apr 15 16:56:45 2007
@@ -1,3 +1,3 @@
-MD5 (modsecurity-apache_2.1.0.tar.gz) = 2e919766f2878c4ee46334816004dd15
-SHA256 (modsecurity-apache_2.1.0.tar.gz) = fd37d64f7ffe193101da20f6e6e2016105de62948f3976aceaa96f636606fe74
-SIZE (modsecurity-apache_2.1.0.tar.gz) = 650133
+MD5 (modsecurity-apache_2.1.1.tar.gz) = ab74ed5f320ffc4ed9f56487bf17c670
+SHA256 (modsecurity-apache_2.1.1.tar.gz) = fadeb3b4ce5672c99c094611792b827d45fcd6b38c4c4fa81c4cfdc63c63b71a
+SIZE (modsecurity-apache_2.1.1.tar.gz) = 650607
------ patch end -----
Comment 4 Foxfair Hu freebsd_committer 2007-04-15 10:04:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->foxfair

I'll take this
Comment 5 Pav Lucistnik freebsd_committer 2007-07-29 13:36:40 UTC
Foxfair's patch in PR is obsoleted by events - the port is now at 2.1.1;
the pcre is provided by apache20 but not by apache22. Here is a new
patch:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/www/mod_security2/Makefile,v
retrieving revision 1.6
diff -a -u -r1.6 Makefile
--- Makefile	14 Jun 2007 15:46:33 -0000	1.6
+++ Makefile	29 Jul 2007 12:34:35 -0000
@@ -60,6 +60,12 @@
 
 REINPLACE_ARGS=	-i ""
 
+.include <bsd.port.pre.mk>
+
+.if ${APACHE_VERSION} == 22
+LIB_DEPENDS+=	pcre.0:${PORTSDIR}/devel/pcre
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e '\
 		s|SecRuleEngine On|SecRuleEngine DetectionOnly|; \
@@ -79,4 +85,4 @@
 	@${CAT} ${PKGMESSAGE}
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Dear maintainer, do you approve this patch?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

Pilot to Co-Pilot: Boo.
Comment 6 Pav Lucistnik freebsd_committer 2007-09-01 22:55:55 UTC
State Changed
From-To: feedback->closed

I have committed my patch.
Comment 7 dfilter service freebsd_committer 2007-09-01 22:58:08 UTC
pav         2007-09-01 21:58:02 UTC

  FreeBSD ports repository

  Modified files:
    www/mod_security2    Makefile 
  Log:
  - Fix build with Apache 2.2: explicitly depend on pcre library
  
  PR:             ports/110645
  Approved by:    maintainer timeout (1 month)
  
  Revision  Changes    Path
  1.8       +7 -1      ports/www/mod_security2/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"