summaryrefslogtreecommitdiff
path: root/ports-mgmt/portmanager
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2005-12-04 06:16:40 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2005-12-04 06:16:40 +0000
commit964fbeb0f7a0f3ebd6cf33d27d4f3cc3238d45c4 (patch)
treeea3bf8b0056edc7d15dbee1f4834f9da839362c5 /ports-mgmt/portmanager
parentUpdate port: to version 0.1.7 (diff)
[MAINTAINER] update sysutils/portmanager
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! PR: ports/89913 Submitted by: Michael C. Shultz <ringworm01@gmail.com>
Notes
Notes: svn path=/head/; revision=150342
Diffstat (limited to 'ports-mgmt/portmanager')
-rw-r--r--ports-mgmt/portmanager/Makefile2
-rw-r--r--ports-mgmt/portmanager/files/patch-0.3.9_7172
2 files changed, 173 insertions, 1 deletions
diff --git a/ports-mgmt/portmanager/Makefile b/ports-mgmt/portmanager/Makefile
index 5038dced7d42..579b1964ad6b 100644
--- a/ports-mgmt/portmanager/Makefile
+++ b/ports-mgmt/portmanager/Makefile
@@ -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 --git a/ports-mgmt/portmanager/files/patch-0.3.9_7 b/ports-mgmt/portmanager/files/patch-0.3.9_7
new file mode 100644
index 000000000000..9a0ea215c9d0
--- /dev/null
+++ b/ports-mgmt/portmanager/files/patch-0.3.9_7
@@ -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 ) );
+