[Pkg-owncloud-commits] [owncloud] 04/05: Drop Apache 2.2 compliance

David Prévot taffit at moszumanska.debian.org
Mon Mar 30 03:23:01 UTC 2015


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

taffit pushed a commit to branch stable8
in repository owncloud.

commit f63b1b42f5d07105942b41a9b07a036c5c7217d5
Author: David Prévot <taffit at debian.org>
Date:   Sun Mar 29 19:35:03 2015 -0400

    Drop Apache 2.2 compliance
    
    Rely on dh-apache2 to handle the configuration.
---
 debian/apache2                     |  1 +
 debian/config/apache/owncloud.conf |  8 +------
 debian/control                     |  8 +++----
 debian/lintian-overrides           |  3 ---
 debian/postinst                    | 46 +++-----------------------------------
 debian/postrm                      | 22 ++----------------
 debian/rules                       |  2 +-
 debian/source/lintian-overrides    |  1 +
 8 files changed, 13 insertions(+), 78 deletions(-)

diff --git a/debian/apache2 b/debian/apache2
new file mode 100644
index 0000000..a1c849b
--- /dev/null
+++ b/debian/apache2
@@ -0,0 +1 @@
+conf debian/config/apache/owncloud.conf
diff --git a/debian/config/apache/owncloud.conf b/debian/config/apache/owncloud.conf
index 9ebf835..aea203e 100644
--- a/debian/config/apache/owncloud.conf
+++ b/debian/config/apache/owncloud.conf
@@ -3,11 +3,5 @@ Alias /owncloud /usr/share/owncloud
 <Directory /usr/share/owncloud/>
     Options +FollowSymLinks
     AllowOverride All
-    <IfVersion < 2.3>
-	order allow,deny
-	allow from all
-    </IfVersion>
-    <IfVersion >= 2.3>
-	Require all granted
-    </IfVersion>
+    Require all granted
 </Directory>
diff --git a/debian/control b/debian/control
index b43441e..bd125db 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: ownCloud for Debian maintainers <pkg-owncloud-maintainers at lists.alio
 Uploaders: Thomas Mueller <thomas.mueller at tmit.eu>,
            David Prévot <taffit at debian.org>,
            Paul van Tilburg <paulvt at debian.org>
-Build-Depends: debhelper (>= 8), node-uglify
+Build-Depends: debhelper (>= 8), dh-apache2, node-uglify
 Standards-Version: 3.9.6
 Homepage: https://owncloud.org
 Vcs-Git: git://anonscm.debian.org/pkg-owncloud/owncloud.git
@@ -13,8 +13,7 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-owncloud/owncloud.git
 
 Package: owncloud
 Architecture: all
-Depends: apache2 | httpd,
-         libjs-jcrop,
+Depends: libjs-jcrop,
          libjs-jquery-mousewheel,
          libjs-mediaelement,
          libjs-pdf,
@@ -55,7 +54,8 @@ Recommends: exim4 | mail-transport-agent,
             php5-intl,
             php5-ldap,
             php5-mcrypt,
-            smbclient
+            smbclient,
+            ${misc:Recommends}
 Suggests: libapache2-mod-xsendfile,
           libav-tools,
           libreoffice,
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
index 1f18dd9..bb3c021 100644
--- a/debian/lintian-overrides
+++ b/debian/lintian-overrides
@@ -2,9 +2,6 @@
 non-standard-dir-perm var/lib/owncloud/assets/ 2770 != 0755
 non-standard-dir-perm var/lib/owncloud/data/ 2770 != 0755
 non-standard-dir-perm var/lib/owncloud/backup/ 2770 != 0755
-# Apache 2.2 compliance is provided as a fallback.
-apache2-reverse-dependency-calls-invoke-rc.d postinst
-apache2-reverse-dependency-calls-wrapper-script postinst a2enmod
 # This symlink points to a file provided by libjs-jcrop, which is a dependency.
 package-contains-broken-symlink usr/share/owncloud/core/vendor/jcrop ../../../javascript/jcrop
 # This symlink points to a directory provided by libjs-pdf, which is a dependency.
diff --git a/debian/postinst b/debian/postinst
index a554ebd..6cfc50c 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -4,42 +4,11 @@ set -e
 
 #DEBHELPER#
 
-reload_apache()
-{
-    if apache2ctl configtest 2>/dev/null; then
-	if [ -x /usr/sbin/invoke-rc.d ]; then
-            invoke-rc.d apache2 $1 3>/dev/null || true
-	else
-            /etc/init.d/apache2 $1 3>/dev/null || true
-	fi
-    else
-        echo "Your Apache 2 configuration is broken, so we're not restarting it for you."
-    fi
-}
-
-
-case "$1" in
-    configure)
-	CONF="owncloud"
-	COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
+if [ "$1" = "configure" ] ; then
+	# Enable mod_rewrite from Apache
 	if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
 		. /usr/share/apache2/apache2-maintscript-helper
 		apache2_invoke enmod rewrite
-		if [ -e /etc/apache2/conf-available/$CONF.conf ] ; then
-			apache2_invoke enconf $CONF || exit $?
-		fi
-	elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
-		if [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/$CONF.conf ] ; then
-			ln -s ../conf-available/$CONF.conf /etc/apache2/conf.d/$CONF.conf
-		fi
-		# Test whether a2enmod is available (and thus also apache2ctl).
-		if [ -x /usr/sbin/a2enmod ]; then
-			# Enable the Apache2 rewrite module if not already enabled
-			a2enmod rewrite > /dev/null || true
-			# Restart Apache to really enable the module and load
-			# /etc/apache2/conf.d/owncloud.conf.
-			reload_apache restart
-		fi
 	fi
 	# Create empty logfile if needed
 	file=/var/log/owncloud.log
@@ -53,15 +22,6 @@ case "$1" in
 	if [ -e /etc/owncloud/config.php ] ; then
 		sudo -u www-data occ upgrade || true
 	fi
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
+fi
 
 exit 0
diff --git a/debian/postrm b/debian/postrm
index fddc262..4609acf 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -4,28 +4,10 @@ set -e
 
 #DEBHELPER#
 
-case "$1" in
-    purge)
+if [ "$1" = "purge" ] ; then
         # Remove generated config and log files.
 	rm -f /etc/owncloud/config.php
 	rm -f /var/log/owncloud.log*
-	CONF="owncloud"
-	COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
-	if [ -e /usr/share/apache2/apache2-maintscript-helper ] && [ -e /etc/apache2/conf-enabled/$CONF.conf ] ; then
-		. /usr/share/apache2/apache2-maintscript-helper
-		apache2_invoke disconf $CONF  || exit $?
-	elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
-		[ -L /etc/apache2/conf.d/$CONF.conf ] && rm /etc/apache2/conf.d/$CONF.conf
-	fi
-    ;;
-
-    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
+fi
 
 exit 0
diff --git a/debian/rules b/debian/rules
index e62c698..ee26dc2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,7 @@
 VERSION := $(shell head -1 debian/changelog | sed 's/.*(//;s/).*//')
 
 %:
-	dh $@
+	dh $@ --with apache2
 
 override_dh_install:
 	# Remove useless licences, documentation, tests, scripts and sources
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
index caa6777..9237bae 100644
--- a/debian/source/lintian-overrides
+++ b/debian/source/lintian-overrides
@@ -5,3 +5,4 @@ source-contains-prebuilt-javascript-object apps/files_texteditor/js/vendor/ace/s
 source-is-missing apps/files_texteditor/js/vendor/ace/src-noconflict/mode-autohotkey.js
 # Noisy lintian is buggy
 source-is-missing apps/files_texteditor/js/vendor/ace/src-noconflict/ext-elastic_tabstops_lite.js
+missing-build-dependency-for-dh-addon apache2 => apache2-dev

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list