From 35cab9763cf8bc081b0c43981cd78506136c5df2 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Fri, 15 Jul 2022 09:38:21 +0200 Subject: [PATCH] - more fixes, update README.md Related: #2101373 --- .gitignore | 1 + rhel-system-roles-sap.spec | 36 +++++++++++++++++++++--------------- sources | 2 +- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index bcd771f..1babc21 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz /community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32.tar.gz /community.sap_install-29b37456211c8bf825547f614652f24cf324860a.tar.gz +/community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f.tar.gz diff --git a/rhel-system-roles-sap.spec b/rhel-system-roles-sap.spec index ea93cd8..03af112 100644 --- a/rhel-system-roles-sap.spec +++ b/rhel-system-roles-sap.spec @@ -6,7 +6,7 @@ %bcond_with collection_artifact -%if 0%{?fedora} || 0%{?rhel} >= 8 +%if 0%{?fedora} || 0%{?rhel} > 8 %bcond_without html %else # pandoc is not supported in rhel 7 and older, @@ -26,10 +26,10 @@ # collection_version has to be increased by every rebuild # otherwise, it cannot be uploaded to Automation Hub and Galaxy # due to version conflict -%define collection_version 1.1.0 +%define collection_version 1.1.1 %global mainid e2a233f5a0cb68363798bf014b16552cca681bd0 -%global commit_id_sap_install 29b37456211c8bf825547f614652f24cf324860a +%global commit_id_sap_install a2c6785d02092bb9142d9f2c170ad4b097d1af2f %global rolename1 sap_general_preconfigure %global rolename2 sap_hana_preconfigure %global rolename3 sap_netweaver_preconfigure @@ -56,13 +56,12 @@ Name: %{package_name} Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products Version: 3.3.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ Url: https://github.com/berndfinger/community.sap_install Source0: https://github.com/linux-system-roles/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz Source1: https://github.com/berndfinger/%{github_repo_sap_install}/archive/%{commit_id_sap_install}/%{github_repo_sap_install}-%{commit_id_sap_install}.tar.gz Source4: README.md -Source5: galaxy.yml Patch1: community.sap_install-shebang.patch Patch2: sap-hana-preconfigure-md2html-error.patch @@ -132,23 +131,24 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-% %prep %setup -q -a1 -n auto-maintenance-%{mainid} -# cp own galaxy.yml and rename the collection name correctly for Automation Hub and Galaxy -mkdir .collections -cp %{SOURCE5} galaxy.yml -sed -i -e "s|namespace: redhat|namespace: %{collection_namespace}|" galaxy.yml -# add correct version for Automation Hub and Galaxy -sed -i -e "s|version: 1.0.0|version: %{collection_version}|" galaxy.yml +# add correct version and namespace for Automation Hub and Galaxy +cp %{github_repo_sap_install}-%{commit_id_sap_install}/galaxy.yml . +sed -i -e "s|^namespace: .*|namespace: %{collection_namespace}|" galaxy.yml +sed -i -e "s|^version: .*|version: %{collection_version}|" galaxy.yml pushd %{github_repo_sap_install}-%{commit_id_sap_install}/ %patch1 -p1 %patch2 -p1 popd +# remove zero file and symlinks +find . -type f -size 0 -delete +find . -type l -delete + pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/ -# remove zero file -rm -f sap_hana_preconfigure/tasks/RedHat_6/recommendations.yml # remove all SLES stuff and RHEL 6 stuff -rm -rf sap_hana_preconfigure/tasks/SLES/ +rm -rf */tasks/SLES/ +rm -f */vars/SLES_15.yml rm -rf sap_hana_preconfigure/tasks/sapnote/1275776 # SLES - sapconf, saptune, etc rm -rf sap_hana_preconfigure/tasks/sapnote/1944799 # SLES - HANA install and config guidelines rm -f sap_hana_preconfigure/tasks/sapnote/1944799.yml @@ -160,7 +160,6 @@ rm -rf sap_hana_preconfigure/tasks/sapnote/2684254 # SLES 15 - OS settings for H rm -f sap_hana_preconfigure/vars/RedHat_6.5.yml rm -f sap_hana_preconfigure/vars/RedHat_6.6.yml rm -f sap_hana_preconfigure/vars/RedHat_6.7.yml -rm -f sap_hana_preconfigure/vars/SLES_15.yml popd %build @@ -172,6 +171,9 @@ done sh md2html.sh $readmes %endif +# create dest-path +mkdir .collections + for role in %{rolenames} ; do LANG=en_US.utf-8 LC_ALL=en_US.utf-8 python3 lsr_role2collection.py --role "$role" \ --src-path %{github_repo_sap_install}-%{commit_id_sap_install}/roles/"$role" \ @@ -233,6 +235,10 @@ popd %endif %changelog +* Thu Jul 14 2022 Than Ngo - 3.3.0-3 +- more fixes, update README.md +Related: #2101373 + * Tue Jul 12 2022 Than Ngo - 3.3.0-2 - make the role Ansible 2.13 compliant - get rid of all the new ansible-lint 6.3.0 errors for preconfigure and sap_hana_install roles diff --git a/sources b/sources index b60ae2a..c27e637 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz) = 3d5c784e668605eb8b7862227b456da05ff5dedf84411131a27118b501b6a9bbe8894c4f29e6de4230fe534ef6b2de4653c56a904857d9eb11b452d31aed143c -SHA512 (community.sap_install-29b37456211c8bf825547f614652f24cf324860a.tar.gz) = f7595e038114a42c2db4115367df11c3bfd91164bccb4cab64d991a0e7eb17a7409d2768942f1c2ddf63bec5368cdda5cd11ffee084b7c0cba49df44f31b8a4c +SHA512 (community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f.tar.gz) = edc17df7e069a0085547db242f93183e93e2ca43351d4ffdfc2dc9a891e673adedb990ee2685874429208e94224e899a45058bc6d2171a76e945d4f460b6d7ab