FreeBSD Bugzilla – Attachment 161856 Details for
Bug 203660
mail/mimedefang: fix dirs and modernize a bit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
port patch
mimedefang.patch (text/plain), 11.76 KB, created by
Pavel Timofeev
on 2015-10-09 15:22:19 UTC
(
hide
)
Description:
port patch
Filename:
MIME Type:
Creator:
Pavel Timofeev
Created:
2015-10-09 15:22:19 UTC
Size:
11.76 KB
patch
obsolete
>diff -ruN /usr/home/timp/mimedefang.orig/Makefile mimedefang/Makefile >--- /usr/home/timp/mimedefang.orig/Makefile 2015-10-09 16:47:51.227096000 +0300 >+++ mimedefang/Makefile 2015-10-09 18:08:06.178867000 +0300 >@@ -29,14 +29,15 @@ > perl_OLD_CMD= perl > GNU_CONFIGURE= yes > >-MAILUSER?= mailnull >+MIMEDEFANG_USER?= mailnull >+MIMEDEFANG_GROUP?= mailnull > SPOOLDIR?= /var/spool/MIMEDefang > QUARANTINEDIR?= /var/spool/MD-Quarantine > > CONFIGURE_ENV+= PERL=${PERL} > CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc \ > --with-confsubdir=mimedefang \ >- --with-user=${MAILUSER} \ >+ --with-user=${MIMEDEFANG_USER} \ > --with-spooldir=${SPOOLDIR} \ > --with-quarantinedir=${QUARANTINEDIR} \ > --with-ipheader \ >@@ -44,7 +45,8 @@ > > SUB_FILES= pkg-message > >-PLIST_SUB+= MAIL_USER="${MAILUSER}" \ >+PLIST_SUB+= USER="${MIMEDEFANG_USER}" \ >+ GROUP="${MIMEDEFANG_GROUP}" \ > MIMEDEFANG_RUNDIR="${SPOOLDIR}" \ > MIMEDEFANG_QUARANTINEDIR="${QUARANTINEDIR}" > >@@ -77,10 +79,10 @@ > > post-install: > @${REINPLACE_CMD} -e 's,%%CHMOD%%,${CHMOD},g' ${WRKSRC}/examples/init-script >- @${INSTALL_SCRIPT} ${WRKSRC}/examples/init-script ${STAGEDIR}${PREFIX}/etc/rc.d/mimedefang >+ ${INSTALL_SCRIPT} ${WRKSRC}/examples/init-script ${STAGEDIR}${PREFIX}/etc/rc.d/mimedefang > .if ${PORT_OPTIONS:MDOCS} > @${MKDIR} ${STAGEDIR}${DOCSDIR} >- @${INSTALL_DATA} ${WRKSRC}/README* ${STAGEDIR}${DOCSDIR}/ >+ ${INSTALL_DATA} ${WRKSRC}/README* ${STAGEDIR}${DOCSDIR}/ > .endif > > .if ${PORT_OPTIONS:MEXAMPLES} >diff -ruN /usr/home/timp/mimedefang.orig/files/patch-Makefile.in mimedefang/files/patch-Makefile.in >--- /usr/home/timp/mimedefang.orig/files/patch-Makefile.in 2015-10-09 16:47:51.227696000 +0300 >+++ mimedefang/files/patch-Makefile.in 2015-10-09 17:56:44.525694000 +0300 >@@ -1,25 +1,25 @@ >---- Makefile.in.orig 2012-01-20 19:20:32.000000000 +0400 >-+++ Makefile.in 2012-04-16 03:14:35.979944862 +0400 >-@@ -156,14 +156,14 @@ >+--- Makefile.in.orig 2012-01-20 15:20:32 UTC >++++ Makefile.in >+@@ -156,14 +156,14 @@ install-redhat: install > > install: all > $(INSTALL) -m 755 -d $(DESTDIR)${CONFDIR} > - -if test "$(IP_HEADER)" = "yes" -a ! -f "$(DESTDIR)${CONFDIR}/mimedefang-ip-key" ; then \ > - $(PERL) ./gen-ip-validator.pl > $(DESTDIR)${CONFDIR}/mimedefang-ip-key ;\ > - -chmod 600 $(DESTDIR)${CONFDIR}/mimedefang-ip-key > /dev/null 2>&1 ; \ >-+ -if test "$(IP_HEADER)" = "yes" -a ! -f "$(DESTDIR)${CONFDIR}/mimedefang-ip-key.example" ; then \ >-+ $(PERL) ./gen-ip-validator.pl > $(DESTDIR)${CONFDIR}/mimedefang-ip-key.example ;\ >-+ -chmod 600 $(DESTDIR)${CONFDIR}/mimedefang-ip-key.example > /dev/null 2>&1 ; \ >++ -if test "$(IP_HEADER)" = "yes" -a ! -f "$(DESTDIR)${CONFDIR}/mimedefang-ip-key.sample" ; then \ >++ $(PERL) ./gen-ip-validator.pl > $(DESTDIR)${CONFDIR}/mimedefang-ip-key.sample ;\ >++ -chmod 600 $(DESTDIR)${CONFDIR}/mimedefang-ip-key.sample > /dev/null 2>&1 ; \ > fi > > if test "$(DEFANGUSER)" != "" ; then \ > if id "$(DEFANGUSER)" > /dev/null 2>&1 ; then \ > - chown "$(DEFANGUSER)" $(DESTDIR)${CONFDIR}/mimedefang-ip-key > /dev/null 2>&1 || true; \ >-+ chown "$(DEFANGUSER)" $(DESTDIR)${CONFDIR}/mimedefang-ip-key.example > /dev/null 2>&1 || true; \ >++ chown "$(DEFANGUSER)" $(DESTDIR)${CONFDIR}/mimedefang-ip-key.sample > /dev/null 2>&1 || true; \ > test ! -d $(DESTDIR)$(SPOOLDIR) && $(INSTALL) -m 750 -o $(DEFANGUSER) -d $(DESTDIR)$(SPOOLDIR) > /dev/null 2>&1 || true; \ > test ! -d $(DESTDIR)$(QDIR) && $(INSTALL) -m 750 -o $(DEFANGUSER) -d $(DESTDIR)$(QDIR) > /dev/null 2>&1 || true; \ > fi \ >-@@ -185,11 +185,7 @@ >+@@ -185,11 +185,7 @@ install: all > -test ! -d $(DESTDIR)$(SPOOLDIR) && mkdir -p $(DESTDIR)$(SPOOLDIR) && chmod 750 $(DESTDIR)$(SPOOLDIR) || true > -test ! -d $(DESTDIR)$(QDIR) && mkdir -p $(DESTDIR)$(QDIR) && chmod 750 $(DESTDIR)$(QDIR) || true > >@@ -28,11 +28,11 @@ > - else \ > - $(INSTALL) -m 644 examples/suggested-minimum-filter-for-windows-clients $(DESTDIR)${CONFDIR}/mimedefang-filter || exit 1; \ > - fi >-+ $(INSTALL) -m 644 examples/suggested-minimum-filter-for-windows-clients $(DESTDIR)${CONFDIR}/mimedefang-filter.example || exit 1 >++ $(INSTALL) -m 644 examples/suggested-minimum-filter-for-windows-clients $(DESTDIR)${CONFDIR}/mimedefang-filter.sample || exit 1 > > $(INSTALL) -m 755 $(INSTALL_STRIP_FLAG) mimedefang-multiplexor $(DESTDIR)$(prefix)/bin/mimedefang-multiplexor > $(INSTALL) -m 755 $(INSTALL_STRIP_FLAG) md-mx-ctrl $(DESTDIR)$(prefix)/bin/md-mx-ctrl >-@@ -210,11 +206,7 @@ >+@@ -210,11 +206,7 @@ install: all > $(INSTALL) -m 644 mimedefang-protocol.7 $(DESTDIR)$(MANDIR)/man7/mimedefang-protocol.7 > $(INSTALL) -m 644 mimedefang-notify.7 $(DESTDIR)$(MANDIR)/man7/mimedefang-notify.7 > if test "$(HAVE_SPAM_ASSASSIN)" = "yes" ; then \ >@@ -41,7 +41,7 @@ > - else \ > - $(INSTALL) -m 644 SpamAssassin/spamassassin.cf $(DESTDIR)${CONFDIR}/sa-mimedefang.cf || exit 1; \ > - fi \ >-+ $(INSTALL) -m 644 SpamAssassin/spamassassin.cf $(DESTDIR)${CONFDIR}/sa-mimedefang.cf.example || exit 1; \ >++ $(INSTALL) -m 644 SpamAssassin/spamassassin.cf $(DESTDIR)${CONFDIR}/sa-mimedefang.cf.sample || exit 1; \ > fi > > distro: FORCE >diff -ruN /usr/home/timp/mimedefang.orig/files/patch-examples__init-script.in mimedefang/files/patch-examples__init-script.in >--- /usr/home/timp/mimedefang.orig/files/patch-examples__init-script.in 2015-10-09 16:47:51.227869000 +0300 >+++ mimedefang/files/patch-examples__init-script.in 2015-10-09 17:56:44.538399000 +0300 >@@ -1,6 +1,6 @@ >---- examples/init-script.in.orig 2010-06-29 14:50:32.000000000 -0700 >-+++ examples/init-script.in 2012-02-14 23:06:37.000000000 -0800 >-@@ -39,6 +39,12 @@ >+--- examples/init-script.in.orig 2012-01-20 15:24:01 UTC >++++ examples/init-script.in >+@@ -39,6 +39,12 @@ export LC_ALL > # The socket used by mimedefang to communicate with sendmail > # SOCKET=$SPOOLDIR/mimedefang.sock > >@@ -13,7 +13,7 @@ > # Run the multiplexor and filters as this user, not root. RECOMMENDED > MX_USER=@DEFANGUSER@ > >-@@ -132,11 +138,11 @@ >+@@ -136,11 +142,11 @@ MX_MAXIMUM=10 > > # Limit slave processes' resident-set size to this many kilobytes. Default > # is unlimited. >@@ -27,7 +27,7 @@ > > # If you want to use the "notification" facility, set the appropriate port. > # See the mimedefang-notify man page for details. >-@@ -183,7 +189,7 @@ >+@@ -187,7 +193,7 @@ then > . /etc/rc.subr > > name=$prog >@@ -36,7 +36,7 @@ > # default to not enabled, enable in rc.conf > eval $rcvar=\${$rcvar:-NO} > >-@@ -193,6 +199,7 @@ >+@@ -197,6 +203,7 @@ then > procname=$PROGDIR/$prog-multiplexor > start_cmd="start_it" > stop_cmd="stop_it" >@@ -44,7 +44,7 @@ > sig_reload="INT" > reread_cmd="reread_it" > # provide both "reload", the FreeBSD default, with a direct signal to >-@@ -203,6 +210,8 @@ >+@@ -207,6 +214,8 @@ fi > # Make sure required vars are set > SOCKET=${SOCKET:=$SPOOLDIR/$prog.sock} > MX_SOCKET=${MX_SOCKET:=$SPOOLDIR/$prog-multiplexor.sock} >@@ -53,7 +53,7 @@ > > start_it() { > if test -r $PID ; then >-@@ -286,6 +295,29 @@ >+@@ -292,6 +301,29 @@ start_it() { > kill `cat $MXPID` > return 1 > fi >@@ -83,7 +83,7 @@ > return 0 > } > >-@@ -321,7 +353,7 @@ >+@@ -327,7 +359,7 @@ stop_it() { > rm -f $MX_SOCKET > /dev/null 2>&1 > rm -f $SOCKET > /dev/null 2>&1 > >@@ -92,7 +92,7 @@ > printf "Waiting for daemons to exit." > WAITPID="" > test -f $PID && WAITPID=`cat $PID` >-@@ -373,6 +405,12 @@ >+@@ -379,6 +411,12 @@ reread_it() { > fi > } > >diff -ruN /usr/home/timp/mimedefang.orig/files/patch-mimedefang-filter.5.in mimedefang/files/patch-mimedefang-filter.5.in >--- /usr/home/timp/mimedefang.orig/files/patch-mimedefang-filter.5.in 2015-10-09 16:47:51.228041000 +0300 >+++ mimedefang/files/patch-mimedefang-filter.5.in 2015-10-09 17:56:44.551615000 +0300 >@@ -1,6 +1,6 @@ >---- ./mimedefang-filter.5.in.orig 2010-02-24 16:19:43.000000000 +0100 >-+++ ./mimedefang-filter.5.in 2010-05-09 16:46:21.000000000 +0200 >-@@ -609,7 +609,7 @@ >+--- mimedefang-filter.5.in.orig 2014-05-21 13:51:21 UTC >++++ mimedefang-filter.5.in >+@@ -622,7 +622,7 @@ and entity_contains_virus_sophie unless > routine. > > .TP >diff -ruN /usr/home/timp/mimedefang.orig/files/patch-mimedefang.pl.in mimedefang/files/patch-mimedefang.pl.in >--- /usr/home/timp/mimedefang.orig/files/patch-mimedefang.pl.in 2015-10-09 16:47:51.228211000 +0300 >+++ mimedefang/files/patch-mimedefang.pl.in 2015-10-09 17:56:44.566804000 +0300 >@@ -1,9 +1,11 @@ >---- mimedefang.pl.in.orig 2011-02-18 22:08:53.000000000 +0300 >-+++ mimedefang.pl.in 2011-02-18 22:09:18.000000000 +0300 >-@@ -172,7 +172,7 @@ >+--- mimedefang.pl.in.orig 2014-05-21 13:50:26 UTC >++++ mimedefang.pl.in >+@@ -171,7 +171,7 @@ $FprotdHost = "127.0.0.1:10200"; > $Fprotd6Host = "127.0.0.1:10200"; > > $SophieSock = '@SPOOLDIR@/sophie'; > -$ClamdSock = '@SPOOLDIR@/clamd.sock'; > +$ClamdSock = '/var/run/clamav/clamd.sock'; > $TrophieSock = '@SPOOLDIR@/trophie'; >+ >+ #*********************************************************************** >diff -ruN /usr/home/timp/mimedefang.orig/pkg-install mimedefang/pkg-install >--- /usr/home/timp/mimedefang.orig/pkg-install 2015-10-09 16:47:51.228739000 +0300 >+++ mimedefang/pkg-install 1970-01-01 03:00:00.000000000 +0300 >@@ -1,36 +0,0 @@ >-#!/bin/sh >- >-[ $# != 2 ] && exit 1 >-[ -z "${PKG_PREFIX}" ] && exit 1 >-[ -n "${BATCH}" ] && exit 0 >- >-PKG_NAME=$1 >-PKG_ACTION=$2 >-MAILUSER=mailnull >-SPOOLDIR=/var/spool/MIMEDefang >-QUARANTINEDIR=/var/spool/MD-Quarantine >- >-case "$PKG_ACTION" in >-POST-INSTALL) >- if [ ! -d ${SPOOLDIR} ]; then >- mkdir -p ${SPOOLDIR} >- chown ${MAILUSER}:${MAILUSER} ${SPOOLDIR} >- chmod 710 ${SPOOLDIR} >- fi >- if [ ! -d ${QUARANTINEDIR} ]; then >- mkdir -p ${QUARANTINEDIR} >- chown ${MAILUSER}:${MAILUSER} ${QUARANTINEDIR} >- chmod 700 ${QUARANTINEDIR} >- fi >- ;; >- >-PRE-INSTALL|POST-DEINSTALL|DEINSTALL) >- ;; >- >-*) >-echo "usage: $0 <PKG_NAME> {PRE-INSTALL|POST-INSTALL|DEINSTALL|POST-DEINSTALL}" >&2 >- exit 1 >- ;; >-esac >- >-exit 0 >diff -ruN /usr/home/timp/mimedefang.orig/pkg-plist mimedefang/pkg-plist >--- /usr/home/timp/mimedefang.orig/pkg-plist 2015-10-09 16:47:51.228903000 +0300 >+++ mimedefang/pkg-plist 2015-10-09 18:00:57.911569000 +0300 >@@ -16,19 +16,9 @@ > man/man8/mimedefang.pl.8.gz > man/man8/watch-mimedefang.8.gz > man/man8/watch-multiple-mimedefangs.8.gz >-@unexec if cmp -s %D/%%ETCDIR%%/mimedefang-ip-key %D/%%ETCDIR%%/mimedefang-ip-key.example; then rm -f %D/%%ETCDIR%%/mimedefang-ip-key; fi >-%%ETCDIR%%/mimedefang-ip-key.example >-@exec [ -f %B/mimedefang-ip-key ] || cp -p %D/%F %B/mimedefang-ip-key >-@unexec if cmp -s %D/%%ETCDIR%%/mimedefang-filter %D/%%ETCDIR%%/mimedefang-filter.example; then rm -f %D/%%ETCDIR%%/mimedefang-filter; fi >-%%ETCDIR%%/mimedefang-filter.example >-@exec [ -f %B/mimedefang-filter ] || cp -p %D/%F %B/mimedefang-filter >-@unexec if cmp -s %D/%%ETCDIR%%/sa-mimedefang.cf %D/%%ETCDIR%%/sa-mimedefang.cf.example; then rm -f %D/%%ETCDIR%%/sa-mimedefang.cf; fi >-%%ETCDIR%%/sa-mimedefang.cf.example >-@exec [ -f %B/sa-mimedefang.cf ] || cp -p %D/%F %B/sa-mimedefang.cf >-@exec [ -d %%MIMEDEFANG_RUNDIR%% ] || mkdir -p %%MIMEDEFANG_RUNDIR%% >-@exec chgrp %%MAIL_USER%% %%MIMEDEFANG_RUNDIR%% >-@exec [ -d %%MIMEDEFANG_QUARANTINEDIR%% ] || mkdir -p %%MIMEDEFANG_QUARANTINEDIR%% >-@exec chgrp %%MAIL_USER%% %%MIMEDEFANG_QUARANTINEDIR%% >+@sample %%ETCDIR%%/mimedefang-ip-key.sample >+@sample %%ETCDIR%%/mimedefang-filter.sample >+@sample %%ETCDIR%%/sa-mimedefang.cf.sample > %%PORTDOCS%%%%DOCSDIR%%/README > %%PORTDOCS%%%%DOCSDIR%%/README.SPAMASSASSIN > %%PORTDOCS%%%%DOCSDIR%%/README.SOPHIE >@@ -40,9 +30,8 @@ > %%PORTEXAMPLES%%%%EXAMPLESDIR%%/README > %%PORTEXAMPLES%%%%EXAMPLESDIR%%/stream-by-domain-filter > %%PORTEXAMPLES%%%%EXAMPLESDIR%%/suggested-minimum-filter-for-windows-clients >-%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% >-%%PORTDOCS%%@dirrm %%DOCSDIR%% >-@dirrmtry %%ETCDIR%% >-@cwd /var/spool >-@dirrm MIMEDefang >-@dirrm MD-Quarantine >+@dir %%PORTEXAMPLES%%%%EXAMPLESDIR%% >+@dir %%PORTDOCS%%%%DOCSDIR%% >+@dir %%ETCDIR%% >+@dir(%%USER%%,%%GROUP%%,710) %%MIMEDEFANG_RUNDIR%% >+@dir(%%USER%%,%%GROUP%%,700) %%MIMEDEFANG_QUARANTINEDIR%%
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
koobs
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 203660
: 161856 |
162201