[tw]
- readded chkconfig add for sendmail in post script - dropped mysql support (useless without further patching) - fixed executable permissions for /usr/sbin/makemap and /usr/sbin/smrsh - dropped FFR_UNSAFE_SASL, because it has no effect anymore
This commit is contained in:
parent
d6e308ef6c
commit
a76220095e
@ -1,22 +1,21 @@
|
|||||||
## package options
|
# package options
|
||||||
%define with_tls yes
|
%define with_tls yes
|
||||||
%define with_sasl1 no
|
%define with_sasl1 no
|
||||||
%define with_sasl2 yes
|
%define with_sasl2 yes
|
||||||
%define with_milter yes
|
%define with_milter yes
|
||||||
%define with_ldap yes
|
%define with_ldap yes
|
||||||
%define with_mysql no
|
%define enable_pie yes
|
||||||
%define enable_pie yes
|
|
||||||
|
|
||||||
%define sendmailcf %{_datadir}/sendmail-cf
|
%define sendmailcf %{_datadir}/sendmail-cf
|
||||||
%define stdir /var/log/mail
|
%define stdir %{_localstatedir}/log/mail
|
||||||
%define smshell /sbin/nologin
|
%define smshell /sbin/nologin
|
||||||
%define spooldir /var/spool
|
%define spooldir %{_localstatedir}/spool
|
||||||
%define maildir %{_sysconfdir}/mail
|
%define maildir %{_sysconfdir}/mail
|
||||||
|
|
||||||
Summary: A widely used Mail Transport Agent (MTA)
|
Summary: A widely used Mail Transport Agent (MTA)
|
||||||
Name: sendmail
|
Name: sendmail
|
||||||
Version: 8.14.1
|
Version: 8.14.1
|
||||||
Release: 1.1
|
Release: 2
|
||||||
License: Sendmail
|
License: Sendmail
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://www.sendmail.org/
|
URL: http://www.sendmail.org/
|
||||||
@ -61,8 +60,8 @@ Provides: %{_mandir}/man1/mailq.1.gz %{_mandir}/man1/newaliases.1.gz
|
|||||||
Provides: %{_mandir}/man5/aliases.5.gz %{_mandir}/man8/sendmail.8.gz
|
Provides: %{_mandir}/man5/aliases.5.gz %{_mandir}/man8/sendmail.8.gz
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
Requires(preun): %{_sbindir}/alternatives chkconfig
|
Requires(preun): %{_sbindir}/alternatives chkconfig
|
||||||
Requires(post): %{_sbindir}/alternatives coreutils
|
Requires(post): %{_sbindir}/alternatives chkconfig coreutils
|
||||||
Requires(postun): %{_sbindir}/alternatives coreutils chkconfig
|
Requires(postun): %{_sbindir}/alternatives chkconfig coreutils
|
||||||
Requires: procmail
|
Requires: procmail
|
||||||
Requires: bash >= 2.0
|
Requires: bash >= 2.0
|
||||||
Requires: setup >= 2.5.31-1
|
Requires: setup >= 2.5.31-1
|
||||||
@ -79,10 +78,6 @@ Requires: %{_sbindir}/saslauthd openssl
|
|||||||
BuildRequires: openldap-devel openssl-devel
|
BuildRequires: openldap-devel openssl-devel
|
||||||
Requires: openldap openssl
|
Requires: openldap openssl
|
||||||
%endif
|
%endif
|
||||||
%if "%{with_mysql}" == "yes"
|
|
||||||
BuildRequires: mysql-devel
|
|
||||||
Requires: mysql
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -196,7 +191,7 @@ EOF
|
|||||||
|
|
||||||
%if "%{with_sasl2}" == "yes"
|
%if "%{with_sasl2}" == "yes"
|
||||||
cat >> redhat.config.m4 << EOF
|
cat >> redhat.config.m4 << EOF
|
||||||
APPENDDEF(\`confENVDEF', \`-DSASL=2 -D_FFR_UNSAFE_SASL')dnl
|
APPENDDEF(\`confENVDEF', \`-DSASL=2')dnl
|
||||||
APPENDDEF(\`confLIBS', \`-lsasl2 -lcrypto')dnl
|
APPENDDEF(\`confLIBS', \`-lsasl2 -lcrypto')dnl
|
||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
@ -215,13 +210,6 @@ APPENDDEF(\`confLIBS', \`-lldap -llber -lssl -lcrypto')dnl
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if "%{with_mysql}" == "yes"
|
|
||||||
cat >> redhat.config.m4 << EOF
|
|
||||||
APPENDDEF(\`confMAPDEF',\`-DMYSQLMAP')dnl
|
|
||||||
APPENDDEF(\`confLIBS',\`%{l_ldflags mysql .} -lmysqlclient -lz -lm')dnl
|
|
||||||
EOF
|
|
||||||
%endif
|
|
||||||
|
|
||||||
DIRS="libsmutil sendmail mailstats rmail praliases smrsh makemap"
|
DIRS="libsmutil sendmail mailstats rmail praliases smrsh makemap"
|
||||||
|
|
||||||
%if "%{with_milter}" == "yes"
|
%if "%{with_milter}" == "yes"
|
||||||
@ -239,6 +227,7 @@ make -C doc/op op.pdf
|
|||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
# create directories
|
||||||
for d in %{_bindir} %{_sbindir} %{_includedir}/libmilter \
|
for d in %{_bindir} %{_sbindir} %{_includedir}/libmilter \
|
||||||
%{_libdir} %{_mandir}/man{1,5,8} %{maildir} %{stdir} %{spooldir} \
|
%{_libdir} %{_mandir}/man{1,5,8} %{maildir} %{stdir} %{spooldir} \
|
||||||
%{_docdir}/sendmail-%{version} %{sendmailcf} %{_sysconfdir}/smrsh\
|
%{_docdir}/sendmail-%{version} %{sendmailcf} %{_sysconfdir}/smrsh\
|
||||||
@ -263,12 +252,12 @@ Make() {
|
|||||||
MANROOT=%{_mandir}/man \
|
MANROOT=%{_mandir}/man \
|
||||||
SBINOWN=${nameuser} SBINGRP=${namegroup} \
|
SBINOWN=${nameuser} SBINGRP=${namegroup} \
|
||||||
UBINOWN=${nameuser} UBINGRP=${namegroup} \
|
UBINOWN=${nameuser} UBINGRP=${namegroup} \
|
||||||
MANOWN=${nameuser} MANGRP=${namegroup} \
|
MANOWN=${nameuser} MANGRP=${namegroup} \
|
||||||
INCOWN=${nameuser} INCGRP=${namegroup} \
|
INCOWN=${nameuser} INCGRP=${namegroup} \
|
||||||
LIBOWN=${nameuser} LIBGRP=${namegroup} \
|
LIBOWN=${nameuser} LIBGRP=${namegroup} \
|
||||||
GBINOWN=${nameuser} GBINGRP=${namegroup} \
|
GBINOWN=${nameuser} GBINGRP=${namegroup} \
|
||||||
CFOWN=${nameuser} CFGRP=${namegroup} \
|
CFOWN=${nameuser} CFGRP=${namegroup} \
|
||||||
MSPQOWN=${nameuser}
|
MSPQOWN=${nameuser}
|
||||||
}
|
}
|
||||||
|
|
||||||
OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
|
OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
|
||||||
@ -283,9 +272,9 @@ Make install -C $OBJDIR/smrsh
|
|||||||
Make install -C $OBJDIR/makemap
|
Make install -C $OBJDIR/makemap
|
||||||
|
|
||||||
# install libraries
|
# install libraries
|
||||||
install -m 644 $OBJDIR/libmilter/libmilter.a %{buildroot}%{_libdir}
|
install -m 644 $OBJDIR/libmilter/libmilter.a %{buildroot}%{_libdir}
|
||||||
install -m 644 $OBJDIR/libsmutil/libsmutil.a %{buildroot}%{_libdir}
|
install -m 644 $OBJDIR/libsmutil/libsmutil.a %{buildroot}%{_libdir}
|
||||||
install -m 644 $OBJDIR/libsm/libsm.a %{buildroot}%{_libdir}
|
install -m 644 $OBJDIR/libsm/libsm.a %{buildroot}%{_libdir}
|
||||||
|
|
||||||
%if "%{_lib}" == "lib64"
|
%if "%{_lib}" == "lib64"
|
||||||
# libmilter.a is 64 bit, not usable in /usr/lib for 32 bit build
|
# libmilter.a is 64 bit, not usable in /usr/lib for 32 bit build
|
||||||
@ -295,7 +284,7 @@ rm -fr %{buildroot}/usr/lib/libmilter.a
|
|||||||
# replace absolute with relative symlinks
|
# replace absolute with relative symlinks
|
||||||
ln -sf ../sbin/makemap %{buildroot}%{_bindir}/makemap
|
ln -sf ../sbin/makemap %{buildroot}%{_bindir}/makemap
|
||||||
for f in hoststat mailq newaliases purgestat ; do
|
for f in hoststat mailq newaliases purgestat ; do
|
||||||
ln -sf ../sbin/sendmail.sendmail %{buildroot}%{_bindir}/${f}
|
ln -sf ../sbin/sendmail.sendmail %{buildroot}%{_bindir}/${f}
|
||||||
done
|
done
|
||||||
|
|
||||||
# use /usr/lib, even for 64 bit architectures
|
# use /usr/lib, even for 64 bit architectures
|
||||||
@ -361,8 +350,9 @@ install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/sendmail
|
|||||||
install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/sendmail
|
install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/sendmail
|
||||||
install -m 644 %{SOURCE5} %{buildroot}%{maildir}/Makefile
|
install -m 644 %{SOURCE5} %{buildroot}%{maildir}/Makefile
|
||||||
|
|
||||||
chmod u+w %{buildroot}%{_sbindir}/{mailstats,praliases}
|
# fix permissions to allow debuginfo extraction and stripping
|
||||||
chmod u+w %{buildroot}%{_bindir}/rmail
|
chmod 755 %{buildroot}%{_sbindir}/{mailstats,makemap,praliases,sendmail,smrsh}
|
||||||
|
chmod 755 %{buildroot}%{_bindir}/rmail
|
||||||
|
|
||||||
%if "%{with_sasl1}" == "yes"
|
%if "%{with_sasl1}" == "yes"
|
||||||
install -m 755 -d %{buildroot}%{_libdir}/sasl
|
install -m 755 -d %{buildroot}%{_libdir}/sasl
|
||||||
@ -374,9 +364,6 @@ install -m 644 %{SOURCE11} %{buildroot}%{_libdir}/sasl2/Sendmail.conf
|
|||||||
%endif
|
%endif
|
||||||
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/smtp.sendmail
|
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/smtp.sendmail
|
||||||
|
|
||||||
# allow stripping of the sendmail app
|
|
||||||
chmod 755 %{buildroot}%{_sbindir}/sendmail
|
|
||||||
|
|
||||||
# fix path for statistics file in man pages
|
# fix path for statistics file in man pages
|
||||||
%if "%{stdir}" != "%{maildir}"
|
%if "%{stdir}" != "%{maildir}"
|
||||||
sed -i -e 's:%{maildir}/statistics:%{stdir}/statistics:' %{buildroot}%{_mandir}/man*/*
|
sed -i -e 's:%{maildir}/statistics:%{stdir}/statistics:' %{buildroot}%{_mandir}/man*/*
|
||||||
@ -412,13 +399,14 @@ fi
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
/sbin/chkconfig --add sendmail
|
||||||
# Set up the alternatives files for MTAs.
|
# Set up the alternatives files for MTAs.
|
||||||
%{_sbindir}/alternatives --install %{_sbindir}/sendmail mta %{_sbindir}/sendmail.sendmail 90 \
|
%{_sbindir}/alternatives --install %{_sbindir}/sendmail mta %{_sbindir}/sendmail.sendmail 90 \
|
||||||
--slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.sendmail \
|
--slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.sendmail \
|
||||||
--slave %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.sendmail \
|
--slave %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.sendmail \
|
||||||
--slave %{_bindir}/rmail mta-rmail %{_bindir}/rmail.sendmail \
|
--slave %{_bindir}/rmail mta-rmail %{_bindir}/rmail.sendmail \
|
||||||
--slave /usr/lib/sendmail mta-sendmail /usr/lib/sendmail.sendmail \
|
--slave /usr/lib/sendmail mta-sendmail /usr/lib/sendmail.sendmail \
|
||||||
--slave %{_sysconfdir}/pam.d/smtp mta-pam %{_sysconfdir}/pam.d/smtp.sendmail \
|
--slave %{_sysconfdir}/pam.d/smtp mta-pam %{_sysconfdir}/pam.d/smtp.sendmail \
|
||||||
--slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man8/sendmail.sendmail.8.gz \
|
--slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man8/sendmail.sendmail.8.gz \
|
||||||
--slave %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man1/mailq.sendmail.1.gz \
|
--slave %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man1/mailq.sendmail.1.gz \
|
||||||
--slave %{_mandir}/man1/newaliases.1.gz mta-newaliasesman %{_mandir}/man1/newaliases.sendmail.1.gz \
|
--slave %{_mandir}/man1/newaliases.1.gz mta-newaliasesman %{_mandir}/man1/newaliases.sendmail.1.gz \
|
||||||
@ -450,6 +438,7 @@ exit 0
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
%dir %{_docdir}/sendmail-%{version}
|
||||||
%doc %{_docdir}/sendmail-%{version}/FAQ
|
%doc %{_docdir}/sendmail-%{version}/FAQ
|
||||||
%doc %{_docdir}/sendmail-%{version}/KNOWNBUGS
|
%doc %{_docdir}/sendmail-%{version}/KNOWNBUGS
|
||||||
%doc %{_docdir}/sendmail-%{version}/LICENSE
|
%doc %{_docdir}/sendmail-%{version}/LICENSE
|
||||||
@ -504,7 +493,7 @@ exit 0
|
|||||||
%ghost %{maildir}/domaintable.db
|
%ghost %{maildir}/domaintable.db
|
||||||
%ghost %{maildir}/mailertable.db
|
%ghost %{maildir}/mailertable.db
|
||||||
|
|
||||||
%attr(0755,root,root) %config(noreplace) %{_initrddir}/sendmail
|
%attr(0755,root,root) %{_initrddir}/sendmail
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/sendmail
|
%config(noreplace) %{_sysconfdir}/sysconfig/sendmail
|
||||||
%config(noreplace) %{_sysconfdir}/pam.d/smtp.sendmail
|
%config(noreplace) %{_sysconfdir}/pam.d/smtp.sendmail
|
||||||
|
|
||||||
@ -538,6 +527,12 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 16 2007 Thomas Woerner <twoerner@redhat.com> 8.14.1-2
|
||||||
|
- readded chkconfig add for sendmail in post script
|
||||||
|
- dropped mysql support (useless without further patching)
|
||||||
|
- fixed executable permissions for /usr/sbin/makemap and /usr/sbin/smrsh
|
||||||
|
- dropped FFR_UNSAFE_SASL, because it has no effect anymore
|
||||||
|
|
||||||
* Thu Apr 12 2007 Thomas Woerner <twoerner@redhat.com> 8.14.1-1.1
|
* Thu Apr 12 2007 Thomas Woerner <twoerner@redhat.com> 8.14.1-1.1
|
||||||
- replaced prereq tags with requires() tags.
|
- replaced prereq tags with requires() tags.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user