Bug 1219178

Summary: makemap support in alternatives
Product: [Fedora] Fedora Reporter: Denis Fateyev <denis>
Component: sendmailAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: jskarvad
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sendmail-8.14.9-6.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1225888 1225891 (view as bug list) Environment:
Last Closed: 2015-05-27 20:57:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1225888, 1225891    

Description Denis Fateyev 2015-05-06 18:50:40 UTC
Description of problem:
Sendmail doesn't use alternatives mechanism for "makemap" and its man file. There are other maildaemons (e.g., opensmtpd) which already consider that other mailers could have their own implementations of such utilities. It's expected that sendmail would do the same.

Version-Release number of selected component (if applicable):
Current version in rawhide

How reproducible:
Always

Steps to Reproduce:
1. Install sendmail and opensmtpd
2. Switch current mta to opensmtpd and back to sendmail using alternatives:
     /usr/sbin/alternatives --set mta /usr/sbin/sendmail.opensmtpd
     /usr/sbin/alternatives --set mta /usr/sbin/sendmail.sendmail

Actual results:
Unlike other components, every time "makemap" points to the sendmail version.

Expected results:
Symbolic link to "makemap" and man-page should be adjusted accordingly.

Additional info:
Can be solved with adding some alternative-specific lines into spec.
E.g., the appropriate opensmtpd lines are:

 --slave %{_sbindir}/makemap mta-makemap %{_sbindir}/makemap.opensmtpd \
 --slave %{_mandir}/man1/makemap.1.gz mta-makemapman %{_mandir}/man8/makemap.opensmtpd.8.gz

Comment 1 Jaroslav Škarvada 2015-05-27 20:54:29 UTC
I used alternatives as you proposed. I also had to use the following hack:

%pre
[ -h %{_sbindir}/makemap ] || rm -f %{_sbindir}/makemap || :
[ -h %{_mandir}/man8/makemap.8.gz ] || rm -f %{_mandir}/man8/makemap.8.gz || :

Otherwise it is not possible to convert to alternatives by simply upgrading.

Comment 2 Fedora Update System 2015-05-28 10:37:03 UTC
sendmail-8.15.1-5.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/sendmail-8.15.1-5.fc22

Comment 3 Fedora Update System 2015-05-28 10:37:24 UTC
sendmail-8.14.9-6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/sendmail-8.14.9-6.fc21

Comment 4 Fedora Update System 2015-06-18 13:21:25 UTC
sendmail-8.15.1-5.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2015-08-11 02:10:14 UTC
sendmail-8.14.9-6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.