[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, next, updated. 801174110ac09b90600aa81ddef8413508fe8ad8
Arno Töll
arno at debian.org
Fri Apr 27 12:16:20 UTC 2012
The following commit has been merged in the next branch:
commit 5982490ad968d531235d6b02c2efc9bae0cf50cb
Author: Arno Töll <arno at debian.org>
Date: Fri Apr 27 14:11:50 2012 +0200
Improve apache2-maintscript-helper
* Allow to turn debug info on through envvars
* Document global variables
diff --git a/debian/changelog b/debian/changelog
index 0035804..e501c3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,13 +21,16 @@ apache2 (2.4.2-2) experimental; urgency=low
for Wheezy+1 to adopt /run.
* Use more exit status codes for a2query which allows to tell apart why a
module was disabled, also make its output more readable.
- * Fix several issues in apache2-maintscript-helper: Now apache2_invoke may
- finally behave correctly and catch all cases including upgrades from
- Squeeze. Also the rc.d action can be supplied through apache2_invoke now.
+ * Changes in apache2-maintscript-helper:
+ + Finally apache2_invoke may behave correctly and catch all cases
+ including upgrades from Squeeze.
+ + apache2_invoke: accepts a third argument to override the rc.d-action now
+ + support APACHE2_MAINTSCRIPT_DEBUG: When defined in the environment or in
+ /etc/apache2/envvars, debug output is displayed.
* Implement a -r switch for dh_apache2 which allows to force a reload of the
web server if required.
- -- Arno Töll <arno at debian.org> Fri, 27 Apr 2012 01:52:38 +0200
+ -- Arno Töll <arno at debian.org> Fri, 27 Apr 2012 02:22:58 +0200
apache2 (2.4.2-1) experimental; urgency=low
diff --git a/debian/config-dir/envvars b/debian/config-dir/envvars
index ff6703d..6799bb9 100644
--- a/debian/config-dir/envvars
+++ b/debian/config-dir/envvars
@@ -36,3 +36,8 @@ export LANG
## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'
+
+## Enable the debug mode for maintainer scripts.
+## This will produce a verbose output on package installations of web server modules and web application
+## installations which interact with Apache
+#export APACHE2_MAINTSCRIPT_DEBUG=1
diff --git a/debian/debhelper/apache2-maintscript-helper b/debian/debhelper/apache2-maintscript-helper
index b09b724..d130d35 100644
--- a/debian/debhelper/apache2-maintscript-helper
+++ b/debian/debhelper/apache2-maintscript-helper
@@ -18,14 +18,58 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#XXX: Remove me later
-set -x
+
+
+#
+# VARIABLES
+#
+
+
+# global environment variables used by apache2-maintscript-helper:
+# * APACHE2_MAINTSCRIPT_DEBUG:
+# set this to any non-zero value to get debug output
+# * APACHE2_MAINTSCRIPT_HELPER_QUIET:
+# set this to any non-zero value to omit any output
+# * EXPORT_APACHE2_MAINTSCRIPT_HELPER:
+# will be defined by apache2-maintscript-helper
+# to avoid inclusion loops. Do not set this
+# variable manually
+# * APACHE2_NEED_ACTION:
+# will be defined if a function call wants to
+# override the behavior of apache2_needs_action.
+# Do not rely on this variable. It is considered
+# an implementation detail.
+# * APACHE2_MAINTSCRIPT_NAME
+# * APACHE2_MAINTSCRIPT_PACKAGE
+# * APACHE2_MAINTSCRIPT_METHOD
+# * APACHE2_MAINTSCRIPT_ARGUMENT
+# these variables contain information about the
+# maintainer script which is calling the
+# maintscript-helper. It contains arguments which
+# dpkg supplies to maintainer scripts and similar
+# information. These variables are an
+# implementation detail and not to be changed.
+
+
+#
+# INITIALIZATION
+#
if [ -n "${EXPORT_APACHE2_MAINTSCRIPT_HELPER:-}" ] ; then
return
else
EXPORT_APACHE2_MAINTSCRIPT_HELPER=1
+ if [ -n "${APACHE2_MAINTSCRIPT_DEBUG:-}" ] ; then
+ set -x
+ elif [ -e /etc/apache2/envvars ] ; then
+ APACHE2_MAINTSCRIPT_DEBUG=$(. /etc/apache2/envvars && echo ${APACHE2_MAINTSCRIPT_DEBUG})
+ if [ -n "${APACHE2_MAINTSCRIPT_DEBUG:-}" ] ; then
+ set -x
+ fi
+ fi
+
+
if [ -z "$1" ] ; then
echo "You must invoke apache2-maintscript-helper with an unmodified environment when sourcing it"
return 1
@@ -53,6 +97,13 @@ fi
#
+# FUNCTIONS
+#
+
+
+
+
+#
# Function apache2_msg
# print out a warning to both, the syslog and a local standard output.
# This function should generally be used to display messages related to
--
Debian packaging for apache2 (Apache HTTPD 2.x)
More information about the Pkg-apache-commits
mailing list