4390d56940
the owner of all installed files is a non-root user. This change affects most packages that require special users or groups by making them use the specified unprivileged user and group instead. (1) Add two new variables PKG_GROUPS_VARS and PKG_USERS_VARS to unprivileged.mk. These two variables are lists of other bmake variables that define package-specific users and groups. Packages that have user-settable variables for users and groups, e.g. apache and APACHE_{USER,GROUP}, courier-mta and COURIER_{USER,GROUP}, etc., should list these variables in PKG_USERS_VARS and PKG_GROUPS_VARS so that unprivileged.mk can know to set them to ${UNPRIVILEGED_USER} and ${UNPRIVILEGED_GROUP}. (2) Modify packages to use PKG_GROUPS_VARS and PKG_USERS_VARS.
34 lines
1.1 KiB
Makefile
34 lines
1.1 KiB
Makefile
# $NetBSD: Makefile,v 1.21 2007/07/04 20:54:59 jlam Exp $
|
|
|
|
CONFLICTS+= bacula-client-[0-9]* bacula-clientonly-[0-9]*
|
|
|
|
.include "options.mk"
|
|
|
|
PLIST_SRC= PLIST.common
|
|
PLIST_SRC+= PLIST.server
|
|
|
|
PLIST_SUBST+= BACULA_DB=${BACULA_DB:Q}
|
|
MESSAGE_SUBST+= PREFIX=${PREFIX:Q}
|
|
MESSAGE_SUBST+= PKGNAME_NOREV=${PKGNAME_NOREV:Q}
|
|
|
|
CONFIGURE_ARGS+= --with-dir-user=${BACULA_DIR_USER:Q} --with-dir-group=${BACULA_GROUP:Q}
|
|
CONFIGURE_ARGS+= --with-sd-user=${BACULA_SD_USER:Q} --with-sd-group=${BACULA_GROUP:Q}
|
|
|
|
OWN_DIRS_PERMS+= ${BACULA_WORKINGDIR} ${ROOT_USER} ${BACULA_GROUP} 770
|
|
|
|
PKG_USERS= ${BACULA_DIR_USER}:${BACULA_GROUP}
|
|
PKG_USERS+= ${BACULA_SD_USER}:${BACULA_GROUP}
|
|
PKG_GROUPS= ${BACULA_GROUP}
|
|
|
|
CONF_FILES+= ${EXAMPLESDIR}/bacula-fd.conf ${PKG_SYSCONFDIR}/bacula-fd.conf
|
|
CONF_FILES+= ${EXAMPLESDIR}/bconsole.conf ${PKG_SYSCONFDIR}/bconsole.conf
|
|
CONF_FILES+= ${EXAMPLESDIR}/bacula-dir.conf ${PKG_SYSCONFDIR}/bacula-dir.conf
|
|
CONF_FILES+= ${EXAMPLESDIR}/bacula-sd.conf ${PKG_SYSCONFDIR}/bacula-sd.conf
|
|
|
|
RCD_SCRIPTS= bacula bacula-dir bacula-sd bacula-fd
|
|
|
|
.include "Makefile.common"
|
|
|
|
PLIST_SRC+= PLIST.common_end
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|