Use %autosetup and refresh patches

epel9
Haikel Guemar 6 years ago
parent e03d1b2aeb
commit e3e8e56c1f

@ -1,7 +1,7 @@
From 55933c8bd4ee983f048d1b4c90674e3dfd2583c4 Mon Sep 17 00:00:00 2001
From 23bcde066d9915952b9bf2c8fd0770a2ce9422ce Mon Sep 17 00:00:00 2001
From: Haikel Guemar <hguemar@redhat.com>
Date: Wed, 29 Apr 2015 01:38:35 +0200
Subject: [PATCH 1/3] Fix puppet paths
Subject: [PATCH 1/5] Fix puppet paths
---
lib/puppet/util/run_mode.rb | 10 +++++-----
@ -41,5 +41,5 @@ index cf6c461..777156a 100644
end
--
2.17.1
2.19.2

@ -1,7 +1,7 @@
From fc00c9d0c99e977cda8bb4a9a89952dfae5523dc Mon Sep 17 00:00:00 2001
From f54a22b96e9e631991bad095a7b321273a2e6e3f Mon Sep 17 00:00:00 2001
From: Gael Chamoulaud <gchamoul@redhat.com>
Date: Wed, 29 Jul 2015 21:58:48 +0200
Subject: [PATCH 2/3] Revert "(maint) Remove puppetmaster.service"
Subject: [PATCH 2/5] Revert "(maint) Remove puppetmaster.service"
This reverts commit c0e30daa53b6267c1c86b6e27c01b1c26cf49af5.
---
@ -42,5 +42,5 @@ index 0000000..dbbd627
+[Install]
+WantedBy=multi-user.target
--
2.17.1
2.19.2

@ -1,7 +1,7 @@
From 320d9dd4a87266d40c5b73d6e020bb77ca4e4d9b Mon Sep 17 00:00:00 2001
From 5688991cd78f7c38a1edf28f76e9b7825a7d415a Mon Sep 17 00:00:00 2001
From: Dominic Cleal <dominic@cleal.org>
Date: Wed, 31 May 2017 10:07:04 +0100
Subject: [PATCH 3/3] Remove Fedora release restrictions from DNF provider
Subject: [PATCH 3/5] Remove Fedora release restrictions from DNF provider
Ensure DNF provider will be used on all versions of Fedora, without new
ones being excluded.
@ -23,5 +23,5 @@ index 535aa6c..c0ed877 100644
def self.update_command
# In DNF, update is deprecated for upgrade
--
2.17.1
2.19.2

@ -1,7 +1,7 @@
From d88bbce5af8a35d2bdf74632ef2dcd0dae8e178c Mon Sep 17 00:00:00 2001
From 76031db0120ef8a3bdee576ca4aac9dc8b2859af Mon Sep 17 00:00:00 2001
From: Emilien Macchi <emilien@redhat.com>
Date: Wed, 15 Aug 2018 22:40:35 +0200
Subject: [PATCH] (PUP-9069) Add support for RHEL8
Subject: [PATCH 4/5] (PUP-9069) Add support for RHEL8
This adds support for the next version of RHEL in the systemd provider.
Note: I have no idea when it'll be released but we need this patch as we
@ -11,10 +11,10 @@ need to make Puppet systemd provider working.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/puppet/provider/service/systemd.rb b/lib/puppet/provider/service/systemd.rb
index 8dd7af21e61..2371a14acb4 100644
index c444861..a68ce96 100644
--- a/lib/puppet/provider/service/systemd.rb
+++ b/lib/puppet/provider/service/systemd.rb
@@ -19,7 +19,7 @@
@@ -19,7 +19,7 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do
end
defaultfor :osfamily => [:archlinux]
@ -23,3 +23,6 @@ index 8dd7af21e61..2371a14acb4 100644
defaultfor :osfamily => :redhat, :operatingsystem => :fedora
defaultfor :osfamily => :suse
defaultfor :osfamily => :coreos
--
2.19.2

@ -1,7 +1,7 @@
From 7ae809e1eaa826082c9f587f8741ea50f5246034 Mon Sep 17 00:00:00 2001
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] (PUP-9198) Add RHEL8 support in the dnf provider
Subject: [PATCH 5/5] (PUP-9198) Add RHEL8 support in the dnf provider
dnf should be the default for RHEL8
---
@ -10,22 +10,22 @@ dnf should be the default for RHEL8
2 files changed, 16 insertions(+)
diff --git a/lib/puppet/provider/package/dnf.rb b/lib/puppet/provider/package/dnf.rb
index 535aa6c6d7f..4823ebfd523 100644
index c0ed877..ee27322 100644
--- a/lib/puppet/provider/package/dnf.rb
+++ b/lib/puppet/provider/package/dnf.rb
@@ -29,6 +29,7 @@
@@ -29,6 +29,7 @@ Puppet::Type.type(:package).provide :dnf, :parent => :yum do
end
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
diff --git a/spec/unit/provider/package/dnf_spec.rb b/spec/unit/provider/package/dnf_spec.rb
index 5e57337f500..40345dcde6e 100644
index 5e57337..40345dc 100644
--- a/spec/unit/provider/package/dnf_spec.rb
+++ b/spec/unit/provider/package/dnf_spec.rb
@@ -23,6 +23,21 @@
@@ -23,6 +23,21 @@ context 'default' do
expect(provider_class).to be_default
end
end
@ -47,3 +47,6 @@ index 5e57337f500..40345dcde6e 100644
end
describe provider_class do
--
2.19.2

@ -43,12 +43,12 @@ Patch03: 0003-Remove-Fedora-release-restrictions-from-DNF-provider.patch
# Note: Puppet 5.5.7 is broken
# Backporting patches that add supports for RHEL > 7
# https://github.com/puppetlabs/puppet/pull/7000 (PUP-9069)
Patch04: 7000.patch
Patch04: 0004-PUP-9069-Add-support-for-RHEL8.patch
# https://github.com/puppetlabs/puppet/pull/7140 (PUP-9198)
Patch05: 7140.patch
Patch05: 0005-PUP-9198-Add-RHEL8-support-in-the-dnf-provider.patch
Group: System Environment/Base
BuildRequires: git
BuildRequires: ruby-devel >= 1.8.7
# ruby-devel does not require the base package, but requires -libs instead
BuildRequires: ruby >= 1.8.7
@ -140,12 +140,7 @@ Provides the central puppet server daemon which provides manifests to clients.
The server can also function as a certificate authority and file server.
%prep
%setup -q
%patch01 -p1 -b .paths
%patch02 -p1 -b .server
%patch03 -p1
%patch04 -p1
%patch05 -p1
%autosetup -S git
# Unbundle
rm -r lib/puppet/vendor/pathspec
# Note(hguemar): remove unrelated OS/distro specific folders

Loading…
Cancel
Save