[pkg-lighttpd] r526 - in lighttpd/trunk/debian: . conf-available
Arno Töll
atoell-guest at alioth.debian.org
Mon Apr 11 10:40:03 UTC 2011
Author: atoell-guest
Date: 2011-04-11 10:39:56 +0000 (Mon, 11 Apr 2011)
New Revision: 526
Added:
lighttpd/trunk/debian/lighttpd.preinst
Modified:
lighttpd/trunk/debian/changelog
lighttpd/trunk/debian/conf-available/15-fastcgi-php.conf
lighttpd/trunk/debian/lighty-enable-mod
Log:
Commit proposes fixes for #614716 and #600050, document changes in changelog
Modified: lighttpd/trunk/debian/changelog
===================================================================
--- lighttpd/trunk/debian/changelog 2011-04-07 08:20:52 UTC (rev 525)
+++ lighttpd/trunk/debian/changelog 2011-04-11 10:39:56 UTC (rev 526)
@@ -1,3 +1,14 @@
+lighttpd (1.4.28-4) unstable; urgency=low
+
+ [Arno Töll]
+ * Fix "leaves dangling alternatives on upgrade" add preinst script which
+ removes the dangling symlink (Closes: #614716)
+ * Fix "/etc/lighttpd/conf-available/15-fastcgi-php.conf: fastcgi-php
+ file missing a required directive" add a dependency based recursive module
+ enable system in lighty-enable-mod (Closes: #600050)
+
+ -- XXXXX YYYYYY <XXXXXX at YYYYYY> Sat, 09 Apr 2011 13:22:45 -0400
+
lighttpd (1.4.28-3) unstable; urgency=low
[ Krzysztof Krzyżaniak (eloy) ]
Modified: lighttpd/trunk/debian/conf-available/15-fastcgi-php.conf
===================================================================
--- lighttpd/trunk/debian/conf-available/15-fastcgi-php.conf 2011-04-07 08:20:52 UTC (rev 525)
+++ lighttpd/trunk/debian/conf-available/15-fastcgi-php.conf 2011-04-11 10:39:56 UTC (rev 526)
@@ -1,3 +1,4 @@
+# -*- depends: fastcgi -*-
# /usr/share/doc/lighttpd-doc/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi
Added: lighttpd/trunk/debian/lighttpd.preinst
===================================================================
--- lighttpd/trunk/debian/lighttpd.preinst (rev 0)
+++ lighttpd/trunk/debian/lighttpd.preinst 2011-04-11 10:39:56 UTC (rev 526)
@@ -0,0 +1,47 @@
+#!/bin/sh
+# preinst script for lighttpd
+
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install)
+ ;;
+
+ upgrade)
+
+ if [ "x$2" != "x" ]; then
+ # We upgrade from Squeeze or older, remove alternative as spawn-fcgi is not provided anymore.
+ # This should have been done since 1.4.26-1 but was accidentally forgotten
+ if dpkg --compare-versions "$2" lt 1.4.28-4
+ then
+ update-alternatives --remove spawn-fcgi /usr/bin/spawn-fcgi.lighttpd || true
+ update-alternatives --remove spawn-fcgi.1.gz /usr/share/man/man1/spawn-fcgi.lighttpd.1.gz || true
+ fi
+
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+
Modified: lighttpd/trunk/debian/lighty-enable-mod
===================================================================
--- lighttpd/trunk/debian/lighty-enable-mod 2011-04-07 08:20:52 UTC (rev 525)
+++ lighttpd/trunk/debian/lighty-enable-mod 2011-04-11 10:39:56 UTC (rev 526)
@@ -4,6 +4,7 @@
#
# Contains changes from:
# - Tobias Gruetzmacher <tobias at portfolio16.de>
+# - Arno Toell <debian at toell.net>
#
# You may distribute under the terms of either the GNU General Public
# License[1] or the Artistic License[2].
@@ -23,7 +24,6 @@
my %available = ();
my %enabled = ();
my @todo = ();
-my %moduledeps = ();
my $enabling = 1;
#--- first check if we enabling or disabling
@@ -75,16 +75,43 @@
#--- activate (link) or deactivate (remove) module
foreach my $do (@todo) {
+ if (! exists($available{$do})) {
+ print("Ignoring unknown module: $do\n");
+ next;
+ }
if ($enabling) {
next unless defined($available{$do});
my $target = sprintf("%s/conf-enabled/%s", $confdir,basename($available{$do}));
- print qq{Enabling $do: };
+ my $source = $available{$do};
my $st = stat($target);
unless ( -f $target ) {
+ # scan for a dependency line
+ local *MOD;
+ open(MOD, "< $source") || die("can't read $source: $!");
+ while(my $i = <MOD>) {
+ if ($i =~ m/# -\*- depends: ([-\w, ]+) -\*-/) {
+ my @matches = split(/,\s+/, $1);
+ for my $module (@matches) {
+ if (exists $available{$module} and ! exists $enabled{$module}) {
+ print("Met dependency: $module\n");
+ push(@todo, $module);
+ }
+ elsif (exists $available{$module} and exists $enabled{$module}) {
+ # Do nothing
+ }
+ else
+ {
+ die("Unresolved dependency: $module\n");
+ }
+ }
+ last;
+ }
+ }
+ close(MOD);
if (symlink("../conf-available/" . basename($available{$do}), $target)) {
- print "ok\n";
+ print "Enabling $do: ok\n";
}
else {
print "failure: $!\n";
@@ -94,19 +121,35 @@
print "already enabled\n";
}
- #--- check dependencies
- for my $module (@{$moduledeps{$do}})
- {
- unless ( -f $target && -l $target )
- {
- print qq{Module $do depends on module $module which is not activated.\n};
- }
- }
}
else {
if (defined($enabled{$do})) {
print qq{Disabling $do\n};
my $target = sprintf("%s/conf-enabled/%s", $confdir,basename($enabled{$do}));
+ my $source = $available{$do};
+
+ # scan for a reverse dependency line
+ foreach my $available_module (keys %available) {
+ if ($available_module eq $do) {
+ next;
+ }
+ local *MOD;
+ open(MOD, "< $available{$available_module}") || die("can't read $available{$available_module}: $!");
+ while(my $i = <MOD>) {
+ if ($i =~ m/# -\*- depends: ([-\w, ]+) -\*-/) {
+ my @matches = split(/,\s+/, $1);
+ for my $module (@matches) {
+ if ($module eq $do && exists $enabled{$available_module}) {
+ print("Reverse dependency met: Disabling $available_module too\n");
+ push(@todo, $available_module);
+ }
+ }
+ last;
+ }
+ }
+ }
+ close(MOD);
+
unlink($target);
} else {
print qq{Already disabled $do\n};
More information about the pkg-lighttpd-maintainers
mailing list