Bug 13016

Summary: Wrong sendmail.cf file used by mergemaster
Product: Base System Reporter: Scot W. Hetzel <hetzels>
Component: confAssignee: Gregory Neil Shapiro <gshapiro>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
file.diff
none
file.diff none

Description Scot W. Hetzel 1999-08-08 01:30:01 UTC
When using MergeMaster to update your /etc directory, it does a comparison
between the /var/tmp/temproot/etc/sendmail.cf(freebsd.cf) file and the
current /etc/sendmail.cf file.  If the current sendmail.cf file was created
by a different custom.mc file, then the comparison is useless. As
we are more concerned with what has changed between our custom.cf file,
and not with what has changed between the custom.cf and freebsd.cf files.

The included patches solve this problem by defining SENDMAIL_CF?=freebsd.cf
in the etc/sendmail/Makefile, which can then be re-defined in the make.conf
file.

Also, added RELEASE_CF?=freebsd.cf to the release/Makefile, so that RELEASE
builds will still use freebsd.cf instead of ${SENDMAIL_CF}.  This can be set
in make.conf to specify a different *.cf file to use instead.

Fix: Apply these 3 patches to  etc/Makefile, etc/sendmail/Makefile and
release/Makefile:
How-To-Repeat: 
1. Create a custom *.mc file
2. add SENDMAIL_CF=<[custom_mc_name].cf> to make.conf
3. create the *.cf file ( cd /usr/src/etc/sendmail ; make install)
4. execute MergeMaster

MergeMaster will show the difference between your custom.cf file and the
freebsd.cf file.
Comment 1 Doug 1999-08-08 09:04:20 UTC
"Scot W. Hetzel" wrote:

> When using MergeMaster to update your /etc directory, it does a comparison
> between the /var/tmp/temproot/etc/sendmail.cf(freebsd.cf) file and the
> current /etc/sendmail.cf file. 

	As I stated in my response to PR 12664 this is exactly what mergemaster is
designed to do, therefore, your synopsis is incorrect. Please refer to that
PR for several suggestions on ways to deal with this situation. 

Good luck,

Doug
Comment 2 Scot W. Hetzel 1999-08-10 02:08:02 UTC
From: Doug <Doug@gorean.org>
> "Scot W. Hetzel" wrote:
>
> > When using MergeMaster to update your /etc directory, it does a
comparison
> > between the /var/tmp/temproot/etc/sendmail.cf(freebsd.cf) file and the
> > current /etc/sendmail.cf file.
>
> As I stated in my response to PR 12664 this is exactly what mergemaster is
> designed to do, therefore, your synopsis is incorrect. Please refer to
that
> PR for several suggestions on ways to deal with this situation.
>
I agree that this problem has nothing to do with the way mergemaster is
designed to show how your installation differs from a default installation.
(That's why I sent it to conf instead of ports).

  Instead it has to do with the way in which etc/sendmail/Makefile creates
the sendmail.cf file in the ${DESTDIR}/etc directory.  This PR probably
should have been called "Fix to sendmail.cf generation problem".

Your suggestion in PR 12664, does not solve this problem.

1. Delete sendmail.cf generation from etc/Makefile after updating sources
and before using mergemaster.

This will need to be done each time the sources are updated, and before
mergemaster is used.  This is a waste of time, especially if the
etc/sendmail/Makefile can be designed to create the correct sendmail.cf file
when the SENDMAIL_CF variable is set in make.conf.

2. After mergemaster makes the comparison between sendmail.cf files, just
delete /var/tmp/tmproot/etc/sendmail.cf when asked.

Before you are able to delete the sendmail.cf file from within mergemaster,
you need to go through several screens of sendmail.cf comparisons before you
are able to delete the sendmail.cf file in mergemaster.  This comparison is
also useless when the system is using a custom sendmail.cf file.

These two solutions do not fix the problem with the sendmail.cf and causes
an inconvenience when using mergemaster to upgrade /etc from sources.

The original patches, included with this PR,  solves the problem by using
SENDMAIL_CF as follows:

1. If SENDMAIL_CF is not defined in /etc/make.conf, then we default to using
"freebsd.mc" to create the sendmail.cf file in ${DESTDIR}/etc.

2. If SENDMAIL_CF is defined in /etc/make.conf, then we use the custom *.mc
file to create the sendmail.cf file in ${DESTDIR}/etc.  This will also
satisfy the complaints of mergemaster using the wrong sendmail.cf file in
its comparisons.

3. If were making a RELEASE and SENDMAIL_CF might be defined in make.conf,
we ignore it, and instead use "freebsd.mc" to create the sendmail.cf file
(SENDMAIL_CF gets set to ${RELEASE_CF} (RELEASE_CF=?freebsd.cf) in
release/Makefile).

And possibly a bonus:

4. If RELEASE_CF is defined in /etc/make.conf, then we use the custom *.mc
file to create a custom sendmail.cf file for our personal release build.

Scot

P.S. This PR should instead be forwarded to the maintainers of the
etc/sendmail/Makefile in STABLE & CURRENT as that is where the problem is
located. And not to the maintainer of the Mergemaster port.
Comment 3 Doug 1999-08-10 16:37:46 UTC
"Scot W. Hetzel" wrote:

> I agree that this problem has nothing to do with the way mergemaster is
> designed to show how your installation differs from a default installation.

	Ok, then next time don't mention it at all. It's not part of the base
system, so it doesn't belong in a PR. 

>   Instead it has to do with the way in which etc/sendmail/Makefile creates
> the sendmail.cf file in the ${DESTDIR}/etc directory.  This PR probably
> should have been called "Fix to sendmail.cf generation problem".

	But there is no problem. You want to use a custom sendmail.cf file, go
right ahead. That doesn't make the way the system works currently a
"problem." It makes it inconvenient for you, an inconvenience that is
easily dealt with.
 
> Your suggestion in PR 12664, does not solve this problem.
> 
> 1. Delete sendmail.cf generation from etc/Makefile after updating sources
> and before using mergemaster.
> 
> This will need to be done each time the sources are updated,

	What I do for stuff like this is to 'cp Makefile makefile' then run a
script before I do a make world which checks the cvs id's for all the
makefiles I've customized to see if they have been updated. They hardly
ever need to be. 

> 2. After mergemaster makes the comparison between sendmail.cf files, just
> delete /var/tmp/tmproot/etc/sendmail.cf when asked.
> 
> Before you are able to delete the sendmail.cf file from within mergemaster,
> you need to go through several screens of sendmail.cf comparisons before you
> are able to delete the sendmail.cf file in mergemaster.  This comparison is
> also useless when the system is using a custom sendmail.cf file.

	Oh please. Learn how to use your PAGER. On more and less all you have to
do is hit q.

	Personally I have no objections to the patches you are suggesting,
providing that they actually work, do what you want them to do, etc.
However I think that you're going way around the point with your arguments.
My grandfather would say that you are using a five dollar solution for a
twenty cent problem. I would tend to agree with him.

Good luck,

Doug
Comment 4 Johan Karlsson freebsd_committer freebsd_triage 2000-09-19 19:32:42 UTC
Responsible Changed
From-To: freebsd-bugs->gshapiro

This is actually a sendmail config patch and we let 
out sendmail maintainer have a look at it.
Comment 5 Gregory Neil Shapiro freebsd_committer freebsd_triage 2001-02-22 05:31:47 UTC
State Changed
From-To: open->feedback

I've checked in changes to the HEAD such that mergemaster should get the 
proper sendmail.cf.  Unless I hear otherwise, I'll close this PR in the near 
future.
Comment 6 Gregory Neil Shapiro freebsd_committer freebsd_triage 2001-02-28 02:56:46 UTC
State Changed
From-To: feedback->closed

The changes are now also in RELENG_4 (-STABLE).