diff options
author | bouyer <bouyer@pkgsrc.org> | 2016-02-09 10:12:53 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2016-02-09 10:12:53 +0000 |
commit | c4415432bb282790cc8664dae71e9c01c78f667f (patch) | |
tree | 7913ceead83270336579f992c5c80216db32553b /net | |
parent | 805fac7696cedcda161cad4063bbb5e3ee2d8d85 (diff) | |
download | pkgsrc-c4415432bb282790cc8664dae71e9c01c78f667f.tar.gz |
Bug fix for workers busy-waiting for child completion: when read()ing a
non-bloking descriptor after a poll(), don't loop forever on EAGAIN
as poll() may return POLLIN for a descriptor which doesn't have data
to be read. Bump PKGREVISION.
While there add user-destdir support.
Diffstat (limited to 'net')
-rw-r--r-- | net/nagios-base/Makefile | 12 | ||||
-rw-r--r-- | net/nagios-base/distinfo | 6 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-base_checks.c | 2 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-base_events.c | 2 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-base_nerd.c | 2 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-cgi_avail.c | 2 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-cgi_histogram.c | 2 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-cgi_trends.c | 2 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-common_downtime.c | 2 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-html_Makefile.in | 20 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-lib_test-squeue.c | 2 | ||||
-rw-r--r-- | net/nagios-base/patches/patch-lib_worker.c | 14 |
12 files changed, 42 insertions, 26 deletions
diff --git a/net/nagios-base/Makefile b/net/nagios-base/Makefile index 1ced7e2ecee..8c553f4ed4f 100644 --- a/net/nagios-base/Makefile +++ b/net/nagios-base/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.62 2016/02/07 12:41:11 bouyer Exp $ +# $NetBSD: Makefile,v 1.63 2016/02/09 10:12:53 bouyer Exp $ # DISTNAME= nagios-4.0.8 PKGNAME= ${DISTNAME:S/-/-base-/} -PKGREVISION= 4 +PKGREVISION= 5 CATEGORIES= net sysutils DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/} @@ -15,7 +15,7 @@ HOMEPAGE= http://www.nagios.org/ COMMENT= Network monitor LICENSE= gnu-gpl-v2 -PKG_DESTDIR_SUPPORT= destdir +PKG_DESTDIR_SUPPORT= user-destdir .include "../../mk/bsd.prefs.mk" .include "../../net/nagios-base/Makefile.common" @@ -52,8 +52,6 @@ BUILD_DEFS+= NAGIOSDIR PKG_GROUPS+= ${NAGIOS_GROUP} PKG_GROUPS+= ${NAGIOSCMD_GROUP} -USERGROUP_PHASE+= pre-install - PKG_USERS+= ${NAGIOS_USER}:${NAGIOS_GROUP} PKG_GECOS.${NAGIOS_USER}= Nagios Runtime User @@ -80,6 +78,10 @@ OWN_DIRS_PERMS+=${NAGIOSDIR}/archives ${NAGIOS_USER} ${NAGIOS_GROUP} 0775 OWN_DIRS_PERMS+=${NAGIOSDIR}/rw ${NAGIOS_USER} ${NAGIOSCMD_GROUP} 0775 OWN_DIRS_PERMS+=${NAGIOSDIR}/checkresults ${NAGIOS_USER} ${NAGIOSCMD_GROUP} 0775 +SPECIAL_PERMS+= ${DESTDIR}/${PREFIX}/share/nagios/jsonquery.html ${NAGIOS_USER} ${NAGIOSCMD_GROUP} 0644 +SPECIAL_PERMS+= ${DESTDIR}/${PREFIX}/share/nagios/rss-corefeed.html ${NAGIOS_USER} ${NAGIOSCMD_GROUP} 0644 +SPECIAL_PERMS+= ${DESTDIR}/${PREFIX}/share/nagios/rss-newsfeed.html ${NAGIOS_USER} ${NAGIOSCMD_GROUP} 0644 + SUBST_CLASSES+= files SUBST_STAGE.files= post-build SUBST_FILES.files= nagios.conf.dist diff --git a/net/nagios-base/distinfo b/net/nagios-base/distinfo index 82fb1652578..38c5ebcb16e 100644 --- a/net/nagios-base/distinfo +++ b/net/nagios-base/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.29 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: distinfo,v 1.30 2016/02/09 10:12:53 bouyer Exp $ SHA1 (nagios-4.0.8.tar.gz) = d49586db6905a8e58a082251d8f89ef5c2cab872 RMD160 (nagios-4.0.8.tar.gz) = b53631755e0a23aba918a99f58b7bea237fdd799 @@ -27,14 +27,14 @@ SHA1 (patch-common_comments.c) = 7739c9c74333c45e86242383073dfa78785445ec SHA1 (patch-common_downtime.c) = 000f1e33ab1ca1c433c3fd0de3d5bf750df6f57f SHA1 (patch-configure) = f57db3a43c1abc1aa0d6fe007308089c620624a4 SHA1 (patch-daemon-init.in) = 1e50bb84fde9780d5b13edb4e232c0e3a90ac3f4 -SHA1 (patch-html_Makefile.in) = 33ca19b5cf37839be6fbd851a5dcf29d4d701c8b +SHA1 (patch-html_Makefile.in) = cef5febcedfaaa38cdf73283e2bda43b4c114379 SHA1 (patch-include_comments.h) = c86328a4f1437ee1dc2b6f97be61693414dd4fce SHA1 (patch-include_locations.h.in) = 0ee376f6737b24f0d4ea8b37781aca70147c5e70 SHA1 (patch-include_statusjson.h) = c5a84b9ef3114f2e2480d719bbb4a24c8965e052 SHA1 (patch-lib_nsock.c) = bd8801e4aff13ebac26e512b44764c2da1e2e5a5 SHA1 (patch-lib_runcmd.c) = fb34fe5cdc39aca973c1a6e125b125867e6ed262 SHA1 (patch-lib_test-squeue.c) = 1bc197da815a069f0f37525f1acbf5fb4110d399 -SHA1 (patch-lib_worker.c) = c70fd4cec230cefc94cd82a20a20c7ecef3cae2a +SHA1 (patch-lib_worker.c) = fe1b6d00429556caaefe43afe7bb1c6d9f6fcb0b SHA1 (patch-sample-config_nagios.cfg.in) = 4ad00840ad66d2e01b19c6db76c810fc3fb80795 SHA1 (patch-t-tap_test__xsddefault.c) = db7166fae411a461d8b4a4a31f55af693aeb03b0 SHA1 (patch-xdata_xcddefault.c) = ba14af868cd773d07e029a2773a44614eedc3e46 diff --git a/net/nagios-base/patches/patch-base_checks.c b/net/nagios-base/patches/patch-base_checks.c index cbe3fedbc13..ed02523234f 100644 --- a/net/nagios-base/patches/patch-base_checks.c +++ b/net/nagios-base/patches/patch-base_checks.c @@ -1,4 +1,4 @@ -$NetBSD: patch-base_checks.c,v 1.1 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: patch-base_checks.c,v 1.2 2016/02/09 10:12:53 bouyer Exp $ 64bit time_t workaround diff --git a/net/nagios-base/patches/patch-base_events.c b/net/nagios-base/patches/patch-base_events.c index 09be0b8f648..dd039abe92f 100644 --- a/net/nagios-base/patches/patch-base_events.c +++ b/net/nagios-base/patches/patch-base_events.c @@ -1,4 +1,4 @@ -$NetBSD: patch-base_events.c,v 1.1 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: patch-base_events.c,v 1.2 2016/02/09 10:12:53 bouyer Exp $ 64bit time_t workaround diff --git a/net/nagios-base/patches/patch-base_nerd.c b/net/nagios-base/patches/patch-base_nerd.c index 7be1f1c9e4a..230cd199b30 100644 --- a/net/nagios-base/patches/patch-base_nerd.c +++ b/net/nagios-base/patches/patch-base_nerd.c @@ -1,4 +1,4 @@ -$NetBSD: patch-base_nerd.c,v 1.1 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: patch-base_nerd.c,v 1.2 2016/02/09 10:12:53 bouyer Exp $ 64bit time_t workaround diff --git a/net/nagios-base/patches/patch-cgi_avail.c b/net/nagios-base/patches/patch-cgi_avail.c index 4b318429f2e..c70d1ef2811 100644 --- a/net/nagios-base/patches/patch-cgi_avail.c +++ b/net/nagios-base/patches/patch-cgi_avail.c @@ -1,4 +1,4 @@ -$NetBSD: patch-cgi_avail.c,v 1.3 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: patch-cgi_avail.c,v 1.4 2016/02/09 10:12:53 bouyer Exp $ 64bit time_t workaround diff --git a/net/nagios-base/patches/patch-cgi_histogram.c b/net/nagios-base/patches/patch-cgi_histogram.c index 4f9c2e85b1e..39453f9e481 100644 --- a/net/nagios-base/patches/patch-cgi_histogram.c +++ b/net/nagios-base/patches/patch-cgi_histogram.c @@ -1,4 +1,4 @@ -$NetBSD: patch-cgi_histogram.c,v 1.3 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: patch-cgi_histogram.c,v 1.4 2016/02/09 10:12:53 bouyer Exp $ 64bit time_t workaround diff --git a/net/nagios-base/patches/patch-cgi_trends.c b/net/nagios-base/patches/patch-cgi_trends.c index a35a40b9bcd..099e63010ba 100644 --- a/net/nagios-base/patches/patch-cgi_trends.c +++ b/net/nagios-base/patches/patch-cgi_trends.c @@ -1,4 +1,4 @@ -$NetBSD: patch-cgi_trends.c,v 1.3 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: patch-cgi_trends.c,v 1.4 2016/02/09 10:12:53 bouyer Exp $ 64bit time_t workaround diff --git a/net/nagios-base/patches/patch-common_downtime.c b/net/nagios-base/patches/patch-common_downtime.c index 9af8150dda4..d8a38294015 100644 --- a/net/nagios-base/patches/patch-common_downtime.c +++ b/net/nagios-base/patches/patch-common_downtime.c @@ -1,4 +1,4 @@ -$NetBSD: patch-common_downtime.c,v 1.1 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: patch-common_downtime.c,v 1.2 2016/02/09 10:12:53 bouyer Exp $ 64bit time_t workaround diff --git a/net/nagios-base/patches/patch-html_Makefile.in b/net/nagios-base/patches/patch-html_Makefile.in index abd35797ea5..fa543021b87 100644 --- a/net/nagios-base/patches/patch-html_Makefile.in +++ b/net/nagios-base/patches/patch-html_Makefile.in @@ -1,10 +1,10 @@ -$NetBSD: patch-html_Makefile.in,v 1.3 2015/04/08 23:25:25 rodent Exp $ +$NetBSD: patch-html_Makefile.in,v 1.4 2016/02/09 10:12:53 bouyer Exp $ Adjustments to build procedure. ---- html/Makefile.in.orig 2014-08-12 15:00:01.000000000 +0000 -+++ html/Makefile.in -@@ -7,7 +7,7 @@ exec_prefix=@exec_prefix@ +--- html/Makefile.in.orig 2014-08-12 17:00:01.000000000 +0200 ++++ html/Makefile.in 2016-02-08 13:16:12.000000000 +0100 +@@ -7,7 +7,7 @@ LOGDIR=@localstatedir@ CFGDIR=@sysconfdir@ BINDIR=@bindir@ @@ -13,7 +13,7 @@ Adjustments to build procedure. HTMLDIR=@datadir@ datarootdir=@datarootdir@ INSTALL=@INSTALL@ -@@ -35,21 +35,21 @@ distclean: clean +@@ -35,58 +35,58 @@ devclean: distclean install: @@ -50,9 +50,13 @@ Adjustments to build procedure. # Remove old HTML files (PHP files are used now) rm -f $(DESTDIR)$(HTMLDIR)/index.html rm -f $(DESTDIR)$(HTMLDIR)/main.html -@@ -58,35 +58,35 @@ install: - $(INSTALL) -m 664 $(INSTALL_OPTS) rss-corefeed.html $(DESTDIR)$(HTMLDIR) - $(INSTALL) -m 664 $(INSTALL_OPTS) rss-newsfeed.html $(DESTDIR)$(HTMLDIR) + rm -f $(DESTDIR)$(HTMLDIR)/side.html +- $(INSTALL) -m 664 $(INSTALL_OPTS) jsonquery.html $(DESTDIR)$(HTMLDIR) +- $(INSTALL) -m 664 $(INSTALL_OPTS) rss-corefeed.html $(DESTDIR)$(HTMLDIR) +- $(INSTALL) -m 664 $(INSTALL_OPTS) rss-newsfeed.html $(DESTDIR)$(HTMLDIR) ++ $(BSD_INSTALL_DATA) jsonquery.html $(DESTDIR)$(HTMLDIR) ++ $(BSD_INSTALL_DATA) rss-corefeed.html $(DESTDIR)$(HTMLDIR) ++ $(BSD_INSTALL_DATA) rss-newsfeed.html $(DESTDIR)$(HTMLDIR) for file in *.php; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done + do $(BSD_INSTALL_DATA) $$file $(DESTDIR)$(HTMLDIR); done diff --git a/net/nagios-base/patches/patch-lib_test-squeue.c b/net/nagios-base/patches/patch-lib_test-squeue.c index 8b6ec622d44..d02f8bba769 100644 --- a/net/nagios-base/patches/patch-lib_test-squeue.c +++ b/net/nagios-base/patches/patch-lib_test-squeue.c @@ -1,4 +1,4 @@ -$NetBSD: patch-lib_test-squeue.c,v 1.1 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: patch-lib_test-squeue.c,v 1.2 2016/02/09 10:12:53 bouyer Exp $ 64bit time_t workaround diff --git a/net/nagios-base/patches/patch-lib_worker.c b/net/nagios-base/patches/patch-lib_worker.c index f20d7feebd0..03fa04e993e 100644 --- a/net/nagios-base/patches/patch-lib_worker.c +++ b/net/nagios-base/patches/patch-lib_worker.c @@ -1,9 +1,10 @@ -$NetBSD: patch-lib_worker.c,v 1.1 2016/02/07 21:52:06 bouyer Exp $ +$NetBSD: patch-lib_worker.c,v 1.2 2016/02/09 10:12:53 bouyer Exp $ 64bit time_t workaround +Workaround for poll(2) returning spurious POLLIN --- lib/worker.c.orig 2014-08-12 17:00:01.000000000 +0200 -+++ lib/worker.c 2016-02-07 22:08:53.000000000 +0100 ++++ lib/worker.c 2016-02-08 12:31:57.000000000 +0100 @@ -194,7 +194,7 @@ #define kvvec_add_tv(kvv, key, value) \ @@ -13,3 +14,12 @@ $NetBSD: patch-lib_worker.c,v 1.1 2016/02/07 21:52:06 bouyer Exp $ kvvec_addkv_wlen(kvv, key, sizeof(key) - 1, buf, strlen(buf)); \ } while (0) +@@ -439,6 +439,8 @@ + + rd = read(io->fd, buf, sizeof(buf)); + if (rd < 0) { ++ if (!final && errno == EAGAIN) ++ return; + if (errno == EINTR || errno == EAGAIN) + continue; + if (!final && errno != EAGAIN) |