[debian-edu-commits] debian-edu/upstream/ 02/07: Migrate setup to Apache 2.4 (Closes: #669782). Rename conffile /etc/apache2/conf.d/sitesummary to /etc/apache2/conf-available/sitesummary.conf and update postinst to enable it by default on fresh installs.

Petter Reinholdtsen pere at moszumanska.debian.org
Thu Aug 21 09:25:45 UTC 2014


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

pere pushed a commit to branch master
in repository sitesummary.

commit 08e3a22d26ea236a64551a35de90379c64439ebf
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu Aug 21 10:22:59 2014 +0200

    Migrate setup to Apache 2.4 (Closes: #669782).
    Rename conffile /etc/apache2/conf.d/sitesummary to
    /etc/apache2/conf-available/sitesummary.conf and update
    postinst to enable it by default on fresh installs.
---
 Makefile                       |  4 ++--
 debian/changelog               |  5 +++++
 debian/control                 |  1 +
 debian/sitesummary.maintscript |  1 +
 debian/sitesummary.postinst    | 11 +++++++++--
 5 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index ee9aa3c..6d8d789 100644
--- a/Makefile
+++ b/Makefile
@@ -50,8 +50,8 @@ install-server:
 
 	$(INSTALL) expire-entry $(DESTDIR)$(pkgdir)/
 
-	$(INSTALL) -d $(DESTDIR)/etc/apache2/conf.d
-	$(INSTALL_DATA) apache.conf $(DESTDIR)/etc/apache2/conf.d/sitesummary
+	$(INSTALL) -d $(DESTDIR)/etc/apache2/conf-available
+	$(INSTALL_DATA) apache.conf $(DESTDIR)/etc/apache2/conf-available/sitesummary.conf
 
 	$(INSTALL) -o www-data -d $(DESTDIR)$(pkgvardir)/entries
 	$(INSTALL) -o www-data -d $(DESTDIR)$(pkgvardir)/tmpstorage
diff --git a/debian/changelog b/debian/changelog
index 719482d..58a7310 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,10 @@
 sitesummary (0.1.11) UNRELEASED; urgency=low
 
+  * Migrate setup to Apache 2.4 (Closes: #669782).  Rename conffile
+    /etc/apache2/conf.d/sitesummary to
+    /etc/apache2/conf-available/sitesummary.conf.  Add code in
+    postinst to enable the apache configuration by default on fresh
+    installs.
   * Add missing ${perl:Depends} to binary packages dependency list.
 
  -- Petter Reinholdtsen <pere at debian.org>  Thu, 21 Aug 2014 10:21:24 +0200
diff --git a/debian/control b/debian/control
index 1633f36..73405f9 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-edu/upstream/sitesummary
 
 Package: sitesummary
 Architecture: all
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends}, ${perl:Depends}, gnupg, net-tools, perl-modules
 Recommends: apache2-mpm-worker | httpd, sitesummary-client
 Suggests: munin, munin-node, nagios3, nagios-plugins-standard, ldap-utils, cups-client
diff --git a/debian/sitesummary.maintscript b/debian/sitesummary.maintscript
new file mode 100644
index 0000000..988729c
--- /dev/null
+++ b/debian/sitesummary.maintscript
@@ -0,0 +1 @@
+mv_conffile /etc/apache2/conf.d/sitesummary /etc/apache2/conf-available/sitesummary.conf 0.1.10
diff --git a/debian/sitesummary.postinst b/debian/sitesummary.postinst
index c1c82b9..a3301bf 100644
--- a/debian/sitesummary.postinst
+++ b/debian/sitesummary.postinst
@@ -37,6 +37,8 @@ EOF
     fi
 }
 
+#DEBHELPER#
+
 case "$1" in
     configure)
 
@@ -50,6 +52,13 @@ case "$1" in
 	    rm /etc/apache2/sites-available/sitesummary
 	fi
 
+	# Enable it on fresh installations as before Apache 2.4.
+	if [ -z "$2" ] && \
+	    [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+	    . /usr/share/apache2/apache2-maintscript-helper
+	    apache2_invoke enconf sitesummary.conf
+	fi
+
         # Make sure the cgi script can write to the storage area
 	chown www-data /var/lib/sitesummary/tmpstorage \
 	    /var/lib/sitesummary/entries 
@@ -91,6 +100,4 @@ case "$1" in
     ;;
 esac
 
-#DEBHELPER#
-
 exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/upstream/sitesummary.git



More information about the debian-edu-commits mailing list