# http://sourceforge.net/projects/sid-milter/
# http://www.sendmail.net/
# - http://blue-labs.org/clue/bluelabs.patch-8.12.3 has been updated upstream
-# - move compilation from install to build section, fix re-entrancy of install
+# - fix re-entrancy of install
# - add tests bcond and/or disable tests tha fail on (AC-)builders
#
# Conditional build:
%bcond_without ldap # without LDAP support
%bcond_without tls # without TLS (SSL) support
%bcond_with pgsql # with PostgreSQL support (bluelabs)
-#
+
Summary: A widely used Mail Transport Agent (MTA)
Summary(de.UTF-8): sendmail-Mail-Übertragungsagent
Summary(es.UTF-8): Sendmail - agente de transporte de mail
Summary(tr.UTF-8): Elektronik posta hizmetleri sunucusu
Summary(uk.UTF-8): Поштовий транспортний агент sendmail
Name: sendmail
-Version: 8.14.3
+Version: 8.15.2
Release: 2
License: BSD
-Group: Networking/Daemons
+Group: Networking/Daemons/SMTP
Source0: ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz
-# Source0-md5: a5ee5d26e1f546a2da5fb9a513bd6bce
+# Source0-md5: a824fa7dea4d3341efb6462ccd816f00
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.aliases
Patch4: %{name}-m4path.patch
Patch5: %{name}-redirect.patch
Patch6: %{name}-hprescan-dos.patch
-Patch7: http://blue-labs.org/clue/bluelabs.patch-8.12.3
+Patch7: %{name}-format_string.patch
+# originally from http://blue-labs.org/clue/bluelabs.patch-8.12.3
+Patch8: bluelabs.patch-8.12.3
URL: http://www.sendmail.org/
BuildRequires: cyrus-sasl-devel
BuildRequires: db-devel >= 4.1.25
-BuildRequires: man
-%{?with_ldap:BuildRequires: openldap-devel >= 2.4.6}
+# man or man-db
+BuildRequires: man-db
+%{?with_ldap:BuildRequires: openldap-devel >= 2.3.0}
%{?with_tls:BuildRequires: openssl-devel >= 0.9.7d}
%{?with_pgsql:BuildRequires: postgresql-devel}
BuildRequires: rpmbuild(macros) >= 1.310
%patch4 -p1
%patch5 -p1
%patch6 -p1
-%{?with_pgsql:%patch7 -p1}
+%patch7 -p1
+%{?with_pgsql:%patch8 -p1}
sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/pld.mc
-install %{SOURCE7} config.m4
+cp -p %{SOURCE7} config.m4
# Ac-specific hack:
# It's problem with _simultanous_ building when builders are on the same
%endif
%build
+echo "define(\`confLIBSEARCHPATH', \`/%{_lib} %{_prefix}/%{_lib}')" >> config.m4
echo "define(\`confCC', \`%{__cc}')" >> config.m4
%ifarch sparc sparc64
echo "define(\`confOPTIMIZE', \`%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DSM_CONF_SEM=0 -DNETINET6')" >> config.m4
%else
echo "define(\`confOPTIMIZE', \`%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DNETINET6')" >> config.m4
%endif
-echo "APPENDDEF(\`confINCDIRS', \`-I/usr/include/sasl')" >> config.m4
-echo "define(\`confLIBSEARCHPATH', \`/%{_lib} %{_prefix}/%{_lib}')" >> config.m4
-echo "define(\`confLIBSEARCH', \`db resolv')" >> config.m4
-%if 0%{!?debug:1}
-echo "define(\`confLDOPTS', \`-s')" >> config.m4
-%endif
+echo "define(\`confLDOPTS', \`%{rpmldflags}')" >> config.m4
%if %{with ldap}
echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')" >> config.m4
echo "APPENDDEF(\`confLIBS', \`-lldap -llber')" >> config.m4
%endif
%if %{with pgsql}
-echo "APPENDDEF(\`confENVDEF', \`-DSASL')" >> config.m4
echo "APPENDDEF(\`confMAPDEF', \`-DPGSQLMAP')" >> config.m4
-echo "APPENDDEF(\`confLIBS', \`-lpq -lresolv')" >> config.m4
-echo "APPENDDEF(\`confLIBS', \`-lsasl -lcrypto')" >> config.m4
+echo "APPENDDEF(\`confLIBS', \`-lpq -lresolv -lcrypto')" >> config.m4
%endif
%if %{with tls}
echo "APPENDDEF(\`confENVDEF', \`-DSTARTTLS')" >> config.m4
-echo "APPENDDEF(\`confENVDEF', \`-D_FFR_DEAL_WITH_ERROR_SSL')" >> config.m4
+echo "APPENDDEF(\`confENVDEF', \`-D_FFR_TLS_1')" >> config.m4
echo "APPENDDEF(\`confLIBS', \`-lssl -lcrypto')" >> config.m4
-echo "APPENDDEF(\`confENVDEF', \`-D_FFR_SMTP_SSL')" >> config.m4
%endif
-echo "APPENDDEF(\`confENVDEF', \`-DMILTER')" >> config.m4
-
%ifarch sparc
%define Build sparc32 sh Build
%else
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \
$RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,monit,sysconfig,sasl,smrsh,security} \
- $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_prefix}/lib} \
+ $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},/usr/lib} \
$RPM_BUILD_ROOT{%{_datadir}/sendmail-cf,%{_libdir}} \
$RPM_BUILD_ROOT/var/{log,spool/mqueue} \
$RPM_BUILD_ROOT{%{_sysconfdir},%{_includedir}}
# install the cf files
cd cf
-rm -f cf/{Build,Makefile} feature/*~
+%{__rm} cf/{Build,Makefile}
+find . -name '*~' -o -name '*.orig' | xargs -r %{__rm}
cp -a * $RPM_BUILD_ROOT%{_datadir}/sendmail-cf
cd -
# sendmail.{cf,mc}
-install cf/cf/pld.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
+cp -p cf/cf/pld.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
sed -e 's|@@PATH@@|%{_datadir}/sendmail-cf|' < %{SOURCE6} \
> $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc
%if %{with pgsql}
-install bluelabs.mc $RPM_BUILD_ROOT%{_sysconfdir}/bluelabs.mc
+cp -p bluelabs.mc $RPM_BUILD_ROOT%{_sysconfdir}/bluelabs.mc
%endif
# submit.mc (submit.cf is installed automatically)
-install cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir}
echo "# local-host-names - include all aliases for your machine here." \
> $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names
-#"vim ruuls
-ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT%{_prefix}/lib/sendmail
+ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
# dangling symlinks
for f in hoststat mailq newaliases purgestat; do
$RPM_BUILD_ROOT%{_sbindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
$RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
-install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile
-install %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/Sendmail.conf
-install %{SOURCE13} $RPM_BUILD_ROOT/etc/pam.d/smtp
-install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/access
-install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/mailertable
-install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/virtusertable
-install %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/domaintable
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile
+cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/Sendmail.conf
+cp -p %{SOURCE13} $RPM_BUILD_ROOT/etc/pam.d/smtp
+cp -p %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/access
+cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/mailertable
+cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/virtusertable
+cp -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/domaintable
touch $RPM_BUILD_ROOT/etc/security/blacklist.smtp
bzip2 -dc %{SOURCE4} | tar xf -
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf{,/cf}/README
+# foreign systems
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/cs-{hpux*,osf1,solaris*,sunos*,ultrix*}.mc
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/generic-{bsd*,hpux*,mpeix,nextstep*,osf1,solaris,sunos*,ultrix*}.{cf,mc}
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/s2k-{osf1,ultrix*}.mc
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/ostype/{a-ux,aix*,altos,amdahl-uts,bsd*,darwin,dgux,domainos,dragonfly,dynix*,freebsd*,gnu,hpux*,irix*,isc*,maxion,mklinux,mpeix,nextstep,openbsd,osf1,powerux,ptx2,qnx,riscos*,sco*,sinix,solaris*,sunos*,svr4,ultrix*,unicos*,unixware*,unknown,uxpds}.m4
+# foreign machines
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/{chez.cs,huginn.cs,knecht,mail.cs,mail.eecs,mailspool.cs,python.cs,ucbarpa,ucbvax,vangogh.cs}.mc
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/domain/{Berkeley.EDU,CS.Berkeley.EDU,EECS.Berkeley.EDU,S2K.Berkeley.EDU,berkeley-only}.m4
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/hack/cssubdomain.m4
+# precompiled files
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/*.cf
+# MIB (package as mibs-*?)
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/sendmail.schema
+
# for perl-Sendmail-Milter
install $OBJDIR/libsm/libsm.a $OBJDIR/libsmutil/libsmutil.a \
$RPM_BUILD_ROOT%{_libdir}
%attr(755,root,root) %{_bindir}/newaliases
%attr(755,root,root) %{_bindir}/mailq
%attr(755,root,root) %{_sbindir}/smrsh
-%{_prefix}/lib/sendmail
+/usr/lib/sendmail
%{_mandir}/man1/mailq.1*
%{_mandir}/man1/newaliases.1*
%dir %{_datadir}/sendmail-cf
%dir %{_datadir}/sendmail-cf/cf
+%{_datadir}/sendmail-cf/cf/clientproto.mc
+%{_datadir}/sendmail-cf/cf/cyrusproto.mc
+%{_datadir}/sendmail-cf/cf/generic-linux.mc
%{_datadir}/sendmail-cf/cf/pld.mc
+%{_datadir}/sendmail-cf/cf/submit.mc
+%{_datadir}/sendmail-cf/cf/tcpproto.mc
+%{_datadir}/sendmail-cf/cf/uucpproto.mc
+%dir %{_datadir}/sendmail-cf/domain
+%{_datadir}/sendmail-cf/domain/generic.m4
%{_datadir}/sendmail-cf/feature
%{_datadir}/sendmail-cf/m4
%{_datadir}/sendmail-cf/mailer