summaryrefslogtreecommitdiffstats
path: root/debian/tests/duplicate-module-load
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:33:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:33:51 +0000
commit4f0770f3df78ecd5dcaefbd214f7a1415366bca6 (patch)
tree72661b8f81594b855bcc967b819263f63fa30e17 /debian/tests/duplicate-module-load
parentAdding upstream version 2.4.56. (diff)
downloadapache2-4f0770f3df78ecd5dcaefbd214f7a1415366bca6.tar.xz
apache2-4f0770f3df78ecd5dcaefbd214f7a1415366bca6.zip
Adding debian version 2.4.56-1~deb11u2.debian/2.4.56-1_deb11u2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/duplicate-module-load')
-rw-r--r--debian/tests/duplicate-module-load26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/tests/duplicate-module-load b/debian/tests/duplicate-module-load
new file mode 100644
index 0000000..3f15cc8
--- /dev/null
+++ b/debian/tests/duplicate-module-load
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -exu
+
+# Check to make sure that module loads haven't been duplicated.
+# Since this is potential minefield that could cause chaos, and a fix is
+# currently in the Ubuntu delta, check specifically for it.
+
+# Why is this so bad? See:
+# https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1251939
+# https://issues.apache.org/bugzilla/show_bug.cgi?id=55787
+
+cd $AUTOPKGTEST_TMP
+
+apache2ctl -l -M > unsorted
+sort unsorted > sorted
+if ! grep core.c sorted ; then
+ echo "core.c not found in apach2ctl output. apache2ctl broken?"
+ exit 1
+fi
+
+uniq < sorted > dedup
+
+if ! diff -u sorted dedup ; then
+ echo Duplicate module loads found
+ exit 1
+fi