Bug 61270 - Sendmail spec file issues
Summary: Sendmail spec file issues
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: sendmail (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Florian La Roche
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2002-03-15 19:51 UTC by Henri Schlereth
Modified: 2007-04-18 16:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-22 17:45:35 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Henri Schlereth 2002-03-15 19:51:33 UTC
Description of Problem:

A straight rebuild of the rpm generates sendmail.sendmail and the init scripts
fail looking for

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):

How Reproducible:

Steps to Reproduce:

Actual Results:

Expected Results:

Additional Information:

Comment 1 Sammy 2002-03-15 20:59:46 UTC
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

2. One should add similar comments on top of the submit.cf file that shows
   how it can be recompiled with m4.

Comment 2 Christopher McCrory 2002-03-18 18:00:20 UTC
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
 mv $RPM_BUILD_ROOT%{_mandir}/man1/newaliases.1
 mv $RPM_BUILD_ROOT%{_mandir}/man5/aliases.5
 mv $RPM_BUILD_ROOT%{_includedir}/*.h $RPM_BUILD_ROOT%{_includedir}/libmilter

@@ -423,24 +403,38 @@
+%if %{errata} > 72

+%if %{errata} > 72
 %config(noreplace)             /etc/mail/statistics
 %config(noreplace)             /etc/sendmail.cf
@@ -489,6 +483,7 @@
 %files doc

Comment 3 Christopher McCrory 2002-03-18 18:02:05 UTC
db maps are ghosted, don;t bother making them

@@ -278,13 +257,11 @@
 for map in virtusertable access domaintable mailertable
-    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}
 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

Comment 4 Christopher McCrory 2002-03-18 18:07:20 UTC
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

Comment 5 Christopher McCrory 2002-03-18 18:12:48 UTC
+pushd devtools/Site
 %patch0 -p1
+mv redhat.config.m4 site.config.m4

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

Comment 6 Christopher McCrory 2002-03-18 18:15:14 UTC
And IMHO, yes all files in /etc/mail would be better than some in /etc and some
in /etc/mail

Comment 7 Florian La Roche 2002-03-20 16:54:30 UTC

Let me know what is missing.


Florian La Roche

Comment 8 Christopher McCrory 2002-03-21 14:38:10 UTC
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.

Comment 9 Christopher McCrory 2002-03-27 15:53:22 UTC
for redhat.config.m4

-if test %{errata} -gt 72 ; then
 %patch0 -p1
-elif test %{errata} -gt 62 ; then
-%patch1 -p1
-%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

Comment 10 Christopher McCrory 2002-03-27 15:54:49 UTC
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

Comment 11 Christopher McCrory 2002-03-27 15:57:47 UTC
-pushd makemap
-sh Build -f ../redhat.config.m4
+for SUBDIR in libsm libsmutil libsmdb sendmail editmap mail.local \
+             mailstats makemap praliases rmail smrsh vacation \
+             libmilter
+ pushd ${SUBDIR}
+  sh Build -f ../redhat.config.m4
+ popd

+for SUBDIR in libsm libsmutil libsmdb sendmail editmap mail.local \
+             mailstats makemap praliases rmail smrsh vacation \
+             libmilter
+  Make force-install -C $OBJDIR/${SUBDIR} || Make install -C $OBJDIR/${SUBDIR}

+# /usr/sbin/mail.local

+# %{_mandir}/man8/mail.local.8*

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

Comment 12 Christopher McCrory 2002-03-27 15:58:34 UTC
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

Comment 13 Christopher McCrory 2002-03-27 15:59:47 UTC
Add to /etc/mail/Makefile

%.cf: %.mc
        # make running via sudo easy
        @echo "running m4 ${@:.cf=}.mc > $@"
        @/usr/bin/m4 ${@:.cf=}.mc > $@

Comment 14 Christopher McCrory 2002-03-27 16:01:42 UTC
if errata is 62 this just breaks

%if %{errata} > 62
%if %{errata} <= 70
BuildRequires: cyrus-sasl

Comment 15 Sammy 2002-03-28 17:20:27 UTC
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.

Comment 16 Christopher McCrory 2002-06-23 15:55:19 UTC
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)
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sm-client

stop() {
        # Stop daemons.
        if test -f /var/run/sm-client.pid ; then
                echo -n $"Shutting down sm-client: "
                killproc sm-client
                [ $RETVAL -eq 0 ] && rm -f /var/run/sm-client.pid
                [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sm-client

Comment 17 Florian La Roche 2003-01-22 17:45:35 UTC
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

Note You need to log in before you can comment on or make changes to this bug.