[opendkim] Updating to 2.4.2-4

stevej stevej at fedoraproject.org
Tue Sep 20 15:39:11 UTC 2011


commit 80f78adbeaa851f915670869bc5b2a5728bc1736
Author: Steve Jenkins <steve at stevejenkins.com>
Date:   Tue Sep 20 08:37:34 2011 -0700

    Updating to 2.4.2-4

 opendkim-2.4.2-initscript.patch |   18 ++++++--
 opendkim.spec                   |   85 +++++++++++++++++++++++++++++----------
 2 files changed, 76 insertions(+), 27 deletions(-)
---
diff --git a/opendkim-2.4.2-initscript.patch b/opendkim-2.4.2-initscript.patch
index 1e3b82b..5670542 100644
--- a/opendkim-2.4.2-initscript.patch
+++ b/opendkim-2.4.2-initscript.patch
@@ -1,15 +1,15 @@
 --- opendkim-2.4.2/contrib/init/redhat/opendkim.in	2011-08-05 21:09:35.000000000 -0700
-+++ opendkim-2.4.2-patches/opendkim.in	2011-08-23 13:08:37.687460892 -0700
++++ opendkim-2.4.2p/contrib/init/redhat/opendkim.in	2011-09-19 13:54:19.138499060 -0700
 @@ -2,7 +2,7 @@
  #
  # opendkim    Start and stop OpenDKIM.
  
 -# chkconfig: 2345 41 61
-+# chkconfig: - 41 61
++# chkconfig: - 41 59
  # description: OpenDKIM implements the DomainKeys Identified Mail (DKIM)
  #              service and a milter-based filter application that can plug
  #              in to any milter-aware MTA.
-@@ -11,33 +11,58 @@
+@@ -11,33 +11,66 @@
  
  ### BEGIN INIT INFO
  # Provides: opendkim
@@ -24,8 +24,8 @@
 -# OpenDKIM startup script v1.3 for RHEL/CentOS/Fedora
 -# by Steve Jenkins (SteveJenkins.com) - 02-15-2011
 -# Based on a script by Andrew Colin Kissa (TopDog) for dkim-milter - 28-05-2009
-+# OpenDKIM startup script v1.4 for RHEL/CentOS/Fedora
-+# by Steve Jenkins (SteveJenkins.com) - 08-22-2011
++# OpenDKIM startup script v1.5 for RHEL/CentOS/Fedora
++# by Steve Jenkins (SteveJenkins.com) - 09-19-2011
 +# Based on a script by Andrew Colin Kissa (TopDog) for dkim-milter - 05-28-2009
  # - Additional functionality to prevent multiple instances and a reload
 -#   handler by Chris LaJoie - 11-01-2011
@@ -33,6 +33,9 @@
  # - Added notification (along with with current PID) if "start" is issued when
  #   OpenDKIM is already running - 02-15-2011
 +# - Added support to generate default keys on start - 08-22-2011
++# - Added support for /etc/sysconfig/opendkim override of default init script
++#   setup parameters - 09-19-2011
++# - Changed default stop priority - 09-19-2011
  
  . /etc/rc.d/init.d/functions
  
@@ -51,6 +54,11 @@
 +KEYGEN=@exec_prefix@/bin/opendkim-genkey
 +DKIM_KEYDIR=@sysconfdir@/$prog/keys
 +DKIM_SELECTOR=default
++AUTOCREATE_DKIM_KEYS=yes
++
++if [ -f /etc/sysconfig/opendkim ]; then
++    . /etc/sysconfig/opendkim
++fi
 +
 +do_dkim_keygen() {
 +	if [ ! -s $DKIM_KEYDIR/$DKIM_SELECTOR.private ]; then
diff --git a/opendkim.spec b/opendkim.spec
index a914a9d..4e9a830 100644
--- a/opendkim.spec
+++ b/opendkim.spec
@@ -2,10 +2,10 @@
 #
 # $Id: opendkim.spec.in,v 1.2 2010/10/25 17:13:47 cm-msk Exp $
 
-Summary: DomainKeys Identified Mail (DKIM) Signature milter and library
+Summary: A DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail
 Name: opendkim
 Version: 2.4.2
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: BSD and Sendmail
 URL: http://opendkim.org/
 Group: System Environment/Daemons
@@ -14,22 +14,17 @@ Requires (pre): shadow-utils
 Requires (post): chkconfig
 Requires (preun): chkconfig, initscripts
 Requires (postun): initscripts
-BuildRequires: sendmail-devel, openssl-devel, libtool, pkgconfig
+BuildRequires: sendmail-devel, openssl-devel, pkgconfig
 Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 Patch0: %{name}-%{version}-initscript.patch
 Patch1: %{name}-%{version}-installreadme.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
-OpenDKIM provides an open source library that implements the DKIM service,
-plus a milter-based filter application that can plug in to any milter-aware
-MTA, including sendmail, Postfix, or any other MTA that supports the milter
-protocol.
-
-The DKIM sender authentication system was originally created by the E-mail
-Signing Technology Group (ESTG) and is now a proposed standard of the
-IETF (RFC4871).  DKIM is an amalgamation of the DomainKeys (DK) proposal by
-Yahoo!, Inc. and the Internet Identified Mail (IIM) proposal by Cisco.
+OpenDKIM allows signing and/or verification of email through an open source
+library that implements the DKIM service, plus a milter-based filter
+application that can plug in to any milter-aware MTA, including sendmail,
+Postfix, or any other MTA that supports the milter protocol.
 
 %package -n libopendkim
 Summary: An open source DKIM library
@@ -55,14 +50,13 @@ required for developing applications against libopendkim.
 
 %build
 %configure --enable-stats
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
 
 %install
 rm -rf %{buildroot}
 
-# Always use system libtool instead of opendkim provided one
-%global LIBTOOL LIBTOOL=`which libtool`
-
-make DESTDIR=%{buildroot} install %{?_smp_mflags} %{LIBTOOL}
+make DESTDIR=%{buildroot} install %{?_smp_mflags}
 mkdir -p %{buildroot}%{_sysconfdir}
 mkdir -p %{buildroot}%{_initrddir}
 install -m 0755 contrib/init/redhat/opendkim %{buildroot}%{_initrddir}/%{name}
@@ -90,12 +84,12 @@ Mode	v
 Syslog	yes
 
 # Log additional entries indicating successful signing or verification of messages.
-# SyslogSuccess	yes
+SyslogSuccess	yes
 
 # If logging is enabled, include detailed logging about why or why not a message was
-# signed or verified. This causes a large increase in the amount of log data generated
-# for each message, so it should be limited to debugging use only.
-#LogWhy	yes
+# signed or verified. This causes an increase in the amount of log data generated
+# for each message, so set this to No (or comment it out) if it gets too noisy.
+LogWhy	yes
 
 # Attempt to become the specified user before starting operations.
 UserID	%{name}:%{name}
@@ -107,8 +101,8 @@ Socket	inet:8891 at localhost
 # privileged user (e.g. Postfix)
 Umask	002
 
-# This specifies a file in which to store DKIM transaction statistics.
-#Statistics	%{_localstatedir}/%{name}/stats
+# This specifies a text file in which to store DKIM transaction statistics.
+#Statistics	%{_localstatedir}/spool/%{name}/stats.dat
 
 ## SIGNING OPTIONS
 
@@ -144,6 +138,36 @@ KeyFile	%{_sysconfdir}/%{name}/keys/default.private
 #InternalHosts	refile:%{_sysconfdir}/%{name}/TrustedHosts
 EOF
 
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
+cat > %{buildroot}%{_sysconfdir}/sysconfig/%{name} << 'EOF'
+# Uncomment the following line to disable automatic DKIM key creation
+#AUTOCREATE_DKIM_KEYS=NO
+#
+# Uncomment the following line to set the default DKIM selector
+#DKIM_SELECTOR=default
+#
+# Uncomment the following to set the default DKIM key directory
+#DKIM_KEYDIR=/etc/opendkim/keys
+EOF
+
+mkdir -p %{buildroot}%{_sysconfdir}/%{name}
+cat > %{buildroot}%{_sysconfdir}/%{name}/SigningTable << 'EOF'
+# The following wildcard will work only if
+# refile:%{_sysconfdir}/%{name}/SigningTable is included
+# in %{_sysconfdir}/%{name}.conf.
+
+#*@example.com default._domainkey.example.com
+
+# If refile: is not specified in %{_sysconfdir}/%{name}.conf, then full
+# user at host is checked first, then simply host, then user at .domain (with all
+# superdomains checked in sequence, so "foo.example.com" would first check
+# "user at foo.example.com", then "user at .example.com", then "user at .com"), then
+# .domain, then user@*, and finally *. See the opendkim.conf(5) man page
+# under "SigningTable".
+
+#example.com default._domainkey.example.com
+EOF
+
 install -p -d %{buildroot}%{_sysconfdir}/tmpfiles.d
 cat > %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf <<'EOF'
 D %{_localstatedir}/run/%{name} 0700 %{name} %{name} -
@@ -158,6 +182,10 @@ mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
 mkdir -p %{buildroot}%{_sysconfdir}/%{name}
 mkdir %{buildroot}%{_sysconfdir}/%{name}/keys
 
+install -m 0755 contrib/stats/%{name}-reportstats %{buildroot}%{_prefix}/bin/%{name}-reportstats
+sed -i 's|^OPENDKIMSTATSDIR="/var/db/opendkim"|OPENDKIMSTATSDIR="%{_localstatedir}/spool/%{name}"|g' %{buildroot}%{_prefix}/bin/%{name}-reportstats
+sed -i 's|^OPENDKIMDATOWNER="mailnull:mailnull"|OPENDKIMDATOWNER="%{name}:%{name}"|g' %{buildroot}%{_prefix}/bin/%{name}-reportstats
+
 chmod 0644 contrib/convert/convert_keylist.sh
 
 %pre
@@ -197,8 +225,11 @@ rm -rf %{buildroot}
 %doc contrib/convert/convert_keylist.sh %{name}/*.sample
 %doc %{name}/%{name}.conf.simple-verify %{name}/%{name}.conf.simple
 %doc %{name}/README contrib/lua/*.lua
+%doc contrib/stats/README.opendkim-reportstats
 %config(noreplace) %{_sysconfdir}/%{name}.conf
 %config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
+%config(noreplace) %attr(-,%{name},%{name}) %{_sysconfdir}/%{name}/SigningTable
+%{_sysconfdir}/sysconfig/%{name}
 %{_initrddir}/%{name}
 %{_sbindir}/*
 %{_bindir}/*
@@ -222,6 +253,16 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/*.pc
 
 %changelog
+* Mon Sep 19 2011 Steve Jenkins <steve stevejenkins com> 2.4.2-4
+- Use Fedora standard method to fix pkg supplied libtool (Todd Lyons)
+- Updated Summary and Description
+- Fixed default stats file location in sample config file
+- Install opendkim-reportstats and README.opendkim-reportstats
+- Changed default stop priority in init script
+- Added example SigningTable
+- Added sysconfig support for AUTOCREATE_DKIM_KEYS, DKIM_SELECTOR, DKIM_KEYDIR
+- Enabled SysLogSuccess and LogWhy by default
+
 * Mon Aug 22 2011 Steve Jenkins <steve stevejenkins com> 2.4.2-3
 - Mad props to Matt Domsch for sponsoring and providing feedback
 - Removed {?OSshort} variable in Release: header


More information about the scm-commits mailing list