[Pkg-owncloud-commits] [SCM] owncloud.git branch, master, updated. debian/5.0.7+dfsg-1-7-gf001b0a
David Prévot
taffit at debian.org
Sun Jun 23 21:25:43 UTC 2013
The following commit has been merged in the master branch:
commit 25bf6071d3c03cfa0eea0365842e99289d493d87
Author: Prach Pongpanich <prachpub at gmail.com>
Date: Sun Jun 16 21:53:41 2013 +0700
Update for Apache 2.4 transition
Closes: #711894
diff --git a/debian/config/apache/owncloud.conf b/debian/config/apache/owncloud.conf
index faf38bb..9ebf835 100644
--- a/debian/config/apache/owncloud.conf
+++ b/debian/config/apache/owncloud.conf
@@ -3,6 +3,11 @@ Alias /owncloud /usr/share/owncloud
<Directory /usr/share/owncloud/>
Options +FollowSymLinks
AllowOverride All
- order allow,deny
- allow from all
+ <IfVersion < 2.3>
+ order allow,deny
+ allow from all
+ </IfVersion>
+ <IfVersion >= 2.3>
+ Require all granted
+ </IfVersion>
</Directory>
diff --git a/debian/owncloud.install b/debian/owncloud.install
index 75346e8..83ec491 100644
--- a/debian/owncloud.install
+++ b/debian/owncloud.install
@@ -28,5 +28,5 @@ db_structure.xml /usr/share/owncloud
*.php /usr/share/owncloud
# Debian-specific stuff.
-debian/config/apache/owncloud.conf /etc/apache2/conf.d
+debian/config/apache/owncloud.conf /etc/apache2/conf-available
debian/config/apache/htaccess /etc/owncloud
diff --git a/debian/owncloud.postrm b/debian/owncloud.postrm
index 5e994b5..30795aa 100644
--- a/debian/owncloud.postrm
+++ b/debian/owncloud.postrm
@@ -23,6 +23,14 @@ case "$1" in
purge)
# Remove generated config file.
rm -f /etc/owncloud/config.php
+ 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 ] ; then
+ . /usr/share/apache2/apache2-maintscript-helper
+ apache2_invoke disconf $CONF
+ elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
+ [ -L /etc/apache2/conf.d/$CONF.conf ] && rm /etc/apache2/conf.d/$CONF.conf
+ fi
;;
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
diff --git a/debian/postinst b/debian/postinst
index 989be0d..07487ae 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -33,14 +33,25 @@ reload_apache()
case "$1" in
configure)
- # 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
+ 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 ] ; then
+ . /usr/share/apache2/apache2-maintscript-helper
+ apache2_invoke enmod rewrite
+ apache2_invoke enconf $CONF
+ 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
# Fix ownership and permissions of existing configuration.
if [ -f /etc/owncloud/config.php ]; then
chown www-data:www-data /etc/owncloud/config.php
--
owncloud.git
More information about the Pkg-owncloud-commits
mailing list