[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, next, updated. 28fddc923d6347896e9c4f159ac458937832ebe9

Arno Töll debian at toell.net
Mon Mar 12 22:38:32 UTC 2012


The following commit has been merged in the next branch:
commit 28fddc923d6347896e9c4f159ac458937832ebe9
Author: Arno Töll <debian at toell.net>
Date:   Mon Mar 12 23:24:48 2012 +0100

    Update the bug report script a bit

diff --git a/debian/apache2-bin.bug-control b/debian/apache2-bin.bug-control
new file mode 100644
index 0000000..9d1b400
--- /dev/null
+++ b/debian/apache2-bin.bug-control
@@ -0,0 +1,2 @@
+report-with: apache2 apache2-bin apache2-data
+package-status: apache2 apache2-bin
diff --git a/debian/apache2-data.bug-script b/debian/apache2-bin.bug-script
similarity index 61%
rename from debian/apache2-data.bug-script
rename to debian/apache2-bin.bug-script
index 96e81f1..8d957cb 100755
--- a/debian/apache2-data.bug-script
+++ b/debian/apache2-bin.bug-script
@@ -6,23 +6,35 @@ $Text::Wrap::columns = 70;
 
 open (my $out, ">&=3") or die "could not open FD 3\n";
 
-my $apache = ". /etc/apache2/envvars && /usr/sbin/apache2";
-my $res = `$apache -t 2>&1`;
+our $AQUERY = 0;
+our $PHP = 0;
+
+if (-x "/usr/sbin/a2query")
+{
+	$AQUERY = "/usr/sbin/a2query";
+}
+
+if ($AQUERY)
+{
+		my $mpm = `$AQUERY -M`;
+		chomp($mpm);
+		print $out "Enabled MPM: $mpm\n";
+}
+
+
 my @modules;
-my $php;
-if ($res !~ "Syntax OK") {
-	# if we are not root, syntax check will fail because ssl private keys
-	# are not readable
-	print $out "Config file syntax check failed.\n" if $> == 0;
+if ($AQUERY)
+{
+	print $out "List of enabled modules:\n";
+	@modules = `$AQUERY -m`;
+}
+else
+{
+	print $out "a2query is not available.\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 `$apache -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";
 }
@@ -35,7 +47,7 @@ else {
 			$missing = 1;
 		}
 		if ($m =~ /^(php\d)/) {
-			$php = $1;
+			$PHP = $1;
 		}
 	}
 
@@ -47,14 +59,23 @@ else {
 		"enabled in /etc/apache2/mods-enabled/)\n") 
 	    if $missing;
 }
-if (defined $php) {
-	my @exts = qx{egrep ^extension= /etc/$php/apache2/php.ini /etc/$php/apache2/conf.d/* 2>/dev/null};
+
+if (defined $PHP) {
+	my @exts = qx{egrep ^extension= /etc/$PHP/apache2/php.ini /etc/$PHP/apache2/conf.d/* 2>/dev/null};
 	if (scalar @exts) {
 		chomp @exts;
 		@exts = grep { ! m{\.dpkg-(?:bak|dist):} } @exts;
 		@exts = sort grep { s{^.*:extension=(\S+)\.\S+}{$1} } @exts;
-		print $out "List of enabled $php extensions:\n";
+		print $out "List of enabled $PHP extensions:\n";
 		print $out wrap("  ", "  ", "@exts\n");
 	}
 }
 
+
+if ($AQUERY)
+{
+		my @confs;
+		print $out "List of enabled configurations:\n";
+		@confs = `$AQUERY -c`;
+		print $out wrap("  ", "  ", "@confs\n");
+}
diff --git a/debian/apache2-data.bug-control b/debian/apache2-data.bug-control
deleted file mode 100644
index ca2aa38..0000000
--- a/debian/apache2-data.bug-control
+++ /dev/null
@@ -1 +0,0 @@
-package-status: apache2 apache2-bin
diff --git a/debian/apache2.links b/debian/apache2.links
index d780b14..6f23c01 100644
--- a/debian/apache2.links
+++ b/debian/apache2.links
@@ -1,4 +1,5 @@
-usr/share/bug/apache2-data/script	usr/share/bug/apache2/script
+usr/share/bug/apache2-bin/script	usr/share/bug/apache2/script
+usr/share/bug/apache2-bin/control	usr/share/bug/apache2/control
 usr/sbin/a2enmod 			usr/sbin/a2dismod
 usr/sbin/a2enmod 			usr/sbin/a2ensite
 usr/sbin/a2enmod 			usr/sbin/a2dissite

-- 
Debian packaging for apache2 (Apache HTTPD 2.x)



More information about the Pkg-apache-commits mailing list