ports/89913: [MAINTAINER] update sysutils/portmanager
Michael C. Shultz
ringworm01 at gmail.com
Sun Dec 4 02:20:09 UTC 2005
>Number: 89913
>Category: ports
>Synopsis: [MAINTAINER] update sysutils/portmanager
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Dec 04 02:20:02 GMT 2005
>Closed-Date:
>Last-Modified:
>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 at 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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list