Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2008 10:47:23 GMT
From:      Massimo Fusaro <mfusaro@neobe.it>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/120078: "bad substitution" in www/geronimo start script
Message-ID:  <200801281047.m0SAlNuk095820@www.freebsd.org>
Resent-Message-ID: <200801281050.m0SAoCuT014365@freefall.freebsd.org>

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

>Number:         120078
>Category:       ports
>Synopsis:       "bad substitution" in www/geronimo start script
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 28 10:50:12 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Massimo Fusaro
>Release:        7.0-PRERELEASE
>Organization:
>Environment:
FreeBSD plane.lan 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #2: Thu Jan 10 11:20:11 CET 2008     root@plane.lan:/usr/obj/usr/src/sys/PLANE  i386


>Description:
In the latest version of the "www/geronimo" port Makefile, PORTVERSION is 2.0.2, but other variables
such as MAJOR_VER refer the previous version: 2.0.M5.

The result is a broken start script (version number is not removed, so the shell variables contain some dot).
For example
	geronimo2_enable
becomes
	geronimo2.0.2_enable
which is not a correct name for a shell variable.
>How-To-Repeat:
/usr/local/etc/rc.d/geronimo2 start
>Fix:


Patch attached with submission follows:

--- Makefile.orig	2008-01-28 11:34:29.000000000 +0100
+++ Makefile	2008-01-28 11:39:57.000000000 +0100
@@ -9,8 +9,8 @@
 PORTVERSION=	2.0.2
 CATEGORIES=	www devel java
 MASTER_SITES=	${MASTER_SITE_APACHE}
-MASTER_SITE_SUBDIR=	geronimo/${PORTVERSION:C/\.M/-M/}
-DISTNAME=	${PORTNAME}-${WEBSERVER}-jee5-${PORTVERSION:C/\.M/-M/}-bin
+MASTER_SITE_SUBDIR=	geronimo/${PORTVERSION}
+DISTNAME=	${PORTNAME}-${WEBSERVER}-jee5-${PORTVERSION}-bin
 
 MAINTAINER=	nemoliu@FreeBSD.org
 COMMENT=	Open-source Java EE 5 application server
@@ -40,17 +40,17 @@
 WEBSERVER=	tomcat6
 .endif
 
-MAJOR_VER=	${PORTVERSION:S/.0.M5//}
-APP_HOME?=	${PREFIX}/${PKGBASE}${PORTVERSION:S/.0.M5//}
+MAJOR_VER=	${PORTVERSION:S/.0.2//}
+APP_HOME?=	${PREFIX}/${PKGBASE}${PORTVERSION:S/.0.2//}
 LOG_DIR=	${APP_HOME}/var/log
 APP_TITLE=	Geronimo
-APP_SHORTNAME=	geronimo${MAJOR_VER:S/.0.M5//}
+APP_SHORTNAME=	geronimo${MAJOR_VER:S/.0.2//}
 GERONIMO_USER?=	www
 GERONIMO_GROUP?=www
 GERONIMO_OUT=	${LOG_DIR}/geronimo.out
 PID_FILE=	/var/run/${APP_SHORTNAME}.pid
 WRKDIR?=	${WRKDIRPREFIX}${.CURDIR}/work
-WRKSRC=		${WRKDIR}/${PORTNAME}-${WEBSERVER}-jee5-${PORTVERSION:C/\.M/-M/}
+WRKSRC=		${WRKDIR}/${PORTNAME}-${WEBSERVER}-jee5-${PORTVERSION}
 JAR_FILE=	bin/server.jar
 WEBPATHV=	${WEBSERVER}
 WEBPATHNV=	jetty
@@ -67,7 +67,7 @@
 PLIST_SUB+=	T=${APP_HOME:S/^${PREFIX}\///} \
 		WWWOWN=${TOMCAT_USER} \
 		WWWGRP=${TOMCAT_GROUP} \
-		PVER=${PORTVERSION:C/\.M/-M/} \
+		PVER=${PORTVERSION} \
 		WEBPATHV=${WEBPATHV} \
 		WEBPATHNV=${WEBPATHNV} \
 		WEBPATHV=${WEBPATHV} \


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



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