From root@undeliverable.renatasystems.org  Fri Jul  3 20:53:43 2009
Return-Path: <root@undeliverable.renatasystems.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7ECF91065673
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  3 Jul 2009 20:53:43 +0000 (UTC)
	(envelope-from root@undeliverable.renatasystems.org)
Received: from hs-9.renatasystems.org (hs-9.renatasystems.org [83.222.5.149])
	by mx1.freebsd.org (Postfix) with SMTP id AD3E38FC29
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  3 Jul 2009 20:53:42 +0000 (UTC)
	(envelope-from root@undeliverable.renatasystems.org)
Received: (qmail 34426 invoked by uid 0); 4 Jul 2009 00:53:40 +0400
Message-Id: <20090703205340.34425.qmail@hs-9.renatasystems.org>
Date: 4 Jul 2009 00:53:40 +0400
From: Alexey V.Degtyarev <alexey@renatasystems.org>
Reply-To: Alexey V.Degtyarev <alexey@renatasystems.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] ports-mgmt/tinderbox-devel incorrect WEBUI option handling
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         136302
>Category:       ports
>Synopsis:       [patch] ports-mgmt/tinderbox-devel incorrect WEBUI option handling
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    itetcu
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 03 21:00:15 UTC 2009
>Closed-Date:    Sat Mar 06 11:26:55 UTC 2010
>Last-Modified:  Sat Mar 06 11:26:55 UTC 2010
>Originator:     Alexey V. Degtyarev
>Release:        FreeBSD 6.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD renatasystems.org 6.3-RELEASE FreeBSD 6.3-RELEASE #2: Sat May 24 23:23:42 MSD 2008 root@renatasystems.org:/usr/obj/usr/src/sys/alexey i386


	
>Description:
tinderbox-devel port has a number of patches files/patch-webui* which
can not be applied with WEBUI option turned off:

===>  Found saved configuration for tinderbox-devel-3.2_4
===>  Extracting for tinderbox-devel-3.2_4
=> MD5 Checksum OK for tinderbox/tinderbox-3.2.tar.gz.
=> SHA256 Checksum OK for tinderbox/tinderbox-3.2.tar.gz.
===>  Patching for tinderbox-devel-3.2_4
===>  Applying FreeBSD patches for tinderbox-devel-3.2_4
File to patch: ^C=> Patch patch-webui__core__TinderboxDS.php failed to
apply cleanly.
=> Patch(es) patch-lib__buildscript patch-lib__tc_command.pl
patch-lib__tc_command.sh patch-lib__tinderlib.sh
patch-sql__schema.mysql.pre patch-sql__schema.pgsql.pre
patch-sql__values.pfp patch-sql__values.pfr applied cleanly.

This happens due to premature removing of the whole webui directory:

.if !defined(WITH_WEBUI)
post-extract:
        @${RM} -R ${WRKSRC}/webui
.endif

Secondly, pkg-message after port was installed shows notes about
tinderbox webui configuration, which is rather confusing as soon as
webui was completely disabled. Probably this also should be fixed in
ports-mgmt/tinderbox port too.
>How-To-Repeat:
Just try to install ports-mgmt/tinderbox-devel having WEBUI option
tunded off.
>Fix:

	

--- tinderbox-devel.patch begins here ---
diff -u -rN tinderbox-devel.orig/Makefile tinderbox-devel/Makefile
--- tinderbox-devel.orig/Makefile	2009-05-11 10:19:40.000000000 +0400
+++ tinderbox-devel/Makefile	2009-07-04 00:21:43.000000000 +0400
@@ -29,7 +29,6 @@
 
 NO_BUILD=	yes
 WANT_PERL=	yes
-SUB_FILES=	pkg-message
 
 MAN1=		tc-configCcache.1 tc-configDistfile.1 tc-configGet.1 \
 		tc-configJail.1 tc-configTinderd.1 tc-init.1
@@ -47,8 +46,10 @@
 WANT_PHP_WEB=	yes
 USE_PHP=	session
 PLIST_SUB+=	WEBUI=""
+SUB_FILES+=	pkg-message
 .else
 PLIST_SUB+=	WEBUI="@comment "
+SUB_FILES+=	pkg-message-nowebui
 .endif
 
 .if defined(WITH_PGSQL)
@@ -90,11 +91,6 @@
 	@${FALSE}
 .endif
 
-.if !defined(WITH_WEBUI)
-post-extract:
-	@${RM} -R ${WRKSRC}/webui
-.endif
-
 post-patch:
 .ifdef WITHOUT_CHECK_FOR_ROOT
 	${REINPLACE_CMD} -e 's/^if \[ `id -u` != 0 \]; then/if false; then/' \
@@ -102,6 +98,10 @@
 .endif
 	@cd ${WRKSRC} && ${FIND} . -name '*.orig' -exec ${RM} {} \;
 
+.if !defined(WITH_WEBUI)
+	@${RM} -R ${WRKSRC}/webui
+.endif
+
 do-install:
 	@${MKDIR} ${PREFIX}/tinderbox/scripts
 	@${ECHO_CMD} "Installing man pages ..."
diff -u -rN tinderbox-devel.orig/files/pkg-message-nowebui.in tinderbox-devel/files/pkg-message-nowebui.in
--- tinderbox-devel.orig/files/pkg-message-nowebui.in	1970-01-01 03:00:00.000000000 +0300
+++ tinderbox-devel/files/pkg-message-nowebui.in	2009-07-04 00:16:50.000000000 +0400
@@ -0,0 +1,10 @@
+
+===============================================================================
+ports-mgmt/tinderbox is now installed, but it requires some additional setup.
+
+****************************************************
+Please do read: %%PREFIX%%/tinderbox/scripts/README
+****************************************************
+
+=============================================================================
+
--- tinderbox-devel.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->itetcu 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Jul 3 21:00:27 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136302 
State-Changed-From-To: open->suspended 
State-Changed-By: itetcu 
State-Changed-When: Sat Sep 19 19:44:45 UTC 2009 
State-Changed-Why:  
Will fix in the next update. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136302 
State-Changed-From-To: suspended->closed 
State-Changed-By: itetcu 
State-Changed-When: Sat Mar 6 11:26:54 UTC 2010 
State-Changed-Why:  
Not needed anymore. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136302 
>Unformatted:
