[apache2] 01/01: Fix docroot change fallout
Stefan Fritsch
sf at moszumanska.debian.org
Sun Apr 27 20:22:12 UTC 2014
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to branch master
in repository apache2.
commit 437958466a27311efa4b6310db269ff5104d518b
Author: Stefan Fritsch <sf at sfritsch.de>
Date: Sun Apr 27 22:19:43 2014 +0200
Fix docroot change fallout
Fix logic in postinst to detect existing index.* files in both
DocumentRoots, the old /var/www and the new /var/www/html.
Also change the compiled in default DocumentRoot to /var/www/html.
---
debian/apache2.postinst | 24 ++++++++++++++++--------
debian/changelog | 9 +++++++++
debian/patches/fhs_compliance.patch | 2 +-
3 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/debian/apache2.postinst b/debian/apache2.postinst
index d815389..acbe652 100644
--- a/debian/apache2.postinst
+++ b/debian/apache2.postinst
@@ -276,14 +276,22 @@ install_default_site()
install_default_files()
{
if is_fresh_install $@ || we_are_upgrading_from_wheezy $@ ; then
- if [ ! -e /var/www/index.html -a \
- ! -h /var/www/index.html -a \
- ! -e /var/www/index.cgi -a \
- ! -e /var/www/index.pl -a \
- ! -e /var/www/index.php -a \
- ! -e /var/www/index.xhtml -a \
- ! -e /var/www/index.htm ] ; then
- cp /usr/share/apache2/default-site/index.html /var/www/html/index.html
+ local do_copy=true
+ local dir ext
+ for dir in /var/www /var/www/html ; do
+ for ext in html cgi pl php xhtml htm ; do
+ if [ -e $dir/index.$ext ] ; then
+ do_copy=false
+ break 2
+ fi
+ done
+ if [ -h $dir/index.html ] ; then
+ do_copy=false
+ break
+ fi
+ done
+ if $do_copy ; then
+ cp /usr/share/apache2/default-site/index.html /var/www/html/index.html
fi
fi
}
diff --git a/debian/changelog b/debian/changelog
index 97e077b..711e3a4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+apache2 (2.4.9-2) UNRELEASED; urgency=medium
+
+ * Fix logic in postinst to detect existing index.* files in both
+ DocumentRoots, the old /var/www and the new /var/www/html. Also
+ change the compiled in default DocumentRoot to /var/www/html.
+ Closes: #743915
+
+ -- Stefan Fritsch <sf at debian.org> Sun, 27 Apr 2014 22:15:58 +0200
+
apache2 (2.4.9-1) unstable; urgency=medium
* New upstream version.
diff --git a/debian/patches/fhs_compliance.patch b/debian/patches/fhs_compliance.patch
index 66e53d6..46827cd 100644
--- a/debian/patches/fhs_compliance.patch
+++ b/debian/patches/fhs_compliance.patch
@@ -58,7 +58,7 @@ Last-Update: 2012-02-25
#else
/* Set default for non OS/2 file system */
-#define DOCUMENT_LOCATION HTTPD_ROOT "/htdocs"
-+#define DOCUMENT_LOCATION "/var/www"
++#define DOCUMENT_LOCATION "/var/www/html"
#endif
#endif /* DOCUMENT_LOCATION */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git
More information about the Pkg-apache-commits
mailing list