[debhelper-devel] [debhelper] 01/01: dh_installinit: Remove upstart support [c11]
Niels Thykier
nthykier at moszumanska.debian.org
Fri Sep 22 19:21:48 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch bug-876453-dh_installinit-sans-upstart
in repository debhelper.
commit 6e4fd911c60b040be0fcf581f50cce188a2e4998
Author: Niels Thykier <niels at thykier.net>
Date: Fri Sep 22 19:20:46 2017 +0000
dh_installinit: Remove upstart support [c11]
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debhelper.pod | 8 ++++++++
dh_installinit | 24 ++++++++++++++++++++----
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/debhelper.pod b/debhelper.pod
index b03a8bb..a69d4d8 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -731,6 +731,14 @@ ELF executable.
This may cause the tools to process more files than previously.
+=item -
+
+The B<dh_installinit> helper no longer installs configuration for
+the upstart init system. Instead, it will abort the build if it
+finds an old upstart configuration file. The error is there to
+remind the package maintainer to ensure the proper removal of the
+conffiles shipped in previous versions of the package (if any).
+
=back
=back
diff --git a/dh_installinit b/dh_installinit
index 02282e0..b1030cb 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -20,8 +20,8 @@ B<dh_installinit> [S<I<debhelper options>>] [B<--name=>I<name>] [B<-n>] [B<-R>]
=head1 DESCRIPTION
B<dh_installinit> is a debhelper program that is responsible for installing
-init scripts with associated defaults files, as well as upstart job files,
-and systemd service files into package build directories.
+init scripts with associated defaults files. In compatability levels up to
+11, B<dh_installinit> also handled upstart job files and systemd service files.
It also automatically generates the F<postinst> and F<postrm> and F<prerm>
commands needed to set up the symlinks in F</etc/rc*.d/> to start and stop
@@ -49,8 +49,13 @@ build directory.
=item debian/I<package>.upstart
-If this exists, it is installed into etc/init/I<package>.conf in the package
-build directory.
+In compatability level 11, this file will trigger an error with a reminder
+about ensuring the proper removal of the upstart file in the previous package
+version. Please consider using the "rm_conffile" feature from
+L<dh_installdeb(1)> to ensure the proper removal of previous upstart files.
+
+In compatability level 10, if this file exists, it is installed into
+etc/init/I<package>.conf in the package build directory.
=item debian/I<package>.service
@@ -256,6 +261,17 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
my $job=pkgfile($package,"upstart");
+ if ($job ne '' and not compat(10)) {
+ isnative($package); # For the side-effect of setting $dh{VERSION}
+ warning("Detected an upstart file; these are no longer supported by dh_installinit in compat 11");
+ warning("Please ensure a proper removal by adding a \"rm_conffile\" line in debian/<pkg>.maintscript");
+ warning("Example maintscript line:");
+ warning(" rm_conffile /etc/init/${jobfile}.conf $dh{VERSION}");
+ warning("(Note: the example is a best-effort guess and it is not always correct! Please verify before use)");
+ warning("see \"man dh_installdeb\" for more information about the maintscript file");
+ warning();
+ error("upstart jobs are no longer supported! Please remove $job and check if you need to add a conffile removal");
+ }
if ($job ne '' && ! $dh{ONLYSCRIPTS}) {
install_dir("$tmp/etc/init");
install_file($job, "$tmp/etc/init/$jobfile.conf");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list