summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Fritsch <sf@debian.org>2007-12-30 12:05:37 +0000
committerStefan Fritsch <sf@sfritsch.de>2012-01-02 10:36:48 +0100
commitd2509f5240fa1e1ee7bb7a41c3d8fc17a32b44cf (patch)
tree35e828eead1f10b31a9345bf343ae209274ed35f
parent19deb0f1c4a0fa1477f07fdd8dc6816f6a04a334 (diff)
downloadapache2-d2509f5240fa1e1ee7bb7a41c3d8fc17a32b44cf.tar.gz
no longer ship files in /var/www but copy index.html on new installs
git-svn-id: svn+ssh://svn.debian.org/svn/pkg-apache/trunk/apache2@514 01b336ce-410b-0410-9a02-a0e7f243c266
-rw-r--r--debian/apache2.2-common.postinst13
-rw-r--r--debian/apache2.2-common.postrm7
-rw-r--r--debian/changelog6
-rw-r--r--debian/config-dir/sites-available/default3
-rw-r--r--debian/default-index.html1
-rwxr-xr-xdebian/rules7
6 files changed, 29 insertions, 8 deletions
diff --git a/debian/apache2.2-common.postinst b/debian/apache2.2-common.postinst
index 2089dffd..62155b13 100644
--- a/debian/apache2.2-common.postinst
+++ b/debian/apache2.2-common.postinst
@@ -92,6 +92,19 @@ if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.2.4-2; then
echo " done."
fi
+# Note, this line catches new installs as well as upgrades
+if dpkg --compare-versions "$2" lt 2.2.6-4; then
+ if [ ! -e /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.html ] ; then
+ cp /usr/share/apache2/default-site/index.html /var/www/index.html
+ fi
+fi
+
+
rm -f /etc/apache2/ports.conf.dpkg-apache2.2-common.old
rm -f /etc/default/apache2.dpkg-apache2.2-common.old
rm -f /etc/apache2/conf.d/charset.dpkg-apache2.2-common.old
diff --git a/debian/apache2.2-common.postrm b/debian/apache2.2-common.postrm
index 2c1fc67c..3a077790 100644
--- a/debian/apache2.2-common.postrm
+++ b/debian/apache2.2-common.postrm
@@ -44,4 +44,11 @@ if [ "$1" = abort-upgrade ] ; then
rm -f /etc/apache2/ports.conf.dpkg-apache2.2-common.existed
fi
+if [ "$1" = remove ] ; then
+ if [ "`md5sum /var/www/index.html 2>/dev/null | cut -d ' ' -f 1`" \
+ = "5388f60d7695cb57b87c799ee62d20b2" ] ; then
+ rm /var/www/index.html
+ fi
+fi
+
#DEBHELPER#
diff --git a/debian/changelog b/debian/changelog
index d1f718e1..bc63ef0e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,11 @@ apache2 (2.2.6-4) UNRELEASED; urgency=low
* Convert docs to be directly viewable with a browser (and not use content
negotiation).
- * Add doc-base entry for the documentation (closes: #311269)
+ * Add doc-base entry for the documentation. (closes: #311269)
+ * Don't ship default files in /var/www, but copy a sample file to
+ /var/www/index.html on new installs. Also remove the now unneeded
+ RedirectMatch line from sites-available/default.
+ (Closes: #411774, #458093)
-- Stefan Fritsch <sf@debian.org> Sat, 15 Dec 2007 00:16:20 +0100
diff --git a/debian/config-dir/sites-available/default b/debian/config-dir/sites-available/default
index 60a82baa..5b197ef9 100644
--- a/debian/config-dir/sites-available/default
+++ b/debian/config-dir/sites-available/default
@@ -12,9 +12,6 @@ NameVirtualHost *
AllowOverride None
Order allow,deny
allow from all
- # This directive allows us to have apache2's default start page
- # in /apache2-default/, but still have / go to the right place
- RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
diff --git a/debian/default-index.html b/debian/default-index.html
new file mode 100644
index 00000000..f5f1c377
--- /dev/null
+++ b/debian/default-index.html
@@ -0,0 +1 @@
+<html><body><h1>It works!</h1></body></html>
diff --git a/debian/rules b/debian/rules
index 7bcbdb82..cdb7b069 100755
--- a/debian/rules
+++ b/debian/rules
@@ -203,10 +203,6 @@ install: build install-worker install-prefork install-common install-dev install
chmod 755 debian/apache2-utils/usr/sbin/split-logfile
cp -a debian/config-dir/* debian/apache2.2-common/etc/apache2
- if [ "$(LSB_RELEASE)" = "Ubuntu" ]; then \
- sed -i -e 's/RedirectMatch/#RedirectMatch/' \
- debian/apache2.2-common/etc/apache2/sites-available/default; \
- fi
mkdir -p debian/apache2.2-common/etc/logrotate.d
cp debian/logrotate debian/apache2.2-common/etc/logrotate.d/apache2
chmod 4754 debian/apache2.2-common/usr/lib/apache2/suexec
@@ -216,6 +212,9 @@ install: build install-worker install-prefork install-common install-dev install
do install -m755 $$i debian/apache2.2-common/usr/sbin; \
rm -f debian/apache2.2-common/usr/sbin/update-apache2-modules debian/apache2.2-common/usr/sbin/modhandler.py; \
done
+ rm -r debian/apache2.2-common/var/www/apache2-default
+ mkdir -p debian/apache2.2-common/usr/share/apache2/default-site
+ cp debian/default-index.html debian/apache2.2-common/usr/share/apache2/default-site/index.html
for i in worker event; do \
install -m755 debian/mpm-postinst-threaded debian/apache2-mpm-$$i.postinst ;\
install -m755 debian/mpm-preinst-threaded debian/apache2-mpm-$$i.preinst;\