diff --git a/sendmail-8.14.4-libdb5.patch b/sendmail-8.14.4-libdb5.patch new file mode 100644 index 0000000..9bd5e50 --- /dev/null +++ b/sendmail-8.14.4-libdb5.patch @@ -0,0 +1,12 @@ +--- sendmail-8.14.4/include/sm/bdb.h.old 2003-03-06 17:30:05.000000000 +0100 ++++ sendmail-8.14.4/include/sm/bdb.h 2010-04-15 16:02:41.029169004 +0200 +@@ -19,7 +19,8 @@ + # define DB_VERSION_MAJOR 1 + # endif /* ! DB_VERSION_MAJOR */ + +-# if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 ++# if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1) || \ ++ (DB_VERSION_MAJOR >= 5) + + # define DBTXN NULL , + diff --git a/sendmail.spec b/sendmail.spec index eeb0966..f9c6bfa 100644 --- a/sendmail.spec +++ b/sendmail.spec @@ -14,7 +14,7 @@ Summary: A widely used Mail Transport Agent (MTA) Name: sendmail Version: 8.14.4 -Release: 5%{?dist} +Release: 6%{?dist} License: Sendmail Group: System Environment/Daemons URL: http://www.sendmail.org/ @@ -49,9 +49,10 @@ Patch17: sendmail-8.14.3-sharedmilter.patch Patch18: sendmail-8.14.4-switchfile.patch Patch20: sendmail-8.14.3-milterfdleaks.patch Patch21: sendmail-8.14.3-ipv6-bad-helo.patch +Patch22: sendmail-8.14.4-libdb5.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: tcp_wrappers-devel -BuildRequires: db4-devel +BuildRequires: libdb-devel BuildRequires: hesiod-devel BuildRequires: groff BuildRequires: ghostscript @@ -156,6 +157,7 @@ cp devtools/M4/UNIX/{,shared}library.m4 %patch18 -p1 -b .switchfile %patch20 -p1 -b .milterfdleaks %patch21 -p1 -b .ipv6-bad-helo +%patch22 -p1 -b .libdb5 for f in RELEASE_NOTES contrib/etrn.0; do iconv -f iso8859-1 -t utf8 -o ${f}{_,} && @@ -167,7 +169,7 @@ done cat > redhat.config.m4 << EOF define(\`confMAPDEF', \`-DNEWDB -DNIS -DHESIOD -DMAP_REGEX -DSOCKETMAP -DNAMED_BIND=1') define(\`confOPTIMIZE', \`\`\`\`${RPM_OPT_FLAGS}'''') -define(\`confENVDEF', \`-I%{_includedir}/db4 -I/usr/kerberos/include -Wall -DXDEBUG=0 -DTCPWRAPPERS -DNETINET6 -DHES_GETMAILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_TLS_1') +define(\`confENVDEF', \`-I%{_includedir}/libdb -I/usr/kerberos/include -Wall -DXDEBUG=0 -DTCPWRAPPERS -DNETINET6 -DHES_GETMAILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_TLS_1') define(\`confLIBDIRS', \`-L/usr/kerberos/%{_lib}') define(\`confLIBS', \`-lnsl -lwrap -lhesiod -lcrypt -ldb -lresolv') define(\`confMANOWN', \`root') @@ -375,8 +377,8 @@ chmod 755 %{buildroot}%{_sbindir}/{mailstats,makemap,praliases,sendmail,smrsh} chmod 755 %{buildroot}%{_bindir}/rmail %if "%{with_sasl2}" == "yes" -install -m 755 -d %{buildroot}%{_libdir}/sasl2 -install -m 644 %{SOURCE11} %{buildroot}%{_libdir}/sasl2/Sendmail.conf +install -m 755 -d %{buildroot}%{_sysconfdir}/sasl2 +install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/sasl2/Sendmail.conf %endif install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/smtp.sendmail @@ -445,7 +447,7 @@ exit 0 --slave %{_mandir}/man5/aliases.5.gz mta-aliasesman %{_mandir}/man5/aliases.sendmail.5.gz \ --initscript sendmail -# Rebuild maps +# Rebuild maps. { chown root %{_sysconfdir}/aliases.db %{maildir}/access.db \ %{maildir}/mailertable.db %{maildir}/domaintable.db \ @@ -453,6 +455,13 @@ exit 0 SM_FORCE_DBREBUILD=1 %{maildir}/make SM_FORCE_DBREBUILD=1 %{maildir}/make aliases } > /dev/null 2>&1 + +# Move existing SASL2 config to new location. +%if "%{with_sasl2}" == "yes" +[ -f %{_libdir}/sasl2/Sendmail.conf ] && touch -r %{_sysconfdir}/sasl2/Sendmail.conf \ + %{_libdir}/sasl2/Sendmail.conf ] && mv -f %{_libdir}/sasl2/Sendmail.conf \ + %{_sysconfdir}/sasl2 2>/dev/null || : +%endif exit 0 %preun @@ -543,7 +552,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/pam.d/smtp.sendmail %{_sysconfdir}/NetworkManager/dispatcher.d/10-sendmail -%config(noreplace) %{_libdir}/sasl*/Sendmail*.conf +%if "%{with_sasl2}" == "yes" +%config(noreplace) %{_sysconfdir}/sasl2/Sendmail.conf +%endif %files cf %defattr(-,root,root,-) @@ -586,6 +597,11 @@ exit 0 %changelog +* Tue Jun 08 2010 Jaroslav Škarvada - 8.14.4-6 +- sasl2 config moved from {_libdir}/sasl2 to {_sysconfdir}/sasl2 +- added libdb5 patch for building with libdb-5 +- rebuilt with libdb-5 + * Mon May 31 2010 Jaroslav Škarvada - 8.14.4-5 - fixed user/group creation