Re: sendmail.cf.rpmnew, but no sendmail.mc.rpmnew?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Steven Stromer wrote:
>
>> I'm not sure there's an issue here.
>>
>> The .mc file gets processed by m4 and pulls in a bunch of m4 "source"
>> files that then cause a new generated .cf file to be created.
>>
>> Since people rarely modify the .m4 files, these get transparently
>> updated with no generated .rpmnew files.
>>     
>
> Agreed, so far.
>   

I should have added that the .m4 files do have a not-insignificant
amount of churn from one release to the next, however.


>   
>> The resultant .cf file, however, may clash with edits you've made.
>>
>> Unless you've not made edits, in which case, "yes", the original .cf
>> file should have been replaced with the new .cf file.  Is this not
>> happening?
>>     
>
> My .cf file was not replaced by the new .cf file; thus, the birth of 
> this thread. It would seem to me the 'clash' you describe is not only 
> inevitable, but desirable, due to the fact that my .cf file, by 
> definition, contains the mail settings I entered via my .mc file.
>   

Ah, so you did edit your .mc file.  I missed that originally.

>   
>> If your .mc file hadn't been modified and neither had your .cf file,
>> then running "make sendmail.cf" will cause your sendmail.cf to be
>> regenerated... and agree with your sendmail.mc file, which should always
>> be the case anyway.
>>     
>
> I fully understand and agree that the two files should 'agree', but I 
> don't see how this clarifies or explains the fact that I see minor, but 
> certainly differing, lines in the .rpmnew file that do not appear in the 
> .cf file that is presently generated when I regenerate the file.
>
> Maybe the real question here should be where the differences I see 
> really stem from. It just seems logical to me that if a .cf file is 
> being included with a package update, it must be that it contains 
> elements that no other files can provide to it during a regeneration.
>   

The .m4 files might be identical, but the .m4 files in
/usr/share/sendmail-cf/m4/ that get included by sendmail.mc and
submit.mc might changed significantly, causing the resultant .cf files
to also be different.

Example:

% head /etc/mail/sendmail.mc
...
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
...

that, in turn, sets up definitions for other files that get pulled in
(like OSTYPE(), etc).



> However, maybe this is where I am off base! Does the .cf file get 
> completely written from scratch by other files during its regeneration, 
> or is it simply edited during this process? If it is entirely dependent 
> on outside 'sources' for the entirely of its content, with every line 
> being entirely system-specific, then why include it with a package 
> update at all, instead of just letting the end user generate his or her 
> own .cf file?
>   

It is completely clobbered.  From my /etc/mail/Makefile:

%.cf: %.mc
        @if test -f /usr/share/sendmail-cf/m4/cf.m4; then \
                umask 022; \
                [ -e $@ ] && mv -f $@ $@.bak; \
                m4 $< > $@; \
        else \
                echo -e "WARNING: '$<' is modified. Please install package sendmail-cf to update your configuration."; \
        fi


m4 then processes the "include(...)" above and starts pulling in file
content and macro definitions.


> As I write, I am beginning to believe that my confusion steps from this 
> single factor! Why include a .cf file in the package update, at all, if 
> the .cf file is supposed to reflect the system it is located on?
>   

Because not everyone wants to have the contents of
/usr/share/sendmail-cf/ on their system.

Still other people are foolish enough to edit their sendmail.cf by hand.

> Suddenly, I begin to feel the clouds part, I contemplate the simplicity 
> of 'rm /etc/mail/sendmail.cf.rpmnew', and a smile forms on my face...
>
> Can anyone confirm that I am finally seeing the light?
>   

Amen and hallelujah.

-Philip


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux