bin/51442: Wrong installed in DESTDIR

Scot W. Hetzel hetzels at
Sat Apr 26 08:10:08 PDT 2003

>Number:         51442
>Category:       bin
>Synopsis:       Wrong installed in DESTDIR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 26 08:10:06 PDT 2003
>Originator:     Scot W. Hetzel
>Release:        FreeBSD 4.8-STABLE i386
West Bend Internet
System: FreeBSD 4.8-STABLE FreeBSD 4.8-STABLE #2: Tue Apr 22 02:28:52 CDT 2003 root at i386

	Running 'mergemaster -D /some/dest/directory' causes mergemaster to install
	wrong in DESTDIR. It installs the created for the
	host system, and not the one need in DESTDIR.

	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 gets installed into DESTDIR.

	The below patch adds a warning that the installed in
	DESTDIR may not be the desired

	I also fixed newaliases, so that it will create the aliases database
	in the DESTDIR.

Index: usr.sbin/mergemaster/
RCS file: /home/ncvs/src/usr.sbin/mergemaster/,v
retrieving revision 1.43
diff -u -r1.43
--- usr.sbin/mergemaster/	5 Mar 2003 12:42:08 -0000	1.43
+++ usr.sbin/mergemaster/	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/
+      ;;
     *)  # Part of AUTO_INSTALL
@@ -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  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'
     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 @@
+if [ -n "${DESTDIR}" ]; then
+  case "${NEED_SENDMAIL_CF}" in
+  '') ;;
+  *)
+    echo ''
+    echo "*** You installed a new 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
 case "${NEED_CAP_MKDB}" in
 '') ;;

More information about the freebsd-bugs mailing list