[lemonldap-ng] 02/04: Modify Apache-2.4 patch to be compliant both with Apache 2.2 and 2.4 unsing mod_version

Xavier Guimard xguimard-guest at moszumanska.debian.org
Sun Mar 9 06:29:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

xguimard-guest pushed a commit to branch master
in repository lemonldap-ng.

commit dd68b0a3fbc1ba8d5a2055df4c9f070cffa2e42e
Author: Xavier Guimard <x.guimard at free.fr>
Date:   Sun Mar 9 07:20:42 2014 +0100

    Modify Apache-2.4 patch to be compliant both with Apache 2.2 and 2.4 unsing mod_version
---
 .../patches/comment-Apache2.4-configuration.patch  | 184 ++++++++++-----------
 1 file changed, 91 insertions(+), 93 deletions(-)

diff --git a/debian/patches/comment-Apache2.4-configuration.patch b/debian/patches/comment-Apache2.4-configuration.patch
index 22359fd..388bc24 100644
--- a/debian/patches/comment-Apache2.4-configuration.patch
+++ b/debian/patches/comment-Apache2.4-configuration.patch
@@ -1,4 +1,6 @@
-Description: add comments to use with Apache 2.4
+Description: compliance with both Apache 2.4 and 2.2
+ To be compliant with both Apache 2.2 (Ubuntu) and 2.4 (Sid), version is now
+ tested
 Author: Xavier Guimard <x.guimard at free.fr>
 Bug: http://jira.ow2.org/browse/LEMONLDAP-571
 Bug-Debian: http://bugs.debian.org/669808
@@ -7,39 +9,23 @@ Bug-Debian: http://bugs.debian.org/669822
 Forwarded: http://jira.ow2.org/browse/LEMONLDAP-571
 Last-Update: 2013-05-31
 
---- a/_example/etc/test-apache2.conf
-+++ b/_example/etc/test-apache2.conf
-@@ -16,8 +16,12 @@
-     # DocumentRoot
-     DocumentRoot __TESTDIR__
-     <Directory __TESTDIR__>
--        Order deny,allow
--        Allow from all
-+	# For Apache 2.2 use:
-+        #Order deny,allow
-+        #Allow from all
-+	# For Apache 2.4 use:
-+	Require all granted
-+
-         Options +ExecCGI
-     </Directory>
- 
 --- a/_example/etc/handler-apache2.conf
 +++ b/_example/etc/handler-apache2.conf
-@@ -21,17 +21,25 @@
+@@ -21,17 +21,27 @@
      # needed): choose your URL to avoid restarting Apache when
      # configuration change
      <Location /reload>
 -        Order deny,allow
 -        Deny from all
 -        Allow from 127.0.0.0/8
-+	# For Apache 2.2 use:
-+        #Order deny,allow
-+        #Deny from all
-+        #Allow from 127.0.0.0/8
-+	# For Apache 2.4 use:
-+	Require ip 127
-+
++        <IfVersion < 2.4>
++            Order deny,allow
++            Deny from all
++            Allow from 127.0.0.0/8
++        </IfVersion>
++        <IfVersion >= 2.4>
++            Require ip 127
++        </IfVersion>
          PerlHeaderParserHandler My::Package->refresh
      </Location>
  
@@ -48,109 +34,121 @@ Last-Update: 2013-05-31
 -    #    Order deny,allow
 -    #    Deny from all
 -    #    Allow from 127.0.0.0/8
-+    #    # For Apache 2.2 use:
-+    #    #Order deny,allow
-+    #    #Deny from all
-+    #    #Allow from 127.0.0.0/8
-+    #    # For Apache 2.4 use:
-+    #    Require ip 127
-+    #
++    #    <IfVersion < 2.4>
++    #        Order deny,allow
++    #        Deny from all
++    #        Allow from 127.0.0.0/8
++    #    </IfVersion>
++    #    <IfVersion >= 2.4>
++    #        Require ip 127
++    #    </IfVersion>
      #    PerlHeaderParserHandler My::Package->status
      #</Location>
  
 --- a/_example/etc/manager-apache2.conf
 +++ b/_example/etc/manager-apache2.conf
-@@ -12,8 +12,12 @@
+@@ -12,8 +12,13 @@
      # DocumentRoot
      DocumentRoot __MANAGERDIR__
      <Directory __MANAGERDIR__>
--	Order deny,allow
--	Allow from all
-+	# For Apache 2.2 use:
-+	#Order deny,allow
-+	#Allow from all
-+	# For Apache 2.4 use:
-+	Require all granted
-+
- 	Options +ExecCGI +FollowSymLinks
+-        Order deny,allow
+-        Allow from all
++        <IfVersion < 2.4>
++            Order allow,deny
++            Allow from all
++        </IfVersion>
++        <IfVersion >= 2.4>
++            Require all granted
++        </IfVersion>
+         Options +ExecCGI +FollowSymLinks
      </Directory>
  
-@@ -21,8 +25,12 @@
+@@ -21,8 +26,13 @@
      Alias /doc/ __DOCDIR__
      Alias /lib/ __DOCDIR__lib/
      <Directory __DOCDIR__>
--	Order deny,allow
--	Allow from all
-+	# For Apache 2.2 use:
-+	#Order deny,allow
-+	#Allow from all
-+	# For Apache 2.4 use:
-+	Require all granted
-+
- 	ErrorDocument 404 /notfound.html
- 	Options +FollowSymLinks
+-        Order allow,deny
+-        Allow from all
++        <IfVersion < 2.4>
++            Order deny,allow
++            Allow from all
++        </IfVersion>
++        <IfVersion >= 2.4>
++            Require all granted
++        </IfVersion>
+         ErrorDocument 404 /notfound.html
+         Options +FollowSymLinks
      </Directory>
 --- a/_example/etc/portal-apache2.conf
 +++ b/_example/etc/portal-apache2.conf
-@@ -12,8 +12,12 @@
+@@ -12,8 +12,13 @@
      # DocumentRoot
      DocumentRoot __PORTALDIR__
      <Directory __PORTALDIR__>
--	Order allow,deny
--	Allow from all
-+	# For Apache 2.2 use:
-+	#Order deny,allow
-+	#Allow from all
-+	# For Apache 2.4 use:
-+	Require all granted
-+
- 	Options +ExecCGI +FollowSymLinks
+-        Order allow,deny
+-        Allow from all
++        <IfVersion < 2.4>
++            Order allow,deny
++            Allow from all
++        </IfVersion>
++        <IfVersion >= 2.4>
++            Require all granted
++        </IfVersion>
+         Options +ExecCGI +FollowSymLinks
      </Directory>
  
-@@ -29,26 +33,38 @@
+@@ -29,26 +34,46 @@
  
      # SOAP functions for sessions management (disabled by default)
      <Location /index.pl/adminSessions>
--	Order deny,allow
--	Deny from all
-+	# For Apache 2.2 use:
-+	#Order deny,allow
-+	#Deny from all
-+	# For Apache 2.4 use:
-+	Require all denied
+-        Order deny,allow
+-        Deny from all
++        <IfVersion < 2.4>
++            Order deny,allow
++            Deny from all
++        </IfVersion>
++        <IfVersion >= 2.4>
++            Require all denied
++        </IfVersion>
      </Location>
  
      # SOAP functions for sessions access (disabled by default)
      <Location /index.pl/sessions>
--	Order deny,allow
--	Deny from all
-+	# For Apache 2.2 use:
-+	#Order deny,allow
-+	#Deny from all
-+	# For Apache 2.4 use:
-+	Require all denied
+-        Order deny,allow
+-        Deny from all
++        <IfVersion < 2.4>
++            Order deny,allow
++            Deny from all
++        </IfVersion>
++        <IfVersion >= 2.4>
++            Require all denied
++        </IfVersion>
      </Location>
  
      # SOAP functions for configuration access (disabled by default)
      <Location /index.pl/config>
--	Order deny,allow
--	Deny from all
-+	# For Apache 2.2 use:
-+	#Order deny,allow
-+	#Deny from all
-+	# For Apache 2.4 use:
-+	Require all denied
+-        Order deny,allow
+-        Deny from all
++        <IfVersion < 2.4>
++            Order deny,allow
++            Deny from all
++        </IfVersion>
++        <IfVersion >= 2.4>
++            Require all denied
++        </IfVersion>
      </Location>
  
      # SOAP functions for notification insertion (disabled by default)
      <Location /index.pl/notification>
--	Order deny,allow
--	Deny from all
-+	# For Apache 2.2 use:
-+	#Order deny,allow
-+	#Deny from all
-+	# For Apache 2.4 use:
-+	Require all denied
+-        Order deny,allow
+-        Deny from all
++        <IfVersion < 2.4>
++            Order deny,allow
++            Deny from all
++        </IfVersion>
++        <IfVersion >= 2.4>
++            Require all denied
++        </IfVersion>
      </Location>
  
      # SAML2 Issuer

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/lemonldap-ng.git



More information about the Pkg-perl-cvs-commits mailing list