[ocspd/f16] * Mon Jan 21 2013 Patrick Monnerat <pm at datasphere.ch> 1.5.1-0.13.rc1 - Patch "podsyntax" to fix man

Patrick Monnerat monnerat at fedoraproject.org
Tue Jan 22 12:27:53 UTC 2013


commit 965bd11d1fe843d1e4686d31ccaeada4127d91fb
Author: Patrick Monnerat <pm at datasphere.ch>
Date:   Tue Jan 22 13:27:31 2013 +0100

    * Mon Jan 21 2013 Patrick Monnerat <pm at datasphere.ch> 1.5.1-0.13.rc1
    - Patch "podsyntax" to fix man page pod syntax.
    - Patch "badalgorcast" to fix a bad X509_ALGOR cast.
      https://bugzilla.redhat.com/show_bug.cgi?id=901793

 ocspd.spec                            |   75 +++++++++++++++++++++++++++++----
 openca-ocspd-1.5.1-badalgorcast.patch |   47 ++++++++++++++++++++
 openca-ocspd-1.5.1-podsyntax.patch    |   36 ++++++++++++++++
 3 files changed, 149 insertions(+), 9 deletions(-)
---
diff --git a/ocspd.service b/ocspd.service
old mode 100755
new mode 100644
diff --git a/ocspd.spec b/ocspd.spec
index 08fae7b..fe1b285 100644
--- a/ocspd.spec
+++ b/ocspd.spec
@@ -4,7 +4,7 @@
 
 Name:		ocspd
 Version:	1.5.1
-Release:	0.9.%{alphatag}%{?dist}
+Release:	0.13.%{alphatag}%{?dist}
 Summary:	OpenCA OCSP Daemon
 License:	ASL 1.0
 Group:		System Environment/Daemons
@@ -14,18 +14,28 @@ Patch1:		openca-ocspd-1.5.1-bufresponse.patch
 Patch2:		openca-ocspd-1.5.1-misc.patch
 Patch3:		openca-ocspd-1.5.1-badcomment.patch
 Patch4:		openca-ocspd-1.5.1-openssl.patch
+Patch5:		openca-ocspd-1.5.1-podsyntax.patch
+Patch6:		openca-ocspd-1.5.1-badalgorcast.patch
 URL:		http://www.openca.org/projects/ocspd
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
 Obsoletes:	openca-ocspd <= %{version}-%{release}
 Provides:	openca-ocspd = %{version}-%{release}
 Requires(pre):	shadow-utils
-Requires(post):	systemd-units
-Requires(post):	systemd-sysv
-Requires(preun):systemd-units
-Requires(postun):systemd-units
 BuildRequires:	openssl-devel
 BuildRequires:	openldap-devel
 BuildRequires:	automake autoconf
-BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
+
+%if 0%{?fedora} >= 16
+Requires(post):	systemd
+Requires(post):	systemd-sysv
+Requires(preun):systemd
+Requires(postun):systemd
+%else
+Requires(post):	chkconfig
+Requires(preun):chkconfig
+Requires(preun):initscripts
+Requires(postun):initscripts
+%endif
 
 %description
  The ocspd is an RFC2560 compliant OCSPD responder. It can be used to
@@ -42,6 +52,8 @@ Mozilla/Firefox/Thunderbird/Apache).
 %patch2 -p1 -b .misc
 %patch3 -p1 -b .badcomment
 %patch4 -p1 -b .openssl
+%patch5 -p1 -b .podsyntax
+%patch6 -p1 -b .badalgorcast
 
 
 #-------------------------------------------------------------------------------
@@ -74,6 +86,7 @@ rm -rf "${RPM_BUILD_ROOT}"
 make DESTDIR="${RPM_BUILD_ROOT}" install
 
 
+%if 0%{?fedora} >= 16
 #	Remove SysV init scripts directory.
 
 rm -rf "${RPM_BUILD_ROOT}%{_initrddir}"
@@ -82,6 +95,7 @@ rm -rf "${RPM_BUILD_ROOT}%{_initrddir}"
 
 mkdir -p "${RPM_BUILD_ROOT}%{_unitdir}/"
 cp -a "%{SOURCE1}" "${RPM_BUILD_ROOT}%{_unitdir}/"
+%endif
 
 
 #-------------------------------------------------------------------------------
@@ -106,35 +120,65 @@ exit 0
 %post
 #-------------------------------------------------------------------------------
 
+%if 0%{?fedora} >= 18
+%systemd_post ocspd.service
+%else
+%if 0%{?fedora} >= 16
 if [ "${1}" = "1" ]
 then	#	Initial installation.
 	/bin/systemctl daemon-reload > /dev/null 2>&1 || :
 fi
+%else
+/sbin/chkconfig --add ocspd
+%endif
+%endif
 
 
 #-------------------------------------------------------------------------------
 %preun
 #-------------------------------------------------------------------------------
 
+%if 0%{?fedora} >= 18
+%systemd_preun ocspd.service
+%else
+%if 0%{?fedora} >= 16
 if [ "${1}" = "0" ]
 then	#	Package removal, not upgrade.
 	/bin/systemctl --no-reload disable ocspd.service > /dev/null 2>&1 || :
 	/bin/systemctl stop ocspd.service > /dev/null 2>&1 || :
 fi
+%else
+if [ "${1}" = "0" ]
+then	/sbin/service ocspd stop >/dev/null 2>&1 || :
+	/sbin/chkconfig --del ocspd
+fi
+%endif
+%endif
 
 
 #-------------------------------------------------------------------------------
 %postun
 #-------------------------------------------------------------------------------
 
+%if 0%{?fedora} >= 18
+%systemd_postun_with_restart ocspd.service
+%else
+%if 0%{?fedora} >= 16
 /bin/systemctl daemon-reload > /dev/null 2>&1 || :
 
 if [ "${1}" -gt "0" ]
 then	#	Package upgrade, not uninstall.
 	/bin/systemctl try-restart ocspd.service > /dev/null 2>&1 || :
 fi
+%else
+if [ "${1}" -gt "0" ]
+then	/sbin/service ocspd condrestart >/dev/null 2>&1 || :
+fi
+%endif
+%endif
 
 
+%if 0%{?fedora} >= 16
 #-------------------------------------------------------------------------------
 %triggerun -- ocspd < 1.5.1-0.9
 #-------------------------------------------------------------------------------
@@ -142,7 +186,7 @@ fi
 %{_bindir}/systemd-sysv-convert --save ocspd > /dev/null 2>&1 || :
 /sbin/chkconfig --del ocspd > /dev/null 2>&1 || :
 /bin/systemctl try-restart ocspd.service > /dev/null 2>&1 || :
-
+%endif
 
 #-------------------------------------------------------------------------------
 %files
@@ -156,14 +200,27 @@ fi
 %attr(700, ocspd, root) %dir %{_sysconfdir}/ocspd/private
 %config(noreplace) %{_sysconfdir}/ocspd/ocspd.conf
 %config(noreplace) %{_sysconfdir}/sysconfig/*
-%{_unitdir}/*
 %{_mandir}/*/*
+%if 0%{?fedora} >= 16
+%{_unitdir}/*
+%else
+%{_initrddir}/*
+%endif
 
 
 #-------------------------------------------------------------------------------
 %changelog
 #-------------------------------------------------------------------------------
 
+* Mon Jan 21 2013 Patrick Monnerat <pm at datasphere.ch> 1.5.1-0.13.rc1
+- Patch "podsyntax" to fix man page pod syntax.
+- Patch "badalgorcast" to fix a bad X509_ALGOR cast.
+  https://bugzilla.redhat.com/show_bug.cgi?id=901793
+
+* Fri Nov 16 2012 Patrick Monnerat <pm at datasphere.ch> 1.5.1-0.12.rc1
+- Use new systemd scriptlet macros.
+  https://bugzilla.redhat.com/show_bug.cgi?id=850238
+
 * Tue Jul 12 2011 Patrick Monnerat <pm at datasphere.ch> 1.5.1-0.9.rc1
 - Migration from SysV daemon handling to systemd (BZ# 720521).
 
@@ -298,5 +355,5 @@ verbose switch is used (before it was enabled only in DEBUG mode)
 * Mon Feb 25 2002 Massimiliano Pala <madwolf at openca.org>
   - Fixed response generation
 
-* Thu Feb 20 2001 Massimiliano Pala <madwolf at openca.org>
+* Tue Feb 20 2001 Massimiliano Pala <madwolf at openca.org>
 - First RPM spec file
diff --git a/openca-ocspd-1.5.1-badalgorcast.patch b/openca-ocspd-1.5.1-badalgorcast.patch
new file mode 100644
index 0000000..747f812
--- /dev/null
+++ b/openca-ocspd-1.5.1-badalgorcast.patch
@@ -0,0 +1,47 @@
+diff -Naur openca-ocspd-1.5.1-rc1.orig/src/hash-db.c openca-ocspd-1.5.1-rc1.new/src/hash-db.c
+--- openca-ocspd-1.5.1-rc1.orig/src/hash-db.c	2006-10-15 16:42:20.000000000 +0200
++++ openca-ocspd-1.5.1-rc1.new/src/hash-db.c	2013-01-21 18:56:52.368649025 +0100
+@@ -701,26 +701,32 @@
+ 
+ 		/* Set the Digest Algorithm used */
+ 		nid = EVP_MD_type(digest);
+-		if (nid == NID_undef ) {
+-			if( cid ) OPENSSL_free (cid);
+-			return (NULL);
++		if (nid == NID_undef) {
++			OPENSSL_free(cid);
++			return NULL;
+ 		};
+-		cid->hashAlgorithm = (X509_ALGOR *) OBJ_nid2obj(nid);
++		cid->hashAlgorithm = X509_ALGOR_new();
+ 		if(cid->hashAlgorithm == NULL) {
+-			if( cid ) OPENSSL_free (cid);
+-			return (NULL);
++			OPENSSL_free(cid);
++			return NULL;
++		};
++		cid->hashAlgorithm->algorithm = OBJ_nid2obj(nid);
++		if(cid->hashAlgorithm->algorithm == NULL) {
++			X509_ALGOR_free(cid->hashAlgorithm);
++			OPENSSL_free(cid);
++			return NULL;
+ 		};
+ 		cid->hashAlgorithm->parameter = ASN1_TYPE_new();
+-		if(cid->hashAlgorithm->parameter == NULL ) {
+-			if( cid->hashAlgorithm ) X509_ALGOR_free( cid->hashAlgorithm);
+-			if( cid ) OPENSSL_free (cid);
++		if(cid->hashAlgorithm->parameter == NULL) {
++			X509_ALGOR_free(cid->hashAlgorithm);
++			OPENSSL_free(cid);
+ 			return (NULL);
+ 		}
+ 		cid->hashAlgorithm->parameter->type = V_ASN1_NULL;
+-		sk_CA_ENTRY_CERTID_push( cid_sk, cid );
++		sk_CA_ENTRY_CERTID_push(cid_sk, cid);
+ 	}
+ 
+-	return( cid_sk );
++	return cid_sk;
+ }
+ 
+ STACK_OF(X509_REVOKED) *ocspd_build_crl_entries_list ( CA_LIST_ENTRY *ca,
diff --git a/openca-ocspd-1.5.1-podsyntax.patch b/openca-ocspd-1.5.1-podsyntax.patch
new file mode 100644
index 0000000..71b8796
--- /dev/null
+++ b/openca-ocspd-1.5.1-podsyntax.patch
@@ -0,0 +1,36 @@
+diff -Naur openca-ocspd-1.5.1-rc1.orig/docs/ocspd.conf.3.pod openca-ocspd-1.5.1-rc1.new/docs/ocspd.conf.3.pod
+--- openca-ocspd-1.5.1-rc1.orig/docs/ocspd.conf.3.pod	2013-01-21 13:05:32.780688588 +0100
++++ openca-ocspd-1.5.1-rc1.new/docs/ocspd.conf.3.pod	2013-01-21 13:17:31.530154407 +0100
+@@ -159,6 +159,8 @@
+ 
+ Let's analyze the options in detail.
+ 
++=over 2
++
+ =item B<default_ocspd section>
+ 
+ In this section of the configuration file are set the general options
+@@ -260,7 +262,7 @@
+ 
+ Here are kept options tied to the revoked certificates' list.
+ 
+-=over 4
++=over 6
+ 
+ =item B<ocsp_add_response_certs>
+ 
+@@ -345,6 +347,8 @@
+ 
+ =back
+ 
++=back
++
+ =head1 AUTHOR
+ 
+ Massimiliano Pala <madwolf at openca.org>
+@@ -354,5 +358,3 @@
+ L<ocspd(3)>,L<openca(3)>,L<openssl(1)>, L<ocsp(1)>
+ 
+ =cut
+-
+-


More information about the scm-commits mailing list