diff options
author | glarkin <glarkin@FreeBSD.org> | 2011-04-27 21:29:21 +0800 |
---|---|---|
committer | glarkin <glarkin@FreeBSD.org> | 2011-04-27 21:29:21 +0800 |
commit | 19163cc57be9410141965866f21e433d5e74cd84 (patch) | |
tree | 7ed4de33e85d35fc328853b63fed4a03955c6bcb /mail | |
parent | d80456c0854ac6dc6d6d2e4947b0789ca3424c2c (diff) | |
download | freebsd-ports-gnome-19163cc57be9410141965866f21e433d5e74cd84.tar.gz freebsd-ports-gnome-19163cc57be9410141965866f21e433d5e74cd84.tar.zst freebsd-ports-gnome-19163cc57be9410141965866f21e433d5e74cd84.zip |
- Fixed spool file ownerships when installing from a package
- Various pkg-plist cleanups to ensure that chmod/chown commands are
executed in the proper order during package installation
- Added LICENSE
- Fixed REQUIRES: in rc.d script
- Bumped PORTREVISION
PR: ports/154437 (based on)
Submitted by: Uffe Jakobsen <uffe@uffe.org>
Diffstat (limited to 'mail')
-rw-r--r-- | mail/nullmailer/Makefile | 25 | ||||
-rw-r--r-- | mail/nullmailer/distinfo | 1 | ||||
-rw-r--r-- | mail/nullmailer/files/nullmailer.in | 2 | ||||
-rw-r--r-- | mail/nullmailer/pkg-plist | 25 |
4 files changed, 30 insertions, 23 deletions
diff --git a/mail/nullmailer/Makefile b/mail/nullmailer/Makefile index a918f12c931e..bd733eaa06cd 100644 --- a/mail/nullmailer/Makefile +++ b/mail/nullmailer/Makefile @@ -7,7 +7,7 @@ PORTNAME= nullmailer PORTVERSION= 1.05 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= mail MASTER_SITES= http://untroubled.org/nullmailer/ \ @@ -25,6 +25,10 @@ GID_FILES+= ../../GIDs .endif USERS= nullmail GROUPS= nullmail +NULLMAIL_UID= 522 +NULLMAIL_GID= 522 + +LICENSE= GPLv2 GNU_CONFIGURE= yes CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} @@ -43,15 +47,22 @@ MAN1= nullmailer-inject.1 sendmail.1 MAN7= nullmailer.7 MAN8= nullmailer-queue.8 nullmailer-send.8 -# Pass BATCH to pkg-install for Evil Things(tm) -# Pass LOCALSTATEDIR to pkg-install for creating home directory correctly -pre-install: - @BATCH="${BATCH}" LOCALSTATEDIR="${LOCALSTATEDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: @cd ${WRKSRC} && make install-root @${INSTALL_DATA} -c ${FILESDIR}/remotes.sample ${PREFIX}/etc/nullmailer/ - @BATCH="${BATCH}" NMH_PREFIX="${NMH_PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +# Append commands that reference the nullmailer user to the plist, because +# we need to ensure that the account has been created by bsd.port.mk by +# the time these are executed. + @${ECHO_CMD} '@exec ${PW} usermod ${USERS} -d ${LOCALSTATEDIR}/nullmailer' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS}:${USERS} ${LOCALSTATEDIR}/nullmailer/queue' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS}:${USERS} ${LOCALSTATEDIR}/nullmailer/tmp' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS}:${USERS} ${LOCALSTATEDIR}/nullmailer/trigger' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS} ${PREFIX}/sbin/nullmailer-queue' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS} ${PREFIX}/libexec/nullmailer/mailq' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} -R ${USERS} ${LOCALSTATEDIR}/nullmailer' >> ${TMPPLIST} + + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/mail/nullmailer/distinfo b/mail/nullmailer/distinfo index c14e9a14e00d..3fedeb810cc8 100644 --- a/mail/nullmailer/distinfo +++ b/mail/nullmailer/distinfo @@ -1,3 +1,2 @@ -MD5 (nullmailer-1.05.tar.gz) = 35124cc05f893efba1310e2ec7c876ff SHA256 (nullmailer-1.05.tar.gz) = 90356ed2bd95eef09ed04713fdef1f81c1ab95e02eee333a96a8e3eb230cac2f SIZE (nullmailer-1.05.tar.gz) = 176800 diff --git a/mail/nullmailer/files/nullmailer.in b/mail/nullmailer/files/nullmailer.in index 5f5bb3fe08d0..2c5778ebecf1 100644 --- a/mail/nullmailer/files/nullmailer.in +++ b/mail/nullmailer/files/nullmailer.in @@ -2,7 +2,7 @@ # $FreeBSD$ # # PROVIDE: nullmailer -# REQUIRE: DAEMON +# REQUIRE: LOGIN # # Add the following line to /etc/rc.conf to enable nullmailer: # diff --git a/mail/nullmailer/pkg-plist b/mail/nullmailer/pkg-plist index 8dd31196b2b1..0f87f9149734 100644 --- a/mail/nullmailer/pkg-plist +++ b/mail/nullmailer/pkg-plist @@ -1,28 +1,25 @@ libexec/nullmailer/smtp libexec/nullmailer/qmqp libexec/nullmailer/mailq +@exec chmod u+s %D/libexec/nullmailer/mailq libexec/nullmailer/sendmail bin/nullmailer-inject sbin/nullmailer-queue +@exec chmod u+s %D/sbin/nullmailer-queue sbin/nullmailer-send -etc/nullmailer/me.sample +@ignore etc/nullmailer/me.sample etc/nullmailer/remotes.sample +@dirrm libexec/nullmailer +@dirrmtry etc/nullmailer +@cwd / @exec mkdir -p %%LOCALSTATEDIR%%/nullmailer/queue @exec chmod 700 %%LOCALSTATEDIR%%/nullmailer/queue +@dirrmtry %%LOCALSTATEDIR%%/nullmailer/queue @exec mkdir -p %%LOCALSTATEDIR%%/nullmailer/tmp @exec chmod 700 %%LOCALSTATEDIR%%/nullmailer/tmp -@exec rm -f %%LOCALSTATEDIR%%/nullmailer/trigger +@dirrmtry %%LOCALSTATEDIR%%/nullmailer/tmp @exec mkfifo %%LOCALSTATEDIR%%/nullmailer/trigger @exec chmod 600 %%LOCALSTATEDIR%%/nullmailer/trigger -@exec chown -R nullmail %%LOCALSTATEDIR%%/nullmailer/* -@exec chown nullmail %D/sbin/nullmailer-queue -@exec chmod u+s %D/sbin/nullmailer-queue -@exec chown nullmail %D/libexec/nullmailer/mailq -@exec chmod u+s %D/libexec/nullmailer/mailq -@unexec if [ -d %%LOCALSTATEDIR%%/nullmailer/queue ]; then rmdir %%LOCALSTATEDIR%%/nullmailer/queue; fi; -@unexec if [ -d %%LOCALSTATEDIR%%/nullmailer/tmp ]; then rmdir %%LOCALSTATEDIR%%/nullmailer/tmp; fi; -@unexec if [ -p %%LOCALSTATEDIR%%/nullmailer/trigger ]; then rm -f %%LOCALSTATEDIR%%/nullmailer/trigger; fi; -@dirrm libexec/nullmailer -@unexec t=`/bin/ls %D/etc/nullmailer`; if [ -z "$t" ]; then echo "Configuration directory is empty, remove it."; rmdir %D/etc/nullmailer; fi; -@unexec if [ -d %%LOCALSTATEDIR%%/nullmailer ]; then rmdir %%LOCALSTATEDIR%%/nullmailer; fi -@unexec if [ -n "$BATCH" ]; then echo "Warning: In batch mode, I will do 'rmuser -y nullmail'"; rmuser -y nullmail; fi; +@unexec rm -f %%LOCALSTATEDIR%%/nullmailer/trigger +@ignore %%LOCALSTATEDIR%%/nullmailer/trigger +@dirrmtry %%LOCALSTATEDIR%%/nullmailer |