bin/51442: Wrong sendmail.cf installed in DESTDIR
Scot W. Hetzel
hetzels at westbend.net
Sat Apr 26 08:10:08 PDT 2003
>Number: 51442
>Category: bin
>Synopsis: Wrong sendmail.cf installed in DESTDIR
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Apr 26 08:10:06 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Scot W. Hetzel
>Release: FreeBSD 4.8-STABLE i386
>Organization:
West Bend Internet
>Environment:
System: FreeBSD WBIw009.westbend.net 4.8-STABLE FreeBSD 4.8-STABLE #2: Tue Apr 22 02:28:52 CDT 2003 root at WBIw009.westbend.net:/usr/obj/usr/src/4x/sys/GENERIC-SMP i386
>Description:
Running 'mergemaster -D /some/dest/directory' causes mergemaster to install
wrong sendmail.cf in DESTDIR. It installs the sendmail.cf created for the
host system, and not the one need in DESTDIR.
>How-To-Repeat:
Create a new installation into DESTDIR on the host system, then create
a *.mc file for DESTDIR. As well as set DESTDIR/etc/make.conf to use
the created *.mc file (SENDMAIL_MC). On the host system, create a *.mc
file with different settings, and set SENDMAIL_MC in /etc/make.conf.
Now run:
mergemaster -D DESTDIR.
The wrong sendmail.cf gets installed into DESTDIR.
>Fix:
The below patch adds a warning that the installed sendmail.cf in
DESTDIR may not be the desired sendmail.cf.
I also fixed newaliases, so that it will create the aliases database
in the DESTDIR.
Index: usr.sbin/mergemaster/mergemaster.sh
===================================================================
RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v
retrieving revision 1.43
diff -u -r1.43 mergemaster.sh
--- usr.sbin/mergemaster/mergemaster.sh 5 Mar 2003 12:42:08 -0000 1.43
+++ usr.sbin/mergemaster/mergemaster.sh 5 Mar 2003 19:22:07 -0000
@@ -698,6 +698,9 @@
echo -n " How should I handle ${COMPFILE}? [Leave it to install later] "
read HANDLE_LINK
;;
+ /etc/mail/sendmail.cf)
+ NEED_SENDMAIL_CF=yes
+ ;;
*) # Part of AUTO_INSTALL
HANDLE_LINK=l
;;
@@ -936,10 +939,10 @@
*)
echo ''
if [ -n "${DESTDIR}" ]; then
- echo "*** You installed a new aliases file into ${DESTDIR}/etc/mail, but"
- echo " the newaliases command is limited to the directories configured"
- echo " in sendmail.cf. Make sure to create your aliases database by"
- echo " hand when your sendmail configuration is done."
+ echo "*** You installed a new aliases file into ${DESTDIR}/etc/mail, so"
+ echo " make sure that you run '/usr/bin/newaliases' to rebuild your"
+ echo " aliases database"
+ run_it_now '/usr/sbin/chroot ${DESTDIR} /usr/bin/newaliases'
else
echo "*** You installed a new aliases file, so make sure that you run"
echo " '/usr/bin/newaliases' to rebuild your aliases database"
@@ -947,6 +950,18 @@
fi
;;
esac
+
+if [ -n "${DESTDIR}" ]; then
+ case "${NEED_SENDMAIL_CF}" in
+ '') ;;
+ *)
+ echo ''
+ echo "*** You installed a new sendmail.cf file into ${DESTDIR}/etc/mail,"
+ echo " this file was created using the *.mc file found on the host system."
+ echo " This *.mc file may not match the *.mc file needed in ${DESTDIR}."
+ ;;
+ esac
+fi
case "${NEED_CAP_MKDB}" in
'') ;;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list