>Number:         178215
>Category:       conf
>Synopsis:       [PATCH] remove mail/sendmail bits if 
>MK_MAIL/MK_MAILWRAPPER/MK_SENDMAIL == no
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 28 08:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        10-CURRENT
>Organization:
EMC Isilon
>Environment:
FreeBSD fuji-current.local 10.0-CURRENT FreeBSD 10.0-CURRENT #0 
r+6a3d3f6-dirty: Sat Apr 27 16:03:39 PDT 2013     
[email protected]:/usr/obj/usr/src/sys/FUJI  i386
>Description:
The attached patch doesn't install mail files in /etc and removes said files if 
MK_MAILWRAPPER/MK_SENDMAIL are set to no.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

>From ce6cdab4536c6c81267f3d52f53deeb5633a873f Mon Sep 17 00:00:00 2001
From: Garrett Cooper <[email protected]>
Date: Sun, 28 Apr 2013 01:28:22 -0700
Subject: [PATCH] Remove mail-related items if MK_MAILWRAPPER/MK_SENDMAIL are
 set to no

Also, sort items in etc/rc.d/Makefile

Signed-off-by: Garrett Cooper <[email protected]>
---
 etc/Makefile                             |  5 ++++-
 etc/rc.d/Makefile                        | 24 ++++++++++++++++--------
 tools/build/mk/OptionalObsoleteFiles.inc | 18 ++++++++++++++++++
 3 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/etc/Makefile b/etc/Makefile
index 3a10b02..cd632fb 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -38,7 +38,6 @@ BIN1= crontab \
        rc.bsdextended \
        rc.firewall \
        rc.initdiskless \
-       rc.sendmail \
        rc.shutdown \
        rc.subr \
        remote \
@@ -122,6 +121,10 @@ BIN1+= portsnap.conf
 BIN1+= pf.os
 .endif
 
+.if ${MK_SENDMAIL} != "no"
+BIN1+= rc.sendmail
+.endif
+
 .if ${MK_TCSH} != "no"
 BIN1+= csh.cshrc csh.login csh.logout
 .endif
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index aace4b1..c088160 100644
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -104,7 +104,7 @@ FILES=      DAEMON \
        ntpd \
        ntpdate \
        ${_opensm} \
-       othermta \
+       ${_othermta} \
        pf \
        pflog \
        pfsync \
@@ -131,7 +131,7 @@ FILES=      DAEMON \
        savecore \
        sdpd \
        securelevel \
-       sendmail \
+       ${_sendmail} \
        serial \
        sppp \
        ${_sshd} \
@@ -161,10 +161,22 @@ FILES=    DAEMON \
        zfs \
        zvol
 
+.if ${MK_BLUETOOTH} != "no"
+_ubthidhci=    ubthidhci
+.endif
+
 .if ${MK_IPX} != "no"
 _ipxrouted=    ipxrouted
 .endif
 
+.if ${MK_MAILWRAPPER} != "no"
+_othermta=     othermta
+.endif
+
+.if ${MK_NS_CACHING} != "no"
+_nscd=         nscd
+.endif
+
 .if ${MK_OFED} != "no"
 _opensm=       opensm
 .endif
@@ -173,12 +185,8 @@ _opensm=   opensm
 _sshd=         sshd
 .endif
 
-.if ${MK_NS_CACHING} != "no"
-_nscd=         nscd
-.endif
-
-.if ${MK_BLUETOOTH} != "no"
-_ubthidhci=    ubthidhci
+.if ${MK_SENDMAIL} != "no"
+_sendmail=     sendmail
 .endif
 
 .if ${MK_UTMPX} != "no"
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc 
b/tools/build/mk/OptionalObsoleteFiles.inc
index 2ef7a3b..5515386 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -3581,7 +3581,23 @@ OLD_FILES+=usr/share/misc/mail.tildehelp
 .endif
 
 .if ${MK_MAILWRAPPER} == no
+OLD_DIRS+=etc/mail
+OLD_FILES+=etc/mail/access.sample
+OLD_FILES+=etc/mail/aliases
+OLD_FILES+=etc/mail/aliases.db
+OLD_FILES+=etc/mail/freebsd.mc
+OLD_FILES+=etc/mail/freebsd.cf
+OLD_FILES+=etc/mail/freebsd.submit.mc
+OLD_FILES+=etc/mail/freebsd.submit.cf
+OLD_FILES+=etc/mail/helpfile
 OLD_FILES+=etc/mail/mailer.conf
+OLD_FILES+=etc/mail/mailertable.sample
+OLD_FILES+=etc/mail/sendmail.cf
+OLD_FILES+=etc/mail/submit.cf
+OLD_FILES+=etc/mail/virtusertable.sample
+OLD_FILES+=etc/mail/Makefile
+OLD_FILES+=etc/mail/README
+OLD_FILES+=etc/rc.d/othermta
 OLD_FILES+=usr/sbin/mailwrapper
 OLD_FILES+=usr/share/man/man8/mailwrapper.8.gz
 .endif
@@ -4050,6 +4066,8 @@ OLD_FILES+=etc/periodic/daily/210.backup-aliases
 OLD_FILES+=etc/periodic/daily/440.status-mailq
 OLD_FILES+=etc/periodic/daily/460.status-mail-rejects
 OLD_FILES+=etc/periodic/daily/500.queuerun
+OLD_FILES+=etc/rc.d/sendmail
+OLD_FILES+=etc/rc.sendmail
 .if ${MK_MAILWRAPPER} == no
 OLD_FILES+=bin/rmail
 .endif
-- 
1.8.2



>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to