diff -Nru puppet-4.5.0/debian/changelog puppet-4.5.0/debian/changelog --- puppet-4.5.0/debian/changelog 2016-05-29 03:53:13.000000000 -0700 +++ puppet-4.5.0/debian/changelog 2016-06-14 16:14:22.000000000 -0700 @@ -1,3 +1,10 @@ +puppet (4.5.0-4ubuntu1) yakkety; urgency=medium + + * debian/patches/use_systemd_on_1610.patch: Use systemd on Ubuntu + 16.10. Closes LP: #1570472. + + -- Nishanth Aravamudan Tue, 14 Jun 2016 16:14:07 -0700 + puppet (4.5.0-4) unstable; urgency=medium * Prevent a purge of puppet-common from deleting /var/lib/puppet diff -Nru puppet-4.5.0/debian/patches/series puppet-4.5.0/debian/patches/series --- puppet-4.5.0/debian/patches/series 2016-05-29 03:53:13.000000000 -0700 +++ puppet-4.5.0/debian/patches/series 2016-06-14 16:10:46.000000000 -0700 @@ -1,3 +1,4 @@ 0001-Adjust-default-paths.patch 0002-Adjust-puppet-master-passenger-paths.patch 0003-fix-puppet-master-logcheck-rule.patch +use_systemd_on_1610.patch diff -Nru puppet-4.5.0/debian/patches/use_systemd_on_1610.patch puppet-4.5.0/debian/patches/use_systemd_on_1610.patch --- puppet-4.5.0/debian/patches/use_systemd_on_1610.patch 1969-12-31 16:00:00.000000000 -0800 +++ puppet-4.5.0/debian/patches/use_systemd_on_1610.patch 2016-06-14 16:13:57.000000000 -0700 @@ -0,0 +1,53 @@ +Description: Use systemd on Ubuntu 16.10 +Author: Nishanth Aravamudan +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1570472 +Origin: upstream, https://github.com/puppetlabs/puppet/commit/d15f66e568c9a04aaa9fec32243b589c0e33a2f1 +Origin: upstream, https://github.com/puppetlabs/puppet/commit/ef342d4ced9bf7aa0489005119bf80a298d094f2 +Bug: https://tickets.puppetlabs.com/browse/PUP-6391 + +--- puppet-4.5.0.orig/lib/puppet/provider/service/systemd.rb ++++ puppet-4.5.0/lib/puppet/provider/service/systemd.rb +@@ -23,7 +23,7 @@ Puppet::Type.type(:service).provide :sys + defaultfor :osfamily => :redhat, :operatingsystem => :fedora + defaultfor :osfamily => :suse + defaultfor :operatingsystem => :debian, :operatingsystemmajrelease => "8" +- defaultfor :operatingsystem => :ubuntu, :operatingsystemmajrelease => ["15.04","15.10","16.04"] ++ defaultfor :operatingsystem => :ubuntu, :operatingsystemmajrelease => ["15.04","15.10","16.04","16.10"] + + def self.instances + i = [] +--- puppet-4.5.0.orig/spec/unit/provider/service/systemd_spec.rb ++++ puppet-4.5.0/spec/unit/provider/service/systemd_spec.rb +@@ -98,25 +98,13 @@ describe Puppet::Type.type(:service).pro + expect(described_class).not_to be_default + end + +- it "should be the default provider on ubuntu15.04" do +- Facter.stubs(:value).with(:osfamily).returns(:debian) +- Facter.stubs(:value).with(:operatingsystem).returns(:ubuntu) +- Facter.stubs(:value).with(:operatingsystemmajrelease).returns("15.04") +- expect(described_class).to be_default +- end +- +- it "should be the default provider on ubuntu15.10" do +- Facter.stubs(:value).with(:osfamily).returns(:debian) +- Facter.stubs(:value).with(:operatingsystem).returns(:ubuntu) +- Facter.stubs(:value).with(:operatingsystemmajrelease).returns("15.10") +- expect(described_class).to be_default +- end +- +- it "should be the default provider on ubuntu16.04" do +- Facter.stubs(:value).with(:osfamily).returns(:debian) +- Facter.stubs(:value).with(:operatingsystem).returns(:ubuntu) +- Facter.stubs(:value).with(:operatingsystemmajrelease).returns("16.04") +- expect(described_class).to be_default ++ [ '15.04', '15.10', '16.04', '16.10' ].each do |ver| ++ it "should be the default provider on ubuntu#{ver}" do ++ Facter.stubs(:value).with(:osfamily).returns(:debian) ++ Facter.stubs(:value).with(:operatingsystem).returns(:ubuntu) ++ Facter.stubs(:value).with(:operatingsystemmajrelease).returns("#{ver}") ++ expect(described_class).to be_default ++ end + end + + [:enabled?, :enable, :disable, :start, :stop, :status, :restart].each do |method|