From 8a4cca179b7877c1c8c06c6aa05b80df7d30cf95 Mon Sep 17 00:00:00 2001 From: Long Li Date: Tue, 3 Dec 2019 16:43:34 +0800 Subject: [PATCH] CentOS 8: Fix facter-2.4.4-4.el7.src.rpm build error Fix build facter-2.4.4-4.el7.src.rpm to facter.el8.rpm make sure to install man/man8/facter.8 when redhat el8 as rubygem-rdoc is not available on older EL releases Story: 2006729 Task: 37761 Depends-On: https://review.opendev.org/#/c/696481/ Depends-On: https://review.opendev.org/#/c/696050/ Change-Id: Ia72a2ec4a1a22d4976d9ade03c95795660f7a898 Signed-off-by: Long Li --- ...-spec-fix-install-man-page-for-rhel8.patch | 26 +++++++++++++++++++ config/facter/centos/meta_patches/PATCH_ORDER | 1 + 2 files changed, 27 insertions(+) create mode 100644 config/facter/centos/meta_patches/0003-spec-fix-install-man-page-for-rhel8.patch diff --git a/config/facter/centos/meta_patches/0003-spec-fix-install-man-page-for-rhel8.patch b/config/facter/centos/meta_patches/0003-spec-fix-install-man-page-for-rhel8.patch new file mode 100644 index 000000000..a30b212b0 --- /dev/null +++ b/config/facter/centos/meta_patches/0003-spec-fix-install-man-page-for-rhel8.patch @@ -0,0 +1,26 @@ +From 9428b3d96f0270ec79c1ab48dc36277c8061681d Mon Sep 17 00:00:00 2001 +From: Long Li +Date: Thu, 28 Nov 2019 18:28:49 +0800 +Subject: [PATCH]: spec-fix-install-man-page-for-rhel8 + +Signed-off-by: Long Li +--- + SPECS/facter.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SPECS/facter.spec b/SPECS/facter.spec +index 97ee783..3ddd64f 100644 +--- a/SPECS/facter.spec ++++ b/SPECS/facter.spec +@@ -83,7 +83,7 @@ ruby install.rb --destdir=%{buildroot} --quick --no-rdoc --sitelibdir=%{facter_l + # Create directory for external facts + mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/facts.d + +-%if ! (0%{?fedora} || 0%{?rhel} >= 7) ++%if ! (0%{?fedora}) + # Install man page, rubygem-rdoc is not available on older EL releases) + install -D -pv -m 644 man/man8/%{name}.8 %{buildroot}/%{_mandir}/man8/%{name}.8 + %endif +-- +2.7.4 + diff --git a/config/facter/centos/meta_patches/PATCH_ORDER b/config/facter/centos/meta_patches/PATCH_ORDER index aef6d299e..ac4052207 100644 --- a/config/facter/centos/meta_patches/PATCH_ORDER +++ b/config/facter/centos/meta_patches/PATCH_ORDER @@ -1,2 +1,3 @@ 0001-spec-include-TiS-paches.patch 0002-Update-package-versioning-for-TIS-format.patch +0003-spec-fix-install-man-page-for-rhel8.patch