diff -Nru puppet-3.8.5/debian/changelog puppet-3.8.5/debian/changelog --- puppet-3.8.5/debian/changelog 2016-03-15 04:28:53.000000000 -0700 +++ puppet-3.8.5/debian/changelog 2016-07-22 15:15:06.000000000 -0700 @@ -1,3 +1,10 @@ +puppet (3.8.5-2ubuntu0.1) xenial; urgency=medium + + * debian/patches/default_to_systemd_if_systemd.patch: systemd is the + default service provider if it is running. Closes LP: #1570472. + + -- Nishanth Aravamudan Thu, 21 Jul 2016 14:01:41 -0700 + puppet (3.8.5-2) unstable; urgency=medium * [7b9bf62] sysvinit: fix service restart. diff -Nru puppet-3.8.5/debian/control puppet-3.8.5/debian/control --- puppet-3.8.5/debian/control 2016-03-15 04:28:53.000000000 -0700 +++ puppet-3.8.5/debian/control 2016-07-21 14:02:44.000000000 -0700 @@ -1,7 +1,8 @@ Source: puppet Section: admin Priority: optional -Maintainer: Puppet Package Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Puppet Package Maintainers Uploaders: Micah Anderson , Andrew Pollock , Nigel Kersten , diff -Nru puppet-3.8.5/debian/patches/default_to_systemd_if_systemd.patch puppet-3.8.5/debian/patches/default_to_systemd_if_systemd.patch --- puppet-3.8.5/debian/patches/default_to_systemd_if_systemd.patch 1969-12-31 16:00:00.000000000 -0800 +++ puppet-3.8.5/debian/patches/default_to_systemd_if_systemd.patch 2016-07-22 17:21:40.000000000 -0700 @@ -0,0 +1,45 @@ +Description: systemd is the default service provider if it is running + Rather than checking for systemd by version number, let systemd be a + service provider if /run/systemd/system is detected and only let upstart + be a provider if it is not detected. +Author: Nishanth Aravamudan +Bug-Ubuntu: https://launchpad.net/bugs/1570472 + +--- a/lib/puppet/provider/service/systemd.rb ++++ b/lib/puppet/provider/service/systemd.rb +@@ -5,9 +5,19 @@ + + commands :systemctl => "systemctl" + ++ if Facter.value(:osfamily).downcase == 'debian' ++ # With multiple init systems on Debian, it is possible to have ++ # pieces of systemd around (e.g. systemctl) but not really be ++ # using systemd. We do not do this on other platforms as it can ++ # cause issues when running in a chroot without /run mounted ++ # (PUP-5577) ++ confine :exists => "/run/systemd/system" ++ end ++ + defaultfor :osfamily => [:archlinux] + defaultfor :osfamily => :redhat, :operatingsystemmajrelease => "7" + defaultfor :osfamily => :redhat, :operatingsystem => :fedora, :operatingsystemmajrelease => ["17", "18", "19", "20", "21"] ++ defaultfor :operatingsystem => :ubuntu, { :exists => "/run/systemd/system" } => :true + + def self.instances + i = [] +--- a/lib/puppet/provider/service/upstart.rb ++++ b/lib/puppet/provider/service/upstart.rb +@@ -12,11 +12,11 @@ + " + + confine :any => [ +- Facter.value(:operatingsystem) == 'Ubuntu', ++ (Facter.value(:operatingsystem) == 'Ubuntu' and !File.exists?("/run/systemd/system")), + (Facter.value(:osfamily) == 'RedHat' and Facter.value(:operatingsystemrelease) =~ /^6\./), + ] + +- defaultfor :operatingsystem => :ubuntu ++ defaultfor :operatingsystem => :ubuntu, { :exists => "/run/systemd/system" } => :false + + commands :start => "/sbin/start", + :stop => "/sbin/stop", diff -Nru puppet-3.8.5/debian/patches/series puppet-3.8.5/debian/patches/series --- puppet-3.8.5/debian/patches/series 2016-03-15 04:28:53.000000000 -0700 +++ puppet-3.8.5/debian/patches/series 2016-07-21 13:59:28.000000000 -0700 @@ -5,3 +5,4 @@ 0005-Fix-service-listing-and-enable-disable-in-Debian.patch 0006-Stored-configs-compatibility-with-ActiveRecord-4.x.patch 0007-PUP-4633-fix-non-ASCII-user-comment-with-ruby-2.1.patch +default_to_systemd_if_systemd.patch