pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/nagios-base Fix build on SunOS. What a pain.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1373064d5d8b
branches:  trunk
changeset: 649918:1373064d5d8b
user:      rodent <rodent%pkgsrc.org@localhost>
date:      Sun Apr 12 23:33:06 2015 +0000

description:
Fix build on SunOS. What a pain.

diffstat:

 net/nagios-base/Makefile                               |    5 +-
 net/nagios-base/distinfo                               |   12 +-
 net/nagios-base/patches/patch-cgi_cmd.c                |   15 +
 net/nagios-base/patches/patch-cgi_extinfo.c            |   24 +
 net/nagios-base/patches/patch-cgi_statusjson.c         |   78 +++++
 net/nagios-base/patches/patch-common_comments.c        |  223 +++++++++++++++++
 net/nagios-base/patches/patch-include_comments.h       |   58 ++++
 net/nagios-base/patches/patch-include_statusjson.h     |   26 +
 net/nagios-base/patches/patch-t-tap_test__xsddefault.c |   24 +
 net/nagios-base/patches/patch-xdata_xcddefault.c       |   15 +
 net/nagios-base/patches/patch-xdata_xrddefault.c       |   15 +
 net/nagios-base/patches/patch-xdata_xsddefault.c       |   15 +
 12 files changed, 508 insertions(+), 2 deletions(-)

diffs (truncated from 583 to 300 lines):

diff -r a1b03488d239 -r 1373064d5d8b net/nagios-base/Makefile
--- a/net/nagios-base/Makefile  Sun Apr 12 17:55:46 2015 +0000
+++ b/net/nagios-base/Makefile  Sun Apr 12 23:33:06 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.56 2015/04/03 17:06:08 rodent Exp $
+# $NetBSD: Makefile,v 1.57 2015/04/12 23:33:06 rodent Exp $
 #
 
 DISTNAME=              nagios-4.0.8
@@ -94,6 +94,9 @@
            ${DESTDIR}/${PREFIX}/share/nagios/images/logos/
        ${INSTALL_DATA} ${WRKDIR}/netbsd40.png \
            ${DESTDIR}/${PREFIX}/share/nagios/images/logos/
+       ${CHMOD} g-w ${DESTDIR}${PREFIX}/share/nagios/jsonquery.html
+       ${CHMOD} g-w ${DESTDIR}${PREFIX}/share/nagios/rss-corefeed.html
+       ${CHMOD} g-w ${DESTDIR}${PREFIX}/share/nagios/rss-newsfeed.html
 
 .include "../../mk/dlopen.buildlink3.mk"
 .include "../../devel/libltdl/buildlink3.mk"
diff -r a1b03488d239 -r 1373064d5d8b net/nagios-base/distinfo
--- a/net/nagios-base/distinfo  Sun Apr 12 17:55:46 2015 +0000
+++ b/net/nagios-base/distinfo  Sun Apr 12 23:33:06 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.23 2015/04/08 23:25:25 rodent Exp $
+$NetBSD: distinfo,v 1.24 2015/04/12 23:33:06 rodent Exp $
 
 SHA1 (nagios-4.0.8.tar.gz) = d49586db6905a8e58a082251d8f89ef5c2cab872
 RMD160 (nagios-4.0.8.tar.gz) = b53631755e0a23aba918a99f58b7bea237fdd799
@@ -9,11 +9,21 @@
 SHA1 (patch-Makefile.in) = 953eea6b276beba75ab5c64c14d10cdcf1ca2188
 SHA1 (patch-base_Makefile.in) = 2b0162bb4d395b1d529f5fc1fdf9eab3ddaeb161
 SHA1 (patch-cgi_Makefile.in) = 25c22914986c0b781f5dd665a7a53778e1031a63
+SHA1 (patch-cgi_cmd.c) = 90dfbfc78b08c5d72f168003d6c9fb56d67a8743
+SHA1 (patch-cgi_extinfo.c) = 8cad0787fbe0a782edb93ca299462a5718a34a4b
 SHA1 (patch-cgi_getcgi.c) = 3af474de4f4281f18a306f7d618ff532d0a9ca9e
+SHA1 (patch-cgi_statusjson.c) = 13967c18ee3eaaaf75edb8b3ee028bece73272ae
 SHA1 (patch-common_Makefile.in) = 7fa093a6109dfa03f9b97e4312d3a09e3235f00f
+SHA1 (patch-common_comments.c) = 7739c9c74333c45e86242383073dfa78785445ec
 SHA1 (patch-configure) = f57db3a43c1abc1aa0d6fe007308089c620624a4
 SHA1 (patch-daemon-init.in) = 1e50bb84fde9780d5b13edb4e232c0e3a90ac3f4
 SHA1 (patch-html_Makefile.in) = 33ca19b5cf37839be6fbd851a5dcf29d4d701c8b
+SHA1 (patch-include_comments.h) = c86328a4f1437ee1dc2b6f97be61693414dd4fce
 SHA1 (patch-include_locations.h.in) = 0ee376f6737b24f0d4ea8b37781aca70147c5e70
+SHA1 (patch-include_statusjson.h) = c5a84b9ef3114f2e2480d719bbb4a24c8965e052
 SHA1 (patch-lib_runcmd.c) = fb34fe5cdc39aca973c1a6e125b125867e6ed262
 SHA1 (patch-sample-config_nagios.cfg.in) = 4ad00840ad66d2e01b19c6db76c810fc3fb80795
+SHA1 (patch-t-tap_test__xsddefault.c) = db7166fae411a461d8b4a4a31f55af693aeb03b0
+SHA1 (patch-xdata_xcddefault.c) = ba14af868cd773d07e029a2773a44614eedc3e46
+SHA1 (patch-xdata_xrddefault.c) = 0883a8ea4bac21523b0aa6ef77272ba5ae0c8b42
+SHA1 (patch-xdata_xsddefault.c) = 6255158bfe90a390678f2b834935e809b21d560c
diff -r a1b03488d239 -r 1373064d5d8b net/nagios-base/patches/patch-cgi_cmd.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-base/patches/patch-cgi_cmd.c   Sun Apr 12 23:33:06 2015 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-cgi_cmd.c,v 1.4 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- cgi/cmd.c.orig     2014-08-12 15:00:01.000000000 +0000
++++ cgi/cmd.c
+@@ -1403,7 +1403,7 @@ void commit_command_data(int cmd) {
+       service *temp_service;
+       host *temp_host;
+       hostgroup *temp_hostgroup;
+-      comment *temp_comment;
++      my_comment *temp_comment;
+       scheduled_downtime *temp_downtime;
+       servicegroup *temp_servicegroup = NULL;
+       contact *temp_contact = NULL;
diff -r a1b03488d239 -r 1373064d5d8b net/nagios-base/patches/patch-cgi_extinfo.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-base/patches/patch-cgi_extinfo.c       Sun Apr 12 23:33:06 2015 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-cgi_extinfo.c,v 1.3 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- cgi/extinfo.c.orig 2014-08-12 15:00:01.000000000 +0000
++++ cgi/extinfo.c
+@@ -1739,7 +1739,7 @@ void show_all_comments(void) {
+       const char *bg_class = "";
+       int odd = 0;
+       char date_time[MAX_DATETIME_LENGTH];
+-      comment *temp_comment;
++      my_comment *temp_comment;
+       host *temp_host;
+       service *temp_service;
+       char *comment_type;
+@@ -2420,7 +2420,7 @@ void display_comments(int type) {
+       const char *bg_class = "";
+       int odd = 1;
+       char date_time[MAX_DATETIME_LENGTH];
+-      comment *temp_comment;
++      my_comment *temp_comment;
+       char *comment_type;
+       char expire_time[MAX_DATETIME_LENGTH];
+ 
diff -r a1b03488d239 -r 1373064d5d8b net/nagios-base/patches/patch-cgi_statusjson.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-base/patches/patch-cgi_statusjson.c    Sun Apr 12 23:33:06 2015 +0000
@@ -0,0 +1,78 @@
+$NetBSD: patch-cgi_statusjson.c,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- cgi/statusjson.c.orig      2014-08-12 15:00:01.000000000 +0000
++++ cgi/statusjson.c
+@@ -63,7 +63,7 @@ extern service *service_list;
+ extern contact *contact_list;
+ #endif
+ extern servicestatus *servicestatus_list;
+-extern comment *comment_list;
++extern my_comment *comment_list;
+ extern scheduled_downtime *scheduled_downtime_list;
+ 
+ /* Program status variables */
+@@ -717,7 +717,7 @@ json_object *json_status_service_selecto
+               time_t, time_t, char *, char *, char *, contactgroup *, timeperiod *,
+               timeperiod *, command *, command *);
+ 
+-int json_status_comment_passes_selection(comment *, int, time_t, time_t,
++int json_status_comment_passes_selection(my_comment *, int, time_t, time_t,
+               unsigned, unsigned, unsigned, unsigned, char *, char *);
+ json_object *json_status_comment_selectors(unsigned, int, int, int, time_t, 
+               time_t, unsigned, unsigned, unsigned, unsigned, char *, char *);
+@@ -1824,7 +1824,7 @@ int validate_arguments(json_object *json
+       timeperiod *temp_timeperiod = NULL;
+       command *temp_command = NULL;
+       contact *temp_contact = NULL;
+-      comment *temp_comment = NULL;
++      my_comment *temp_comment = NULL;
+       scheduled_downtime *temp_downtime = NULL;
+       authdata *authinfo = NULL; /* Currently always NULL because
+                                                                       get_authentication_information() hasn't
+@@ -3568,7 +3568,7 @@ void json_status_service_details(json_ob
+ #endif
+       }
+ 
+-int json_status_comment_passes_selection(comment *temp_comment, int time_field, 
++int json_status_comment_passes_selection(my_comment *temp_comment, int time_field, 
+               time_t start_time, time_t end_time, unsigned comment_types,
+               unsigned entry_types, unsigned persistence, unsigned expiring,
+               char *host_name, char *service_description) {
+@@ -3743,7 +3743,7 @@ json_object *json_status_commentcount(un
+               char *host_name, char *service_description) {
+ 
+       json_object *json_data;
+-      comment *temp_comment;
++      my_comment *temp_comment;
+       int count = 0;
+ 
+       json_data = json_new_object();
+@@ -3777,7 +3777,7 @@ json_object *json_status_commentlist(uns
+       json_object *json_commentlist_object = NULL;
+       json_object *json_commentlist_array = NULL;
+       json_object *json_comment_details;
+-      comment *temp_comment;
++      my_comment *temp_comment;
+       int current = 0;
+       int counted = 0;
+       char *buf;
+@@ -3835,7 +3835,7 @@ json_object *json_status_commentlist(uns
+       return json_data;
+       }
+ 
+-json_object *json_status_comment(unsigned format_options, comment *temp_comment) {
++json_object *json_status_comment(unsigned format_options, my_comment *temp_comment) {
+ 
+       json_object *json_comment = json_new_object();
+       json_object *json_details = json_new_object();
+@@ -3849,7 +3849,7 @@ json_object *json_status_comment(unsigne
+       }
+ 
+ void json_status_comment_details(json_object *json_details, 
+-              unsigned format_options, comment *temp_comment) {
++              unsigned format_options, my_comment *temp_comment) {
+ 
+       json_object_append_integer(json_details, "comment_id", 
+                       temp_comment->comment_id);
diff -r a1b03488d239 -r 1373064d5d8b net/nagios-base/patches/patch-common_comments.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-base/patches/patch-common_comments.c   Sun Apr 12 23:33:06 2015 +0000
@@ -0,0 +1,223 @@
+$NetBSD: patch-common_comments.c,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- common/comments.c.orig     2014-08-12 15:00:01.000000000 +0000
++++ common/comments.c
+@@ -36,9 +36,9 @@
+ #endif
+ 
+ 
+-comment     *comment_list = NULL;
++my_comment     *comment_list = NULL;
+ int       defer_comment_sorting = 0;
+-comment     **comment_hashlist = NULL;
++my_comment     **comment_hashlist = NULL;
+ 
+ 
+ 
+@@ -131,12 +131,12 @@ int add_new_service_comment(int entry_ty
+ 
+ /* deletes a host or service comment */
+ int delete_comment(int type, unsigned long comment_id) {
+-      comment *this_comment = NULL;
+-      comment *last_comment = NULL;
+-      comment *next_comment = NULL;
++      my_comment *this_comment = NULL;
++      my_comment *last_comment = NULL;
++      my_comment *next_comment = NULL;
+       int hashslot = 0;
+-      comment *this_hash = NULL;
+-      comment *last_hash = NULL;
++      my_comment *this_hash = NULL;
++      my_comment *last_hash = NULL;
+ 
+       /* find the comment we should remove */
+       for(this_comment = comment_list, last_comment = comment_list; this_comment != NULL; this_comment = next_comment) {
+@@ -232,8 +232,8 @@ int delete_all_comments(int type, char *
+ /* deletes all comments for a particular host */
+ int delete_all_host_comments(char *host_name) {
+       int result = OK;
+-      comment *temp_comment = NULL;
+-      comment *next_comment = NULL;
++      my_comment *temp_comment = NULL;
++      my_comment *next_comment = NULL;
+ 
+       if(host_name == NULL)
+               return ERROR;
+@@ -252,8 +252,8 @@ int delete_all_host_comments(char *host_
+ /* deletes all non-persistent acknowledgement comments for a particular host */
+ int delete_host_acknowledgement_comments(host *hst) {
+       int result = OK;
+-      comment *temp_comment = NULL;
+-      comment *next_comment = NULL;
++      my_comment *temp_comment = NULL;
++      my_comment *next_comment = NULL;
+ 
+       if(hst == NULL)
+               return ERROR;
+@@ -275,8 +275,8 @@ int delete_host_acknowledgement_comments
+ /* deletes all comments for a particular service */
+ int delete_all_service_comments(char *host_name, char *svc_description) {
+       int result = OK;
+-      comment *temp_comment = NULL;
+-      comment *next_comment = NULL;
++      my_comment *temp_comment = NULL;
++      my_comment *next_comment = NULL;
+ 
+       if(host_name == NULL || svc_description == NULL)
+               return ERROR;
+@@ -295,8 +295,8 @@ int delete_all_service_comments(char *ho
+ /* deletes all non-persistent acknowledgement comments for a particular service */
+ int delete_service_acknowledgement_comments(service *svc) {
+       int result = OK;
+-      comment *temp_comment = NULL;
+-      comment *next_comment = NULL;
++      my_comment *temp_comment = NULL;
++      my_comment *next_comment = NULL;
+ 
+       if(svc == NULL)
+               return ERROR;
+@@ -314,7 +314,7 @@ int delete_service_acknowledgement_comme
+ 
+ /* checks for an expired comment (and removes it) */
+ int check_for_expired_comment(unsigned long comment_id) {
+-      comment *temp_comment = NULL;
++      my_comment *temp_comment = NULL;
+ 
+       /* check all comments */
+       for(temp_comment = comment_list; temp_comment != NULL; temp_comment = temp_comment->next) {
+@@ -341,16 +341,16 @@ int check_for_expired_comment(unsigned l
+ /******************************************************************/
+ 
+ /* adds comment to hash list in memory */
+-int add_comment_to_hashlist(comment *new_comment) {
+-      comment *temp_comment = NULL;
+-      comment *lastpointer = NULL;
++int add_comment_to_hashlist(my_comment *new_comment) {
++      my_comment *temp_comment = NULL;
++      my_comment *lastpointer = NULL;
+       int hashslot = 0;
+ 
+       /* initialize hash list */
+       if(comment_hashlist == NULL) {
+               int i;
+ 
+-              comment_hashlist = (comment **)malloc(sizeof(comment *) * COMMENT_HASHSLOTS);
++              comment_hashlist = (my_comment **)malloc(sizeof(my_comment *) * COMMENT_HASHSLOTS);
+               if(comment_hashlist == NULL)
+                       return 0;
+ 
+@@ -410,9 +410,9 @@ int add_service_comment(int entry_type, 
+ 
+ /* adds a comment to the list in memory */
+ int add_comment(int comment_type, int entry_type, char *host_name, char *svc_description, time_t entry_time, char *author, char *comment_data, unsigned long comment_id, int persistent, int expires, 
time_t expire_time, int source) {
+-      comment *new_comment = NULL;
+-      comment *last_comment = NULL;
+-      comment *temp_comment = NULL;



Home | Main Index | Thread Index | Old Index