From 8642790a1aba225d24bb52c0a9b49cac25d8091fc325c86f82306a65915c3932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 12 Jan 2015 16:44:39 +0000 Subject: [PATCH] Accepting request 280598 from home:-miska-:arm Add support for spf, mysql and other small fixes OBS-URL: https://build.opensuse.org/request/show/280598 OBS-URL: https://build.opensuse.org/package/show/server:mail/exim?expand=0&rev=156 --- exim.changes | 12 +++++++++++ exim.service | 1 - exim.spec | 61 ++++++++++++++++++++++++---------------------------- 3 files changed, 40 insertions(+), 34 deletions(-) diff --git a/exim.changes b/exim.changes index a19388c..f358022 100644 --- a/exim.changes +++ b/exim.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sun Dec 21 10:25:47 UTC 2014 - michal.hrusecky@opensuse.org + +- Enable SPF + +------------------------------------------------------------------- +Sun Dec 21 09:48:18 UTC 2014 - michal.hrusecky@opensuse.org + +- Fix service file +- Using bcond for mysql, pgsql and ldap +- mysql, pgsql and ldap enabled by default + ------------------------------------------------------------------- Fri Dec 5 12:47:28 UTC 2014 - lmuelle@suse.com diff --git a/exim.service b/exim.service index 392a899..4da57f2 100644 --- a/exim.service +++ b/exim.service @@ -7,7 +7,6 @@ Conflicts=sendmail.service postfix.service PrivateTmp=true Environment=QUEUE=1h EnvironmentFile=-/etc/sysconfig/exim -ExecStartPre=-/usr/libexec/exim-gen-cert ExecStart=/usr/sbin/exim -bd -q${QUEUE} [Install] diff --git a/exim.spec b/exim.spec index d262e9c..3fa1fe0 100644 --- a/exim.spec +++ b/exim.spec @@ -16,10 +16,17 @@ # +%bcond_without mysql +%bcond_without pgsql +%bcond_without ldap + Name: exim BuildRequires: cyrus-sasl-devel BuildRequires: db-devel +BuildRequires: libspf2-devel +%if %{with_ldap} BuildRequires: openldap2-devel +%endif BuildRequires: pcre-devel %if %{?suse_version:1}%{?!suse_version:0} BuildRequires: libopenssl-devel @@ -50,13 +57,11 @@ Requires(pre): fileutils textutils %endif Version: 4.84 Release: 0 -%if %{?build_with_mysql:1}0 +%if %{with_mysql} BuildRequires: mysql-devel -Provides: exim = %version %endif -%if %{?build_with_pgsql:1}0 +%if %{with_pgsql} BuildRequires: postgresql-devel -Provides: exim = %version %endif Summary: The Exim Mail Transfer Agent, a Replacement for sendmail License: GPL-2.0+ @@ -76,7 +81,6 @@ Source31: eximstats.conf Source32: exim.service Patch: exim-tail.patch Patch1: exim-enable_ecdh_openssl.patch -%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0 %package -n eximon Summary: Eximon, an graphical frontend to administer Exim's mail queue @@ -88,7 +92,6 @@ Group: Productivity/Networking/Email/Servers Requires: perl-GD Requires: perl-GDGraph Requires: perl-GDTextUtil -%endif %description Exim is a mail transport agent (MTA) developed at the University of @@ -99,16 +102,12 @@ In particular, it has options for verifying incoming sender and recipient addresses, for refusing mail from specified hosts, networks, or senders, and for controlling mail relaying. - -%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0 - %description -n eximon This allows administrators to view the exim agent's mail queue and logs, and perform a variety of actions on queued messages, such as freezing, bouncing and thawing messages, and even editing body and header of mails. - %description -n eximstats-html If this package is installed alongside the exim MTA, and you enable EXIM_REPORT_WEEKLY_HTML in /etc/sysconfig/exim, logrotate/cron will @@ -121,9 +120,6 @@ The script /usr/sbin/eximstats-html-update.py can create the reports for log files that were rotated in the past. (You would only run this once, if at all. The rest is done by logrotate / cron.) - -%endif - %prep %setup -q -n exim-%{version} %patch @@ -163,11 +159,13 @@ cat <<-EOF > Local/Makefile LOOKUP_CDB=yes LOOKUP_DNSDB=yes LOOKUP_DSEARCH=yes +%if %{with_ldap} LOOKUP_LDAP=yes -%if %{?build_with_mysql:1}0 +%endif +%if %{with_mysql} LOOKUP_MYSQL=yes %endif -%if %{?build_with_pgsql:1}0 +%if %{with_pgsql} LOOKUP_PGSQL=yes %endif LOOKUP_NIS=yes @@ -177,24 +175,27 @@ cat <<-EOF > Local/Makefile # LOOKUP_PGSQL=yes # LOOKUP_WHOSON=yes CYRUS_SASLAUTHD_SOCKET=/var/run/sasl2/mux - LDAP_LIB_TYPE=OPENLDAP2 # LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include # LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq - LOOKUP_LIBS=-lldap -llber -%if %{?build_with_mysql:1}0 - LOOKUP_INCLUDE=-I /usr/include/mysql - LOOKUP_LIBS=-lldap -llber -lmysqlclient + LOOKUP_LIBS=-llber +%if %{with_ldap} + LDAP_LIB_TYPE=OPENLDAP2 + LOOKUP_LIBS+=-lldap %endif -%if %{?build_with_pgsql:1}0 - LOOKUP_INCLUDE=-I /usr/include/pgsql - LOOKUP_LIBS=-lldap -llber -lpq +%if %{with_mysql} + LOOKUP_INCLUDE+=-I /usr/include/mysql + LOOKUP_LIBS+=-lmysqlclient +%endif +%if %{with_pgsql} + LOOKUP_INCLUDE+=-I /usr/include/pgsql + LOOKUP_LIBS+=-lpq %endif EXIM_MONITOR=eximon.bin WITH_CONTENT_SCAN=yes WITH_OLD_DEMIME=yes AUTH_CRAM_MD5=yes AUTH_PLAINTEXT=yes - # AUTH_SPA=yes + AUTH_SPA=yes AUTH_DOVECOT=yes SUPPORT_TLS=yes TLS_LIBS=-lssl -lcrypto @@ -242,6 +243,8 @@ cat <<-EOF > Local/Makefile # SPOOL_MODE=0640 SUPPORT_MOVE_FROZEN_MESSAGES=yes HAVE_IPV6=YES + EXPERIMENTAL_SPF=yes + LOOKUP_LIBS+=-lspf2 CFLAGS=$RPM_OPT_FLAGS -Wall $CFLAGS_OPT_WERROR -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED $fPIE EXTRALIBS=-ldl -L/usr/X11R6/%{_lib} $pie EOF @@ -287,15 +290,11 @@ do done ln -sf exim $RPM_BUILD_ROOT/usr/sbin/sendmail %if 0%{?suse_version} > 1220 -ln -sv ../../%{_unitdir}/exim.service $RPM_BUILD_ROOT/usr/sbin/rcexim +ln -sv service $RPM_BUILD_ROOT/usr/sbin/rcexim %else ln -sv ../../etc/init.d/exim $RPM_BUILD_ROOT/usr/sbin/rcexim %endif -%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0 mv $RPM_BUILD_ROOT/usr/sbin/eximon* $RPM_BUILD_ROOT/usr/bin/ -%else -rm $RPM_BUILD_ROOT/usr/sbin/eximon* -%endif cp -p %{S:1} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.exim install -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/logrotate.d/exim # man pages @@ -326,12 +325,10 @@ gzip -9 doc/*.txt chmod 644 util/*.{pl,sh} src/convert4r* # # eximstats-html files -%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0 mkdir -p $RPM_BUILD_ROOT/srv/www/eximstats mkdir -p $RPM_BUILD_ROOT/etc/apache2/conf.d/ cp -p $RPM_SOURCE_DIR/eximstats.conf $RPM_BUILD_ROOT/etc/apache2/conf.d/ install -m 0755 $RPM_SOURCE_DIR/eximstats-html-update.py $RPM_BUILD_ROOT/%{_sbindir} -%endif # apparmor profile install -D -m 0644 $RPM_SOURCE_DIR/apparmor.usr.sbin.exim $RPM_BUILD_ROOT/etc/apparmor/profiles/extras/usr.sbin.exim @@ -430,7 +427,6 @@ exit 0 /usr/lib/sendmail /var/adm/fillup-templates/sysconfig.exim %dir %attr(750,mail,mail) /var/log/exim -%if !%{?build_with_mysql:1}0 && !%{?build_with_pgsql:1}0 %files -n eximon %defattr(-,root,root) @@ -444,6 +440,5 @@ exit 0 /etc/apache2/conf.d /etc/apache2/conf.d/eximstats.conf %{_sbindir}/eximstats-html-update.py -%endif %changelog