epel9
Terje Røsten 6 years ago
parent f04e1ae2d4
commit 2745c62d0c

@ -10,7 +10,7 @@ ones being excluded.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/puppet/provider/package/dnf.rb b/lib/puppet/provider/package/dnf.rb
index 535aa6c..c0ed877 100644
index 4823ebf..ee27322 100644
--- a/lib/puppet/provider/package/dnf.rb
+++ b/lib/puppet/provider/package/dnf.rb
@@ -28,7 +28,7 @@ Puppet::Type.type(:package).provide :dnf, :parent => :yum do
@ -19,9 +19,6 @@ index 535aa6c..c0ed877 100644
- defaultfor :operatingsystem => :fedora, :operatingsystemmajrelease => (22..30).to_a
+ defaultfor :operatingsystem => :fedora
defaultfor :osfamily => :redhat, :operatingsystemmajrelease => ["8"]
def self.update_command
# In DNF, update is deprecated for upgrade
--
2.19.2

@ -1,52 +0,0 @@
From 8cf4f5cb49ac3742c0c650f81875872ac3e09fbb Mon Sep 17 00:00:00 2001
From: Alex Schultz <aschultz@redhat.com>
Date: Wed, 3 Oct 2018 12:55:30 -0600
Subject: [PATCH 5/5] (PUP-9198) Add RHEL8 support in the dnf provider
dnf should be the default for RHEL8
---
lib/puppet/provider/package/dnf.rb | 1 +
spec/unit/provider/package/dnf_spec.rb | 15 +++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/lib/puppet/provider/package/dnf.rb b/lib/puppet/provider/package/dnf.rb
index c0ed877..ee27322 100644
--- a/lib/puppet/provider/package/dnf.rb
+++ b/lib/puppet/provider/package/dnf.rb
@@ -29,6 +29,7 @@ Puppet::Type.type(:package).provide :dnf, :parent => :yum do
end
defaultfor :operatingsystem => :fedora
+ defaultfor :osfamily => :redhat, :operatingsystemmajrelease => ["8"]
def self.update_command
# In DNF, update is deprecated for upgrade
diff --git a/spec/unit/provider/package/dnf_spec.rb b/spec/unit/provider/package/dnf_spec.rb
index 5e57337..40345dc 100644
--- a/spec/unit/provider/package/dnf_spec.rb
+++ b/spec/unit/provider/package/dnf_spec.rb
@@ -23,6 +23,21 @@ context 'default' do
expect(provider_class).to be_default
end
end
+
+ it "should not be the default provider on rhel7" do
+ Facter.stubs(:value).with(:osfamily).returns(:redhat)
+ Facter.stubs(:value).with(:operatingsystem).returns(:redhat)
+ Facter.stubs(:value).with(:operatingsystemmajrelease).returns("7")
+ expect(provider_class).to_not be_default
+ end
+
+ it "should be the default provider on rhel8" do
+ Facter.stubs(:value).with(:osfamily).returns(:redhat)
+ Facter.stubs(:value).with(:operatingsystem).returns(:redhat)
+ Facter.stubs(:value).with(:operatingsystemmajrelease).returns("8")
+ expect(provider_class).to be_default
+ end
+
end
describe provider_class do
--
2.19.2

@ -25,8 +25,8 @@
%global pending_upgrade_file %{pending_upgrade_path}/upgrade_pending
Name: puppet
Version: 5.5.6
Release: 6%{?dist}
Version: 5.5.10
Release: 1%{?dist}
Summary: A network tool for managing many disparate systems
License: ASL 2.0
URL: http://puppetlabs.com
@ -44,8 +44,6 @@ Patch03: 0003-Remove-Fedora-release-restrictions-from-DNF-provider.patch
# Backporting patches that add supports for RHEL > 7
# https://github.com/puppetlabs/puppet/pull/7000 (PUP-9069)
Patch04: 0004-PUP-9069-Add-support-for-RHEL8.patch
# https://github.com/puppetlabs/puppet/pull/7140 (PUP-9198)
Patch05: 0005-PUP-9198-Add-RHEL8-support-in-the-dnf-provider.patch
BuildRequires: git
BuildRequires: ruby-devel >= 1.8.7
@ -403,6 +401,9 @@ fi
exit 0
%changelog
* Thu Mar 07 2019 Terje Rosten <terje.rosten@ntnu.no> - 5.5.10-1
- 5.5.10
* Thu Mar 07 2019 Terje Rosten <terje.rosten@ntnu.no> - 5.5.6-6
- Split off headless subpackage, based on idea from Bogdan Dobrelya

@ -1,2 +1,2 @@
SHA512 (puppet-5.5.6.tar.gz) = 53bccc4cf3d4dde3079d96cd28b4cf380d004fdf67da8eaeaf70706ca5e1fe611910042f1aa03453fb29419bb9888a0eeef9a9d64e8f0cfe5d8d7a73e5bf5850
SHA512 (puppet-5.5.6.tar.gz.asc) = 919303ae3f944236e52d2c1008f77e383ea2ee88c450fd00c197bc751f8fd3cd042bc6fd5f544a57b30a122f04db48418ee4d44319ecb996426fec311f7b83f2
SHA512 (puppet-5.5.10.tar.gz) = 70a5684289fc576853bf908adff44c1b1ce4b37d71236e7d7a8d140fa0e3cdd46a4b570cc7e493a3f47641f6be0c3b736ab04a178c30cce4244abe686378bf4b
SHA512 (puppet-5.5.10.tar.gz.asc) = 884e7f290c6dba7076f7e5c5038326d77997598252fbf432f0e6abcbb3fe676aa38ebe5d8df682e616fa757365de423dd074a174c5e4d4f699832fd6377bd487

Loading…
Cancel
Save