ports/52776: www/mod_jk fix and update
Palle Girgensohn
girgen at pingpong.net
Thu May 29 02:50:05 UTC 2003
>Number: 52776
>Category: ports
>Synopsis: www/mod_jk fix and update
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed May 28 19:50:03 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Palle Girgensohn <girgen at pingpong.net>
>Release: FreeBSD 4.7-PRERELEASE i386
>Organization:
PING PONG
>Environment:
System: FreeBSD palle.girgensohn.se 4.7-RC FreeBSD 4.7-RC #0: Sun Sep 29 17:21:22 CEST 2002 root at palle.girgensohn.se:/usr/local/obj/usr/src/sys/STORDATAN i386
>Description:
Hi,
Here's a suggestion to fix the broken mod_jk. It builds very cleanly
without depending on anything more than necessary, and has a slave
ports (sent in separately) for building with apache2. Also, it is a
major update of the apache module for communicating with apache using
ajp1x. It is compatible with tomcat-3.x, 4.x (and surely 5.x) on the
Java side.
See also ports/52774 and ports/52775 for the equivalent jk2 ports. I
think there is a gain for the FreeBSD community to use all four ports
I've sent in tonight.
>How-To-Repeat:
>Fix:
Apply the patch below to www/mod_jk
and don't forget to add and remove some stuff:
cvs remove files/Makefile.freebsd \
files/mod_jk.conf
cvs add files/mod_jk.conf.sample \
files/patch-configure.in \
files/workers.properties.sample
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/www/mod_jk/Makefile,v
retrieving revision 1.12
diff -u -u -r1.12 Makefile
--- Makefile 6 May 2003 21:26:23 -0000 1.12
+++ Makefile 29 May 2003 02:13:05 -0000
@@ -6,46 +6,45 @@
#
PORTNAME= mod_jk
-PORTVERSION= 3.3.1
-PORTREVISION= 2
+PORTVERSION= 1.2.3
+PORTEPOCH= 1
CATEGORIES= www
-MASTER_SITES= http://jakarta.apache.org/builds/jakarta-tomcat/release/v${PORTVERSION}/src/ \
- http://www.metaverse.nl/~ernst/ \
- ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= znerd
-DISTNAME= jakarta-tomcat-${PORTVERSION}-src
+MASTER_SITES= ${MASTER_SITE_APACHE_JAKARTA}
+MASTER_SITE_SUBDIR= jakarta-tomcat-connectors/jk/release/v${PORTVERSION}/src
+DISTNAME= jakarta-tomcat-connectors-jk-${PORTVERSION}-src
MAINTAINER= znerd at FreeBSD.org
-COMMENT= Apache module for Tomcat 3
-
-BROKEN= "Broken dependency"
+COMMENT= Apache JK module for Tomcat
BUILD_DEPENDS= ${APXS}:${APACHE_PORT}
-RUN_DEPENDS= ${APXS}:${APACHE_PORT} \
- ${TOMCAT_HOME}/lib/tomcat.jar:${PORTSDIR}/www/jakarta-tomcat3
-
-USE_GMAKE= YES
-USE_JAVA= 1.2+
-MAKEFILE= Makefile.freebsd
-WRKSRC= ${WRKDIR}/jakarta-tomcat-${PORTVERSION}-src/src/native/mod_jk/apache1.3
+RUN_DEPENDS= ${APXS}:${APACHE_PORT}
-APXS?= ${LOCALBASE}/sbin/apxs
+APXS= ${LOCALBASE}/sbin/apxs
APACHE_PORT?= ${PORTSDIR}/www/apache13
-TOMCAT_HOME?= ${LOCALBASE}/jakarta-tomcat${PORTVERSION}
+APACHE_CONF= ${LOCALBASE}/etc/apache${APACHE2}
+WRKSRC= ${WRKDIR}/jakarta-tomcat-connectors-jk-${PORTVERSION}-src/jk/native
-post-extract:
- ${MV} ${WRKSRC}/Makefile.freebsd ${WRKSRC}/Makefile.freebsd.orig
+USE_GMAKE= YES
+USE_LIBTOOL= YES
+USE_AUTOCONF_VER= 253
+USE_AUTOMAKE_VER= 15
+AUTOMAKE_ARGS= --add-missing
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS+= --with-apxs=${APXS}
+APACHE2?=
+APACHE_VER?= 1.3
+PLIST_SUB= APACHE2=${APACHE2}
post-patch:
- ${SED} \
- -e "s#%%APXS%%#${APXS}#g" \
- -e "s#%%JAVA_HOME%%#${JAVA_HOME}#g" \
- ${FILESDIR}/Makefile.freebsd \
- > ${WRKSRC}/Makefile.freebsd
+ cd ${WRKSRC}; ${ACLOCAL}; ${LOCALBASE}/bin/libtoolize
do-install:
- ${APXS} -i -A -n jk ${WRKSRC}/mod_jk.so
- ${SED} -e "s#%%TOMCAT_HOME%%#${TOMCAT_HOME}#g" ${FILESDIR}/mod_jk.conf > ${WRKDIR}/mod_jk.conf
- ${INSTALL_DATA} ${WRKDIR}/mod_jk.conf ${PREFIX}/etc/apache
+ ${APXS} -i -A -n jk ${WRKSRC}/apache-${APACHE_VER}/mod_jk.so
+ ${SED} -e "s#%%APACHE_CONF%%#${APACHE_CONF}#g" ${FILESDIR}/mod_jk.conf.sample > ${WRKDIR}/mod_jk.conf.sample
+ ${INSTALL_DATA} ${WRKDIR}/mod_jk.conf.sample ${APACHE_CONF}
+ ${INSTALL_DATA} ${FILESDIR}/workers.properties.sample ${APACHE_CONF}
+
+post-install:
+ ${CAT} ${PKGMESSAGE} | ${SED} "s|/usr/local|${PREFIX}|g"
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/www/mod_jk/distinfo,v
retrieving revision 1.4
diff -u -u -r1.4 distinfo
--- distinfo 3 Apr 2002 21:10:59 -0000 1.4
+++ distinfo 28 May 2003 22:26:03 -0000
@@ -1 +1 @@
-MD5 (jakarta-tomcat-3.3.1-src.tar.gz) = 7f472a332d098a3591a3ce861747e995
+MD5 (jakarta-tomcat-connectors-jk-1.2.3-src.tar.gz) = 4c2c2a4e6a6ad8a912afaffbff173227
Index: pkg-descr
===================================================================
RCS file: /home/ncvs/ports/www/mod_jk/pkg-descr,v
retrieving revision 1.2
diff -u -u -r1.2 pkg-descr
--- pkg-descr 8 Aug 2001 08:44:40 -0000 1.2
+++ pkg-descr 28 May 2003 22:40:38 -0000
@@ -2,4 +2,4 @@
new Tomcat-Apache plugin that handles the communication between
Tomcat and Apache.
-WWW: http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html
+WWW: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html
Index: pkg-message
===================================================================
RCS file: /home/ncvs/ports/www/mod_jk/pkg-message,v
retrieving revision 1.2
diff -u -u -r1.2 pkg-message
--- pkg-message 22 Feb 2002 10:09:30 -0000 1.2
+++ pkg-message 29 May 2003 01:43:04 -0000
@@ -1,5 +1,5 @@
*****************************************************************************
-Make sure mod_jk.so is enabled in ${PREFIX}/etc/apache/httpd.conf
-and mod_jk is configured. Have a look at ${PREFIX}/etc/apache/mod_jk.conf
-for an example.
+Make sure mod_jk.so is enabled in /usr/local/etc/apache/httpd.conf and
+mod_jk is configured. Have a look at
+/usr/local/etc/apache/mod_jk.conf.sample for an example.
*****************************************************************************
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/www/mod_jk/pkg-plist,v
retrieving revision 1.1
diff -u -u -r1.1 pkg-plist
--- pkg-plist 20 May 2001 14:00:17 -0000 1.1
+++ pkg-plist 29 May 2003 00:39:30 -0000
@@ -1,4 +1,5 @@
-etc/apache/mod_jk.conf
-libexec/apache/mod_jk.so
+etc/apache%%APACHE2%%/mod_jk.conf.sample
+etc/apache%%APACHE2%%/workers.properties.sample
+libexec/apache%%APACHE2%%/mod_jk.so
@exec %D/sbin/apxs -e -A -n jk %f
@unexec %D/sbin/apxs -e -A -n jk %f
--- /dev/null Thu May 29 04:09:23 2003
+++ files/patch-configure.in Wed Apr 16 23:04:18 2003
@@ -0,0 +1,11 @@
+--- configure.in.orig Tue Dec 17 05:20:55 2002
++++ configure.in Thu Apr 10 13:18:40 2003
+@@ -102,7 +102,7 @@
+ WEBSERVER="apache-2.0"
+ APXSCFLAGS="`${APXS} -q CFLAGS` `${APXS} -q EXTRA_CFLAGS`"
+ APXSCPPFLAGS="`${APXS} -q EXTRA_CPPFLAGS`"
+- APACHE_CONFIG_VARS=${apache_dir}/build/config_vars.mk
++ APACHE_CONFIG_VARS=${prefix}/share/apache2/build/config_vars.mk
+ fi
+ AC_MSG_RESULT([building connector for \"$WEBSERVER\"])
+
--- /dev/null Thu May 29 04:09:23 2003
+++ files/workers.properties.sample Wed Apr 16 23:04:18 2003
@@ -0,0 +1,12 @@
+# Incredibly simple workers.properties file, intended for connecting
+# to one host, via AJP13. See the tomcat documentation for
+# information on more exotic configuration options.
+#
+# Change jsp-hostname to the hostname of your JSP server.
+#
+worker.list=jsp-hostname
+
+worker.jsp-hostname.port=8009
+worker.jsp-hostname.host=jsp-hostname
+worker.jsp-hostname.type=ajp13
+worker.jsp-hostname.lbfactor=1
--- /dev/null Thu May 29 04:09:23 2003
+++ files/mod_jk.conf.sample Wed Apr 16 23:04:18 2003
@@ -0,0 +1,14 @@
+# Replace jsp-hostname with the hostname of your JSP server, as
+# specified in workers.properties.
+#
+<IfModule mod_jk.c>
+ JkWorkersFile %%APACHE_CONF%%/workers.properties
+ JkLogFile logs/jk.log
+ JkLogLevel warn
+
+ # Sample JkMounts. Replace these with the paths you would
+ # like to mount from your JSP server.
+ JkMount /*.jsp jsp-hostname
+ JkMount /servlet/* jsp-hostname
+ JkMount /examples/* jsp-hostname
+</IfModule>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list