Projects
Kolab:3.4:Updates
mod_nss
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 7
View file
mod_nss.spec
Changed
@@ -1,37 +1,78 @@ -%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} -%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}} -%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} +%if 0%{?suse_version} +%global httpd_name apache2 +%else +%global httpd_name httpd +%endif + +%global _ap_sysconfdir %{_sysconfdir}/%{httpd_name} + +%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} +%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/%{httpd_name}/.mmn || echo missing-%{httpd_name}-devel)}} +%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_ap_sysconfdir}/conf.d}} + # /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 -%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} -%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} - -Name: mod_nss -Version: 1.0.8 -Release: 19.1%{?dist} -Summary: SSL/TLS module for the Apache HTTP server -Group: System Environment/Daemons -License: ASL 2.0 -URL: http://directory.fedoraproject.org/wiki/Mod_nss -Source: http://directory.fedoraproject.org/sources/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: nspr-devel >= 4.6.3, nss-devel >= 3.12.6 -BuildRequires: httpd-devel, apr-devel, apr-util-devel -BuildRequires: pkgconfig -BuildRequires: gcc-c++ -Requires: httpd-mmn = %{_httpd_mmn} -Requires(post): httpd, nss-tools -Requires: nss >= 3.12.6 -Patch1: mod_nss-conf.patch -Patch2: mod_nss-gencert.patch -Patch3: mod_nss-wouldblock.patch +%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_ap_sysconfdir}/conf.d}} + +%if 0%{?suse_version} +%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/%{httpd_name}}} +%else +%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/%{httpd_name}/modules}} +%endif + +%if 0%{?suse_version} +Name: apache2-mod_nss +%else +Name: mod_nss +%endif + +Version: 1.0.8 +Release: 19.1%{?dist} +Summary: SSL/TLS module for the Apache HTTP server +Group: System Environment/Daemons +License: ASL 2.0 +URL: http://directory.fedoraproject.org/wiki/Mod_nss +Source: http://directory.fedoraproject.org/sources/mod_nss-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%if 0%{?suse_version} +BuildRequires: bison +BuildRequires: findutils +BuildRequires: flex +BuildRequires: libapr-util1-devel +BuildRequires: libapr1-devel +BuildRequires: mozilla-nspr-devel >= 4.6.3 +BuildRequires: mozilla-nss-devel >= 3.12.6 +%else +BuildRequires: apr-devel +BuildRequires: apr-util-devel +BuildRequires: nspr-devel >= 4.6.3 +BuildRequires: nss-devel >= 3.12.6 +%endif + +BuildRequires: gcc-c++ +BuildRequires: %{httpd_name}-devel +BuildRequires: pkgconfig + +%if 0%{?suse_version} < 1 +Requires: httpd-mmn = %{_httpd_mmn} +Requires(post): httpd +Requires(post): nss-tools +Requires: nss >= 3.12.6 +%else +Requires: mozilla-nss-tools +%endif + +Patch1: mod_nss-conf.patch +Patch2: mod_nss-gencert.patch +Patch3: mod_nss-wouldblock.patch # Add options for tuning client negotiate in NSS -Patch4: mod_nss-negotiate.patch -Patch5: mod_nss-reverseproxy.patch -Patch6: mod_nss-pcachesignal.h -Patch7: mod_nss-reseterror.patch -Patch8: mod_nss-lockpcache.patch -Patch9: mod_nss-httpd24.patch -Patch10: mod_nss-overlapping_memcpy.patch +Patch4: mod_nss-negotiate.patch +Patch5: mod_nss-reverseproxy.patch +Patch6: mod_nss-pcachesignal.h +Patch7: mod_nss-reseterror.patch +Patch8: mod_nss-lockpcache.patch +Patch9: mod_nss-httpd24.patch +Patch10: mod_nss-overlapping_memcpy.patch %description The mod_nss module provides strong cryptography for the Apache Web @@ -40,7 +81,7 @@ security library. %prep -%setup -q +%setup -q -n mod_nss-%{version} %patch1 -p1 -b .conf %patch2 -p1 -b .gencert %patch3 -p1 -b .wouldblock @@ -49,9 +90,11 @@ %patch6 -p1 -b .pcachesignal.h %patch7 -p1 -b .reseterror %patch8 -p1 -b .lockpcache -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 + +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6 %patch9 -p1 -b .httpd24 %endif + %patch10 -p1 -b .overlap # Touch expression parser sources to prevent regenerating it @@ -72,6 +115,11 @@ NSS_BIN=`/usr/bin/pkg-config --variable=exec_prefix nss` +%if 0%{?suse_version} +C_INCLUDE_PATH="/usr/include/nss3:/usr/include/nspr4:/usr/include/apache2-prefork/" +export C_INCLUDE_PATH +%endif + %configure \ --with-nss-lib=$NSS_LIB_DIR \ --with-nss-inc=$NSS_INCLUDE_DIR \ @@ -85,52 +133,70 @@ # The install target of the Makefile isn't used because that uses apxs # which tries to enable the module in the build host httpd instead of in # the build root. -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf -mkdir -p $RPM_BUILD_ROOT%{_httpd_confdir} -mkdir -p $RPM_BUILD_ROOT%{_libdir}/httpd/modules -mkdir -p $RPM_BUILD_ROOT%{_sbindir} -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias +mkdir -p %{buildroot}/%{_ap_sysconfdir}/alias +mkdir -p %{buildroot}%{_ap_sysconfdir}/conf +mkdir -p %{buildroot}%{_httpd_confdir} +mkdir -p %{buildroot}/%{_libdir}/%{httpd_name} + +%if 0%{?suse_version} < 1 +mkdir -p %{buildroot}/%{_libdir}/%{httpd_name}/modules +%endif + +mkdir -p %{buildroot}%{_sbindir} + +%if 0%{?suse_version} +sed -i -e "s|\@apache_lib\@|%{_libdir}\/apache2|g" nss.conf +%else +sed -i -e "s|\@apache_lib\@|modules|g" nss.conf +sed -i -e "s|/var/log/apache2|logs|g" nss.conf +sed -i \ + -e "s|\@apache_prefix\@|/var/www|g" \ + -e "s|/etc/httpd/cgi-bin|/var/www/cgi-bin|g" \ + -e "s|\@apache_conf\@|/etc/httpd|g" \ + -e "s|/etc/httpd/conf/alias|/etc/httpd/alias|g" nss.conf +%endif %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" # httpd >= 2.4.x -mkdir -p $RPM_BUILD_ROOT%{_httpd_modconfdir} +mkdir -p %{buildroot}%{_httpd_modconfdir} sed -n /^LoadModule/p nss.conf > 10-nss.conf sed -i /^LoadModule/d nss.conf -install -m 644 10-nss.conf $RPM_BUILD_ROOT%{_httpd_modconfdir} +install -m 644 10-nss.conf %{buildroot}%{_httpd_modconfdir} %endif -install -m 644 nss.conf $RPM_BUILD_ROOT%{_httpd_confdir} +install -m 644 nss.conf %{buildroot}%{_httpd_confdir} + +install -m 755 .libs/libmodnss.so %{buildroot}%{_httpd_moddir} +install -m 755 nss_pcache %{buildroot}%{_sbindir}/ +install -m 755 gencert %{buildroot}%{_sbindir}/ -install -m 755 .libs/libmodnss.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules/ -install -m 755 nss_pcache $RPM_BUILD_ROOT%{_sbindir}/ -install -m 755 gencert $RPM_BUILD_ROOT%{_sbindir}/ -ln -s ../../../%{_libdir}/libnssckbi.so $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias/ -touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias/secmod.db -touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias/cert8.db -touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias/key3.db -touch $RPM_BUILD_ROOT%{_sysconfdir}/httpd/alias/install.log +ln -s ../../../%{_libdir}/libnssckbi.so %{buildroot}/%{_ap_sysconfdir}/alias/ +touch %{buildroot}/%{_ap_sysconfdir}/alias/secmod.db +touch %{buildroot}/%{_ap_sysconfdir}/alias/cert8.db +touch %{buildroot}/%{_ap_sysconfdir}/alias/key3.db +touch %{buildroot}/%{_ap_sysconfdir}/alias/install.log -perl -pi -e "s:$NSS_LIB_DIR:$NSS_BIN:" $RPM_BUILD_ROOT%{_sbindir}/gencert +perl -pi -e "s:$NSS_LIB_DIR:$NSS_BIN:" %{buildroot}/%{_sbindir}/gencert %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %post umask 077 if [ "$1" -eq 1 ] ; then - if [ ! -e %{_sysconfdir}/httpd/alias/key3.db ]; then - %{_sbindir}/gencert %{_sysconfdir}/httpd/alias > %{_sysconfdir}/httpd/alias/install.log 2>&1 + if [ ! -e %{_ap_sysconfdir}/alias/key3.db ]; then + %{_sbindir}/gencert %{_ap_sysconfdir}/alias > %{_ap_sysconfdir}/alias/install.log 2>&1 echo "" echo "%{name} certificate database generated." echo "" fi # Make sure that the database ownership is setup properly. - /bin/find %{_sysconfdir}/httpd/alias -user root -name "*.db" -exec /bin/chgrp apache {} \; - /bin/find %{_sysconfdir}/httpd/alias -user root -name "*.db" -exec /bin/chmod g+r {} \; + /bin/find %{_ap_sysconfdir}/alias -user root -name "*.db" -exec /bin/chgrp apache {} \; + /bin/find %{_ap_sysconfdir}/alias -user root -name "*.db" -exec /bin/chmod g+r {} \; fi %files @@ -140,13 +206,13 @@ %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" %config(noreplace) %{_httpd_modconfdir}/10-nss.conf %endif -%{_libdir}/httpd/modules/libmodnss.so -%dir %{_sysconfdir}/httpd/alias/ -%ghost %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/httpd/alias/secmod.db -%ghost %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/httpd/alias/cert8.db -%ghost %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/httpd/alias/key3.db -%ghost %config(noreplace) %{_sysconfdir}/httpd/alias/install.log -%{_sysconfdir}/httpd/alias/libnssckbi.so +%{_httpd_moddir}/libmodnss.so +%dir %{_ap_sysconfdir}/alias/ +%ghost %attr(0640,root,apache) %config(noreplace) %{_ap_sysconfdir}/alias/secmod.db +%ghost %attr(0640,root,apache) %config(noreplace) %{_ap_sysconfdir}/alias/cert8.db +%ghost %attr(0640,root,apache) %config(noreplace) %{_ap_sysconfdir}/alias/key3.db +%ghost %config(noreplace) %{_ap_sysconfdir}/alias/install.log +%{_ap_sysconfdir}/alias/libnssckbi.so %{_sbindir}/nss_pcache %{_sbindir}/gencert
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.