diff options
author | wxs <wxs@FreeBSD.org> | 2009-05-04 23:36:05 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2009-05-04 23:36:05 +0800 |
commit | 68ea460da59614bcc82b80b7517ee85d518af07d (patch) | |
tree | 97b8b5b8dcab48abe4a15229e935bed6d72781bb /net-mgmt | |
parent | d867adf8b0f1cc53e46cd5c7f2a19f98608d3b64 (diff) | |
download | freebsd-ports-gnome-68ea460da59614bcc82b80b7517ee85d518af07d.tar.gz freebsd-ports-gnome-68ea460da59614bcc82b80b7517ee85d518af07d.tar.zst freebsd-ports-gnome-68ea460da59614bcc82b80b7517ee85d518af07d.zip |
- Fix runtime problem with embedded perl.
- Mark as MAKE_JOBS_UNSAFE.
- Stop using DISTVERSION and use PORTVERSION in net-mgmt/nagios.
PR: ports/134175
Submitted by: Jarrod Sayers <jarrod@netleader.com.au> (maintainer)
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/nagios-devel/Makefile | 5 | ||||
-rw-r--r-- | net-mgmt/nagios-devel/files/patch-base__utils.c | 38 | ||||
-rw-r--r-- | net-mgmt/nagios/Makefile | 9 | ||||
-rw-r--r-- | net-mgmt/nagios/files/patch-base-utils.c | 38 | ||||
-rw-r--r-- | net-mgmt/nagios2/Makefile | 4 | ||||
-rw-r--r-- | net-mgmt/nagios2/files/patch-base-utils.c | 42 |
6 files changed, 130 insertions, 6 deletions
diff --git a/net-mgmt/nagios-devel/Makefile b/net-mgmt/nagios-devel/Makefile index 9998166ebaa5..b16ada7c05a7 100644 --- a/net-mgmt/nagios-devel/Makefile +++ b/net-mgmt/nagios-devel/Makefile @@ -6,7 +6,8 @@ # PORTNAME= nagios -DISTVERSION= 3.1.0 +PORTVERSION= 3.1.0 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= SF PKGNAMESUFFIX= -devel @@ -71,6 +72,8 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \ LIBS="-L${LOCALBASE}/lib" \ PERL=${PERL} +MAKE_JOBS_UNSAFE= yes + INSTALL_TARGET= install install-commandmode install-config PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \ diff --git a/net-mgmt/nagios-devel/files/patch-base__utils.c b/net-mgmt/nagios-devel/files/patch-base__utils.c new file mode 100644 index 000000000000..bb8e2a150879 --- /dev/null +++ b/net-mgmt/nagios-devel/files/patch-base__utils.c @@ -0,0 +1,38 @@ +--- base/utils.c.orig 2009-01-26 01:12:34.000000000 +1030 ++++ base/utils.c 2009-05-03 11:59:28.000000000 +0930 +@@ -3660,7 +3660,7 @@ + /* initializes embedded perl interpreter */ + int init_embedded_perl(char **env){ + #ifdef EMBEDDEDPERL +- char *embedding[]={ "", "" }; ++ char **embedding = NULL; + int exitstatus=0; + char *temp_buffer=NULL; + int argc=2; +@@ -3676,6 +3676,17 @@ + + else{ + ++ embedding = malloc(argc * sizeof(char *)); ++ if (embedding == NULL) { ++ use_embedded_perl = FALSE; ++ logit(NSLOG_RUNTIME_ERROR, TRUE, "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n"); ++ } else { ++ embedding[0] = malloc(sizeof(char)); ++ if (embedding[0] == NULL) { ++ use_embedded_perl = FALSE; ++ logit(NSLOG_RUNTIME_ERROR, TRUE, "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n"); ++ } else { ++ *embedding[0] = '\0'; + embedding[1]=p1_file; + + use_embedded_perl=TRUE; +@@ -3687,6 +3698,8 @@ + logit(NSLOG_RUNTIME_ERROR,TRUE,"Error: Could not allocate memory for embedded Perl interpreter!\n"); + } + } ++ } ++ } + + /* a fatal error occurred... */ + if(use_embedded_perl==FALSE){ diff --git a/net-mgmt/nagios/Makefile b/net-mgmt/nagios/Makefile index 6821be1bd620..f091c61ec841 100644 --- a/net-mgmt/nagios/Makefile +++ b/net-mgmt/nagios/Makefile @@ -6,7 +6,8 @@ # PORTNAME= nagios -DISTVERSION= 3.0.6 +PORTVERSION= 3.0.6 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= SF @@ -16,8 +17,6 @@ COMMENT= Extremely powerful network monitoring system LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins -MAKE_JOBS_UNSAFE= yes - USE_ICONV= yes USE_PERL5_BUILD= yes USE_AUTOTOOLS= autoconf:262 libltdl:15 @@ -68,6 +67,8 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \ LIBS="-L${LOCALBASE}/lib" \ PERL=${PERL} +MAKE_JOBS_UNSAFE= yes + INSTALL_TARGET= install install-commandmode install-config PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \ @@ -86,7 +87,7 @@ SUB_FILES= pkg-install \ ### XXX: Subtle bug with removing PREFIX from here SUB_LIST= PREFIX=${PREFIX} \ - ${PLIST_SUB} + ${PLIST_SUB} .if defined(WITH_EMBEDDED_PERL) USE_PERL5= 5.8.0+ diff --git a/net-mgmt/nagios/files/patch-base-utils.c b/net-mgmt/nagios/files/patch-base-utils.c new file mode 100644 index 000000000000..e4aa4a489b82 --- /dev/null +++ b/net-mgmt/nagios/files/patch-base-utils.c @@ -0,0 +1,38 @@ +--- base/utils.c.orig 2008-12-01 03:52:58.000000000 +1030 ++++ base/utils.c 2009-05-03 11:51:19.000000000 +0930 +@@ -3597,7 +3597,7 @@ + /* initializes embedded perl interpreter */ + int init_embedded_perl(char **env){ + #ifdef EMBEDDEDPERL +- char *embedding[]={ "", "" }; ++ char **embedding = NULL; + int exitstatus=0; + char *temp_buffer=NULL; + int argc=2; +@@ -3613,6 +3613,17 @@ + + else{ + ++ embedding = malloc(argc * sizeof(char *)); ++ if (embedding == NULL) { ++ use_embedded_perl = FALSE; ++ logit(NSLOG_RUNTIME_ERROR, TRUE, "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n"); ++ } else { ++ embedding[0] = malloc(sizeof(char)); ++ if (embedding[0] == NULL) { ++ use_embedded_perl = FALSE; ++ logit(NSLOG_RUNTIME_ERROR, TRUE, "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n"); ++ } else { ++ *embedding[0] = '\0'; + embedding[1]=p1_file; + + use_embedded_perl=TRUE; +@@ -3624,6 +3635,8 @@ + logit(NSLOG_RUNTIME_ERROR,TRUE,"Error: Could not allocate memory for embedded Perl interpreter!\n"); + } + } ++ } ++ } + + /* a fatal error occurred... */ + if(use_embedded_perl==FALSE){ diff --git a/net-mgmt/nagios2/Makefile b/net-mgmt/nagios2/Makefile index 11a2477fa873..5436664077e4 100644 --- a/net-mgmt/nagios2/Makefile +++ b/net-mgmt/nagios2/Makefile @@ -7,7 +7,7 @@ PORTNAME= nagios PORTVERSION= 2.12 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-mgmt MASTER_SITES= SF @@ -72,6 +72,8 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \ LIBS="-L${LOCALBASE}/lib" \ PERL=${PERL} +MAKE_JOBS_UNSAFE= yes + INSTALL_TARGET= install install-commandmode install-config PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \ diff --git a/net-mgmt/nagios2/files/patch-base-utils.c b/net-mgmt/nagios2/files/patch-base-utils.c new file mode 100644 index 000000000000..6ef4e98ad12d --- /dev/null +++ b/net-mgmt/nagios2/files/patch-base-utils.c @@ -0,0 +1,42 @@ +--- base/utils.c.orig 2008-02-11 03:50:10.000000000 +1030 ++++ base/utils.c 2009-05-03 11:58:03.000000000 +0930 +@@ -4553,7 +4553,7 @@ + /* initializes embedded perl interpreter */ + int init_embedded_perl(char **env){ + #ifdef EMBEDDEDPERL +- char *embedding[] = { "", "" }; ++ char **embedding = NULL; + int exitstatus = 0; + char buffer[MAX_INPUT_BUFFER]; + int argc = 2; +@@ -4571,6 +4571,21 @@ + + else{ + ++ embedding = malloc(argc * sizeof(char *)); ++ if (embedding == NULL) { ++ use_embedded_perl = FALSE; ++ snprintf(buffer, sizeof(buffer), "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n"); ++ buffer[sizeof(buffer) - 1] = '\0'; ++ write_to_logs_and_console(buffer, NSLOG_RUNTIME_ERROR, TRUE); ++ } else { ++ embedding[0] = malloc(sizeof(char)); ++ if (embedding[0] == NULL) { ++ use_embedded_perl = FALSE; ++ snprintf(buffer, sizeof(buffer), "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n"); ++ buffer[sizeof(buffer) - 1] = '\0'; ++ write_to_logs_and_console(buffer, NSLOG_RUNTIME_ERROR, TRUE); ++ } else { ++ *embedding[0] = '\0'; + embedding[1]=p1_file; + + use_embedded_perl=TRUE; +@@ -4584,6 +4599,8 @@ + write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE); + } + } ++ } ++ } + + /* a fatal error occurred... */ + if(use_embedded_perl==FALSE){ |