summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--opendkim.spec155
-rw-r--r--sources5
3 files changed, 164 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 64f2ac5..4efae63 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,10 @@
/opendkim-2.8.3.tar.gz
/opendkim-2.8.4.tar.gz
/opendkim-2.9.0.tar.gz
+<<<<<<< HEAD
+=======
+/opendkim.add-user-group.patch
+>>>>>>> origin/master
/opendkim-2.9.2.tar.gz
/opendkim.autocreate-keys-no.patch
/opendkim.keygen-permissions.patch
diff --git a/opendkim.spec b/opendkim.spec
index ecb0e4c..93e7617 100644
--- a/opendkim.spec
+++ b/opendkim.spec
@@ -1,15 +1,26 @@
+<<<<<<< HEAD
# SystemV-compatible version
+=======
+%global systemd (0%{?fedora} && 0%{?fedora} >= 18) || (0%{?rhel} && 0%{?rhel} >= 7)
+
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+>>>>>>> origin/master
Summary: A DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail
Name: opendkim
Version: 2.10.1
+<<<<<<< HEAD
Release: 4%{?dist}
+=======
+Release: 5%{?dist}
+>>>>>>> origin/master
License: BSD and Sendmail
URL: http://opendkim.org/
Group: System Environment/Daemons
Requires: lib%{name} = %{version}-%{release}
Requires (pre): shadow-utils
+<<<<<<< HEAD
# Uncomment for systemd version
#Requires (post): systemd-units
#Requires (preun): systemd-units
@@ -19,12 +30,29 @@ Requires (pre): shadow-utils
#BuildRequires: libmemcached-devel
# Uncomment for SystemV version
+=======
+%if %systemd
+# Required for systemd
+Requires (post): systemd-units
+Requires (preun): systemd-units
+Requires (postun): systemd-units
+Requires (post): systemd-sysv
+BuildRequires: libdb-devel
+BuildRequires: libmemcached-devel
+%else
+>>>>>>> origin/master
Requires (post): chkconfig
Requires (preun): chkconfig, initscripts
Requires (postun): initscripts
BuildRequires: db4-devel
+<<<<<<< HEAD
# Required for all versions
+=======
+%endif
+
+# Required for all systems
+>>>>>>> origin/master
BuildRequires: libbsd
BuildRequires: libbsd-devel
BuildRequires: pkgconfig
@@ -60,6 +88,7 @@ Requires: libopendkim = %{version}-%{release}
This package contains the static libraries, headers, and other support files
required for developing applications against libopendkim.
+<<<<<<< HEAD
#%package sysvinit
#Summary: The SysV init script to manage the OpenDKIM milter.
#Group: System Environment/Daemons
@@ -78,13 +107,32 @@ required for developing applications against libopendkim.
%prep
%setup -q
%patch0 -p1
+=======
+%prep
+%setup -q
+%if %systemd
+# Apply systemd patches
+#%patch0 -p1
+%else
+# Apply SysV patches
+%patch0 -p1
+%endif
+>>>>>>> origin/master
%build
# Always use system libtool instead of opendkim provided one to
# properly handle 32 versus 64 bit detection and settings
%define LIBTOOL LIBTOOL=`which libtool`
+<<<<<<< HEAD
+%configure --with-db
+=======
+%if %systemd
+%configure --with-libmemcached --with-db
+%else
%configure --with-db
+%endif
+>>>>>>> origin/master
# Remove rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@@ -96,11 +144,22 @@ rm -rf %{buildroot}
make DESTDIR=%{buildroot} install %{?_smp_mflags}
install -d %{buildroot}%{_sysconfdir}
install -d %{buildroot}%{_sysconfdir}/sysconfig
+install -m 0755 contrib/init/redhat/%{name}-default-keygen %{buildroot}%{_sbindir}/%{name}-default-keygen
+
+%if %systemd
+install -d -m 0755 %{buildroot}%{_unitdir}
+install -m 0644 contrib/systemd/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
+%else
install -d %{buildroot}%{_initrddir}
+<<<<<<< HEAD
#install -d -m 0755 %{buildroot}%{_unitdir}
#install -m 0644 contrib/systemd/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
install -m 0755 contrib/init/redhat/%{name} %{buildroot}%{_initrddir}/%{name}
install -m 0755 contrib/init/redhat/%{name}-default-keygen %{buildroot}%{_sbindir}/%{name}-default-keygen
+=======
+install -m 0755 contrib/init/redhat/%{name} %{buildroot}%{_initrddir}/%{name}
+%endif
+>>>>>>> origin/master
cat > %{buildroot}%{_sysconfdir}/%{name}.conf << 'EOF'
## BASIC OPENDKIM CONFIGURATION FILE
@@ -191,9 +250,12 @@ cat > %{buildroot}%{_sysconfdir}/sysconfig/%{name} << 'EOF'
# Set the necessary startup options
OPTIONS="-x %{_sysconfdir}/%{name}.conf -P %{_localstatedir}/run/%{name}/%{name}.pid"
+<<<<<<< HEAD
# Determine whether default DKIM keys are automatically created on start (deprecated)
#AUTOCREATE_DKIM_KEYS=YES
+=======
+>>>>>>> origin/master
# Set the default DKIM selector
DKIM_SELECTOR=default
@@ -359,15 +421,28 @@ getent passwd %{name} >/dev/null || \
exit 0
%post
+<<<<<<< HEAD
#if [ $1 -eq 1 ] ; then
# # Initial installation
# /bin/systemctl enable %{name}.service >/dev/null 2>&1 || :
#fi
#%post sysvinit
+=======
+%if %systemd
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl enable %{name}.service >/dev/null 2>&1 || :
+fi
+
+%else
+
+>>>>>>> origin/master
/sbin/chkconfig --add %{name} || :
+%endif
%preun
+<<<<<<< HEAD
#if [ $1 -eq 0 ] ; then
# # Package removal, not upgrade
# /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
@@ -375,13 +450,26 @@ exit 0
#fi
#%preun sysvinit
+=======
+%if %systemd
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
+ /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
+fi
+
+%else
+
+>>>>>>> origin/master
if [ $1 -eq 0 ]; then
service %{name} stop >/dev/null || :
/sbin/chkconfig --del %{name} || :
fi
exit 0
+%endif
%postun
+<<<<<<< HEAD
#/bin/systemctl daemon-reload >/dev/null 2>&1 || :
#if [ $1 -ge 1 ] ; then
# # Package upgrade, not uninstall
@@ -389,11 +477,24 @@ exit 0
#fi
#%postun sysvinit
+=======
+%if %systemd
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
+fi
+
+%else
+
+>>>>>>> origin/master
if [ "$1" -ge "1" ] ; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
exit 0
+%endif
+<<<<<<< HEAD
#%triggerun -- %{name} < 2.8.0-1
#/usr/bin/systemd-sysv-convert --save %{name} >/dev/null 2>&1 || :
#/bin/systemctl enable %{name}.service >/dev/null 2>&1
@@ -402,6 +503,14 @@ exit 0
#%triggerpostun -n opendkim-sysvinit -- %{name} < 2.8.0-1
#/sbin/chkconfig --add %{name} >/dev/null 2>&1 || :
+=======
+%if %systemd
+%triggerun -- %{name} < 2.8.0-1
+/bin/systemctl enable %{name}.service >/dev/null 2>&1
+/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
+/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
+%endif
+>>>>>>> origin/master
%post -n libopendkim -p /sbin/ldconfig
@@ -429,12 +538,21 @@ rm -rf %{buildroot}
%dir %attr(-,%{name},%{name}) %{_localstatedir}/run/%{name}
%dir %attr(-,root,%{name}) %{_sysconfdir}/%{name}
%dir %attr(750,%name,%{name}) %{_sysconfdir}/%{name}/keys
+<<<<<<< HEAD
#%attr(0644,root,root) %{_unitdir}/%{name}.service
%attr(0755,root,root) %{_sbindir}/%{name}-default-keygen
#%files sysvinit
#%defattr(-,root,root)
+=======
+%attr(0755,root,root) %{_sbindir}/%{name}-default-keygen
+
+%if %systemd
+%attr(0644,root,root) %{_unitdir}/%{name}.service
+%else
+>>>>>>> origin/master
%attr(0755,root,root) %{_initrddir}/%{name}
+%endif
%files -n libopendkim
%defattr(-,root,root)
@@ -450,7 +568,15 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/*.pc
%changelog
+<<<<<<< HEAD
* Fri Mar 24 2015 Steve Jenkins <steve@stevejenkins.com> - 2.10.1-4
+=======
+* Wed Mar 25 2015 Steve Jenkins <steve@stevejenkins.com> - 2.10.1-5
+- Combined systemd and SysV spec files using conditionals
+- Drop sysvinit subpackage completely
+
+* Tue Mar 24 2015 Steve Jenkins <steve@stevejenkins.com> - 2.10.1-4
+>>>>>>> origin/master
- Fixed typo in Group name
- Added updated libtool definition
- Additional comments in spec file
@@ -474,7 +600,11 @@ rm -rf %{buildroot}
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+<<<<<<< HEAD
* Mon Aug 4 2014 Steve Jenkins <steve@stevejenkins.com> - 2.9.2-2
+=======
+* Mon Aug 04 2014 Steve Jenkins <steve@stevejenkins.com> - 2.9.2-2
+>>>>>>> origin/master
- Change file ownerships/permissions to fix https://bugzilla.redhat.com/show_bug.cgi?id=891292
- Default keys no longer created on startup. Privileged user must run opendkim-default-keygen or create manually (after install)
@@ -484,11 +614,16 @@ rm -rf %{buildroot}
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+<<<<<<< HEAD
+=======
+
+>>>>>>> origin/master
* Wed Dec 18 2013 Steve Jenkins <steve stevejenkins com> - 2.9.0-2
- Patch adds user and group to systemd service file (Thx jcosta@redhat.com)
- Changed default ownership of /etc/opendkim/keys directory to opendkim user
* Wed Dec 18 2013 Steve Jenkins <steve stevejenkins com> - 2.9.0-1
+<<<<<<< HEAD
- Update to use newer upstream 2.9.0 source code
- Added libbsd-devel to BuildRequires
- Removed listrl references from libopendkim files section (handled by libbsd-devel)
@@ -497,6 +632,16 @@ rm -rf %{buildroot}
- Rebuild of all release packages to sync version numbers
* Sun Nov 3 2013 Ville Skytta <ville.skytta@iki.fi> - 2.8.4-3
+=======
+- Updated to use newer upstream 2.9.0 source code
+- Added libbsd-devel to Build Requires
+- Removed listrl references from libopendkim files section (handled by libbsd-devel)
+
+* Sun Nov 3 2013 Steve Jenkins <steve stevejenkins com> - 2.8.4-4
+- Rebuild of all release packages to sync version numbers
+
+* Sun Nov 3 2013 Ville Skytta ville.skytta@iki.fi> - 2.8.4-3
+>>>>>>> origin/master
- Fix path to docs in sample config when doc dir is unversioned (#993997).
* Sat Aug 03 2013 Petr Pisar <ppisar@redhat.com> - 2.8.4-2
@@ -506,6 +651,12 @@ rm -rf %{buildroot}
- Updated to use newer upstream 2.8.4 source code
- Added libbsd build requirement
+<<<<<<< HEAD
+=======
+* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 2.8.3-3
+- Perl 5.18 rebuild
+
+>>>>>>> origin/master
* Fri May 17 2013 Steve Jenkins <steve stevejenkins com> 2.8.3-2
- Removed libmemcached support from SysV version (requires > v0.36)
@@ -525,7 +676,11 @@ rm -rf %{buildroot}
* Tue Feb 26 2013 Steve Jenkins <steve stevejenkins com> 2.8.0-3
- Split into two spec files: systemd (F17+) and SysV (EL5-6)
+<<<<<<< HEAD
- systemd-only: Removed leading / from unitdir variables
+=======
+- Removed leading / from unitdir variables
+>>>>>>> origin/master
- Removed commented source lines
- Created comment sections for easy switching between systemd and SysV
diff --git a/sources b/sources
index 15ab060..618f3f0 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,7 @@
+<<<<<<< HEAD
e75c2944634f875a301d85ab30c2d094 opendkim-2.10.1.tar.gz
d5cc6208c52eb939b538290470c88fdb opendkim.init.patch
+=======
+d5cc6208c52eb939b538290470c88fdb opendkim.init.patch
+e75c2944634f875a301d85ab30c2d094 opendkim-2.10.1.tar.gz
+>>>>>>> origin/master