diff options
author | oliver <oliver@FreeBSD.org> | 2005-03-16 01:13:49 +0800 |
---|---|---|
committer | oliver <oliver@FreeBSD.org> | 2005-03-16 01:13:49 +0800 |
commit | d800dfcfb8e63b71caaffdf47fe08efd51cfc5f0 (patch) | |
tree | c5ec23779058674f185b959130125215f1707551 | |
parent | d1159da3b6a592f45aa6bda446c9354fe93b1834 (diff) | |
download | freebsd-ports-gnome-d800dfcfb8e63b71caaffdf47fe08efd51cfc5f0.tar.gz freebsd-ports-gnome-d800dfcfb8e63b71caaffdf47fe08efd51cfc5f0.tar.zst freebsd-ports-gnome-d800dfcfb8e63b71caaffdf47fe08efd51cfc5f0.zip |
- change socket and pid location from /usr/local/var/spool/authdaemon/ to /var/run/authdaemond/
- fix default user/group premissions.
PR: 78866
Submitted by: Artis Caune <Artis.Caune@latnet.lv>
27 files changed, 126 insertions, 144 deletions
diff --git a/databases/courier-authlib-mysql/Makefile b/databases/courier-authlib-mysql/Makefile index 09788f1fb902..a9de1f36fc2c 100644 --- a/databases/courier-authlib-mysql/Makefile +++ b/databases/courier-authlib-mysql/Makefile @@ -41,6 +41,8 @@ OPTIONS= PAM "Build with PAM support" on \ AUTHUSERDB "Build with authuserdb" on VPOPMAILDIR?= ${LOCALBASE}/vpopmail +WITH_MAILUSER?= daemon +WITH_MAILGROUP?=daemon CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ @@ -50,7 +52,12 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --without-authshadow \ --without-authcustom \ --enable-unicode \ - --enable-ltdl-install=no + --enable-ltdl-install=no \ + --with-mailuser=${WITH_MAILUSER} \ + --with-mailgroup=${WITH_MAILGROUP} \ + --with-authdaemonvar=/var/run/authdaemond + +PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP} .include <bsd.port.pre.mk> @@ -117,14 +124,6 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment " PLIST_SUB+= AUTHUSERDBFLAG="" .endif -.if defined(WITH_MAILUSER) -CONFIGURE_ARGS+=--with-mailuser=${WITH_MAILUSER} -.endif - -.if defined(WITH_MAILGROUP) -CONFIGURE_ARGS+=--with-mailgroup=${WITH_MAILGROUP} -.endif - RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= courierlogger.1 diff --git a/databases/courier-authlib-mysql/files/courier-authdaemond.sh b/databases/courier-authlib-mysql/files/courier-authdaemond.sh index ef48f1629b24..88c9b91fa74e 100644 --- a/databases/courier-authlib-mysql/files/courier-authdaemond.sh +++ b/databases/courier-authlib-mysql/files/courier-authdaemond.sh @@ -24,7 +24,7 @@ command="%%PREFIX%%/sbin/authdaemond" start_cmd="authdaemond_cmd start" stop_cmd="authdaemond_cmd stop" restart_cmd="authdaemond_cmd stop && authdaemond_cmd start" -pidfile="%%PREFIX%%/var/spool/authdaemon/pid" +pidfile="/var/run/authdaemond/pid" procname="%%PREFIX%%/sbin/courierlogger" load_rc_config $name @@ -41,7 +41,7 @@ authdaemond_cmd () { if [ $? -eq 0 ] ; then [ -f "$pidfile" ] && rm -f "$pidfile" [ -f "$pidfile".lock ] && rm -f "$pidfile".lock - [ -S %%PREFIX%%/var/spool/authdaemon/socket ] && rm -f %%PREFIX%%/var/spool/authdaemon/socket + [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket return 0 fi ;; diff --git a/databases/courier-authlib-mysql/pkg-plist b/databases/courier-authlib-mysql/pkg-plist index 007d02df5b01..2a5e2800f7b8 100644 --- a/databases/courier-authlib-mysql/pkg-plist +++ b/databases/courier-authlib-mysql/pkg-plist @@ -1,3 +1,4 @@ +@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true bin/courierauthconfig etc/rc.d/courier-authdaemond.sh %%MYSQLFLAG%%etc/authlib/authmysqlrc.dist @@ -60,11 +61,9 @@ sbin/courierlogger %%PORTDOCS%%%%DOCSDIR%%/README.ldap %%PORTDOCS%%%%DOCSDIR%%/README_authlib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool 2>/dev/null || true -@unexec rmdir %D/var/authdaemon 2>/dev/null || true -@unexec rmdir %D/var 2>/dev/null || true +@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true +@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true +@unexec rmdir /var/run/authdaemond 2>/dev/null || true @unexec rmdir %D/etc/authlib 2>/dev/null || true @dirrm lib/courier-authlib @dirrm libexec/courier-authlib diff --git a/databases/courier-authlib-pgsql/Makefile b/databases/courier-authlib-pgsql/Makefile index 09788f1fb902..a9de1f36fc2c 100644 --- a/databases/courier-authlib-pgsql/Makefile +++ b/databases/courier-authlib-pgsql/Makefile @@ -41,6 +41,8 @@ OPTIONS= PAM "Build with PAM support" on \ AUTHUSERDB "Build with authuserdb" on VPOPMAILDIR?= ${LOCALBASE}/vpopmail +WITH_MAILUSER?= daemon +WITH_MAILGROUP?=daemon CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ @@ -50,7 +52,12 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --without-authshadow \ --without-authcustom \ --enable-unicode \ - --enable-ltdl-install=no + --enable-ltdl-install=no \ + --with-mailuser=${WITH_MAILUSER} \ + --with-mailgroup=${WITH_MAILGROUP} \ + --with-authdaemonvar=/var/run/authdaemond + +PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP} .include <bsd.port.pre.mk> @@ -117,14 +124,6 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment " PLIST_SUB+= AUTHUSERDBFLAG="" .endif -.if defined(WITH_MAILUSER) -CONFIGURE_ARGS+=--with-mailuser=${WITH_MAILUSER} -.endif - -.if defined(WITH_MAILGROUP) -CONFIGURE_ARGS+=--with-mailgroup=${WITH_MAILGROUP} -.endif - RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= courierlogger.1 diff --git a/databases/courier-authlib-pgsql/files/courier-authdaemond.sh b/databases/courier-authlib-pgsql/files/courier-authdaemond.sh index ef48f1629b24..88c9b91fa74e 100644 --- a/databases/courier-authlib-pgsql/files/courier-authdaemond.sh +++ b/databases/courier-authlib-pgsql/files/courier-authdaemond.sh @@ -24,7 +24,7 @@ command="%%PREFIX%%/sbin/authdaemond" start_cmd="authdaemond_cmd start" stop_cmd="authdaemond_cmd stop" restart_cmd="authdaemond_cmd stop && authdaemond_cmd start" -pidfile="%%PREFIX%%/var/spool/authdaemon/pid" +pidfile="/var/run/authdaemond/pid" procname="%%PREFIX%%/sbin/courierlogger" load_rc_config $name @@ -41,7 +41,7 @@ authdaemond_cmd () { if [ $? -eq 0 ] ; then [ -f "$pidfile" ] && rm -f "$pidfile" [ -f "$pidfile".lock ] && rm -f "$pidfile".lock - [ -S %%PREFIX%%/var/spool/authdaemon/socket ] && rm -f %%PREFIX%%/var/spool/authdaemon/socket + [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket return 0 fi ;; diff --git a/databases/courier-authlib-pgsql/pkg-plist b/databases/courier-authlib-pgsql/pkg-plist index 007d02df5b01..2a5e2800f7b8 100644 --- a/databases/courier-authlib-pgsql/pkg-plist +++ b/databases/courier-authlib-pgsql/pkg-plist @@ -1,3 +1,4 @@ +@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true bin/courierauthconfig etc/rc.d/courier-authdaemond.sh %%MYSQLFLAG%%etc/authlib/authmysqlrc.dist @@ -60,11 +61,9 @@ sbin/courierlogger %%PORTDOCS%%%%DOCSDIR%%/README.ldap %%PORTDOCS%%%%DOCSDIR%%/README_authlib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool 2>/dev/null || true -@unexec rmdir %D/var/authdaemon 2>/dev/null || true -@unexec rmdir %D/var 2>/dev/null || true +@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true +@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true +@unexec rmdir /var/run/authdaemond 2>/dev/null || true @unexec rmdir %D/etc/authlib 2>/dev/null || true @dirrm lib/courier-authlib @dirrm libexec/courier-authlib diff --git a/databases/courier-authlib-userdb/Makefile b/databases/courier-authlib-userdb/Makefile index 09788f1fb902..a9de1f36fc2c 100644 --- a/databases/courier-authlib-userdb/Makefile +++ b/databases/courier-authlib-userdb/Makefile @@ -41,6 +41,8 @@ OPTIONS= PAM "Build with PAM support" on \ AUTHUSERDB "Build with authuserdb" on VPOPMAILDIR?= ${LOCALBASE}/vpopmail +WITH_MAILUSER?= daemon +WITH_MAILGROUP?=daemon CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ @@ -50,7 +52,12 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --without-authshadow \ --without-authcustom \ --enable-unicode \ - --enable-ltdl-install=no + --enable-ltdl-install=no \ + --with-mailuser=${WITH_MAILUSER} \ + --with-mailgroup=${WITH_MAILGROUP} \ + --with-authdaemonvar=/var/run/authdaemond + +PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP} .include <bsd.port.pre.mk> @@ -117,14 +124,6 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment " PLIST_SUB+= AUTHUSERDBFLAG="" .endif -.if defined(WITH_MAILUSER) -CONFIGURE_ARGS+=--with-mailuser=${WITH_MAILUSER} -.endif - -.if defined(WITH_MAILGROUP) -CONFIGURE_ARGS+=--with-mailgroup=${WITH_MAILGROUP} -.endif - RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= courierlogger.1 diff --git a/databases/courier-authlib-userdb/files/courier-authdaemond.sh b/databases/courier-authlib-userdb/files/courier-authdaemond.sh index ef48f1629b24..88c9b91fa74e 100644 --- a/databases/courier-authlib-userdb/files/courier-authdaemond.sh +++ b/databases/courier-authlib-userdb/files/courier-authdaemond.sh @@ -24,7 +24,7 @@ command="%%PREFIX%%/sbin/authdaemond" start_cmd="authdaemond_cmd start" stop_cmd="authdaemond_cmd stop" restart_cmd="authdaemond_cmd stop && authdaemond_cmd start" -pidfile="%%PREFIX%%/var/spool/authdaemon/pid" +pidfile="/var/run/authdaemond/pid" procname="%%PREFIX%%/sbin/courierlogger" load_rc_config $name @@ -41,7 +41,7 @@ authdaemond_cmd () { if [ $? -eq 0 ] ; then [ -f "$pidfile" ] && rm -f "$pidfile" [ -f "$pidfile".lock ] && rm -f "$pidfile".lock - [ -S %%PREFIX%%/var/spool/authdaemon/socket ] && rm -f %%PREFIX%%/var/spool/authdaemon/socket + [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket return 0 fi ;; diff --git a/databases/courier-authlib-userdb/pkg-plist b/databases/courier-authlib-userdb/pkg-plist index 007d02df5b01..2a5e2800f7b8 100644 --- a/databases/courier-authlib-userdb/pkg-plist +++ b/databases/courier-authlib-userdb/pkg-plist @@ -1,3 +1,4 @@ +@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true bin/courierauthconfig etc/rc.d/courier-authdaemond.sh %%MYSQLFLAG%%etc/authlib/authmysqlrc.dist @@ -60,11 +61,9 @@ sbin/courierlogger %%PORTDOCS%%%%DOCSDIR%%/README.ldap %%PORTDOCS%%%%DOCSDIR%%/README_authlib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool 2>/dev/null || true -@unexec rmdir %D/var/authdaemon 2>/dev/null || true -@unexec rmdir %D/var 2>/dev/null || true +@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true +@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true +@unexec rmdir /var/run/authdaemond 2>/dev/null || true @unexec rmdir %D/etc/authlib 2>/dev/null || true @dirrm lib/courier-authlib @dirrm libexec/courier-authlib diff --git a/databases/courier-authlib-usergdbm/Makefile b/databases/courier-authlib-usergdbm/Makefile index 09788f1fb902..a9de1f36fc2c 100644 --- a/databases/courier-authlib-usergdbm/Makefile +++ b/databases/courier-authlib-usergdbm/Makefile @@ -41,6 +41,8 @@ OPTIONS= PAM "Build with PAM support" on \ AUTHUSERDB "Build with authuserdb" on VPOPMAILDIR?= ${LOCALBASE}/vpopmail +WITH_MAILUSER?= daemon +WITH_MAILGROUP?=daemon CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ @@ -50,7 +52,12 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --without-authshadow \ --without-authcustom \ --enable-unicode \ - --enable-ltdl-install=no + --enable-ltdl-install=no \ + --with-mailuser=${WITH_MAILUSER} \ + --with-mailgroup=${WITH_MAILGROUP} \ + --with-authdaemonvar=/var/run/authdaemond + +PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP} .include <bsd.port.pre.mk> @@ -117,14 +124,6 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment " PLIST_SUB+= AUTHUSERDBFLAG="" .endif -.if defined(WITH_MAILUSER) -CONFIGURE_ARGS+=--with-mailuser=${WITH_MAILUSER} -.endif - -.if defined(WITH_MAILGROUP) -CONFIGURE_ARGS+=--with-mailgroup=${WITH_MAILGROUP} -.endif - RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= courierlogger.1 diff --git a/databases/courier-authlib-usergdbm/files/courier-authdaemond.sh b/databases/courier-authlib-usergdbm/files/courier-authdaemond.sh index ef48f1629b24..88c9b91fa74e 100644 --- a/databases/courier-authlib-usergdbm/files/courier-authdaemond.sh +++ b/databases/courier-authlib-usergdbm/files/courier-authdaemond.sh @@ -24,7 +24,7 @@ command="%%PREFIX%%/sbin/authdaemond" start_cmd="authdaemond_cmd start" stop_cmd="authdaemond_cmd stop" restart_cmd="authdaemond_cmd stop && authdaemond_cmd start" -pidfile="%%PREFIX%%/var/spool/authdaemon/pid" +pidfile="/var/run/authdaemond/pid" procname="%%PREFIX%%/sbin/courierlogger" load_rc_config $name @@ -41,7 +41,7 @@ authdaemond_cmd () { if [ $? -eq 0 ] ; then [ -f "$pidfile" ] && rm -f "$pidfile" [ -f "$pidfile".lock ] && rm -f "$pidfile".lock - [ -S %%PREFIX%%/var/spool/authdaemon/socket ] && rm -f %%PREFIX%%/var/spool/authdaemon/socket + [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket return 0 fi ;; diff --git a/databases/courier-authlib-usergdbm/pkg-plist b/databases/courier-authlib-usergdbm/pkg-plist index 007d02df5b01..2a5e2800f7b8 100644 --- a/databases/courier-authlib-usergdbm/pkg-plist +++ b/databases/courier-authlib-usergdbm/pkg-plist @@ -1,3 +1,4 @@ +@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true bin/courierauthconfig etc/rc.d/courier-authdaemond.sh %%MYSQLFLAG%%etc/authlib/authmysqlrc.dist @@ -60,11 +61,9 @@ sbin/courierlogger %%PORTDOCS%%%%DOCSDIR%%/README.ldap %%PORTDOCS%%%%DOCSDIR%%/README_authlib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool 2>/dev/null || true -@unexec rmdir %D/var/authdaemon 2>/dev/null || true -@unexec rmdir %D/var 2>/dev/null || true +@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true +@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true +@unexec rmdir /var/run/authdaemond 2>/dev/null || true @unexec rmdir %D/etc/authlib 2>/dev/null || true @dirrm lib/courier-authlib @dirrm libexec/courier-authlib diff --git a/mail/courier-authlib-vchkpw/Makefile b/mail/courier-authlib-vchkpw/Makefile index 09788f1fb902..a9de1f36fc2c 100644 --- a/mail/courier-authlib-vchkpw/Makefile +++ b/mail/courier-authlib-vchkpw/Makefile @@ -41,6 +41,8 @@ OPTIONS= PAM "Build with PAM support" on \ AUTHUSERDB "Build with authuserdb" on VPOPMAILDIR?= ${LOCALBASE}/vpopmail +WITH_MAILUSER?= daemon +WITH_MAILGROUP?=daemon CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ @@ -50,7 +52,12 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --without-authshadow \ --without-authcustom \ --enable-unicode \ - --enable-ltdl-install=no + --enable-ltdl-install=no \ + --with-mailuser=${WITH_MAILUSER} \ + --with-mailgroup=${WITH_MAILGROUP} \ + --with-authdaemonvar=/var/run/authdaemond + +PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP} .include <bsd.port.pre.mk> @@ -117,14 +124,6 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment " PLIST_SUB+= AUTHUSERDBFLAG="" .endif -.if defined(WITH_MAILUSER) -CONFIGURE_ARGS+=--with-mailuser=${WITH_MAILUSER} -.endif - -.if defined(WITH_MAILGROUP) -CONFIGURE_ARGS+=--with-mailgroup=${WITH_MAILGROUP} -.endif - RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= courierlogger.1 diff --git a/mail/courier-authlib-vchkpw/files/courier-authdaemond.sh b/mail/courier-authlib-vchkpw/files/courier-authdaemond.sh index ef48f1629b24..88c9b91fa74e 100644 --- a/mail/courier-authlib-vchkpw/files/courier-authdaemond.sh +++ b/mail/courier-authlib-vchkpw/files/courier-authdaemond.sh @@ -24,7 +24,7 @@ command="%%PREFIX%%/sbin/authdaemond" start_cmd="authdaemond_cmd start" stop_cmd="authdaemond_cmd stop" restart_cmd="authdaemond_cmd stop && authdaemond_cmd start" -pidfile="%%PREFIX%%/var/spool/authdaemon/pid" +pidfile="/var/run/authdaemond/pid" procname="%%PREFIX%%/sbin/courierlogger" load_rc_config $name @@ -41,7 +41,7 @@ authdaemond_cmd () { if [ $? -eq 0 ] ; then [ -f "$pidfile" ] && rm -f "$pidfile" [ -f "$pidfile".lock ] && rm -f "$pidfile".lock - [ -S %%PREFIX%%/var/spool/authdaemon/socket ] && rm -f %%PREFIX%%/var/spool/authdaemon/socket + [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket return 0 fi ;; diff --git a/mail/courier-authlib-vchkpw/pkg-plist b/mail/courier-authlib-vchkpw/pkg-plist index 007d02df5b01..2a5e2800f7b8 100644 --- a/mail/courier-authlib-vchkpw/pkg-plist +++ b/mail/courier-authlib-vchkpw/pkg-plist @@ -1,3 +1,4 @@ +@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true bin/courierauthconfig etc/rc.d/courier-authdaemond.sh %%MYSQLFLAG%%etc/authlib/authmysqlrc.dist @@ -60,11 +61,9 @@ sbin/courierlogger %%PORTDOCS%%%%DOCSDIR%%/README.ldap %%PORTDOCS%%%%DOCSDIR%%/README_authlib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool 2>/dev/null || true -@unexec rmdir %D/var/authdaemon 2>/dev/null || true -@unexec rmdir %D/var 2>/dev/null || true +@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true +@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true +@unexec rmdir /var/run/authdaemond 2>/dev/null || true @unexec rmdir %D/etc/authlib 2>/dev/null || true @dirrm lib/courier-authlib @dirrm libexec/courier-authlib diff --git a/mail/courier-authlib/Makefile b/mail/courier-authlib/Makefile index 09788f1fb902..a9de1f36fc2c 100644 --- a/mail/courier-authlib/Makefile +++ b/mail/courier-authlib/Makefile @@ -41,6 +41,8 @@ OPTIONS= PAM "Build with PAM support" on \ AUTHUSERDB "Build with authuserdb" on VPOPMAILDIR?= ${LOCALBASE}/vpopmail +WITH_MAILUSER?= daemon +WITH_MAILGROUP?=daemon CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ @@ -50,7 +52,12 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --without-authshadow \ --without-authcustom \ --enable-unicode \ - --enable-ltdl-install=no + --enable-ltdl-install=no \ + --with-mailuser=${WITH_MAILUSER} \ + --with-mailgroup=${WITH_MAILGROUP} \ + --with-authdaemonvar=/var/run/authdaemond + +PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP} .include <bsd.port.pre.mk> @@ -117,14 +124,6 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment " PLIST_SUB+= AUTHUSERDBFLAG="" .endif -.if defined(WITH_MAILUSER) -CONFIGURE_ARGS+=--with-mailuser=${WITH_MAILUSER} -.endif - -.if defined(WITH_MAILGROUP) -CONFIGURE_ARGS+=--with-mailgroup=${WITH_MAILGROUP} -.endif - RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= courierlogger.1 diff --git a/mail/courier-authlib/files/courier-authdaemond.sh b/mail/courier-authlib/files/courier-authdaemond.sh index ef48f1629b24..88c9b91fa74e 100644 --- a/mail/courier-authlib/files/courier-authdaemond.sh +++ b/mail/courier-authlib/files/courier-authdaemond.sh @@ -24,7 +24,7 @@ command="%%PREFIX%%/sbin/authdaemond" start_cmd="authdaemond_cmd start" stop_cmd="authdaemond_cmd stop" restart_cmd="authdaemond_cmd stop && authdaemond_cmd start" -pidfile="%%PREFIX%%/var/spool/authdaemon/pid" +pidfile="/var/run/authdaemond/pid" procname="%%PREFIX%%/sbin/courierlogger" load_rc_config $name @@ -41,7 +41,7 @@ authdaemond_cmd () { if [ $? -eq 0 ] ; then [ -f "$pidfile" ] && rm -f "$pidfile" [ -f "$pidfile".lock ] && rm -f "$pidfile".lock - [ -S %%PREFIX%%/var/spool/authdaemon/socket ] && rm -f %%PREFIX%%/var/spool/authdaemon/socket + [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket return 0 fi ;; diff --git a/mail/courier-authlib/pkg-plist b/mail/courier-authlib/pkg-plist index 007d02df5b01..2a5e2800f7b8 100644 --- a/mail/courier-authlib/pkg-plist +++ b/mail/courier-authlib/pkg-plist @@ -1,3 +1,4 @@ +@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true bin/courierauthconfig etc/rc.d/courier-authdaemond.sh %%MYSQLFLAG%%etc/authlib/authmysqlrc.dist @@ -60,11 +61,9 @@ sbin/courierlogger %%PORTDOCS%%%%DOCSDIR%%/README.ldap %%PORTDOCS%%%%DOCSDIR%%/README_authlib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool 2>/dev/null || true -@unexec rmdir %D/var/authdaemon 2>/dev/null || true -@unexec rmdir %D/var 2>/dev/null || true +@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true +@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true +@unexec rmdir /var/run/authdaemond 2>/dev/null || true @unexec rmdir %D/etc/authlib 2>/dev/null || true @dirrm lib/courier-authlib @dirrm libexec/courier-authlib diff --git a/net/courier-authlib-ldap/Makefile b/net/courier-authlib-ldap/Makefile index 09788f1fb902..a9de1f36fc2c 100644 --- a/net/courier-authlib-ldap/Makefile +++ b/net/courier-authlib-ldap/Makefile @@ -41,6 +41,8 @@ OPTIONS= PAM "Build with PAM support" on \ AUTHUSERDB "Build with authuserdb" on VPOPMAILDIR?= ${LOCALBASE}/vpopmail +WITH_MAILUSER?= daemon +WITH_MAILGROUP?=daemon CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ @@ -50,7 +52,12 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --without-authshadow \ --without-authcustom \ --enable-unicode \ - --enable-ltdl-install=no + --enable-ltdl-install=no \ + --with-mailuser=${WITH_MAILUSER} \ + --with-mailgroup=${WITH_MAILGROUP} \ + --with-authdaemonvar=/var/run/authdaemond + +PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP} .include <bsd.port.pre.mk> @@ -117,14 +124,6 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment " PLIST_SUB+= AUTHUSERDBFLAG="" .endif -.if defined(WITH_MAILUSER) -CONFIGURE_ARGS+=--with-mailuser=${WITH_MAILUSER} -.endif - -.if defined(WITH_MAILGROUP) -CONFIGURE_ARGS+=--with-mailgroup=${WITH_MAILGROUP} -.endif - RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= courierlogger.1 diff --git a/net/courier-authlib-ldap/files/courier-authdaemond.sh b/net/courier-authlib-ldap/files/courier-authdaemond.sh index ef48f1629b24..88c9b91fa74e 100644 --- a/net/courier-authlib-ldap/files/courier-authdaemond.sh +++ b/net/courier-authlib-ldap/files/courier-authdaemond.sh @@ -24,7 +24,7 @@ command="%%PREFIX%%/sbin/authdaemond" start_cmd="authdaemond_cmd start" stop_cmd="authdaemond_cmd stop" restart_cmd="authdaemond_cmd stop && authdaemond_cmd start" -pidfile="%%PREFIX%%/var/spool/authdaemon/pid" +pidfile="/var/run/authdaemond/pid" procname="%%PREFIX%%/sbin/courierlogger" load_rc_config $name @@ -41,7 +41,7 @@ authdaemond_cmd () { if [ $? -eq 0 ] ; then [ -f "$pidfile" ] && rm -f "$pidfile" [ -f "$pidfile".lock ] && rm -f "$pidfile".lock - [ -S %%PREFIX%%/var/spool/authdaemon/socket ] && rm -f %%PREFIX%%/var/spool/authdaemon/socket + [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket return 0 fi ;; diff --git a/net/courier-authlib-ldap/pkg-plist b/net/courier-authlib-ldap/pkg-plist index 007d02df5b01..2a5e2800f7b8 100644 --- a/net/courier-authlib-ldap/pkg-plist +++ b/net/courier-authlib-ldap/pkg-plist @@ -1,3 +1,4 @@ +@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true bin/courierauthconfig etc/rc.d/courier-authdaemond.sh %%MYSQLFLAG%%etc/authlib/authmysqlrc.dist @@ -60,11 +61,9 @@ sbin/courierlogger %%PORTDOCS%%%%DOCSDIR%%/README.ldap %%PORTDOCS%%%%DOCSDIR%%/README_authlib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool 2>/dev/null || true -@unexec rmdir %D/var/authdaemon 2>/dev/null || true -@unexec rmdir %D/var 2>/dev/null || true +@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true +@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true +@unexec rmdir /var/run/authdaemond 2>/dev/null || true @unexec rmdir %D/etc/authlib 2>/dev/null || true @dirrm lib/courier-authlib @dirrm libexec/courier-authlib diff --git a/security/courier-authlib-base/Makefile b/security/courier-authlib-base/Makefile index 09788f1fb902..a9de1f36fc2c 100644 --- a/security/courier-authlib-base/Makefile +++ b/security/courier-authlib-base/Makefile @@ -41,6 +41,8 @@ OPTIONS= PAM "Build with PAM support" on \ AUTHUSERDB "Build with authuserdb" on VPOPMAILDIR?= ${LOCALBASE}/vpopmail +WITH_MAILUSER?= daemon +WITH_MAILGROUP?=daemon CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ @@ -50,7 +52,12 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --without-authshadow \ --without-authcustom \ --enable-unicode \ - --enable-ltdl-install=no + --enable-ltdl-install=no \ + --with-mailuser=${WITH_MAILUSER} \ + --with-mailgroup=${WITH_MAILGROUP} \ + --with-authdaemonvar=/var/run/authdaemond + +PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP} .include <bsd.port.pre.mk> @@ -117,14 +124,6 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment " PLIST_SUB+= AUTHUSERDBFLAG="" .endif -.if defined(WITH_MAILUSER) -CONFIGURE_ARGS+=--with-mailuser=${WITH_MAILUSER} -.endif - -.if defined(WITH_MAILGROUP) -CONFIGURE_ARGS+=--with-mailgroup=${WITH_MAILGROUP} -.endif - RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= courierlogger.1 diff --git a/security/courier-authlib-base/files/courier-authdaemond.sh b/security/courier-authlib-base/files/courier-authdaemond.sh index ef48f1629b24..88c9b91fa74e 100644 --- a/security/courier-authlib-base/files/courier-authdaemond.sh +++ b/security/courier-authlib-base/files/courier-authdaemond.sh @@ -24,7 +24,7 @@ command="%%PREFIX%%/sbin/authdaemond" start_cmd="authdaemond_cmd start" stop_cmd="authdaemond_cmd stop" restart_cmd="authdaemond_cmd stop && authdaemond_cmd start" -pidfile="%%PREFIX%%/var/spool/authdaemon/pid" +pidfile="/var/run/authdaemond/pid" procname="%%PREFIX%%/sbin/courierlogger" load_rc_config $name @@ -41,7 +41,7 @@ authdaemond_cmd () { if [ $? -eq 0 ] ; then [ -f "$pidfile" ] && rm -f "$pidfile" [ -f "$pidfile".lock ] && rm -f "$pidfile".lock - [ -S %%PREFIX%%/var/spool/authdaemon/socket ] && rm -f %%PREFIX%%/var/spool/authdaemon/socket + [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket return 0 fi ;; diff --git a/security/courier-authlib-base/pkg-plist b/security/courier-authlib-base/pkg-plist index 007d02df5b01..2a5e2800f7b8 100644 --- a/security/courier-authlib-base/pkg-plist +++ b/security/courier-authlib-base/pkg-plist @@ -1,3 +1,4 @@ +@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true bin/courierauthconfig etc/rc.d/courier-authdaemond.sh %%MYSQLFLAG%%etc/authlib/authmysqlrc.dist @@ -60,11 +61,9 @@ sbin/courierlogger %%PORTDOCS%%%%DOCSDIR%%/README.ldap %%PORTDOCS%%%%DOCSDIR%%/README_authlib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool 2>/dev/null || true -@unexec rmdir %D/var/authdaemon 2>/dev/null || true -@unexec rmdir %D/var 2>/dev/null || true +@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true +@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true +@unexec rmdir /var/run/authdaemond 2>/dev/null || true @unexec rmdir %D/etc/authlib 2>/dev/null || true @dirrm lib/courier-authlib @dirrm libexec/courier-authlib diff --git a/security/courier-authlib/Makefile b/security/courier-authlib/Makefile index 09788f1fb902..a9de1f36fc2c 100644 --- a/security/courier-authlib/Makefile +++ b/security/courier-authlib/Makefile @@ -41,6 +41,8 @@ OPTIONS= PAM "Build with PAM support" on \ AUTHUSERDB "Build with authuserdb" on VPOPMAILDIR?= ${LOCALBASE}/vpopmail +WITH_MAILUSER?= daemon +WITH_MAILGROUP?=daemon CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ CXXFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \ @@ -50,7 +52,12 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --without-authshadow \ --without-authcustom \ --enable-unicode \ - --enable-ltdl-install=no + --enable-ltdl-install=no \ + --with-mailuser=${WITH_MAILUSER} \ + --with-mailgroup=${WITH_MAILGROUP} \ + --with-authdaemonvar=/var/run/authdaemond + +PLIST_SUB= MAILUSER=${WITH_MAILUSER} MAILGROUP=${WITH_MAILGROUP} .include <bsd.port.pre.mk> @@ -117,14 +124,6 @@ PLIST_SUB+= AUTHUSERDBFLAG="@comment " PLIST_SUB+= AUTHUSERDBFLAG="" .endif -.if defined(WITH_MAILUSER) -CONFIGURE_ARGS+=--with-mailuser=${WITH_MAILUSER} -.endif - -.if defined(WITH_MAILGROUP) -CONFIGURE_ARGS+=--with-mailgroup=${WITH_MAILGROUP} -.endif - RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= courierlogger.1 diff --git a/security/courier-authlib/files/courier-authdaemond.sh b/security/courier-authlib/files/courier-authdaemond.sh index ef48f1629b24..88c9b91fa74e 100644 --- a/security/courier-authlib/files/courier-authdaemond.sh +++ b/security/courier-authlib/files/courier-authdaemond.sh @@ -24,7 +24,7 @@ command="%%PREFIX%%/sbin/authdaemond" start_cmd="authdaemond_cmd start" stop_cmd="authdaemond_cmd stop" restart_cmd="authdaemond_cmd stop && authdaemond_cmd start" -pidfile="%%PREFIX%%/var/spool/authdaemon/pid" +pidfile="/var/run/authdaemond/pid" procname="%%PREFIX%%/sbin/courierlogger" load_rc_config $name @@ -41,7 +41,7 @@ authdaemond_cmd () { if [ $? -eq 0 ] ; then [ -f "$pidfile" ] && rm -f "$pidfile" [ -f "$pidfile".lock ] && rm -f "$pidfile".lock - [ -S %%PREFIX%%/var/spool/authdaemon/socket ] && rm -f %%PREFIX%%/var/spool/authdaemon/socket + [ -S /var/run/authdaemond/socket ] && rm -f /var/run/authdaemond/socket return 0 fi ;; diff --git a/security/courier-authlib/pkg-plist b/security/courier-authlib/pkg-plist index 007d02df5b01..2a5e2800f7b8 100644 --- a/security/courier-authlib/pkg-plist +++ b/security/courier-authlib/pkg-plist @@ -1,3 +1,4 @@ +@unexec [ ! -f /var/run/authdaemond/pid ] || %D/etc/rc.d/courier-authdaemond.sh stop || true bin/courierauthconfig etc/rc.d/courier-authdaemond.sh %%MYSQLFLAG%%etc/authlib/authmysqlrc.dist @@ -60,11 +61,9 @@ sbin/courierlogger %%PORTDOCS%%%%DOCSDIR%%/README.ldap %%PORTDOCS%%%%DOCSDIR%%/README_authlib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool/authdaemon 2>/dev/null || true -@unexec rmdir %D/var/spool 2>/dev/null || true -@unexec rmdir %D/var/authdaemon 2>/dev/null || true -@unexec rmdir %D/var 2>/dev/null || true +@exec mkdir -m 0750 /var/run/authdaemond 2>/dev/null || true +@exec chown %%MAILUSER%%:%%MAILGROUP%% /var/run/authdaemond 2>/dev/null || true +@unexec rmdir /var/run/authdaemond 2>/dev/null || true @unexec rmdir %D/etc/authlib 2>/dev/null || true @dirrm lib/courier-authlib @dirrm libexec/courier-authlib |