[apache2] 03/03: Add test that some default modules are enabled

Stefan Fritsch sf at moszumanska.debian.org
Fri Dec 30 10:11:31 UTC 2016


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

sf pushed a commit to branch master
in repository apache2.

commit 39a96a142bb6929a87720a0e05428acaf0211672
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Fri Dec 30 10:51:04 2016 +0100

    Add test that some default modules are enabled
---
 debian/changelog          |  1 +
 debian/tests/control      |  4 ++++
 debian/tests/default-mods | 28 ++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index af1237d..8077ab2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ apache2 (2.4.25-2) UNRELEASED; urgency=medium
     before 2.4.25-2. It was wrongly not activated in new installs since
     jessie. This made the default installation vulnerable to some DoS
     attacks.
+  * Add test for some modules to be enabled.
   * Remove mention of CVE-2016-5387 in 2.4.25-1 changelog. It was already
     fixed in 2.4.23-2.
 
diff --git a/debian/tests/control b/debian/tests/control
index 99c5db9..ffa5126 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -6,6 +6,10 @@ Tests: htcacheclean
 Restrictions: allow-stderr, needs-root
 Depends: apache2
 
+Tests: default-mods
+Restrictions: allow-stderr, needs-root
+Depends: apache2
+
 Tests: ssl-passphrase
 Restrictions: needs-root allow-stderr breaks-testbed
 Depends: apache2, curl, expect, ssl-cert
diff --git a/debian/tests/default-mods b/debian/tests/default-mods
new file mode 100644
index 0000000..5d9df6a
--- /dev/null
+++ b/debian/tests/default-mods
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -eu
+
+RC=0
+fail () {
+	echo "FAIL: $@" >&2
+	RC=1
+}
+
+declare -a REQUIRED_MODS
+REQUIRED_MODS=(
+	alias
+	auth_basic
+	authn_core
+	authz_core
+	log_config
+	mime
+	reqtimeout
+	version
+	watchdog
+)
+
+
+for m in "${REQUIRED_MODS[@]}" ; do
+	apachectl -M | grep -w "${m}_module" || fail "Module $m not activated"
+done
+
+exit $RC

-- 
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