From housley@thehousleys.net  Thu Jul 13 12:11:44 2000
Return-Path: <housley@thehousleys.net>
Received: from thehousleys.net (frenchknot.ne.mediaone.net [24.147.224.201])
	by hub.freebsd.org (Postfix) with ESMTP id 35AE837C51E
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Jul 2000 12:11:42 -0700 (PDT)
	(envelope-from housley@thehousleys.net)
Received: from baby.int.thehousleys.net (baby.int.thehousleys.net. [192.168.0.24])
	by thehousleys.net (8.9.3/8.9.3) with ESMTP id PAA67830
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Jul 2000 15:11:39 -0400 (EDT)
	(envelope-from housley@thehousleys.net)
Received: (from housley@localhost)
	by baby.int.thehousleys.net (8.9.3/8.9.3) id PAA70731;
	Thu, 13 Jul 2000 15:11:39 -0400 (EDT)
	(envelope-from housley)
Message-Id: <200007131911.PAA70731@baby.int.thehousleys.net>
Date: Thu, 13 Jul 2000 15:11:39 -0400 (EDT)
From: jim@thehousleys.net
Sender: housley@thehousleys.net
Reply-To: jim@thehousleys.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: Allow building more then 1 SENDMAIL_CF
X-Send-Pr-Version: 3.2

>Number:         19897
>Category:       bin
>Synopsis:       Allow building more then 1 SENDMAIL_CF
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gshapiro
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 13 12:20:02 PDT 2000
>Closed-Date:    Tue Feb 27 18:57:58 PST 2001
>Last-Modified:  Tue Feb 27 18:58:12 PST 2001
>Originator:     James Housley
>Release:        FreeBSD 4.0-STABLE i386
>Organization:
The Housleys dot Net
>Environment:

	FreeBSD 4- and 5-

>Description:

	Currently SENDMAIL_CF specified a single file to be compiled
	and installed as sendmail.cf.  However if you do all building
	on a single machine for your network there might be a need for
	different sendmail.cf's.

	The attached patch adds ADDITIONAL_SENDMAIL_CF will multiple
	files maybe specified to be built.  None are installed, only
	the file specified by SENDMAIL_CF is installed.

>How-To-Repeat:

	

>Fix:

--- etc/sendmail/Makefile.orig	Thu Jul 13 15:02:16 2000
+++ etc/sendmail/Makefile	Thu Jul 13 15:01:46 2000
@@ -17,6 +17,12 @@
 
 ALL=	freebsd.cf
 
+# Additional SENDMAIL_CF's to be built, but NOT installed.  Only
+# SENDMAIL_CF is installed.
+.if defined(ADDITIONAL_SENDMAIL_CF)
+ALL+=	${ADDITIONAL_SENDMAIL_CF}
+.endif
+
 # Local sendmail.cf, may be set in /etc/make.conf.  Warning! If set, this
 # causes 'make install' to always copy it over /etc/mail/sendmail.cf!!!
 # Caveat emptor!  Be sure you want this before you enable it.


>Release-Note:
>Audit-Trail:

From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To: jim@thehousleys.net
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: bin/19897: Allow building more then 1 SENDMAIL_CF
Date: Thu, 13 Jul 2000 16:03:45 -0400 (EDT)

 <<On Thu, 13 Jul 2000 15:11:39 -0400 (EDT), jim@thehousleys.net said:
 
 > 	The attached patch adds ADDITIONAL_SENDMAIL_CF will multiple
 > 	files maybe specified to be built.  None are installed, only
 > 	the file specified by SENDMAIL_CF is installed.
 
 Here is how we do something similar:
 
 RCS file: /home/ncvs/src/etc/sendmail/Makefile,v
 retrieving revision 1.1.2.1
 diff -u -r1.1.2.1 Makefile
 --- Makefile    1999/08/29 14:20:01     1.1.2.1
 +++ Makefile    2000/01/08 18:07:34
 @@ -15,25 +15,22 @@
             $(M4) -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET}
         $(CHMOD) $(ROMODE) ${.TARGET}
  
 -ALL=   freebsd.cf
 +ALL=   freebsd.cf mintaka.cf ossipee.cf lampang.cf
  
 -# Local sendmail.cf, may be set in /etc/make.conf.  Warning! If set, this
 -# causes 'make install' to always copy it over /etc/sendmail.cf!!!
 -# Caveat emptor!  Be sure you want this before you enable it.
 -.if defined(SENDMAIL_CF)
 -ALL+=  ${SENDMAIL_CF}
 -.endif
 -
  CLEANFILES+=$(ALL)
  
  all: $(ALL)
  
  depend:
  
 +# Local sendmail.cf, may be set in /etc/make.conf.  Warning! If set, this
 +# causes 'make install' to always copy it over /etc/sendmail.cf!!!
 +# Caveat emptor!  Be sure you want this before you enable it.
  install:
 +       ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${ALL} \
 +               ${DESTDIR}/etc/mail
  .if defined(SENDMAIL_CF)
 -       ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${SENDMAIL_CF} \
 -               ${DESTDIR}/etc/sendmail.cf
 +       ln -f ${DESTDIR}/etc/mail/${SENDMAIL_CF} /etc/sendmail.cf
  .endif
  
  # Helper for src/etc/Makefile
 
 If I were doing this again, I would probably do it like this:
 
 .if defined(SENDMAIL_CF)
 	set ${SENDMAIL_CF}; ln -f ${DESTDIR}/etc/mail/$1 /etc/sendmail.cf
 .endif
 
 In our application, we want all of the cf files to be installed; we
 define the role of a particular machine by linking the ``official''
 configuration file names to the machine-specific versions.
 
 -GAWollman
 
 
Responsible-Changed-From-To: freebsd-bugs->gshapiro 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Fri Jul 14 07:10:55 PDT 2000 
Responsible-Changed-Why:  
Haha!  We have a new sendmail maintainer! :-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19897 
State-Changed-From-To: open->feedback 
State-Changed-By: gshapiro 
State-Changed-When: Wed Feb 21 21:39:50 PST 2001 
State-Changed-Why:  
I've checked in changes to the HEAD such that allows you to build any 
number of .cf files from .mc files in /etc/mail/.  Unless I hear otherwise, 
I'll close this PR in the near future. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19897 
State-Changed-From-To: feedback->closed 
State-Changed-By: gshapiro 
State-Changed-When: Tue Feb 27 18:57:58 PST 2001 
State-Changed-Why:  
The changes are now also in RELENG_4 (-STABLE). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19897 
>Unformatted:
