[mod_dnssd] update for httpd 2.4, fix deps etc (#803069)

jorton jorton at fedoraproject.org
Tue Apr 17 14:04:43 UTC 2012


commit bf2d49e4f99de9897579c010deed87b38db84a86
Author: Joe Orton <jorton at redhat.com>
Date:   Tue Apr 17 15:04:33 2012 +0100

    update for httpd 2.4, fix deps etc (#803069)
    
    Resolves: rhbz#803069

 mod_dnssd-0.6-httpd24.patch |   24 ++++++++++++++++++++++++
 mod_dnssd.spec              |   28 ++++++++++++++++++++++++----
 2 files changed, 48 insertions(+), 4 deletions(-)
---
diff --git a/mod_dnssd-0.6-httpd24.patch b/mod_dnssd-0.6-httpd24.patch
new file mode 100644
index 0000000..6eb5058
--- /dev/null
+++ b/mod_dnssd-0.6-httpd24.patch
@@ -0,0 +1,24 @@
+--- mod_dnssd-0.6/src/mod_dnssd.c.httpd24
++++ mod_dnssd-0.6/src/mod_dnssd.c
+@@ -26,6 +26,9 @@
+ #include <unixd.h>
+ #include <apr_signal.h>
+ #include <mpm_common.h>
++#if AP_MODULE_MAGIC_AT_LEAST(20090130,0)
++#include <mod_unixd.h>
++#endif
+ 
+ #include <unistd.h>
+ 
+@@ -576,7 +579,11 @@ static void child_process(apr_pool_t *p,
+ 
+     ap_assert(d);
+ 
++#if AP_MODULE_MAGIC_AT_LEAST(20090130,0)
++    ap_unixd_setup_child();
++#else
+     unixd_setup_child();
++#endif
+ 
+     if (pipe(sigterm_pipe_fds) < 0) {
+         ap_log_error(APLOG_MARK, APLOG_ERR, 0, r.main_server, "pipe() failed: %s", strerror(errno));
diff --git a/mod_dnssd.spec b/mod_dnssd.spec
index a9d4b9f..5929ae8 100644
--- a/mod_dnssd.spec
+++ b/mod_dnssd.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_dnssd
 Version:        0.6
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        An Apache HTTPD module which adds Zeroconf support
 
 Group:          System Environment/Daemons
@@ -8,8 +14,9 @@ License:        ASL 2.0
 URL:            http://0pointer.de/lennart/projects/mod_dnssd/
 Source0:        http://0pointer.de/lennart/projects/mod_dnssd/%{name}-%{version}.tar.gz
 Source1:        mod_dnssd.conf-httpd
+Patch0:         mod_dnssd-0.6-httpd24.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
+Requires:       httpd-mmn = %{_httpd_mmn}
 BuildRequires:  httpd-devel avahi-devel e2fsprogs-devel
 
 %description
@@ -18,15 +25,25 @@ using Avahi.
 
 %prep
 %setup -q
+%patch0 -p1 -b .httpd24
 
 %build
+export APXS=%{_httpd_apxs}
 %configure --disable-lynx
 make %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -Dp -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/mod_dnssd.conf
 install -Dp src/.libs/mod_dnssd.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules/mod_dnssd.so
+%if "%{_httpd_confdir}" == "%{_httpd_modconfdir}"
+install -Dp -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/mod_dnssd.conf
+%else
+sed -n /^LoadModule/p %{SOURCE1} > 10-mod_dnssd.conf
+sed /^LoadModule/d %{SOURCE1} > mod_dnssd.conf
+touch -r %{SOURCE1} 10-mod_dnssd.conf mod_dnssd.conf
+install -Dp -m 0644 mod_dnssd.conf $RPM_BUILD_ROOT%{_httpd_confdir}/mod_dnssd.conf
+install -Dp -m 0644 10-mod_dnssd.conf $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-mod_dnssd.conf
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -34,10 +51,13 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root,-)
 %doc LICENSE doc/README doc/README.html
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/mod_dnssd.conf
+%config(noreplace) %{_sysconfdir}/httpd/conf.*/*.conf
 %{_libdir}/httpd/modules/mod_dnssd.so
 
 %changelog
+* Tue Apr 17 2012 Joe Orton <jorton at redhat.com> - 0.6-6
+- update for httpd 2.4, fix deps etc (#803069)
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list