SPECS: apache-mod_nss.spec - add builddb bcond and include pregenerated nss...

glen glen at pld-linux.org
Fri Oct 3 22:43:57 CEST 2008


Author: glen                         Date: Fri Oct  3 20:43:57 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- add builddb bcond and include pregenerated nss db from distfiles

---- Files affected:
SPECS:
   apache-mod_nss.spec (1.16 -> 1.17) 

---- Diffs:

================================================================
Index: SPECS/apache-mod_nss.spec
diff -u SPECS/apache-mod_nss.spec:1.16 SPECS/apache-mod_nss.spec:1.17
--- SPECS/apache-mod_nss.spec:1.16	Fri Oct  3 18:28:59 2008
+++ SPECS/apache-mod_nss.spec	Fri Oct  3 22:43:52 2008
@@ -1,19 +1,22 @@
 # $Revision$, $Date$
-# TODO
-# - certutil tries to open /dev/tty to get passphrase for nss db init
+# Conditional build:
+%bcond_with	builddb		# build nss database. requires interactive input
+#
 %define		mod_name	nss
 %define		apxs		/usr/sbin/apxs
 Summary:	mod_nss - strong cryptography support for Apache using SSL/TLS library NSS
 Summary(pl.UTF-8):	mod_nss - silna kryptografia dla Apache'a przy użyciu biblioteki SSL/TLS NSS
 Name:		apache-mod_nss
 Version:	1.0.8
-Release:	0.1
+Release:	0.2
 License:	Apache v2.0
 Group:		Networking/Daemons
 Source0:	http://directory.fedoraproject.org/sources/mod_nss-%{version}.tar.gz
 # Source0-md5:	32458d91ce909260a6081cce58004e2f
 Source1:	apache-server.crt
 Source2:	apache-server.key
+Source3:	nss.tar.bz2
+# Source3-md5:	d5bfafc09ad23f4bdd917d450680cec7
 Patch0:		%{name}-config.patch
 URL:		http://directory.fedoraproject.org/wiki/Mod_nss
 BuildRequires:	%{apxs}
@@ -23,8 +26,10 @@
 BuildRequires:	libstdc++-devel
 BuildRequires:	nspr-devel >= 1:4.6.2
 BuildRequires:	nss-devel >= 1:3.11.3
-#BuildRequires:	nss-tools
-#BuildRequires:	openssl-tools
+%if %{with builddb}
+BuildRequires:	nss-tools
+BuildRequires:	openssl-tools
+%endif
 Requires:	apache(modules-api) = %{apache_modules_api}
 Requires:	nspr >= 1:4.6.2
 Requires:	nss >= 1:3.11.3
@@ -56,7 +61,7 @@
 zamiast OpenSSL.
 
 %prep
-%setup -q -n mod_nss-%{version}
+%setup -q -n mod_nss-%{version} -a3
 %patch0 -p1
 cp %{SOURCE1} server.crt
 cp %{SOURCE2} server.key
@@ -76,11 +81,14 @@
 
 %{__make}
 
+%if %{with builddb}
+# XXX: this is interactive, cannot be done in builders process
+rm -rf nss
 install -d nss
-# XXX: this is interactive, cannot be done in rpm build process
-#certutil -N -d nss
-#openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -name "Server-Cert" -passout pass:
-#pk12util -i server.p12 -d nss -W ''
+certutil -N -d nss
+openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -name "Server-Cert" -passout pass:
+pk12util -i server.p12 -d nss -W ''
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -89,7 +97,7 @@
 install nss_pcache $RPM_BUILD_ROOT%{_sbindir}
 
 cp -a nss.conf $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/40_mod_%{mod_name}.conf
-#cp -a nss/* $RPM_BUILD_ROOT%{_sysconfdir}/nss
+cp -a nss/* $RPM_BUILD_ROOT%{_sysconfdir}/nss
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -106,9 +114,9 @@
 %defattr(644,root,root,755)
 %doc NOTICE README TODO docs/mod_nss.html migrate.pl
 %attr(750,root,root) %dir %{_sysconfdir}/nss
-#%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nss/cert8.db
-#%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nss/key3.db
-#%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nss/secmod.db
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nss/cert8.db
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nss/key3.db
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nss/secmod.db
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/libmodnss.so
 %attr(755,root,root) %{_sbindir}/nss_pcache
@@ -119,6 +127,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.17  2008/10/03 20:43:52  glen
+- add builddb bcond and include pregenerated nss db from distfiles
+
 Revision 1.16  2008/10/03 16:28:59  glen
 - build without BR: cpp
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/apache-mod_nss.spec?r1=1.16&r2=1.17&f=u



More information about the pld-cvs-commit mailing list