[mod_revocator] fix deps, packaging for 2.4 (#803074)

jorton jorton at fedoraproject.org
Wed Apr 18 10:12:10 UTC 2012


commit 79093ec5603c5b681b559091036fbff2cdcd61ee
Author: Joe Orton <jorton at redhat.com>
Date:   Wed Apr 18 11:11:58 2012 +0100

    fix deps, packaging for 2.4 (#803074)
    
    Resolves: rhbz#803074

 .gitignore         |    1 +
 clog               |    5 +++--
 mod_revocator.spec |   32 ++++++++++++++++++++++++--------
 3 files changed, 28 insertions(+), 10 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b204ede..13f49ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 mod_revocator-1.0.3.tar.gz
+/mod_revocator-1.?.?
diff --git a/clog b/clog
index 0fa8311..d1f8aca 100644
--- a/clog
+++ b/clog
@@ -1,2 +1,3 @@
-Bugzilla Bug #716874 - httpd (32 bit) failed to start if mod_revocator
-(32 bit) is installed on ppc64
+fix deps, packaging for 2.4 (#803074)
+
+Resolves: rhbz#803074
diff --git a/mod_revocator.spec b/mod_revocator.spec
index 45cce64..52d2ed9 100644
--- a/mod_revocator.spec
+++ b/mod_revocator.spec
@@ -1,6 +1,12 @@
+%{!?_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}}
+# /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}}
+
 Name: mod_revocator
 Version: 1.0.3
-Release: 10%{?dist}
+Release: 11%{?dist}
 Summary: CRL retrieval module for the Apache HTTP server
 Group: System Environment/Daemons
 License: ASL 2.0
@@ -14,6 +20,7 @@ BuildRequires: httpd-devel >= 0:2.0.52, apr-devel, apr-util-devel
 BuildRequires: pkgconfig, autoconf, automake, libtool
 BuildRequires: openldap-devel >= 2.2.29
 Requires: mod_nss >= 1.0.8
+Requires: httpd-mmn = %{_httpd_mmn}
 Patch1: mod_revocator-libpath.patch
 Patch2: mod_revocator-kill.patch
 Patch3: mod_revocator-segfault-fix.patch
@@ -57,7 +64,8 @@ NSS_BIN=`/usr/bin/pkg-config --variable=exec_prefix nss`
     --with-nss-inc=$NSS_INCLUDE_DIR \
     --with-nspr-lib=$NSPR_LIB_DIR \
     --with-nspr-inc=$NSPR_INCLUDE_DIR \
-    --with-apr-config --enable-openldap
+    --with-apr-config --enable-openldap \
+    --with-apxs=%{_httpd_apxs}
 
 make %{?_smp_flags} all
 
@@ -67,12 +75,17 @@ make %{?_smp_flags} all
 # the build root.
 rm -rf $RPM_BUILD_ROOT
 
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
-mkdir -p $RPM_BUILD_ROOT%{_libdir}/httpd/modules
-mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_httpd_confdir} $RPM_BUILD_ROOT%{_httpd_modconfdir} \
+       $RPM_BUILD_ROOT%{_libdir}/httpd/modules $RPM_BUILD_ROOT%{_bindir}
+
 
-install -m 644 revocator.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
+%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
+# httpd >= 2.4.x
+sed -n /^LoadModule/p revocator.conf > 10-revocator.conf
+sed -i /^LoadModule/d revocator.conf
+install -m 644 10-revocator.conf $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-revocator.conf
+%endif
+install -m 644 revocator.conf $RPM_BUILD_ROOT%{_httpd_confdir}/revocator.conf
 install -m 755 .libs/libmodrev.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules/mod_rev.so
 # Ugh, manually create the ldconfig symbolic links
 version=`grep -v '^\#' ./libtool-version`
@@ -95,7 +108,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root,-)
 %doc README LICENSE docs/mod_revocator.html
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/revocator.conf
+%config(noreplace) %{_sysconfdir}/httpd/conf.*/*.conf
 %{_libdir}/httpd/modules/mod_rev.so
 # rpmlint will complain that librevocation.so is a shared library but this
 # must be ignored because this file is loaded directly by name by the Apache
@@ -105,6 +118,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/crlhelper
 
 %changelog
+* Wed Apr 18 2012 Joe Orton <jorton at redhat.com> - 1.0.3-11
+- fix deps, packaging for 2.4 (#803074)
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.3-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list