Description of Problem: A straight rebuild of the rpm generates sendmail.sendmail and the init scripts fail looking for sendmail. The heuristic for > 6.2 <=7.1 fails on a 6.2 box with a boolean -1 (set to 6.0 or 6.1 and it works perfectly) Dispite mods to remove the extra .sendmail in the spec file the compile fails with a globbing error still looking for sendmail.sendmail et al on 7.0 boxes (dont know why, all the changes work just fine on a 7.1 boxen) However on the plus side the 7.1 rpm runs fine on the 7.0 boxes. Only catch is that a server sendmail restart doesnt work, you actually have to do a stop/ start. Version-Release number of selected component (if applicable): 8.12-2.7 How Reproducible: Steps to Reproduce: 1. 2. 3. Actual Results: Expected Results: Additional Information:
I just experienced this! /usr/sbin/sendmail.sendmail......some other comments: 1. It would be nice if everything goes into /etc/mail including sendmail.cf file. 2. One should add similar comments on top of the submit.cf file that shows how it can be recompiled with m4.
for sendmail spec file: install libsm.a as some milter programs need it to compile if version check for prog.sendmail move @@ -306,7 +283,9 @@ install -m 755 -d $RPM_BUILD_ROOT%{_libdir} install -m 644 $OBJDIR/libmilter/libmilter.a $RPM_BUILD_ROOT%{_libdir} install -m 644 $OBJDIR/libsmutil/libsmutil.a $RPM_BUILD_ROOT%{_libdir} +install -m 644 $OBJDIR/libsm/libsm.a $RPM_BUILD_ROOT%{_libdir} +%if %{errata} > 72 mv $RPM_BUILD_ROOT%{_sbindir}/sendmail $RPM_BUILD_ROOT%{_sbindir}/sendmail.sendmail for i in mailq newaliases rmail; do mv $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/$i.sendmail @@ -314,6 +293,7 @@ mv $RPM_BUILD_ROOT%{_mandir}/man1/mailq.1 $RPM_BUILD_ROOT%{_mandir}/man1/mailq.sendmail.1 mv $RPM_BUILD_ROOT%{_mandir}/man1/newaliases.1 $RPM_BUILD_ROOT%{_mandir}/man1/newaliases.sendmail.1 mv $RPM_BUILD_ROOT%{_mandir}/man5/aliases.5 $RPM_BUILD_ROOT%{_mandir}/man5/aliases.sendmail.5 +%endif mv $RPM_BUILD_ROOT%{_includedir}/*.h $RPM_BUILD_ROOT%{_includedir}/libmilter @@ -423,24 +403,38 @@ /usr/sbin/praliases /usr/bin/hoststat /usr/bin/purgestat -/usr/bin/rmail.sendmail /usr/bin/makemap +/usr/bin/vacation /usr/sbin/makemap +%if %{errata} > 72 %attr(2755,root,smmsp)/usr/sbin/sendmail.sendmail +/usr/bin/rmail.sendmail /usr/bin/newaliases.sendmail /usr/bin/mailq.sendmail +%else +%attr(2755,root,smmsp)/usr/sbin/sendmail +/usr/bin/rmail +/usr/bin/newaliases +/usr/bin/mailq +%endif /usr/sbin/smrsh /usr/lib/sendmail %{_mandir}/man8/smrsh.8* +%if %{errata} > 72 %{_mandir}/man5/aliases.sendmail.5* %{_mandir}/man1/newaliases.sendmail.1* %{_mandir}/man1/mailq.sendmail.1* +%else +%{_mandir}/man5/aliases.5* +%{_mandir}/man1/newaliases.1* +%{_mandir}/man1/mailq.1* +%endif %config(noreplace) /etc/mail/statistics %config(noreplace) /etc/sendmail.cf @@ -489,6 +483,7 @@ %{_includedir}/libmilter/*.h %{_libdir}/libmilter.a %{_libdir}/libsmutil.a +%{_libdir}/libsm.a %files doc
db maps are ghosted, don;t bother making them @@ -278,13 +257,11 @@ EOF for map in virtusertable access domaintable mailertable do - touch $RPM_BUILD_ROOT/etc/mail/${map} - chmod 0644 $RPM_BUILD_ROOT/etc/mail/${map} - $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT/etc/sendmail.cf hash $RPM_BUILD_ROOT/etc/mail/${map}.db < $RPM_BUILD_ROOT/etc/mail/${map} - chmod 0644 $RPM_BUILD_ROOT/etc/mail/${map}.db + touch $RPM_BUILD_ROOT/etc/mail/${map}{,.db} + chmod 0644 $RPM_BUILD_ROOT/etc/mail/${map}{,.db} done install -m644 %{SOURCE3} $RPM_BUILD_ROOT/etc/aliases -$RPM_BUILD_ROOT/usr/bin/makemap -C $RPM_BUILD_ROOT/etc/sendmail.cf hash $RPM_BUILD_ROOT/etc/aliases.db < %{SOURCE3} +touch $RPM_BUILD_ROOT/etc/aliases.db install -m644 %SOURCE4 $RPM_BUILD_ROOT/etc/sysconfig/sendmail install -m755 %SOURCE1 $RPM_BUILD_ROOT%{initdir}/sendmail
ditch APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_MILTER=1') in config.m4 as MILTER is now a stable in the 8.12.2-7 spec the different config.m4 were a little screwy IIHO, they should all be the same - hesiod for <72 I havn't tried it but openssl is in 6.2 eratta so the SSL stuff might be OK
+pushd devtools/Site <snip> %patch0 -p1 <snip> +mv redhat.config.m4 site.config.m4 +popd A Devtools/Site/site.config.m4 will get used automagically Possibly add it as a %doc entry Sorry for the multiple submissions, but it made it easier for me to remember what I had changed locally
And IMHO, yes all files in /etc/mail would be better than some in /etc and some in /etc/mail
http://people.redhat.com/laroche/sendmail-8.12.2-9.src.rpm Let me know what is missing. Thanks, Florian La Roche
laroche: I emailed you on a compile error I was getting. It turns out I had a shared mem segment in use ( ? ) that was causing the t-shm test to fail. The only way I could clear it was a reboot :( [chrismcc@philippe libsm]$ ./t-shm 2 of 2 tests completed successfully 4 of 4 tests completed successfully works now.
for redhat.config.m4 -if test %{errata} -gt 72 ; then %patch0 -p1 -elif test %{errata} -gt 62 ; then -%patch1 -p1 -else -%patch2 -p1 +if test %{errata} -le 72 ; then +# Don't use hesiod +%{__perl} -pi -e "s#(-DHESIOD|-DHES_GETMAILHOST|-lhesiod)##" redhat.config.m4 This eliminates having to keep 3 different config files around
let aliases live in /etc/mail instead of /etc -%patch5 -p1 +# leave aliases in /etc/mail +# %patch5 -p1 Also requires redhat.mc `ALIASES" line removal
... -pushd makemap -sh Build -f ../redhat.config.m4 -popd +for SUBDIR in libsm libsmutil libsmdb sendmail editmap mail.local \ + mailstats makemap praliases rmail smrsh vacation \ + libmilter +do + pushd ${SUBDIR} + sh Build -f ../redhat.config.m4 + popd +done + ... +for SUBDIR in libsm libsmutil libsmdb sendmail editmap mail.local \ + mailstats makemap praliases rmail smrsh vacation \ + libmilter +do + Make force-install -C $OBJDIR/${SUBDIR} || Make install -C $OBJDIR/${SUBDIR} +done +# /usr/sbin/mail.local +/usr/bin/vacation +/usr/sbin/editmap +%{_mandir}/man8/editmap.8* +# %{_mandir}/man8/mail.local.8* +%{_mandir}/man1/vacation.1* makes keeping track of the dirs easier. They are also build in the same order as the Makefile indicates (if it matters) mail.local installed but not packaged vacation added
fix submit.mc -install -m 644 cf/cf/submit.mc $RPM_BUILD_ROOT/etc/mail/submit.mc +# add this so m4 submit.mc works +echo "include(\`/usr/share/sendmail-cf/m4/cf.m4')" > \ + $RPM_BUILD_ROOT/etc/mail/submit.mc +cat cf/cf/submit.mc >> \ + $RPM_BUILD_ROOT/etc/mail/submit.mc
Add to /etc/mail/Makefile %.cf: %.mc # make running via sudo easy @echo "running m4 ${@:.cf=}.mc > $@" @/usr/bin/m4 ${@:.cf=}.mc > $@
if errata is 62 this just breaks %if %{errata} > 62 %if %{errata} <= 70 BuildRequires: cyrus-sasl ...
The problem with /usr/sbin/sendmail.sendmail exists upto and including version 8.12.2-11....this is bad because the old sendmail binary is not replaced and trying to restart it fails. I thought this was fixed in -10.
What I added to the init script to start the queue runner start() { # Start daemons. if ! test -f /var/run/sm-client.pid ; then echo -n $"Starting sm-client: " touch /var/run/sm-client.pid chown smmsp:smmsp /var/run/sm-client.pid daemon /usr/sbin/sendmail -L sm-msp-queue -Ac \ $([ -n "$QUEUE" ] && echo -q$QUEUE) echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sm-client fi stop() { # Stop daemons. if test -f /var/run/sm-client.pid ; then echo -n $"Shutting down sm-client: " killproc sm-client RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/run/sm-client.pid [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sm-client fi
This should be all resolved in the newest rpm. Please open a new bugzilla entry for further changes you want to have included. Thanks a lot, Florian La Roche