diff options
author | Stefan Fritsch <sf@debian.org> | 2008-01-05 09:48:01 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@sfritsch.de> | 2012-01-02 10:36:50 +0100 |
commit | aeeccf6bf7acdc08a93d213a5a1315f20047d1fb (patch) | |
tree | 2c2f084cd600f014d22d6568e21527673293b783 | |
parent | 9f29383e97ce76c186ea975e352f6b65bb8d8c5b (diff) | |
download | apache2-aeeccf6bf7acdc08a93d213a5a1315f20047d1fb.tar.gz |
Add reportbug script
git-svn-id: svn+ssh://svn.debian.org/svn/pkg-apache/trunk/apache2@527 01b336ce-410b-0410-9a02-a0e7f243c266
-rw-r--r-- | debian/apache2.2-common.bug.control | 1 | ||||
-rwxr-xr-x | debian/apache2.2-common.bug.script | 42 | ||||
-rw-r--r-- | debian/apache2.2-common.dirs | 1 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | debian/rules | 6 |
5 files changed, 51 insertions, 0 deletions
diff --git a/debian/apache2.2-common.bug.control b/debian/apache2.2-common.bug.control new file mode 100644 index 00000000..4955a757 --- /dev/null +++ b/debian/apache2.2-common.bug.control @@ -0,0 +1 @@ +package-status: apache2-mpm-prefork apache2-mpm-worker apache2-mpm-event apache2-mpm-itk diff --git a/debian/apache2.2-common.bug.script b/debian/apache2.2-common.bug.script new file mode 100755 index 00000000..f3b68ff8 --- /dev/null +++ b/debian/apache2.2-common.bug.script @@ -0,0 +1,42 @@ +#!/usr/bin/perl -w + +use strict; +use Text::Wrap; +$Text::Wrap::columns = 70; + +open (my $out, ">&=3") or die "could not open FD 3\n"; + +my $res = `/usr/sbin/apache2 -t 2>&1`; +my @modules; +if ($res !~ "Syntax OK") { + print $out "Config file syntax check failed.\n"; + @modules = sort glob("/etc/apache2/mods-enabled/*.load"); + map { s{^/etc/apache2/mods-enabled/(.*)\.load$}{$1} } @modules; + print $out "List of /etc/apache2/mods-enabled/*.load:\n"; +} +else { + @modules = sort `/usr/sbin/apache2 -M 2>&1`; + @modules = map { /^ (.*)_module \(shared\)/ ? ($1) : () } @modules; + print $out "List of enabled modules from 'apache2 -M':\n"; +} +if (! scalar @modules) { + print $out "Could not determine module list\n"; +} +else { + my $missing; + foreach my $m (@modules) { + if (-e "/etc/apache2/mods-available/$m.conf" and + ! -e "/etc/apache2/mods-enabled/$m.conf") { + $m .= "*"; + $missing = 1; + } + } + + print $out wrap(" ", " ", "@modules\n"); + + print $out + wrap(" ", " ", + "(A * means that the .conf file for that module is not " . + "enabled in /etc/apache2/mods-enabled/)\n") + if $missing; +} diff --git a/debian/apache2.2-common.dirs b/debian/apache2.2-common.dirs index 4c1a937c..e4e90d5a 100644 --- a/debian/apache2.2-common.dirs +++ b/debian/apache2.2-common.dirs @@ -6,6 +6,7 @@ etc/logrotate.d usr/lib/cgi-bin usr/share/apache2/build usr/share/apache2/default-site +usr/share/bug/apache2.2-common usr/share/lintian/overrides var/cache/apache2 var/cache/apache2/mod_disk_cache diff --git a/debian/changelog b/debian/changelog index 69fa6860..c8acf72e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,7 @@ apache2 (2.2.7-1) UNRELEASED; urgency=low * Add some information to README.Debian (Apache wiki, default virtual host) * Build with LDFLAGS=-Wl,--as-needed to drop a lot of unnecessary dependencies, easing library transitions (closes: #458857). + * Add reportbug script to list enabled modules. * Fix some lintian warnings: - Pass --no-start to dh_installinit instead of omitting the debhelper token in various maintainer scripts. Also move the update-rc.d call to diff --git a/debian/rules b/debian/rules index 500e7e16..33c26d1c 100755 --- a/debian/rules +++ b/debian/rules @@ -182,6 +182,8 @@ install: build install-worker install-prefork install-common install-dev install # --sourcedir=$(REALCURDIR)/debian/apache2.2-common cp debian/bash_completion debian/apache2.2-common/etc/bash_completion.d/apache2.2-common + install -m755 debian/apache2.2-common.bug.script debian/apache2.2-common/usr/share/bug/apache2.2-common/script + install -m644 debian/apache2.2-common.bug.control debian/apache2.2-common/usr/share/bug/apache2.2-common/control cp debian/apache2-doc.conf debian/apache2-doc/etc/apache2/conf.d/apache2-doc grep -rl apachectl debian/apache2-doc/usr/share/doc/apache2-doc/manual | xargs perl -p -i -e 's/apachectl(?!\.html)/apache2ctl/g' @@ -224,6 +226,7 @@ install: build install-worker install-prefork install-common install-dev install rm -rf debian/apache2-mpm-$$i/ ;\ mkdir -p debian/apache2-mpm-$$i/usr/sbin ;\ mkdir -p debian/apache2-mpm-$$i/usr/share/lintian/overrides ;\ + mkdir -p debian/apache2-mpm-$$i/usr/share/bug/apache2-mpm-$$i ;\ install -m 755 $(BUILD)/$$i/apache2 debian/apache2-mpm-$$i/usr/sbin/apache2 ;\ if [ "$(LSB_RELEASE)" != "Ubuntu" ] && [ -n "$(DEB_BUILD_STRIP)" ] ; then \ objcopy --only-keep-debug debian/apache2-mpm-$$i/usr/sbin/apache2 debian/apache2-dbg/usr/lib/debug/usr/sbin/apache2-mpm-$$i ;\ @@ -232,6 +235,7 @@ install: build install-worker install-prefork install-common install-dev install objcopy --add-gnu-debuglink=debian/apache2-dbg/usr/lib/debug/usr/sbin/apache2-mpm-$$i debian/apache2-mpm-$$i/usr/sbin/apache2 ;\ fi ;\ perl -p -e "s/^/apache2-mpm-$$i: /" < debian/mpms.lintian-overrides > debian/apache2-mpm-$$i/usr/share/lintian/overrides/apache2-mpm-$$i ;\ + ln -s ../apache2.2-common/script debian/apache2-mpm-$$i/usr/share/bug/apache2-mpm-$$i ;\ done for pkg in `awk '/^Package:/ { print $$2 }' debian/control`; do \ @@ -246,6 +250,8 @@ binary-indep: install dh_installdirs -i dh_installdocs -i ln -sf ../apache2.2-common/README.Debian debian/apache2/usr/share/doc/apache2/ + mkdir -p debian/apache2/usr/share/bug/apache2 + ln -sf ../apache2.2-common/script debian/apache2/usr/share/bug/apache2 cp debian/README.Debian debian/apache2-doc/usr/share/doc/apache2-doc/ dh_installchangelogs -i CHANGES -Napache2 dh_installchangelogs -papache2 |