Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jun 2004 15:41:30 +0200
From:      Oliver Eikemeier <eikemeier@fillmore-labs.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/67937: [PATCH] www/apache13-modssl, www/apache13-modssl+ipv6: sanitize version number handling
Message-ID:  <40CDAB0A.2010207@fillmore-labs.com>
Resent-Message-ID: <200406141340.i5EDeNj5093208@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         67937
>Category:       ports
>Synopsis:       [PATCH] www/apache13-modssl, www/apache13-modssl+ipv6: sanitize version number handling
>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:   Mon Jun 14 13:40:23 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Eikemeier
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 4.10-STABLE

>Description:

port www/apache13-modssl has an erratic version numbering scheme, depending on the
configured options. This confuses most package tools, including pkg_version, portaudit
and portupgrade, and possibly users. Besides, LATEST_LINK does not match the directory
name for no good reason and CONFLICTS setting is incorrect, the port does conflict with
itself, which it shouldn't.

While I'm here: user tunable variables should be WITH_*/WITHOUT_*.

>How-To-Repeat:
>Fix:

Index: www/apache13-modssl/Makefile
===================================================================
RCS file: /home/ncvs/ports/www/apache13-modssl/Makefile,v
retrieving revision 1.154
diff -u -r1.154 Makefile
--- www/apache13-modssl/Makefile	11 Jun 2004 08:36:54 -0000	1.154
+++ www/apache13-modssl/Makefile	14 Jun 2004 13:27:22 -0000
@@ -5,23 +5,23 @@
 # $FreeBSD: ports/www/apache13-modssl/Makefile,v 1.154 2004/06/11 08:36:54 dinoex Exp $
 #
 
-PORTNAME=	apache+mod_ssl
-PORTVERSION=	${VERSION_APACHE}+${VERSION_MODSSL}${PVERSION_MODSNMP}${PVERSION_MODACCEL}${PVERSION_MODDEFLATE}
+PORTNAME=	apache
+PORTVERSION=	${VERSION_APACHE}+${VERSION_MODSSL}
 PORTREVISION=	4
-CATEGORIES=	www security
+CATEGORIES?=	www security
 MASTER_SITES=	${MASTER_SITE_APACHE_HTTPD} \
 		${MASTER_SITES_MODSSL:S/$/:mod_ssl/} \
 		http://www.mod-snmp.com/distr/:mod_snmp \
 		http://sysoev.ru/mod_accel/:mod_accel \
 		http://sysoev.ru/mod_deflate/:mod_deflate
-PKGNAMESUFFIX?=	${MODSNMP_SUFFIX}${MODACCEL_SUFFIX}${MODDEFLATE_SUFFIX}${IPV6_SUFFIX}${PKGNAMESUFFIX2}
+PKGNAMESUFFIX?=	-modssl
 DISTNAME=	apache_${VERSION_APACHE}
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${MODSSL_FILE}:mod_ssl \
 		${MODSNMP_DISTFILE} ${MODACCEL_DISTFILE} ${MODDEFLATE_DISTFILE}
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX} ${MODSSL_FILE} \
 		${MODACCEL_FILE} ${MODDEFLATE_FILE}
 
-.if defined(APACHE_WITH_IPV6) || make(makesum) || defined(FETCH_ALL)
+.if defined(WITH_IPV6) || make(makesum) || defined(FETCH_ALL)
 PATCH_SITES+=	ftp://ftp.42.org/pub/orphan/ ${MASTER_SITE_LOCAL}
 PATCH_SITE_SUBDIR=	dinoex
 PATCHFILES+=	apache-1.3.31modssl-v6-20040514.diff.gz
@@ -31,11 +31,16 @@
 COMMENT?=	The Apache 1.3 webserver with SSL/TLS functionality
 
 LIB_DEPENDS=	mm.13:${PORTSDIR}/devel/mm
-PATCH_DEPENDS=	${BUILD_DEPENDS}
 
 CONFLICTS?=	apache+ipv6-1.* apache+ssl-1.* apache-1.* apache-2.* \
 		apache_fp-1.* caudium-devel-1.* caudium10-1.* caudium12-* \
 		ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.* w3c-httpd-3.*
+.if ${PKGNAMESUFFIX} == "-modssl"
+CONFLICTS+=	apache-modssl+ipv6-1.*
+.else
+CONFLICTS+=	apache-modssl-1.*
+.endif
+
 VERSION_APACHE=	1.3.31
 VERSION_MODSSL=	2.8.18
 VERSION_MODSNMP=	1.3.14.12
@@ -128,7 +133,7 @@
 CONFIGURE_ARGS+=	--runtimedir=${APACHE_RELATIVE_RUNTIMEDIR}
 .endif
 
-.if defined(APACHE_WITHOUT_EXPAT)
+.if defined(WITHOUT_EXPAT)
 CONFIGURE_ARGS+=	--disable-rule=EXPAT
 .endif
 
@@ -157,20 +162,10 @@
 CFLAGS+=	-O3
 .endif
 
-.if defined(APACHE_WITH_MODSNMP) || make(makesum) || defined(FETCH_ALL)
+.if defined(WITH_MODSNMP) || make(makesum) || defined(FETCH_ALL)
 MODSNMP_DISTFILE=	${MODSNMP_FILE}:mod_snmp
 .endif
-.if defined(APACHE_WITH_MODSNMP)
-CONFLICTS+=	apache+mod_ssl-1.* \
-		apache+mod_ssl+ipv6-1.* \
-		apache+mod_ssl+mod_accel-1.* \
-		apache+mod_ssl+mod_accel+ipv6-1.* \
-		apache+mod_ssl+mod_accel+mod_deflate-1.* \
-		apache+mod_ssl+mod_accel+mod_deflate+ipv6-1.* \
-		apache+mod_ssl+mod_deflate-1.* \
-		apache+mod_ssl+mod_deflate+ipv6-1.* \
-MODSNMP_SUFFIX=	+mod_snmp
-PVERSION_MODSNMP=	+${VERSION_MODSNMP}
+.if defined(WITH_MODSNMP)
 CONFIGURE_ARGS+=	--activate-module=src/modules/snmp_agt/libsnmp_agt.a
 CFLAGS+=	-DSNMP -DUSE_DB -DSNMP_CONFIG_H -DHARD_VIRTUAL_HOST_MAX=1000 \
 		-DSNMPLOCALONLY
@@ -183,25 +178,13 @@
 		%%DOCSDIR%%/snmp_agt/apache-scoreboard-mib.txt \
 		%%DOCSDIR%%/snmp_agt/apache-config-mib.txt
 PLIST_DIRS+=	%%DOCSDIR%%/snmp_agt %%DOCSDIR%% www/buckets www
-.else
-CONFLICTS+=	apache+mod_snmp*-1.*
 .endif
 
-.if defined(APACHE_WITH_MODACCEL) || make(makesum) || defined(FETCH_ALL)
+.if defined(WITH_MODACCEL) || make(makesum) || defined(FETCH_ALL)
 MODACCEL_FILE=	mod_accel-${VERSION_MODACCEL}${EXTRACT_SUFX}
 MODACCEL_DISTFILE=	${MODACCEL_FILE}:mod_accel
 .endif
-.if defined(APACHE_WITH_MODACCEL)
-CONFLICTS+=	apache+mod_ssl-1.* \
-		apache+mod_ssl+ipv6-1.* \
-		apache+mod_ssl+mod_snmp-1.* \
-		apache+mod_ssl+mod_snmp+ipv6-1.* \
-		apache+mod_ssl+mod_snmp+mod_deflate-1.* \
-		apache+mod_ssl+mod_snmp+mod_deflate+ipv6-1.* \
-		apache+mod_ssl+mod_deflate-1.* \
-		apache+mod_ssl+mod_deflate+ipv6-1.*
-MODACCEL_SUFFIX=	+mod_accel
-PVERSION_MODACCEL=	+${VERSION_MODACCEL}
+.if defined(WITH_MODACCEL)
 CONFIGURE_ARGS+=	--activate-module=src/modules/extra/mod_randban.o \
 		--enable-shared=randban \
 		--activate-module=src/modules/extra/mod_freeze.o \
@@ -213,44 +196,22 @@
 		libexec/apache/mod_freeze.so \
 		libexec/apache/mod_randban.so \
 		%%DOCSDIR%%/mod/mod_accel.html
-.else
-CONFLICTS+=	apache+mod_accel*-1.*
 .endif
 
-.if defined(APACHE_WITH_MODDEFLATE) || make(makesum) || defined(FETCH_ALL)
+.if defined(WITH_MODDEFLATE) || make(makesum) || defined(FETCH_ALL)
 MODDEFLATE_FILE=	mod_deflate-${VERSION_MODDEFLATE}${EXTRACT_SUFX}
 MODDEFLATE_DISTFILE=	${MODDEFLATE_FILE}:mod_deflate
 .endif
-.if defined(APACHE_WITH_MODDEFLATE)
-CONFLICTS+=	apache+mod_ssl-1.* \
-		apache+mod_ssl+ipv6-1.* \
-		apache+mod_ssl+mod_snmp-1.* \
-		apache+mod_ssl+mod_snmp+ipv6-1.* \
-		apache+mod_ssl+mod_snmp+mod_accel-1.* \
-		apache+mod_ssl+mod_snmp+mod_accel+ipv6-1.* \
-		apache+mod_ssl+mod_accel-1.* \
-		apache+mod_ssl+mod_accel+ipv6-1.*
-MODDEFLATE_SUFFIX=	+mod_deflate
-PVERSION_MODDEFLATE=	+${VERSION_MODDEFLATE}
+.if defined(WITH_MODDEFLATE)
 CONFIGURE_ARGS+=	--activate-module=src/modules/extra/mod_deflate.o
 PLIST_FILES+=	%%DOCSDIR%%/mod/mod_deflate.html
-.else
-CONFLICTS+=	apache+mod_deflate*-1.*
 .endif
 
-.if defined(APACHE_WITH_IPV6)
-.if defined(APACHE_WITH_MODACCEL)
+.if defined(WITH_IPV6)
+.if defined(WITH_MODACCEL)
 BROKEN=		"mod_accel and ipv6 don't compile together"
 .endif
 
-CONFLICTS+=	apache+mod_ssl-1.* \
-		apache+mod_ssl+mod_snmp-1.* \
-		apache+mod_ssl+mod_snmp+mod_accel-1.* \
-		apache+mod_ssl+mod_snmp+mod_accel+mod_deflate-1.* \
-		apache+mod_ssl+mod_accel-1.* \
-		apache+mod_ssl+mod_accel+mod_deflate-1.* \
-		apache+mod_ssl+mod_deflate-1.*
-IPV6_SUFFIX=	+ipv6
 CONFIGURE_ARGS+=	--enable-rule=INET6
 PLIST_SUB+=	WITHIPV6=""
 PLIST_FILES+=	include/apache/sa_len.h \
@@ -311,23 +272,23 @@
 	@${ECHO_MSG} "				is not recommended for production servers."
 	@${ECHO_MSG} "				[default is no]"
 	@${ECHO_MSG} ""
-	@${ECHO_MSG} "  APACHE_WITH_IPV6=yes		IPv6 support."
+	@${ECHO_MSG} "  WITH_IPV6=yes		IPv6 support."
 	@${ECHO_MSG} "				This setting turns IPv6 support on."
 	@${ECHO_MSG} "				[default is no]"
 	@${ECHO_MSG} ""
-	@${ECHO_MSG} "  APACHE_WITH_MODSNMP=yes	mod_snmp support."
+	@${ECHO_MSG} "  WITH_MODSNMP=yes	mod_snmp support."
 	@${ECHO_MSG} "				This setting turns support for SNMP on."
 	@${ECHO_MSG} "				[default is no]"
 	@${ECHO_MSG} ""
-	@${ECHO_MSG} "  APACHE_WITH_MODACCEL=yes	mod_accel support."
+	@${ECHO_MSG} "  WITH_MODACCEL=yes	mod_accel support."
 	@${ECHO_MSG} "				This setting activates build of mod_accel."
 	@${ECHO_MSG} "				[default is no]"
 	@${ECHO_MSG} ""
-	@${ECHO_MSG} "  APACHE_WITH_MODDEFLATE=yes	mod_deflate support."
+	@${ECHO_MSG} "  WITH_MODDEFLATE=yes	mod_deflate support."
 	@${ECHO_MSG} "				This setting activates build of mod_deflate."
 	@${ECHO_MSG} "				[default is no]"
 	@${ECHO_MSG} ""
-	@${ECHO_MSG} "  APACHE_WITHOUT_EXPAT=yes	don't compile in expat."
+	@${ECHO_MSG} "  WITHOUT_EXPAT=yes	don't compile in expat."
 	@${ECHO_MSG} "				[default is no (expat is included)]"
 	@${ECHO_MSG} ""
 
@@ -336,7 +297,7 @@
 		${FILESDIR}/rcng.sh > ${WRKSRC}/rcng.sh
 	@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \
 		> ${WRKSRC}/apache.sh
-.if defined(APACHE_WITH_MODSNMP)
+.if defined(WITH_MODSNMP)
 	(cd ${WRKSRC}; ${TAR} xfz  ${DISTDIR}/${MODSNMP_FILE})
 .endif
 
@@ -344,13 +305,13 @@
 	@cd ${WRKDIR}/mod_ssl-${VERSION_MODSSL}-${VERSION_APACHE} \
 	&& ${ECHO_MSG} "===>  Applying mod_ssl-${VERSION_MODSSL} extension" \
 	&& ./configure --with-apache=../${DISTNAME} --expert
-.if defined(APACHE_WITH_MODACCEL)
+.if defined(WITH_MODACCEL)
 	@cd ${WRKDIR}/mod_accel-${VERSION_MODACCEL} \
 	&& ${ECHO_MSG} "===>  Applying mod_accel-${VERSION_MODACCEL} extension" \
 	&& ./configure --with-apache=../${DISTNAME} --with-mod_randban --with-mod_freeze \
 	&& ${MAKE}
 .endif
-.if defined(APACHE_WITH_MODDEFLATE)
+.if defined(WITH_MODDEFLATE)
 	@cd ${WRKDIR}/mod_deflate-${VERSION_MODDEFLATE} \
 	&& ${ECHO_MSG} "===>  Applying mod_deflate-${VERSION_MODDEFLATE} extension" \
 	&& ./configure --with-apache=../${DISTNAME} \
@@ -380,12 +341,12 @@
 	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 
 post-install:
-.if defined(USE_RC_SUBR)
+.if !defined(WITHOUT_RC_SUBR)
 	${INSTALL_SCRIPT} ${WRKSRC}/rcng.sh ${PREFIX}/etc/rc.d/apache.sh
 .else
 	${INSTALL_SCRIPT} ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh.sample
 .endif
-.if defined(APACHE_WITH_MODSNMP)
+.if defined(WITH_MODSNMP)
 	@${MKDIR} ${DATADIR}/buckets
 	@${CHOWN} www:www ${DATADIR}/buckets
 .endif
Index: www/apache13-modssl+ipv6/Makefile
===================================================================
RCS file: /home/ncvs/ports/www/apache13-modssl+ipv6/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- www/apache13-modssl+ipv6/Makefile	21 Mar 2004 11:28:13 -0000	1.1
+++ www/apache13-modssl+ipv6/Makefile	14 Jun 2004 13:27:41 -0000
@@ -4,16 +4,14 @@
 #
 # $FreeBSD: ports/www/apache13-modssl+ipv6/Makefile,v 1.1 2004/03/21 11:28:13 dinoex Exp $
 
-CATEGORIES=	www ipv6
+CATEGORIES=	www security ipv6
+PKGNAMESUFFIX=	-modssl+ipv6
 
 MAINTAINER=	dinoex@FreeBSD.org
 COMMENT=	The Apache 1.3 webserver with SSL/TLS and IPv6 functionality
 
-APACHE_WITH_IPV6=yes
-MASTERDIR?=	${.CURDIR}/../apache13-modssl
+WITH_IPV6=yes
 
-.if exists(${.CURDIR}/Makefile.local)
-.include "${.CURDIR}/Makefile.local"
-.endif
+MASTERDIR=	${.CURDIR}/../apache13-modssl
 
 .include "${MASTERDIR}/Makefile"

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40CDAB0A.2010207>