From 78add219dc729fc5b302ae7211efc084213d2fdf Mon Sep 17 00:00:00 2001 From: rvasikarla Date: Sun, 5 Apr 2026 18:48:02 -0500 Subject: [PATCH] fix: select systemd as default service provider on Raspbian 13 Add Raspbian 13 (trixie) to the list of versions that default to the systemd service provider. Without this, puppet selects init as the service provider on 32-bit Raspberry Pi OS 13, which causes service resources to fail. This is the same fix that was applied for Raspbian 12 in #9169. Fixes #9565 --- lib/puppet/provider/service/systemd.rb | 2 +- spec/unit/provider/service/systemd_spec.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/puppet/provider/service/systemd.rb b/lib/puppet/provider/service/systemd.rb index c8e52762203..877c467adc7 100644 --- a/lib/puppet/provider/service/systemd.rb +++ b/lib/puppet/provider/service/systemd.rb @@ -31,7 +31,7 @@ defaultfor 'os.name' => :ubuntu notdefaultfor 'os.name' => :ubuntu, 'os.release.major' => ["10.04", "12.04", "14.04", "14.10"] # These are using upstart defaultfor 'os.name' => :cumuluslinux, 'os.release.major' => %w[3 4] - defaultfor 'os.name' => :raspbian, 'os.release.major' => %w[12] + defaultfor 'os.name' => :raspbian, 'os.release.major' => %w[12 13] def self.instances i = [] diff --git a/spec/unit/provider/service/systemd_spec.rb b/spec/unit/provider/service/systemd_spec.rb index c0721f0f690..710dcc9731a 100644 --- a/spec/unit/provider/service/systemd_spec.rb +++ b/spec/unit/provider/service/systemd_spec.rb @@ -178,6 +178,13 @@ expect(provider_class).to be_default end + it "should be the default provider on raspbian13" do + allow(Facter).to receive(:value).with('os.family').and_return(:debian) + allow(Facter).to receive(:value).with('os.name').and_return(:raspbian) + allow(Facter).to receive(:value).with('os.release.major').and_return("13") + expect(provider_class).to be_default + end + %i[enabled? daemon_reload? enable disable start stop status restart].each do |method| it "should have a #{method} method" do expect(provider).to respond_to(method)