pkgsrc-WIP-changes archive

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

zabbix50-*: Cleanup



Module Name:	pkgsrc-wip
Committed By:	Juraj Lutter <otis%NetBSD.org@localhost>
Pushed By:	otis
Date:		Thu Sep 10 18:38:56 2020 +0000
Changeset:	f20c0b60c1380f4a2f869102c118cff14a695764

Modified Files:
	zabbix50-agent/Makefile
	zabbix50-agent/files/smf/manifest.xml
	zabbix50-agent/files/zabbix_agentd.sh
	zabbix50-proxy/Makefile
	zabbix50-proxy/PLIST
	zabbix50-proxy/files/smf/manifest.xml
	zabbix50-proxy/files/zabbix_proxy.sh
	zabbix50-proxy/options.mk
	zabbix50-server/Makefile
	zabbix50-server/files/smf/manifest.xml

Log Message:
zabbix50-*: Cleanup

- Fix stack size issue in NetBSD scripts
- Fix most pkglint warning
- Fix SMF manifests

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f20c0b60c1380f4a2f869102c118cff14a695764

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 zabbix50-agent/Makefile                | 4 +---
 zabbix50-agent/files/smf/manifest.xml  | 2 +-
 zabbix50-agent/files/zabbix_agentd.sh  | 2 ++
 zabbix50-proxy/Makefile                | 6 ++----
 zabbix50-proxy/PLIST                   | 4 ++--
 zabbix50-proxy/files/smf/manifest.xml  | 2 +-
 zabbix50-proxy/files/zabbix_proxy.sh   | 2 ++
 zabbix50-proxy/options.mk              | 6 ++----
 zabbix50-server/Makefile               | 8 ++++----
 zabbix50-server/files/smf/manifest.xml | 2 +-
 10 files changed, 18 insertions(+), 20 deletions(-)

diffs:
diff --git a/zabbix50-agent/Makefile b/zabbix50-agent/Makefile
index 38bfe02784..9a0dd2981e 100644
--- a/zabbix50-agent/Makefile
+++ b/zabbix50-agent/Makefile
@@ -5,7 +5,7 @@
 PKGNAME=	${DISTNAME:S/-/-agent-/}
 COMMENT=	Enterprise-class Monitoring Solution for Everyone
 
-CONFLICTS+=     zabbix-agent-[3-4]*
+CONFLICTS+=	zabbix-agent-[0-9]*
 
 USE_TOOLS+=		pkg-config
 GNU_CONFIGURE=		yes
@@ -31,8 +31,6 @@ SUBST_SED.fix-paths=		-e 's,/usr/local/etc,${PKG_SYSCONFDIR},g'
 
 .include "../../mk/bsd.prefs.mk"
 
-SMF_INSTANCES=		agent
-
 .include "options.mk"
 
 .include "../../security/openssl/buildlink3.mk"
diff --git a/zabbix50-agent/files/smf/manifest.xml b/zabbix50-agent/files/smf/manifest.xml
index 9c888cbadb..df8e63a875 100644
--- a/zabbix50-agent/files/smf/manifest.xml
+++ b/zabbix50-agent/files/smf/manifest.xml
@@ -14,7 +14,7 @@
     <method_context>
         <method_credential user="@ZABBIX_USER@" group="@ZABBIX_GROUP@"/>
     </method_context>
-    <instance name="agent" enabled="false">
+    <instance name="@SMF_INSTANCES@" enabled="false">
       <dependency name="config-file" grouping="require_all" restart_on="refresh" type="path">
         <service_fmri value="file://localhost@PKG_SYSCONFDIR@/zabbix_agentd.conf"/>
       </dependency>
diff --git a/zabbix50-agent/files/zabbix_agentd.sh b/zabbix50-agent/files/zabbix_agentd.sh
index 3b861e5ccb..fc7190ac05 100644
--- a/zabbix50-agent/files/zabbix_agentd.sh
+++ b/zabbix50-agent/files/zabbix_agentd.sh
@@ -14,6 +14,7 @@ fi
 name="zabbix_agentd"
 rcvar=${name}
 command="@PREFIX@/sbin/${name}"
+start_precmd="ulimit -s 10240"
 required_files="@PKG_SYSCONFDIR@/${name}.conf"
 
 if [ -f /etc/rc.subr ]; then
@@ -21,5 +22,6 @@ if [ -f /etc/rc.subr ]; then
 	run_rc_command "$1"
 else
 	@ECHO@ -n " ${name}"
+	[ "x$1" = "xstart" ] && ulimit -s 10240
 	${command} ${command_args}
 fi
diff --git a/zabbix50-proxy/Makefile b/zabbix50-proxy/Makefile
index aff039388a..da347341bd 100644
--- a/zabbix50-proxy/Makefile
+++ b/zabbix50-proxy/Makefile
@@ -5,8 +5,8 @@
 PKGNAME=	${DISTNAME:S/-/-proxy-/}
 COMMENT=	Enterprise-class Monitoring Solution for Everyone
 
-CONFLICTS+=     zabbix-server-*
-CONFLICTS+=     zabbix-proxy-[3-4]*
+CONFLICTS+=	zabbix-server-[0-9]*
+CONFLICTS+=	zabbix-proxy-[0-9]*
 
 USE_TOOLS+=		pax pkg-config
 GNU_CONFIGURE=		yes
@@ -37,8 +37,6 @@ SUBST_SED.fix-paths=		-e 's,/usr/local/etc,${PKG_SYSCONFDIR},g'
 
 .include "../../mk/bsd.prefs.mk"
 
-SMF_INSTANCES=		proxy
-
 post-install:
 	cd ${WRKSRC}/database/${ZABBIX_DB_TYPE}; \
 		${PAX} -rw . ${DESTDIR}${PREFIX}/share/zabbix/
diff --git a/zabbix50-proxy/PLIST b/zabbix50-proxy/PLIST
index 85c74f4871..ae59358675 100644
--- a/zabbix50-proxy/PLIST
+++ b/zabbix50-proxy/PLIST
@@ -4,10 +4,10 @@ man/man8/zabbix_proxy.8
 sbin/zabbix_proxy
 share/examples/zabbix/zabbix_proxy.conf
 share/zabbix/data.sql
-share/zabbix/images.sql
-share/zabbix/schema.sql
 ${PLIST.mysql}share/zabbix/double.sql
 ${PLIST.pgsql}share/zabbix/double.sql
+share/zabbix/images.sql
+share/zabbix/schema.sql
 ${PLIST.pgsql}share/zabbix/timescaledb.sql
 @pkgdir share/zabbix/externalscripts
 @pkgdir lib/modules
diff --git a/zabbix50-proxy/files/smf/manifest.xml b/zabbix50-proxy/files/smf/manifest.xml
index 0ad5412f2c..b319012725 100644
--- a/zabbix50-proxy/files/smf/manifest.xml
+++ b/zabbix50-proxy/files/smf/manifest.xml
@@ -14,7 +14,7 @@
     <method_context>
         <method_credential user="@ZABBIX_USER@" group="@ZABBIX_GROUP@"/>
     </method_context>
-    <instance name="proxy" enabled="false">
+    <instance name="@SMF_INSTANCES@" enabled="false">
       <dependency name="config-file" grouping="require_all" restart_on="refresh" type="path">
         <service_fmri value="file://localhost@PKG_SYSCONFDIR@/zabbix_proxy.conf"/>
       </dependency>
diff --git a/zabbix50-proxy/files/zabbix_proxy.sh b/zabbix50-proxy/files/zabbix_proxy.sh
index d12170c3cc..92c02d6fcd 100644
--- a/zabbix50-proxy/files/zabbix_proxy.sh
+++ b/zabbix50-proxy/files/zabbix_proxy.sh
@@ -14,6 +14,7 @@ fi
 name="zabbix_proxy"
 rcvar=${name}
 command="@PREFIX@/sbin/${name}"
+start_precmd="ulimit -s 10240"
 required_files="@PKG_SYSCONFDIR@/${name}.conf"
 
 if [ -f /etc/rc.subr ]; then
@@ -21,5 +22,6 @@ if [ -f /etc/rc.subr ]; then
 	run_rc_command "$1"
 else
 	@ECHO@ -n " ${name}"
+	[ "x$1" = "xstart" ] && ulimit -s 10240
 	${command} ${command_args}
 fi
diff --git a/zabbix50-proxy/options.mk b/zabbix50-proxy/options.mk
index 0329b1f3e0..a47d7dbeae 100644
--- a/zabbix50-proxy/options.mk
+++ b/zabbix50-proxy/options.mk
@@ -12,9 +12,8 @@ PKG_SUGGESTED_OPTIONS+=		inet6
 
 .include "../../mk/bsd.options.mk"
 
-PLIST_VARS+=            mysql
-PLIST_VARS+=            pgsql
-PLIST_VARS+=            sqlite3
+PLIST_VARS+=		mysql
+PLIST_VARS+=		pgsql
 
 .if !empty(PKG_OPTIONS:Minet6)
 CONFIGURE_ARGS+=	--enable-ipv6
@@ -53,5 +52,4 @@ PLIST.pgsql=            yes
 CONFIGURE_ARGS+=	--with-sqlite3=${BUILDLINK_PREFIX.sqlite3}
 .include "../../databases/sqlite3/buildlink3.mk"
 ZABBIX_DB_TYPE=		sqlite3
-PLIST.sqlite3=          yes
 .endif
diff --git a/zabbix50-server/Makefile b/zabbix50-server/Makefile
index 817f0e2a2e..05430f3947 100644
--- a/zabbix50-server/Makefile
+++ b/zabbix50-server/Makefile
@@ -1,11 +1,13 @@
 # $NetBSD: Makefile,v 1.37 2020/06/20 12:43:46 gdt Exp $
-
+# used by sysutils/zabbix50-proxy/Makefile
+# used by sysutils/zabbix50-agent/Makefile
+#
 .include "Makefile.common"
 
 PKGNAME=	${DISTNAME:S/-/-server-/}
 COMMENT=	Enterprise-class Monitoring Solution for Everyone
 
-CONFLICTS+=	zabbix-server-[3-4]*
+CONFLICTS+=	zabbix-server-[0-9]*
 CONFLICTS+=	zabbix-proxy-[0-9]*
 
 DEPENDS+=	fping-[0-9]*:../../net/fping
@@ -41,8 +43,6 @@ CFLAGS.SunOS+=			-DDUK_USE_BYTEORDER=1
 
 .include "../../mk/bsd.prefs.mk"
 
-SMF_INSTANCES=		server
-
 post-install:
 	cd ${WRKSRC}/database/${ZABBIX_DB_TYPE}; \
 		${PAX} -rw . ${DESTDIR}${PREFIX}/share/zabbix/
diff --git a/zabbix50-server/files/smf/manifest.xml b/zabbix50-server/files/smf/manifest.xml
index b97b04308b..12c84dfe26 100644
--- a/zabbix50-server/files/smf/manifest.xml
+++ b/zabbix50-server/files/smf/manifest.xml
@@ -14,7 +14,7 @@
     <method_context>
         <method_credential user="@ZABBIX_USER@" group="@ZABBIX_GROUP@"/>
     </method_context>
-    <instance name="server" enabled="false">
+    <instance name="@SMF_INSTANCES@" enabled="false">
       <dependency name="config-file" grouping="require_all" restart_on="refresh" type="path">
         <service_fmri value="file://localhost@PKG_SYSCONFDIR@/zabbix_server.conf"/>
       </dependency>


Home | Main Index | Thread Index | Old Index