ports/66927: [PATCH] mail/dcc-dccd has several problems

Oleg Sharoiko os at rsu.ru
Thu May 20 08:00:58 UTC 2004


>Number:         66927
>Category:       ports
>Synopsis:       [PATCH] mail/dcc-dccd has several problems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 20 01:00:47 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Oleg Sharoiko
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Computer Center of Rostov State University
>Environment:
System: FreeBSD brain.cc.rsu.ru 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue May 18 18:15:48 MSD 2004 os at brain.cc.rsu.ru:/usr/obj/usr/src/sys/brain.athlon-xp.HEAD.2004-01-30 i386


	
>Description:
	mail/dcc-dccd has two problems:

	1. dccifd doesn't relate to sendmail so it should be controlled
	by seprate option in Makefile

	2. milter header/library is not detected when sendmail is
	installed from ports

	In addition I wold request for new feature: ability to specify
	userid for setuid binaries installed by port.

	The attached patch solves the problems and adds DCCUSER

>How-To-Repeat:
	Install base system without sendmail.
	Build and install sendmail from ports
	Try to install mail/dcc-dccd port
>Fix:
	
	Apply the patch and put the file (attached bellow)
	as files/patch-configure

	Patch:

diff -Nur --exclude=CVS dcc-dccd/Makefile /tmp/dcc-dccd/Makefile
--- dcc-dccd/Makefile	Thu May 20 11:24:56 2004
+++ /tmp/dcc-dccd/Makefile	Thu May 20 11:19:52 2004
@@ -22,15 +22,64 @@
 MANCOMPRESSED=	yes
 MAN8=		cdcc.8 dbclean.8 dblist.8 dcc.8 dccd.8 dccifd.8 dccm.8 \
 		dccproc.8 dccsight.8
+#
+# User for dcc files and SUID binaries
+#
+DCCUSER?=	root
 
-.if exists(/usr/lib/libmilter.a) || exists(${LOCALBASE}/lib/libmilter.a)
-PLIST_SUB+=	WITH_SENDMAIL=""
+#
+# You can choose the sendmail to be used by specifying
+#
+# WITH_SENDMAIL_BASE=yes
+#  or
+# WITH_SENDMAIL_PORT=yes
+#
+
+# if no preference was set, check for an up to date base version
+# but give an installed port preference over it.
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITH_SENDMAIL_BASE) && \
+    !defined(WITH_SENDMAIL_PORT) && \
+    !exists(${LOCALBASE}/lib/libmilter.a)
+WITH_SENDMAIL_BASE=yes
+.endif
+
+.if defined(WITH_SENDMAIL_BASE)
+.if exists(/usr/lib/libmilter.a)
+MILTERBASE=     /usr
+WITH_SENDMAIL=yes
+.else
+BROKEN= "Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_P
+ORT=yes"
+.endif
 .else
-CONFIGURE_ARGS+=	--disable-dccm --disable-dccifd
-PLIST_SUB+=	WITH_SENDMAIL="@comment "
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
+MILTERBASE?=    ${LOCALBASE}
+WITH_SENDMAIL=yes
 .endif
 
-.include <bsd.port.pre.mk>
+.if !defined(WITHOUT_SENDMAIL) && defined(WITH_SENDMAIL)
+MILTERINC=      ${MILTERBASE}/include
+MILTERLIB=      ${MILTERBASE}/lib
+
+CPPFLAGS+=      -I${MILTERINC}
+LDFLAGS+=       -L${MILTERLIB}
+
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CONFIGURE_ARGS+= --with-sendmail=${MILTERBASE}
+.else
+CONFIGURE_ARGS+= --disable-dccm
+.endif
+
+.if defined(WITHOUT_DCCIFD)
+CONFIGURE_ARGS+= --disable-dccifd
+.else
+WITH_DCCIFD=yes
+.endif
+
+CONFIGURE_ARGS+= --with-uid=${DCCUSER}
 
 post-patch:
 	${FIND} ${WRKSRC} -type f -exec \
diff -Nur --exclude=CVS dcc-dccd/pkg-plist /tmp/dcc-dccd/pkg-plist
--- dcc-dccd/pkg-plist	Thu May 20 11:24:56 2004
+++ /tmp/dcc-dccd/pkg-plist	Thu May 20 11:19:52 2004
@@ -14,7 +14,7 @@
 dcc/grey_whitelist
 dcc/ids
 dcc/libexec/cron-dccd
-%%WITH_SENDMAIL%%dcc/libexec/dccifd
+%%WITH_DCCIFD%%dcc/libexec/dccifd
 %%WITH_SENDMAIL%%dcc/libexec/dccm
 dcc/libexec/dbclean
 dcc/libexec/dblist

	files/patch-configure:


--- configure.000	Thu Apr 22 20:44:48 2004
+++ configure	Thu May 20 10:42:19 2004
@@ -2238,6 +2238,15 @@
     SENDMAIL_EVAL="$SENDMAIL"
     with_sendmail=yes
 fi
+# 
+if test -n "$SENDMAIL"; then
+    if test -f $SENDMAIL/include/libmilter/mfapi.h -a -f $SENDMAIL/lib/libmilter.a; then
+        SENDMAIL_OBJ=$SENDMAIL/lib
+        SENDMAIL_OBJ_EVAL=$SENDMAIL_OBJ
+        SENDMAIL_LIB=$SENDMAIL_OBJ/libmilter.a
+    fi
+fi
+#
 if test -z "$SENDMAIL"; then
     # prefer a parallel ../sendmail directory
     DEPTH=.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list