Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jan 2005 13:56:43 +0300 (MSK)
From:      Oleg Sharoiko <os@rsu.ru>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        ports@freebsd.org
Subject:   [patch] mail/sendmail doesn't build when base system has no NIS
Message-ID:  <200501041056.j04AuhPD062888@brain.cc.rsu.ru>

next in thread | raw e-mail | index | archive | help

>Submitter-Id:	current-users
>Originator:	Oleg Sharoiko
>Organization:	Computer Center of Rostov State University
>Confidential:	no 
>Synopsis:	[patch] mail/sendmail doesn't build when base system has no NIS
>Severity:	serious
>Priority:	medium
>Category:	ports
>Class:		sw-bug
>Release:	FreeBSD 5.3-STABLE i386
>Environment:
System: FreeBSD wolf.os.rsu.ru 5.3-STABLE FreeBSD 5.3-STABLE #0: Sat Jan 1 21:36:31 MSK 2005 os@wolf.os.rsu.ru:/usr/obj/usr/src/sys/wolf.os.i686.RELENG_5.2005-01-01 i386


	
>Description:
	Base system can now be built without NIS (NO_NIS in make.conf) but mail/sendmail assumes NIS always present. When base system has no NIS sendmail fails to build.

>How-To-Repeat:
	Compile base system with NO_NIS
	Try to build mail/sendmail

>Fix:
	Here is a simple patch, which adds SENDMAIL_WITHOUT_NIS knob. It lacks auto-detection of NIS absence - I don't know how to implement it. But this patch should be sufficient to fix sendmail build when base system has no NIS.

	The proposed patch replaces `-DNEWDB -DNIS -DMAP_REGEX' with `-DNEWDB -DMAP_REGEX'. Maybe it should be broader like s/-DNIS// but I prefer more conservative approach as there are less chances it will break anything. On the other hand there are chances that broader patch will work even when options are changed.

diff -u -r sendmail.orig/Makefile sendmail/Makefile
--- sendmail.orig/Makefile	Tue Jan  4 13:00:02 2005
+++ sendmail/Makefile	Tue Jan  4 13:21:25 2005
@@ -39,6 +39,7 @@
 # Options to define Features:
 # SENDMAIL_WITHOUT_IPV6=yes
 # SENDMAIL_WITHOUT_MILTER=yes
+# SENDMAIL_WITHOUT_NIS=yes
 # SENDMAIL_WITHOUT_SHMEM=yes
 # SENDMAIL_WITH_TLS=yes
 # SENDMAIL_WITH_SMTPS=yes
@@ -273,10 +274,16 @@
 	@${ECHO_CMD} "DEPENDENCY NOTE: SENDMAIL_WITH_SOCKETMAP will be enabled to support SENDMAIL_WITH_CYRUSLOOKUP"
 .endif
 
+SED_SCRIPT=	-e "s;\`-pthread\';\`${PTHREAD_LIBS}\';" \
+		-e "s;\`-O\';\`${CFLAGS}\';"
+
+.if defined(SENDMAIL_WITHOUT_NIS)
+SED_SCRIPT+=	-e "s;\`-DNEWDB -DNIS -DMAP_REGEX\';\`-DNEWDB -DMAP_REGEX\';"
+.endif
+
 do-configure:
 	@${MV} ${WRKSRC}/devtools/OS/FreeBSD ${WRKSRC}/devtools/OS/FreeBSD.sed
-	${SED} -e "s;\`-pthread\';\`${PTHREAD_LIBS}\';" \
-		-e "s;\`-O\';\`${CFLAGS}\';" \
+	${SED} ${SED_SCRIPT} \
 		${WRKSRC}/devtools/OS/FreeBSD.sed \
 		> ${WRKSRC}/devtools/OS/FreeBSD
 	${SED} -e "s=%%PREFIX%%=${PREFIX}=g" \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501041056.j04AuhPD062888>