From ringworm01@gmail.com  Sun Dec  4 02:10:43 2005
Return-Path: <ringworm01@gmail.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AB94316A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  4 Dec 2005 02:10:43 +0000 (GMT)
	(envelope-from ringworm01@gmail.com)
Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 50A7743D5A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  4 Dec 2005 02:10:43 +0000 (GMT)
	(envelope-from ringworm01@gmail.com)
Received: from ringworm.mechee.com ([71.102.14.129])
 by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep
 9 2005)) with ESMTPA id <0IQY00MC3BDTLY12@vms046.mailsrvcs.net> for
 FreeBSD-gnats-submit@freebsd.org; Sat, 03 Dec 2005 20:10:42 -0600 (CST)
Received: by ringworm.mechee.com (Postfix, from userid 1001)
	id 7AB36130C2C; Sat, 03 Dec 2005 18:10:41 -0800 (PST)
Message-Id: <20051204021041.7AB36130C2C@ringworm.mechee.com>
Date: Sat, 03 Dec 2005 18:10:41 -0800 (PST)
From: Michael C. Shultz <ringworm01@gmail.com>
Reply-To: Michael C. Shultz <ringworm01@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Gerard Seibert <gerard@seibercom.net>
Subject: [MAINTAINER] update sysutils/portmanager
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         89913
>Category:       ports
>Synopsis:       [MAINTAINER] update sysutils/portmanager
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 04 02:20:02 GMT 2005
>Closed-Date:    Sun Dec 04 06:17:12 GMT 2005
>Last-Modified:  Sun Dec 04 06:17:12 GMT 2005
>Originator:     Michael C. Shultz
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD ringworm.mechee.com 5.4-STABLE FreeBSD 5.4-STABLE #0: Wed Nov 30 13:51:49 PST 2005 root@ringworm.mechee.com:/usr5/obj/usr5/src/sys/RINGWORM5 i386

>Description:

	update sysutils/portmanager to 0.3.9_7

	1. Fixes portmanager not honoring STOP/START statements from its own config file,
	reported by Gerard Seibert <gerard@seibercom.net>, Thanks!

>How-To-Repeat:

	N/A

>Fix:

--- portmanager-0.3.9_7.diff begins here ---
diff -ruN portmanager/Makefile portmanager-0.3.9_7/Makefile
--- portmanager/Makefile	Sat Dec  3 18:01:40 2005
+++ portmanager-0.3.9_7/Makefile	Sat Dec  3 18:04:53 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	portmanager
 PORTVERSION=	0.3.9
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	sysutils
 MASTER_SITES=	http://portmanager.sunsite.dk/distfiles/ \
 		${MASTER_SITE_SOURCEFORGE}
diff -ruN portmanager/files/patch-0.3.9_7 portmanager-0.3.9_7/files/patch-0.3.9_7
--- portmanager/files/patch-0.3.9_7	Wed Dec 31 16:00:00 1969
+++ portmanager-0.3.9_7/files/patch-0.3.9_7	Sat Dec  3 18:02:48 2005
@@ -0,0 +1,172 @@
+diff -ruN ../0.3.9_6/libMGPM/src/MGPMrUpdate.c ./libMGPM/src/MGPMrUpdate.c
+--- ../0.3.9_6/libMGPM/src/MGPMrUpdate.c	Sat Dec  3 14:45:00 2005
++++ ./libMGPM/src/MGPMrUpdate.c	Sat Dec  3 17:50:47 2005
+@@ -203,17 +203,20 @@
+ 			property->fieldConfigDbKey,
+ 			STOP,
+ 			property->fieldConfigDbKey,
+-			exact )	
+-		&&
+-		strncmp( oldPortDir, 
+-			MGdbGet( property->configDb,
+-				MGdbGetRecno( property->configDb ) - 1,
+-				property->fieldConfigDbValue ),
+-			strlen( oldPortDir ) ) ==  0 )
++			exact )	)
+ 	{
+ 		stopPortDirPtr	= MGdbGet( property->configDb,  	
+ 					MGdbGetRecno( property->configDb ) - 1,
+ 					property->fieldConfigDbValue );
++
++		if( strncmp( oldPortDir, MGdbGet( property->configDb,
++						MGdbGetRecno( property->configDb ) - 1,
++						property->fieldConfigDbValue ),
++						strlen( oldPortDir ) ) )
++		{
++			continue;
++		}
++
+ 		if( stopPortDirPtr[strlen( oldPortDir )] == SPACE )
+ 		{
+ 			strncpy( localProperty.stopPortDir, stopPortDirPtr, strlen( oldPortDir ) );
+@@ -230,17 +233,21 @@
+ 			property->fieldConfigDbKey,
+ 			START,
+ 			property->fieldConfigDbKey,
+-			exact )	
+-		&&
+-		strncmp( oldPortDir, 
+-			MGdbGet( property->configDb,
+-				MGdbGetRecno( property->configDb ) - 1,
+-				property->fieldConfigDbValue ),
+-			strlen( oldPortDir ) ) ==  0 )
++			exact ) )
++
+ 	{
+ 		startPortDirPtr	= MGdbGet( property->configDb,  	
+ 					MGdbGetRecno( property->configDb ) - 1,
+ 					property->fieldConfigDbValue );
++
++		if( strncmp( oldPortDir, MGdbGet( property->configDb,
++					MGdbGetRecno( property->configDb ) - 1,
++					property->fieldConfigDbValue ),
++					strlen( oldPortDir ) ) )
++		{
++			continue;
++		}
++
+ 		if( startPortDirPtr[strlen( oldPortDir )] == SPACE )
+ 		{
+ 			strncpy( localProperty.startPortDir, startPortDirPtr, strlen( oldPortDir ) );
+@@ -1082,33 +1089,9 @@
+  				pHandle	= popen( localProperty.stopPortCmd, "r" );
+ 				fread( localProperty.buffer, bufferSize, 1, pHandle );
+ 				pclose( pHandle );
+-/*
+-				idx	= 0;
+-				while( idx < bufferSize )
+-				{
+-					if( localProperty.buffer[idx] == LINEFEED 
+-						||
+-						localProperty.buffer[idx] == TAB 
+-						|| 
+-						localProperty.buffer[idx] == SPACE )
+-					{
+-						localProperty.buffer[idx]	= 0;
+-						break;
+-					}
+-					idx++;
+-				}
+-*/
+-				if( property->log )
+-				{
+-					strcpy( localProperty.command, "echo \"    stopping " );
+-					strcat( localProperty.command, oldPortName );
+-					strcat( localProperty.command, " " );
+-					strcat( localProperty.command, oldPortDir );
+-					strcat( localProperty.command, " execution by running " );
+-					strcat( localProperty.command, localProperty.stopPortCmd );
+-					strcat( localProperty.command, " \">> /var/log/portmanager.log" );
+-					system( localProperty.command );
+-				}
++
++				MGPMlogAdd( property, "stopping ", oldPortName, oldPortDir, " execution by running ", localProperty.stopPortCmd );
++
+ 				fprintf( stdout, "%s reply: %s\n", localProperty.stopPortCmd, localProperty.buffer );
+ 				while( fflush( stdout ) );
+ 			}
+@@ -1264,19 +1247,6 @@
+ 			system( localProperty.command );
+ 		}
+ 	}
+-
+-	/*
+-	 * 5 second time delay
+-	 */
+-/*
+-	property->STDIN = fopen( "/dev/STDIN", "r" );
+-	signal( SIGALRM, MGPMrTimer );
+-	alarm( 5 );
+-	answer	= getc( property->STDIN );
+-	alarm(0);
+-	fclose( property->STDIN );
+-*/
+-	
+ 	strcpy( localProperty.command, "cp /tmp/*.db " );
+ 	strcat( localProperty.command, SHAREDIR );
+ 	fprintf( stdout, "restoring databases localProperty.command:%s\n", localProperty.command );
+@@ -1298,33 +1268,8 @@
+  		pHandle	= popen( localProperty.startPortCmd, "r" );
+ 		fread( localProperty.buffer, bufferSize, 1, pHandle );
+ 		pclose( pHandle );
+-/*
+-		idx	= 0;
+-		while( idx < bufferSize )
+-		{
+-			if( localProperty.buffer[idx] == LINEFEED 
+-				||
+-				localProperty.buffer[idx] == TAB 
+-				|| 
+-				localProperty.buffer[idx] == SPACE )
+-			{
+-				localProperty.buffer[idx]	= 0;
+-				break;
+-			}
+-			idx++;
+-		}
+-*/
+-		if( property->log )
+-		{
+-			strcpy( localProperty.command, "echo \"    starting " );
+-			strcat( localProperty.command, oldPortName );
+-			strcat( localProperty.command, " " );
+-			strcat( localProperty.command, oldPortDir );
+-			strcat( localProperty.command, " execution by running " );
+-			strcat( localProperty.command, localProperty.startPortCmd );
+-			strcat( localProperty.command, " \">> /var/log/portmanager.log" );
+-			system( localProperty.command );
+-		}
++
++		MGPMlogAdd( property, "starting ", oldPortName, oldPortDir, " execution by running ", localProperty.startPortCmd );
+ 
+ 		fprintf( stdout, "%s reply: %s\n", localProperty.startPortCmd, localProperty.buffer );
+ 		while( fflush( stdout ) );
+@@ -1362,8 +1307,6 @@
+ 		fprintf( stdout, "restoring databases localProperty.command:%s\n", localProperty.command );
+ 		while( fflush( stdout ) );
+ 		system( localProperty.command );
+-
+-
+ 	}
+ 	else
+ 	{
+@@ -1656,9 +1599,6 @@
+ 	strcat( command, curDir );
+ 
+ 	strcat( command, "/work 2>&1" );
+-/*
+-	strcat( command, "/work" );
+-*/
+ 	fprintf( stdout, "===>  Cleaning for %s\n", portDir );	
+ 	while( fflush( stdout ) );
+ 
--- portmanager-0.3.9_7.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Sun Dec 4 06:17:02 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

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