pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/chat/inspircd3 chat/inspircd3: Create config dirs with...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2a4a34cb3360
branches:  trunk
changeset: 395288:2a4a34cb3360
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat May 04 10:50:04 2019 +0000

description:
chat/inspircd3: Create config dirs with OWN_DIRS and set permissions on
config files to be only readable to the inspircd user. Many of these files
contain sensitive information after configuration, e.g. keys and passwords.

diffstat:

 chat/inspircd3/Makefile |  60 +++++++++++++++++++++++++++---------------------
 chat/inspircd3/PLIST    |   3 +-
 2 files changed, 35 insertions(+), 28 deletions(-)

diffs (120 lines):

diff -r 7434e3fcca57 -r 2a4a34cb3360 chat/inspircd3/Makefile
--- a/chat/inspircd3/Makefile   Sat May 04 09:46:49 2019 +0000
+++ b/chat/inspircd3/Makefile   Sat May 04 10:50:04 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2019/05/03 19:03:02 nia Exp $
+# $NetBSD: Makefile,v 1.3 2019/05/04 10:50:04 nia Exp $
 
 DISTNAME=      inspircd-3.0.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    chat
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=inspircd/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -19,10 +19,12 @@
 
 BUILD_DEFS+=   PKG_SYSCONFDIR
 
+PKG_SYSCONFSUBDIR=     inspircd
+
 CONFIGURE_ARGS+=       --prefix=${PREFIX}
 CONFIGURE_ARGS+=       --manual-dir=${PREFIX}/${PKGMANDIR}/man1
 CONFIGURE_ARGS+=       --module-dir=${PREFIX}/lib/inspircd/modules
-CONFIGURE_ARGS+=       --config-dir=${PKG_SYSCONFDIR}/inspircd
+CONFIGURE_ARGS+=       --config-dir=${PKG_SYSCONFDIR}
 CONFIGURE_ARGS+=       --data-dir=${PREFIX}/inspircd/data
 CONFIGURE_ARGS+=       --log-dir=${PREFIX}/inspircd/logs
 CONFIG_SHELL=          ${PERL5}
@@ -31,26 +33,6 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-CONF_FILES+=   ${EGDIR}/motd.txt.example ${PKG_SYSCONFDIR}/inspircd/motd.txt
-CONF_FILES+=   ${EGDIR}/inspircd.conf.example ${PKG_SYSCONFDIR}/inspircd/inspircd.conf
-CONF_FILES+=   ${EGDIR}/links.conf.example ${PKG_SYSCONFDIR}/inspircd/links.conf
-CONF_FILES+=   ${EGDIR}/modules.conf.example ${PKG_SYSCONFDIR}/inspircd/modules.conf
-CONF_FILES+=   ${EGDIR}/opers.conf.example ${PKG_SYSCONFDIR}/inspircd/opers.conf
-CONF_FILES+=   ${EGDIR}/motd.txt.example ${PKG_SYSCONFDIR}/inspircd/motd.txt
-
-CONF_FILES+=   ${EGDIR}/filter.conf.example ${PKG_SYSCONFDIR}/inspircd/filter.conf
-CONF_FILES+=   ${EGDIR}/helpop.conf.example ${PKG_SYSCONFDIR}/inspircd/helpop.conf
-CONF_FILES+=   ${EGDIR}/inspircd.conf.example ${PKG_SYSCONFDIR}/inspircd/inspircd.conf
-CONF_FILES+=   ${EGDIR}/links.conf.example ${PKG_SYSCONFDIR}/inspircd/links.conf
-CONF_FILES+=   ${EGDIR}/modules.conf.example ${PKG_SYSCONFDIR}/inspircd/modules.conf
-CONF_FILES+=   ${EGDIR}/motd.txt.example ${PKG_SYSCONFDIR}/inspircd/motd.txt
-CONF_FILES+=   ${EGDIR}/opermotd.txt.example ${PKG_SYSCONFDIR}/inspircd/opermotd.txt
-CONF_FILES+=   ${EGDIR}/opers.conf.example ${PKG_SYSCONFDIR}/inspircd/opers.conf
-CONF_FILES+=   ${EGDIR}/quotes.txt.example ${PKG_SYSCONFDIR}/inspircd/quotes.txt
-CONF_FILES+=   ${EGDIR}/services/anope.conf.example ${PKG_SYSCONFDIR}/inspircd/services/anope.conf
-CONF_FILES+=   ${EGDIR}/services/atheme.conf.example ${PKG_SYSCONFDIR}/inspircd/services/atheme.conf
-CONF_FILES+=   ${EGDIR}/services/generic.conf.example ${PKG_SYSCONFDIR}/inspircd/services/generic.conf
-
 INSPIRCD_USER?=                inspircd
 INSPIRCD_GROUP?=       inspircd
 PKG_GROUPS=            ${INSPIRCD_GROUP}
@@ -61,14 +43,41 @@
 FILES_SUBST+=          INSPIRCD_GROUP=${INSPIRCD_GROUP:Q}
 FILES_SUBST+=          INSPIRCD_USER=${INSPIRCD_USER:Q}
 
+EGDIR=                 ${PREFIX}/share/examples/inspircd
+
+CONF_FILES_PERMS+=     ${EGDIR}/inspircd.conf.example ${PKG_SYSCONFDIR}/inspircd.conf \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+CONF_FILES_PERMS+=     ${EGDIR}/links.conf.example ${PKG_SYSCONFDIR}/links.conf \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+CONF_FILES_PERMS+=     ${EGDIR}/modules.conf.example ${PKG_SYSCONFDIR}/modules.conf \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+CONF_FILES_PERMS+=     ${EGDIR}/opers.conf.example ${PKG_SYSCONFDIR}/opers.conf \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+CONF_FILES_PERMS+=     ${EGDIR}/filter.conf.example ${PKG_SYSCONFDIR}/filter.conf  \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+CONF_FILES_PERMS+=     ${EGDIR}/helpop.conf.example ${PKG_SYSCONFDIR}/helpop.conf \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+CONF_FILES_PERMS+=     ${EGDIR}/motd.txt.example ${PKG_SYSCONFDIR}/motd.txt \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0644
+CONF_FILES_PERMS+=     ${EGDIR}/opermotd.txt.example ${PKG_SYSCONFDIR}/opermotd.txt \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+CONF_FILES_PERMS+=     ${EGDIR}/quotes.txt.example ${PKG_SYSCONFDIR}/quotes.txt \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0644
+CONF_FILES_PERMS+=     ${EGDIR}/services/anope.conf.example ${PKG_SYSCONFDIR}/services/anope.conf \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+CONF_FILES_PERMS+=     ${EGDIR}/services/atheme.conf.example ${PKG_SYSCONFDIR}/services/atheme.conf \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+CONF_FILES_PERMS+=     ${EGDIR}/services/generic.conf.example ${PKG_SYSCONFDIR}/services/generic.conf \
+                       ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0600
+
 OWN_DIRS_PERMS+=       ${PREFIX}/inspircd ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755
 OWN_DIRS_PERMS+=       ${PREFIX}/inspircd/data ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755
 OWN_DIRS_PERMS+=       ${PREFIX}/inspircd/logs ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755
+OWN_DIRS_PERMS+=       ${PKG_SYSCONFDIR} ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755
+OWN_DIRS_PERMS+=       ${PKG_SYSCONFDIR}/services ${INSPIRCD_USER} ${INSPIRCD_GROUP} 0755
 
 RCD_SCRIPTS=           inspircd
 
-EGDIR=                 ${PREFIX}/share/examples/inspircd
-
 SUBST_CLASSES+=                conf
 SUBST_STAGE.conf=      pre-configure
 SUBST_MESSAGE.conf=    Set variables in configuration file.
@@ -78,7 +87,6 @@
 INSTALLATION_DIRS+=    ${EGDIR}
 INSTALLATION_DIRS+=    ${EGDIR}/sql
 INSTALLATION_DIRS+=    ${EGDIR}/services
-INSTALLATION_DIRS+=    ${PKG_SYSCONFDIR}/inspircd/services
 
 INSPIRCD_EXTRAS_OFF+=  m_regex_re2.cpp
 INSPIRCD_EXTRAS_OFF+=  m_regex_tre.cpp
diff -r 7434e3fcca57 -r 2a4a34cb3360 chat/inspircd3/PLIST
--- a/chat/inspircd3/PLIST      Sat May 04 09:46:49 2019 +0000
+++ b/chat/inspircd3/PLIST      Sat May 04 10:50:04 2019 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2019/05/03 17:14:27 nia Exp $
+@comment $NetBSD: PLIST,v 1.2 2019/05/04 10:50:04 nia Exp $
 bin/inspircd
 bin/inspircd-genssl
 lib/inspircd/modules/core_channel.so
@@ -218,4 +218,3 @@
 share/examples/inspircd/sql/sqloper.sqlite3.sql
 @pkgdir inspircd/logs
 @pkgdir inspircd/data
-@pkgdir etc/inspircd/services



Home | Main Index | Thread Index | Old Index