[lcgdm-dav] added patch for apache 2.4 api change

Ricardo Rocha rocha at fedoraproject.org
Tue Jan 29 08:53:21 UTC 2013


commit 7cdc328d01d93025815ce55bcab9a4d34656bf49
Author: rocha <rocha at rocha-el6.cern.ch>
Date:   Tue Jan 29 09:52:59 2013 +0100

    added patch for apache 2.4 api change

 apache-remote-ip.patch |   15 +++++++++++++++
 lcgdm-dav.spec         |   11 ++++++++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/apache-remote-ip.patch b/apache-remote-ip.patch
new file mode 100644
index 0000000..ef0f80f
--- /dev/null
+++ b/apache-remote-ip.patch
@@ -0,0 +1,15 @@
+Index: lcgdm-dav/trunk/src/shared/security.c
+===================================================================
+--- lcgdm-dav/trunk/src/shared/security.c	(revision 7056)
++++ lcgdm-dav/trunk/src/shared/security.c	(revision 7696)
+@@ -52,5 +52,10 @@
+ 
+   /* Client IP */
++#if AP_SERVER_MAJORVERSION_NUMBER == 2 &&\
++    AP_SERVER_MINORVERSION_NUMBER < 4
+   info->remote_address = r->connection->remote_ip;
++#else
++  info->remote_address = r->useragent_ip;
++#endif
+ 
+   /* Get user information from the connection notes */
diff --git a/lcgdm-dav.spec b/lcgdm-dav.spec
index 14c3bec..b22fbb9 100644
--- a/lcgdm-dav.spec
+++ b/lcgdm-dav.spec
@@ -2,7 +2,7 @@
 
 Name:		lcgdm-dav
 Version:	0.11.0
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	HTTP/DAV front end to the DPM/LFC services
 Group:		Applications/Internet
 License:	ASL 2.0
@@ -12,6 +12,10 @@ URL:		https://svnweb.cern.ch/trac/lcgdm
 # svn export http://svn.cern.ch/guest/lcgdm/lcgdm-dav/tags/lcgdm-dav_0_11_0 lcgdm-dav-0.11.0
 # tar -czvf lcgdm-dav-0.11.0.tar.gz lcgdm-dav-0.11.0
 Source0:	%{name}-%{version}.tar.gz
+# apache remote ip field changed in 2.4
+# https://its.cern.ch/jira/browse/LCGDM-930
+Patch0:		apache-remote-ip.patch
+
 Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	cmake%{?_isa}
@@ -80,6 +84,8 @@ The lcgdm-dav server package providing the HTTP and DAV front end to the LCGDM
 %prep
 %setup -q -n %{name}-%{version}
 
+%patch0 -p2
+
 %build
 %cmake . -DCMAKE_INSTALL_PREFIX=/
 
@@ -123,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/%{name}/*
 
 %changelog
+* Tue Jan 29 2013 Ricardo Rocha <ricardo.rocha at cern.ch> - 0.11.0-2
+- Added patch for apache 2.4 api change
+
 * Wed Nov 14 2012 Ricardo Rocha <ricardo.rocha at cern.ch> - 0.11.0-1
 - Update for new upstream release
 


More information about the scm-commits mailing list