[apache2] 01/04: Restart htcacheclean on upgrade
Stefan Fritsch
sf at moszumanska.debian.org
Fri Jan 20 07:54:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to branch master
in repository apache2.
commit 9e285607ba686626031ba887079d55b2c7f4dd69
Author: Stefan Fritsch <sf at sfritsch.de>
Date: Sat Jan 14 18:06:48 2017 +0100
Restart htcacheclean on upgrade
postinst's call to start_htcacheclean() missed the $@ arguments, so it
would always start not restart (and the former does nothing if
htcacheclean is already running).
The check for cache_disk.load should not be necessary because
invoke-rc.d should do the correct thing(tm).
Also add a comment to prerm.
Avoid that apache2-utils is upgraded without htcacheclean being
restarted by tightening the dependency from apache2 to apache2-utils.
---
debian/apache2.postinst | 4 +---
debian/apache2.prerm | 1 +
debian/changelog | 3 +++
debian/control | 2 +-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/debian/apache2.postinst b/debian/apache2.postinst
index 66cb6d7..80a1860 100644
--- a/debian/apache2.postinst
+++ b/debian/apache2.postinst
@@ -184,9 +184,7 @@ handle_htcacheclean ()
fi
# Restart it if applicable
- if [ -e "/etc/apache2/mods-enabled/cache_disk.load" ]; then
- start_htcacheclean
- fi
+ start_htcacheclean "$@"
}
msg ()
diff --git a/debian/apache2.prerm b/debian/apache2.prerm
index 813b6fe..cde34da 100644
--- a/debian/apache2.prerm
+++ b/debian/apache2.prerm
@@ -1,6 +1,7 @@
#!/bin/sh
set -e
+# If upgrading, postinst will restart. So we only need stop if removing.
if [ -x "/etc/init.d/apache-htcacheclean" ] && [ "$1" = remove ] ; then
invoke-rc.d apache-htcacheclean stop || true
fi
diff --git a/debian/changelog b/debian/changelog
index 8077ab2..2bb7901 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ 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.
+ * Restart htcacheclean on updates and tighten dependency on apache2-utils
+ to ensure that apache2-utils cannot be upgraded without apache2.
+ Closes: #851122
* 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/control b/debian/control
index d7b18dc..f7e875a 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@ Architecture: any
Pre-Depends: dpkg (>= 1.17.14)
Depends: ${misc:Depends}, lsb-base, procps [!hurd-i386],
perl, mime-support, apache2-bin (= ${binary:Version}),
- apache2-utils (>= 2.4), apache2-data (= ${source:Version}),
+ apache2-utils (= ${binary:Version}), apache2-data (= ${source:Version}),
${perl:Depends}
Provides: httpd, httpd-cgi
Recommends: ssl-cert
--
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