ports/81623: [patch] www/oops more brokenness
Dmitry Morozovsky
marck at FreeBSD.org
Sun May 29 14:00:24 UTC 2005
>Number: 81623
>Category: ports
>Synopsis: [patch] www/oops more brokenness
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun May 29 14:00:21 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Dmitry Morozovsky
>Release: FreeBSD 4-STABLE i386
>Organization:
Cronyx Plus LLC (RiNet ISP)
>Environment:
System: FreeBSD various (from 4 to -current)
>Description:
My previous patch misses one more reference of IPL_NAT, hence www/oops does not
build on fresh current. This patch fixes this, and also eliminates ugly hackish
configure.oops script in favor to OPTIONS. Also, mutual exclusiveness of
storage dependency ports now checked.
>How-To-Repeat:
>Fix:
NOTICE: scripts/configure.oops should be cvs rm'ed.
Index: files/patch-src_modules_transparent.c
===================================================================
RCS file: /home/ncvs/ports/www/oops/files/patch-src_modules_transparent.c,v
retrieving revision 1.1
diff -u -r1.1 patch-src_modules_transparent.c
--- files/patch-src_modules_transparent.c 20 May 2005 17:53:56 -0000 1.1
+++ files/patch-src_modules_transparent.c 29 May 2005 13:47:22 -0000
@@ -12,3 +12,12 @@
if (natfd < 0) {
my_xlog(OOPS_LOG_HTTP|OOPS_LOG_DBG|OOPS_LOG_SEVERE, "transparent/redir(): NAT open failed: %m\n");
goto notdone;
+@@ -270,7 +270,7 @@
+ natLookup.nl_outip = rq->client_sa.sin_addr;
+ natLookup.nl_flags = IPN_TCP;
+ if (natfd < 0) {
+- natfd = open(IPL_NAT, O_RDONLY, 0);
++ natfd = open(IPNAT_NAME, O_RDONLY, 0);
+ if (natfd < 0) {
+ my_xlog(OOPS_LOG_HTTP|OOPS_LOG_DBG|OOPS_LOG_SEVERE, "transparent/redir(): NAT open failed: %m\n");
+ goto notdone;
Index: scripts/configure.oops
===================================================================
RCS file: scripts/configure.oops
diff -N scripts/configure.oops
--- scripts/configure.oops 4 Jan 2003 16:17:27 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,76 +0,0 @@
-#!/bin/sh
-#
-
-if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
- exit
-fi
-
-tempfile=`mktemp -t checklist`
-if [ "${BATCH}" = "yes" ]; then
- set \"GigaBase\"
-else
- /usr/bin/dialog --title "OOPS configuration options" --clear \
- --checklist "\n\
-Please select desired options:\n\
-(please select ONLY ONE DB storages)" -1 -1 16 \
-GigaBase "GigaBase storage" OFF \
-DB4 "Berkeley DB v4 storage" OFF \
-MySQL "MySQL auth support" OFF \
-PgSQL "PostgreSQL auth support" OFF \
-PCRE "PCRE support" OFF \
-2> $tempfile
-
- retval=$?
-
- if [ -s $tempfile ]; then
- set `cat $tempfile`
- fi
- rm -f $tempfile
-
- case $retval in
- 0) if [ -z "$*" ]; then
- echo "Nothing selected"
- fi
- ;;
- 1) echo "Cancel pressed."
- exit 1;
- ;;
- esac
-fi
-
-${MKDIR} ${WRKDIRPREFIX}${CURDIR}
-exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
-
-echo "PREFIX= ${PREFIX}"
-
-while [ "$1" ]; do
- case $1 in
- \"GigaBase\")
- echo "LIB_DEPENDS+= gigabase_r.2:\${PORTSDIR}/databases/gigabase"
- echo "CONFIGURE_ARGS+= --without-DB"
- ;;
- \"DB4\")
- echo "LIB_DEPENDS+= db4.0:\${PORTSDIR}/databases/db4"
- echo "CONFIGURE_ARGS+= --without-GB"
- ;;
- \"MySQL\")
- echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client"
- echo "CONFIGURE_ARGS+= --with-MYSQL=\${PREFIX}"
- ;;
- \"PgSQL\")
- echo "POSTGRESQL_PORT?= databases/postgresql7"
- echo "LIB_DEPENDS+= pq.3:\${PORTSDIR}/\${POSTGRESQL_PORT}"
- echo "CONFIGURE_ARGS+= --with-PGSQL=\${PREFIX}/pgsql"
- ;;
- \"PCRE\")
- echo "LIB_DEPENDS+= pcre.0:\${PORTSDIR}/devel/pcre"
- echo "CONFIGURE_ARGS+= --with-regexp=pcre"
- ;;
- *)
- echo "Invalid option(s): $*" > /dev/stderr
- rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
- exit 1
- ;;
- esac
- shift
-done
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/www/oops/Makefile,v
retrieving revision 1.36
diff -u -r1.36 Makefile
--- Makefile 20 May 2005 17:53:56 -0000 1.36
+++ Makefile 29 May 2005 13:51:20 -0000
@@ -7,7 +7,7 @@
PORTNAME= oops
PORTVERSION= ${OOPSVERSION}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= www
MASTER_SITES= http://oops-cache.org/
DISTNAME= ${PORTNAME}-${OOPSVERSION}
@@ -36,24 +36,48 @@
OOPSVAR= /var/run/oops
OOPSLOG= /var/log/oops
-SCRIPTS_ENV+= WRKDIRPREFIX="${WRKDIRPREFIX}" \
- TOUCH="${TOUCH}" \
- MKDIR="${MKDIR}"
-
USE_RC_SUBR= YES
PKGMESSAGE= ${WRKDIR}/pkg-message
SUB_FILES= pkg-message
-.if defined(BATCH)
+OPTIONS= GIGABASE "GigaBase storage" on \
+ DB4 "Berkeley DB v4 storage" off \
+ MYSQL "MySQL auth support" off \
+ PGSQL "PostgreSQL auth support" off \
+ PCRE "PCRE support" off
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_GIGABASE)
+.if defined (WITH_DB4)
+BROKEN= "Only one DB storage can be used (First)"
+.endif
LIB_DEPENDS+= gigabase_r.2:${PORTSDIR}/databases/gigabase
CONFIGURE_ARGS+= --without-DB
.endif
-pre-fetch:
- @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.oops
+.if defined(WITH_DB4)
+.if defined(WITHOUT_GIGABASE)
+LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4
+CONFIGURE_ARGS+= --without-GB
+.else
+BROKEN= "Only one DB storage can be used"
+.endif
+.endif
-.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
-.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
+.if defined(WITH_MYSQL)
+USE_MYSQL= YES
+CONFIGURE_ARGS+= --with-MYSQL=${PREFIX}
+.endif
+
+.if defined(WITH_PGSQL)
+USE_PGSQL= YES
+CONFIGURE_ARGS+= --with-PGSQL=${PREFIX}/pgsql
+.endif
+
+.if defined(WITH_PCRE)
+LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
+CONFIGURE_ARGS+= --with-regexp=pcre
.endif
pre-configure:
@@ -66,8 +90,6 @@
pre-install:
@PKG_PREFIX=${PREFIX} BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-.include <bsd.port.pre.mk>
-
post-install:
.if !defined(NOPORTDOCS)
@${INSTALL_MAN} ${WRKSRC}/doc/oops.8 ${PREFIX}/man/man8
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list