o Update the port to milter-sender 0.55 and libsnert 1.33.

o Fix some buglets and port framework usage issues:

	- The file milter-sender.mc doesn't belong to docs.  Installing
	  its reference copy along with the working copy is better.

	- Make use of the exported BSD_INSTALL_* environment variables.

	- Change access permissions only on needed files.

	- Take care of file access permissions when installing
	  from the package.

	- daemon(8) will take the program to the background, but it cannot
	  change the current directory to anywhere but the root.  Since
	  getting a core file might be useful, cd to a directory writable
	  by the milter-sender process just before starting it.

	- Review the messages: improve grammar, remind to reinstall
	  sendmail.cf as well (rebuilding it alone isn't enough.)
This commit is contained in:
Yaroslav Tykhiy 2004-06-04 11:02:28 +00:00
parent 25818309e4
commit 6a02f66228
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=110811
7 changed files with 72 additions and 50 deletions

View file

@ -6,11 +6,10 @@
#
PORTNAME= milter-sender
PORTVERSION= 0.51
PORTREVISION= 1
PORTVERSION= 0.55
CATEGORIES= mail
MASTER_SITES= http://www.snert.com/Software/download/
DISTFILES= libsnert-1.32.tgz milter-sender-${PORTVERSION}.tgz
DISTFILES= libsnert-1.33.tgz milter-sender-${PORTVERSION}.tgz
MAINTAINER= ports@FreeBSD.org
COMMENT= Real-time sender address verification, based on Milter API
@ -40,7 +39,7 @@ CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS}
DOCS= CHANGES.TXT index.shtml style.css mailto.js \
license-body.html LICENSE.TXT milter-sender.mc
license-body.html LICENSE.TXT
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"

View file

@ -1,4 +1,4 @@
MD5 (libsnert-1.32.tgz) = 974e7cee99707e7d7475b6656a9f9b39
SIZE (libsnert-1.32.tgz) = 182083
MD5 (milter-sender-0.51.tgz) = 17960ce483953bf1403b943537a8e42e
SIZE (milter-sender-0.51.tgz) = 209022
MD5 (libsnert-1.33.tgz) = 8142fb74496daac68080a19a41436706
SIZE (libsnert-1.33.tgz) = 208388
MD5 (milter-sender-0.55.tgz) = df89b4bcdfbd02d60a2ff8c13d130f47
SIZE (milter-sender-0.55.tgz) = 213324

View file

@ -1,33 +1,51 @@
--- install.sh.in.orig Mon Mar 1 12:59:54 2004
+++ install.sh.in Sat Mar 6 12:21:24 2004
@@ -17,21 +17,23 @@
chown ${USER} ${STATEDIR}
chgrp ${GROUP} ${STATEDIR}
--- install.sh.in.orig Thu Apr 1 00:44:46 2004
+++ install.sh.in Fri Jun 4 06:38:29 2004
@@ -13,38 +13,22 @@
MAILDIR="@with_sendmail@"
MILTER_CF="@milter_cf@"
-if [ ! -d ${STATEDIR} ]; then
- mkdir -p ${STATEDIR}
-fi
-chown ${USER} ${STATEDIR}
-chgrp ${GROUP} ${STATEDIR}
+install -d -o ${USER} -g ${GROUP} -m 755 ${STATEDIR}
RC="${STARTUP_DIR}/${MILTER}${STARTUP_EXT}"
-if [ ! -f $RC ]; then
- cp ${MILTER}.sh $RC
- chmod 540 $RC
+${BSD_INSTALL_SCRIPT} ${MILTER}.sh $RC.sample
+[ ! -f $RC ] && cp $RC.sample $RC
- case `uname -s` in
- Linux*)
- chkconfig --add ${MILTER}
- ;;
- SunOS*)
- # Does SunOS have a chkconfig like tool?
- ln -s $RC /etc/rc2.d/S70${MILTER}
- ln -s $RC /etc/rcS.d/K30${MILTER}
- ;;
- esac
-fi
+${BSD_INSTALL_PROGRAM} ${MILTER} ${SBINDIR}
-cp -f ${MILTER} ${SBINDIR}
-cp -f ${MILTER}.mc ${MAILDIR}/${MILTER}.mc.sample
+install -C -s ${MILTER} ${SBINDIR}
+install -C ${MILTER}.mc ${MAILDIR}/${MILTER}.mc.sample
-chmod 550 ${SBINDIR}/${MILTER}
+${BSD_INSTALL_DATA} ${MILTER}.mc ${MAILDIR}/${MILTER}.mc.sample
+[ ! -f ${MAILDIR}/${MILTER}.mc ] && cp ${MAILDIR}/${MILTER}.mc.sample ${MAILDIR}/${MILTER}.mc
-./milter-sender help=1 >${MILTER_CF}.sample
-cp -f ${MILTER}.mc ${MAILDIR}/${MILTER}.mc.sample
+./milter-sender help=1 | sed 's|^MilterSocket=.*|MilterSocket=unix:/var/spool/milter-sender/socket|' >${MILTER_CF}.sample
+[ ! -f ${MILTER_CF} ] && cp ${MILTER_CF}.sample ${MILTER_CF}
-./milter-sender help=1 >${MILTER_CF}.sample
-
-chmod g+r ${MAILDIR} ${MAILDIR}/access.* ${MAILDIR}/aliases.* ${MILTER_CF}.sample*
-chgrp ${GROUP} ${MAILDIR} ${MAILDIR}/access.* ${MAILDIR}/aliases.* ${MILTER_CF}.sample*
+chmod g+r ${MAILDIR}/access.* ${MAILDIR}/aliases.* ${MILTER_CF}.sample*
+chgrp ${GROUP} ${MAILDIR}/access.* ${MAILDIR}/aliases.* ${MILTER_CF}.sample*
+chgrp ${GROUP} ${MAILDIR}/access.db ${MAILDIR}/aliases.db ${MILTER_CF} ${MILTER_CF}.sample
+chmod g+r ${MAILDIR}/access.db ${MAILDIR}/aliases.db ${MILTER_CF} ${MILTER_CF}.sample
case `uname -s` in
*BSD*)
RC="${prefix}/etc/rc.d/${MILTER}.sh"
- if [ ! -f $RC ]; then
+# if [ ! -f $RC ]; then
cp ${MILTER}.sh $RC
chmod 540 $RC
- fi
+# fi
;;
Linux*)
if [ -d '/etc/rc.d/init.d' ]; then
echo '***************************************************************'
echo

View file

@ -19,7 +19,7 @@
- # Start the program in the background from a sub-shell
- # so that process will appear in the ps output immediately.
- sh -c "$PROGRAM $OPTIONS &"
+ /usr/sbin/daemon -f $PROGRAM $OPTIONS &
+ cd $STATE_DIR && daemon -f $PROGRAM $OPTIONS
- pid=`getpid "$PROGRAM"`
- if [ X"$pid" = X ]; then

View file

@ -1,11 +1,11 @@
--- ../lib/configure.orig Wed Nov 5 23:55:38 2003
+++ ../lib/configure Sat Nov 15 05:25:33 2003
@@ -1508,7 +1508,7 @@
--- ../lib/configure.orig Sun Mar 28 11:13:05 2004
+++ ../lib/configure Thu Jun 3 17:25:12 2004
@@ -1581,7 +1581,7 @@
COMPILE='$(CC) $(CFLAGS) $(CC_O)$*$O -c $<'
elif test "$OS" = 'FreeBSD'; then
# Assume GCC.
- CFLAGS="$CFLAGS -pthread -Wall"
+ CFLAGS="$CFLAGS -Wall"
elif test "$OS" = 'SunOS'; then
# This used to be -I{}, but I've seen two different SunOS 5.8
# systems in two different parts of the world with man pages
- CFLAGS="${CFLAGS} -pthread -Wall"
+ CFLAGS="${CFLAGS} -Wall"
XARGSI='xargs -J{}'
ARCHIVE='ar rc $(LIB) {}'

View file

@ -1,11 +1,11 @@
************************************************************************
In order to run this port, please add the following lines to
In order to run this port, please add the following line to
/etc/mail/YOUR-CONF.mc:
include(`milter-sender.mc')dnl
Don't forget to remake sendmail configuration file after modifying
YOUR-CONF.mc
Don't forget to remake and reinstall the sendmail configuration file
after modifying YOUR-CONF.mc.
************************************************************************

View file

@ -1,7 +1,9 @@
@unexec if [ -f %D/etc/milter-sender.cf ] && cmp -s %D/etc/milter-sender.cf %D/etc/milter-sender.cf.sample; then rm -f %D/etc/milter-sender.cf; fi
etc/milter-sender.cf.sample
@exec if [ ! -f %D/etc/milter-sender.cf ] ; then cp %D/%F %B/milter-sender.cf; fi
etc/rc.d/milter-sender.sh
@exec if [ ! -f %D/etc/milter-sender.cf ] ; then cp -p %D/%F %B/milter-sender.cf; fi
@unexec if [ -f %D/etc/rc.d/milter-sender.sh ] && cmp -s %D/etc/rc.d/milter-sender.sh %D/etc/rc.d/milter-sender.sh.sample; then rm -f %D/etc/rc.d/milter-sender.sh; fi
etc/rc.d/milter-sender.sh.sample
@exec if [ ! -f %D/etc/rc.d/milter-sender.sh ] ; then cp %D/%F %B/milter-sender.sh; fi
sbin/milter-sender
@exec install -d -o smmsp -g smmsp -m 755 /var/spool/milter-sender
@unexec rm -rf /var/spool/milter-sender
@ -18,14 +20,17 @@ sbin/milter-sender
%%PORTDOCS%%%%DOCSDIR%%/index.shtml
%%PORTDOCS%%%%DOCSDIR%%/license-body.html
%%PORTDOCS%%%%DOCSDIR%%/mailto.js
%%PORTDOCS%%%%DOCSDIR%%/milter-sender.mc
%%PORTDOCS%%%%DOCSDIR%%/style.css
@unexec echo "If permanently deleting this package, don't forget to delete the filter"
@unexec echo "inclusion of milter-sender from /etc/mail/YOUR-CONF.mc and to rebuild"
@unexec echo "sendmail.cf file!"
@unexec echo
@unexec echo "If permanently deleting this package, don't forget to delete"
@unexec echo "the inclusion of milter-sender.mc from /etc/mail/YOUR-CONF.mc"
@unexec echo "and then to rebuild and reinstall the sendmail configuration file!"
@unexec echo
%%PORTDOCS%%@dirrm %%DOCSDIR%%/Img
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@cwd /
@unexec if [ -f %D/etc/mail/milter-sender.mc ] && cmp -s %D/etc/mail/milter-sender.mc %D/etc/mail/milter-sender.mc.sample; then rm -f %D/etc/mail/milter-sender.mc; fi
etc/mail/milter-sender.mc.sample
@exec if [ ! -f %D/etc/mail/milter-sender.mc ] ; then cp %D/%F %B/milter-sender.mc; fi
@exec chgrp smmsp %D/etc/mail/access.db %D/etc/mail/aliases.db
@exec chmod g+r %D/etc/mail/access.db %D/etc/mail/aliases.db