Created
December 19, 2013 18:15
-
-
Save stevejenkins/8043731 to your computer and use it in GitHub Desktop.
Differences between systemd vs. SystemV versions of OpenDKIM spec file for Fedora/EPEL repos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- OpenDKIM-Fedora/SPECS/opendkim.spec 2013-12-18 19:51:31.927514150 -0800 | |
+++ OpenDKIM-SysV/SPECS/opendkim.spec 2013-12-18 19:51:09.221494149 -0800 | |
@@ -1,6 +1,4 @@ | |
-# systemd-compatible version | |
- | |
-%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} | |
+# SystemV-compatible version | |
Summary: A DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail | |
Name: opendkim | |
@@ -13,18 +11,18 @@ | |
Requires (pre): shadow-utils | |
# Uncomment for systemd version | |
-Requires (post): systemd-units | |
-Requires (preun): systemd-units | |
-Requires (postun): systemd-units | |
-Requires (post): systemd-sysv | |
-BuildRequires: libdb-devel | |
-BuildRequires: libmemcached-devel | |
+#Requires (post): systemd-units | |
+#Requires (preun): systemd-units | |
+#Requires (postun): systemd-units | |
+#Requires (post): systemd-sysv | |
+#BuildRequires: libdb-devel | |
+#BuildRequires: libmemcached-devel | |
# Uncomment for SystemV version | |
-#Requires (post): chkconfig | |
-#Requires (preun): chkconfig, initscripts | |
-#Requires (postun): initscripts | |
-#BuildRequires: db4-devel | |
+Requires (post): chkconfig | |
+Requires (preun): chkconfig, initscripts | |
+Requires (postun): initscripts | |
+BuildRequires: db4-devel | |
BuildRequires: libbsd | |
BuildRequires: libbsd-devel | |
@@ -35,9 +33,7 @@ | |
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz | |
-# Add User/Group to systemd service file | |
-# https://sourceforge.net/p/opendkim/bugs/184/ | |
-Patch0: %{name}.add-user-group.patch | |
+#Patch0: %{name}-add-user-group.patch | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
@@ -64,27 +60,27 @@ | |
This package contains the static libraries, headers, and other support files | |
required for developing applications against libopendkim. | |
-%package sysvinit | |
-Summary: The SysV init script to manage the OpenDKIM milter. | |
-Group: System Environmnt/Daemons | |
-Requires: %{name} = %{version}-%{release} | |
- | |
-%description sysvinit | |
-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. This package | |
-contains the SysV init script to manage the OpenDKIM milter when running a | |
-legacy SysV-compatible init system. | |
+#%package sysvinit | |
+#Summary: The SysV init script to manage the OpenDKIM milter. | |
+#Group: System Environmnt/Daemons | |
+#Requires: %{name} = %{version}-%{release} | |
+ | |
+#%description sysvinit | |
+#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. This package | |
+#contains the SysV init script to manage the OpenDKIM milter when running a | |
+#legacy SysV-compatible init system. | |
-It is not required when the init system used is systemd. | |
+#It is not required when the init system used is systemd. | |
%prep | |
%setup -q | |
-%patch0 -p1 | |
+#%patch0 -p1 | |
%build | |
-%configure --with-unbound --with-libmemcached --with-db | |
+%configure --with-unbound --with-db | |
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 | |
@@ -95,8 +91,8 @@ | |
install -d %{buildroot}%{_sysconfdir} | |
install -d %{buildroot}%{_sysconfdir}/sysconfig | |
install -d %{buildroot}%{_initrddir} | |
-install -d -m 0755 %{buildroot}%{_unitdir} | |
-install -m 0644 contrib/systemd/%{name}.service %{buildroot}%{_unitdir}/%{name}.service | |
+#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 | |
@@ -276,22 +272,22 @@ | |
exit 0 | |
%post | |
-if [ $1 -eq 1 ] ; then | |
- # Initial installation | |
- /bin/systemctl enable %{name}.service >/dev/null 2>&1 || : | |
-fi | |
+#if [ $1 -eq 1 ] ; then | |
+# # Initial installation | |
+# /bin/systemctl enable %{name}.service >/dev/null 2>&1 || : | |
+#fi | |
-%post sysvinit | |
+#%post sysvinit | |
/sbin/chkconfig --add %{name} || : | |
%preun | |
-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 | |
+#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 | |
-%preun sysvinit | |
+#%preun sysvinit | |
if [ $1 -eq 0 ]; then | |
service %{name} stop >/dev/null || : | |
/sbin/chkconfig --del %{name} || : | |
@@ -299,26 +295,26 @@ | |
exit 0 | |
%postun | |
-/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 | |
+#/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 | |
-%postun sysvinit | |
+#%postun sysvinit | |
if [ "$1" -ge "1" ] ; then | |
/sbin/service %{name} condrestart >/dev/null 2>&1 || : | |
fi | |
exit 0 | |
-%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 | |
-/sbin/chkconfig --del %{name} >/dev/null 2>&1 || : | |
-/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : | |
+#%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 | |
+#/sbin/chkconfig --del %{name} >/dev/null 2>&1 || : | |
+#/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : | |
-%triggerpostun -n opendkim-sysvinit -- %{name} < 2.8.0-1 | |
-/sbin/chkconfig --add %{name} >/dev/null 2>&1 || : | |
+#%triggerpostun -n opendkim-sysvinit -- %{name} < 2.8.0-1 | |
+#/sbin/chkconfig --add %{name} >/dev/null 2>&1 || : | |
%post -n libopendkim -p /sbin/ldconfig | |
@@ -346,11 +342,11 @@ | |
%dir %attr(-,%{name},%{name}) %{_localstatedir}/run/%{name} | |
%dir %attr(-,root,%{name}) %{_sysconfdir}/%{name} | |
%dir %attr(750,%name,%{name}) %{_sysconfdir}/%{name}/keys | |
-%attr(0644,root,root) %{_unitdir}/%{name}.service | |
-%attr(0755,root,root) %{_sbindir}/%{name}-default-keygen | |
+#%attr(0644,root,root) %{_unitdir}/%{name}.service | |
+#%attr(0755,root,root) %{_sbindir}/%{name}-default-keygen | |
-%files sysvinit | |
-%defattr(-,root,root) | |
+#%files sysvinit | |
+#%defattr(-,root,root) | |
%attr(0755,root,root) %{_initrddir}/%{name} | |
%files -n libopendkim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment