[ocsinventory] fix config for httpd 2.4

Remi Collet remi at fedoraproject.org
Wed Apr 18 11:42:30 UTC 2012


commit 562b14ef1aebd6a37717427d13f2a5556850397e
Author: remi <fedora at famillecollet.com>
Date:   Wed Apr 18 13:41:10 2012 +0200

    fix config for httpd 2.4

 ocsinventory.spec   |   10 ++++++++--
 ocsng-httpd24.patch |    4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/ocsinventory.spec b/ocsinventory.spec
index 0d46a8f..58d16d3 100644
--- a/ocsinventory.spec
+++ b/ocsinventory.spec
@@ -8,7 +8,7 @@ Name:        ocsinventory
 Summary:     Open Computer and Software Inventory Next Generation
 
 Version:     2.0.5
-Release:     1%{?dist}
+Release:     2%{?dist}
 
 Group:       Applications/Internet
 License:     GPLv2
@@ -18,7 +18,7 @@ URL:         http://www.ocsinventory-ng.org/
 Source0:     http://launchpad.net/ocsinventory-server/stable-2.0/%{version}/+download/%{tarname}-%{version}.tar.gz
 Source1:     ocsinventory-reports.conf
 
-# Use system PHPCAS
+# Fix for httpd 2.4 (for new authz_core)
 Patch0:      ocsng-httpd24.patch
 
 BuildArch:   noarch
@@ -179,11 +179,13 @@ sed -e "s;DATABASE_SERVER;localhost;g" \
     -e "s;VERSION_MP;2;g" \
     -e "s;PATH_TO_LOG_DIRECTORY;%{_localstatedir}/log/ocsinventory-server;g" \
     -e '/OCS_OPT_EXT_USERAGENTS_FILE_PATH/s;^.*$;  PerlSetEnv OCS_OPT_EXT_USERAGENTS_FILE_PATH %{_sysconfdir}/ocsinventory/ocsinventory-server/external-agents.conf;' \
+    -e "s;APACHE_AUTH_USER_FILE;%{_sysconfdir}/ocsinventory/ocsinventory-server/htpasswd;g" \
     etc/ocsinventory/ocsinventory-server.conf \
     >%{buildroot}%{_sysconfdir}/httpd/conf.d/ocsinventory-server.conf
 
 install -Dm 644 external-agents.conf \
         %{buildroot}%{_sysconfdir}/ocsinventory/ocsinventory-server/external-agents.conf
+touch   %{buildroot}%{_sysconfdir}/ocsinventory/ocsinventory-server/htpasswd
 
 # --- ocsinventory-reports --- administration console
 
@@ -278,6 +280,7 @@ fi
 %doc binutils/{ocs-errors,soap-client.pl}
 %dir %{_sysconfdir}/ocsinventory/ocsinventory-server
 %config(noreplace) %{_sysconfdir}/ocsinventory/ocsinventory-server/external-agents.conf
+%config(noreplace) %{_sysconfdir}/ocsinventory/ocsinventory-server/htpasswd
 %config(noreplace) %{_sysconfdir}/logrotate.d/ocsinventory-server
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/ocsinventory-server.conf
 %attr(755,apache,root) %{_localstatedir}/log/ocsinventory-server
@@ -303,6 +306,9 @@ fi
 
 
 %changelog
+* Wed Apr 18 2012 Remi Collet <remi at fedoraproject.org> - 2.0.5-2
+- fix config for httpd 2.4
+
 * Thu Apr 05 2012 Remi Collet <remi at fedoraproject.org> - 2.0.5-1
 - update to 2.0.5 (security fixes)
 - add missing /var/lib/ocsinventory-reports/logs
diff --git a/ocsng-httpd24.patch b/ocsng-httpd24.patch
index cadd711..466b6e6 100644
--- a/ocsng-httpd24.patch
+++ b/ocsng-httpd24.patch
@@ -75,13 +75,13 @@ diff -up etc/ocsinventory/ocsinventory-server.conf.orig etc/ocsinventory/ocsinve
 +	<IfModule mod_authz_core.c>
 +		<RequireAll> 
 +			Require all granted
-+			Require "SOAP_USER"
++			Require valid-user
 +		</RequireAll> 
 +	</IfModule>
 +	<IfModule !mod_authz_core.c>
 +		Order deny,allow
 +		Allow from all
-+		Require "SOAP_USER"
++		Require valid-user
 +	</IfModule>
    </location>
 -</IfModule>


More information about the scm-commits mailing list