pkgsrc-WIP-changes archive

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

zabbix50-server: Move user and group creation into Makefile.common



Module Name:	pkgsrc-wip
Committed By:	Juraj Lutter <otis%NetBSD.org@localhost>
Pushed By:	otis
Date:		Tue Aug 18 15:55:17 2020 +0000
Changeset:	035486ff6c686dd0fdea9ef0577a0050692d730a

Modified Files:
	zabbix50-server/Makefile
	zabbix50-server/Makefile.common

Log Message:
zabbix50-server: Move user and group creation into Makefile.common

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

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

diffstat:
 zabbix50-server/Makefile        |  9 ---------
 zabbix50-server/Makefile.common | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 9 deletions(-)

diffs:
diff --git a/zabbix50-server/Makefile b/zabbix50-server/Makefile
index 78ed6c274e..68bbb6fd7e 100644
--- a/zabbix50-server/Makefile
+++ b/zabbix50-server/Makefile
@@ -36,15 +36,6 @@ SUBST_SED.fix-paths=		-e 's,/usr/local/etc,${PKG_SYSCONFDIR},g'
 
 .include "../../mk/bsd.prefs.mk"
 
-ZABBIX_GROUP?=		zabbix
-ZABBIX_USER?=		zabbix
-PKG_GROUPS+=		${ZABBIX_GROUP}
-PKG_USERS+=		${ZABBIX_USER}:${ZABBIX_GROUP}
-PKG_GECOS.${ZABBIX_USER}= Zabbix user
-
-FILES_SUBST+=		ZABBIX_USER=${ZABBIX_USER}
-FILES_SUBST+=		ZABBIX_GROUP=${ZABBIX_GROUP}
-
 SMF_INSTANCES=		server
 
 post-install:
diff --git a/zabbix50-server/Makefile.common b/zabbix50-server/Makefile.common
index d80b726c14..78459a6bfd 100644
--- a/zabbix50-server/Makefile.common
+++ b/zabbix50-server/Makefile.common
@@ -11,3 +11,17 @@ MASTER_SITES=	https://cdn.zabbix.com/zabbix/sources/stable/5.0/
 MAINTAINER?=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	https://www.zabbix.com/
 LICENSE=	gnu-gpl-v2
+
+# Zabbix user, common to all components
+ZABBIX_GROUP?=			zabbix
+ZABBIX_USER?=			zabbix
+ZABBIX_HOMEDIR?=		/var/zabbix
+PKG_GROUPS+=			${ZABBIX_GROUP}
+PKG_USERS+=			${ZABBIX_USER}:${ZABBIX_GROUP}
+PKG_GECOS.${ZABBIX_USER}=	Zabbix user
+PKG_HOME.${ZABBIX_USER}=	${ZABBIX_HOMEDIR}
+
+FILES_SUBST+=			ZABBIX_USER=${ZABBIX_USER}
+FILES_SUBST+=			ZABBIX_GROUP=${ZABBIX_GROUP}
+
+OWN_DIRS_PERMS+=		${ZABBIX_HOMEDIR} ${ZABBIX_USER} ${ZABBIX_GROUP} 0755


Home | Main Index | Thread Index | Old Index