summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debhelper.pod5
-rw-r--r--debian/changelog4
-rwxr-xr-xdh_installinit11
3 files changed, 19 insertions, 1 deletions
diff --git a/debhelper.pod b/debhelper.pod
index 7ad3e944..216360b2 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -532,6 +532,11 @@ This compatibility level is still open for development; use with caution.
Changes from v9 are:
+=item -
+
+B<dh_installinit> will no longer install a file named debian/I<package>
+as an init script.
+
=over 8
=item -
diff --git a/debian/changelog b/debian/changelog
index edd3cf39..c14d9762 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@ debhelper (9.20130631) UNRELEASED; urgency=low
Closes: #717374
(Thanks, Luca Falavigna)
* Type fixes. Closes: #719216
+ * dh_installinit: Fix a longstanding accidental behavior that caused
+ a file named debian/package to be installed as the init script.
+ Only fixed in v10 since packages might depend on this behavior.
+ Closes: #719359
-- Joey Hess <joeyh@debian.org> Fri, 19 Jul 2013 18:47:27 -0400
diff --git a/dh_installinit b/dh_installinit
index 7ee16ef0..d7c8f75d 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -162,6 +162,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# Figure out what filename to install it as.
my $script;
+ my $scriptsrc;
my $jobfile=$package;
if (defined $dh{NAME}) {
$jobfile=$script=$dh{NAME};
@@ -177,12 +178,20 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
else {
warning("\"$package\" has no final d' in its name, but -d was specified.");
}
+ $scriptsrc=$script;
}
elsif ($dh{INIT_SCRIPT}) {
$script=$dh{INIT_SCRIPT};
+ $scriptsrc=$script;
}
else {
$script=$package;
+ if (compat(9)) {
+ $scriptsrc=$script;
+ }
+ else {
+ $scriptsrc="init";
+ }
}
my $service=pkgfile($package,"service");
@@ -222,7 +231,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
doit("install","-p","-m644",$default,"$tmp/etc/default/$script");
}
- my $init=pkgfile($package,$script) || pkgfile($package,"init") ||
+ my $init=pkgfile($package,$scriptsrc) || pkgfile($package,"init") ||
pkgfile($package,"init.d");
if ($job ne '' || ($dh{ONLYSCRIPTS} && -e "$tmp/etc/init/$jobfile.conf")) {