diff --git a/.gitignore b/.gitignore index 5637113..9d832da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ -SOURCES/auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz -SOURCES/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz -SOURCES/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz -SOURCES/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz +SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz +SOURCES/community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32.tar.gz diff --git a/.rhel-system-roles-sap.metadata b/.rhel-system-roles-sap.metadata index 1eac3ce..a6a65fd 100644 --- a/.rhel-system-roles-sap.metadata +++ b/.rhel-system-roles-sap.metadata @@ -1,4 +1,2 @@ -2c8f0a9cddc4b6ecdfb149c22c86c8c18394aff9 SOURCES/auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz -80114f5c167f5f1fa940c3c21145498f54d97f5b SOURCES/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz -0883d358ca5eb466fad455af80fa1cf8abdef29f SOURCES/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz -e9bf401559ab460d4a3079fab8faa2bd7183b170 SOURCES/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz +584f8d1681adf13cb7af256a7b38d94ca80dcab2 SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz +d1be0a3996b7927827767f0a79a1613992d9a59c SOURCES/community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32.tar.gz diff --git a/SOURCES/README.md b/SOURCES/README.md index 9903e3b..ea15477 100644 --- a/SOURCES/README.md +++ b/SOURCES/README.md @@ -1,7 +1,7 @@ Red Hat Enterprise Linux System Roles for SAP Ansible Collection ===================================== -Red Hat Enterprise Linux System Roles for SAP is a set of roles for preparing Red Hat Enterprise Linux systems for the initial installation of SAP NetWeaver and SAP HANA. +Red Hat Enterprise Linux System Roles for SAP is a set of roles for preparing Red Hat Enterprise Linux systems for the initial installation of SAP NetWeaver and SAP HANA, and for installing SAP HANA. ## Dependencies @@ -16,10 +16,10 @@ There are currently two ways to use the Red Hat Enterprise Linux System Roles fo You can install the collection from Automation Hub by running: ``` -ansible-galaxy collection install sap.rhel +ansible-galaxy collection install redhat.sap_install ``` -After the installation, the roles are available as `sap.rhel.`. +After the installation, the roles are available as `redhat.sap_install.`. Please see the [Using Ansible collections documentation](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for further details. @@ -43,10 +43,17 @@ The supported Ansible versions are aligned with currently maintained Ansible ver The modules and other plugins in this collection are private, used only internally to the collection, unless otherwise noted. -### Supported Roles +### Fully Supported Roles - * preconfigure - * hana_preconfigure - * netweaver_preconfigure + * sap_general_preconfigure + * sap_hana_preconfigure + * sap_netweaver_preconfigure + + + +### Roles in Technology Preview Support + + + * sap_hana_install diff --git a/SOURCES/community.sap_install-be6ec7e34a25f078a7fc49166ad2e2a1dc6fc3e4-#135.patch b/SOURCES/community.sap_install-be6ec7e34a25f078a7fc49166ad2e2a1dc6fc3e4-#135.patch new file mode 100644 index 0000000..a9a4890 --- /dev/null +++ b/SOURCES/community.sap_install-be6ec7e34a25f078a7fc49166ad2e2a1dc6fc3e4-#135.patch @@ -0,0 +1,64 @@ +diff -up community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml.me community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +--- community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml.me 2022-05-23 20:03:38.155660382 +0200 ++++ community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml 2022-05-23 20:06:38.667894467 +0200 +@@ -18,14 +18,26 @@ + __sap_general_preconfigure_req_ha_repos: '' + when: not sap_general_preconfigure_use_ha_repos + +- - name: Assert - Set final list of repos, auto ++ - name: Assert - Set final list of repos, non-s390x, auto + set_fact: + __sap_general_preconfigure_req_repos: + "{{ __sap_general_preconfigure_req_os_repos | list }} + + {{ __sap_general_preconfigure_req_netweaver_repos | list }} + + {{ __sap_general_preconfigure_req_hana_repos | list }} + + {{ __sap_general_preconfigure_req_ha_repos | list }}" +- when: sap_general_preconfigure_req_repos is undefined ++ when: ++ - sap_general_preconfigure_req_repos is undefined ++ - ansible_architecture != 's390x' ++ ++ - name: Assert - Set final list of repos, s390x, auto ++ set_fact: ++ __sap_general_preconfigure_req_repos: ++ "{{ __sap_general_preconfigure_req_os_repos | list }} + ++ {{ __sap_general_preconfigure_req_netweaver_repos | list }} + ++ {{ __sap_general_preconfigure_req_ha_repos | list }}" ++ when: ++ - sap_general_preconfigure_req_repos is undefined ++ - ansible_architecture == 's390x' + + - name: Assert - Set final list of repos, manual + set_fact: +diff -up community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32/roles/sap_general_preconfigure/tasks/RedHat/installation.yml.me community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +--- community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32/roles/sap_general_preconfigure/tasks/RedHat/installation.yml.me 2022-05-23 20:07:10.469897468 +0200 ++++ community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32/roles/sap_general_preconfigure/tasks/RedHat/installation.yml 2022-05-23 20:08:27.072770838 +0200 +@@ -18,14 +18,26 @@ + __sap_general_preconfigure_req_ha_repos: '' + when: not sap_general_preconfigure_use_ha_repos + +- - name: Set final list of repos, auto ++ - name: Set final list of repos, non-s390x, auto + set_fact: + __sap_general_preconfigure_req_repos: + "{{ __sap_general_preconfigure_req_os_repos | list }} + + {{ __sap_general_preconfigure_req_netweaver_repos | list }} + + {{ __sap_general_preconfigure_req_hana_repos | list }} + + {{ __sap_general_preconfigure_req_ha_repos | list }}" +- when: sap_general_preconfigure_req_repos is undefined ++ when: ++ - sap_general_preconfigure_req_repos is undefined ++ - ansible_architecture != 's390x' ++ ++ - name: Set final list of repos, s390x, auto ++ set_fact: ++ __sap_general_preconfigure_req_repos: ++ "{{ __sap_general_preconfigure_req_os_repos | list }} + ++ {{ __sap_general_preconfigure_req_netweaver_repos | list }} + ++ {{ __sap_general_preconfigure_req_ha_repos | list }}" ++ when: ++ - sap_general_preconfigure_req_repos is undefined ++ - ansible_architecture == 's390x' + + - name: Set final list of repos, manual + set_fact: diff --git a/SOURCES/galaxy.yml b/SOURCES/galaxy.yml index 42df497..b8d68c3 100644 --- a/SOURCES/galaxy.yml +++ b/SOURCES/galaxy.yml @@ -3,13 +3,13 @@ # The namespace of the collection. This can be a company/brand/organization or product namespace under which all # content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with # underscores or numbers and cannot contain consecutive underscores -namespace: sap +namespace: redhat # The name of the collection. Has the same character restrictions as 'namespace' -name: rhel +name: sap_install # The version of the collection. Must be compatible with semantic versioning -version: 3.1.1 +version: 1.0.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md @@ -18,18 +18,18 @@ readme: README.md # @nicks:irc/im.site#channel' authors: - Bernd Finger +- Sean Freeman +- Rainer Leber - Markus Koch -- Than Ngo ### OPTIONAL but strongly recommended # A short summary description of the collection -description: Ansible Collection to prepare a RHEL 7.6 or later system for the installation of SAP NetWeaver or SAP HANA +description: Ansible Collection for installing SAP NetWeaver or SAP HANA on Linux # Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only # accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' license: -- GPL-3.0-or-later - Apache-2.0 # The path to the license file for the collection. This path is relative to the root of the collection. This key is @@ -47,13 +47,13 @@ tags: [sap] dependencies: {} # The URL of the originating SCM repository -repository: https://github.com/sap-linux-roles/sap-linux-roles.github.io/ +repository: https://github.com/sap-linuxlab/community.sap_install # The URL to any online docs -documentation: https://github.com/sap-linux-roles/sap-linux-roles.github.io/blob/master/README.md +documentation: https://github.com/sap-linuxlab/sap-linuxlab.github.io/blob/master/README.md # The URL to the homepage of the collection/project -homepage: https://sap-linux-roles.github.io +homepage: https://sap-linuxlab.github.io # The URL to the collection issue tracker -issues: https://github.com/sap-linux-roles/sap-linux-roles.github.io/issues +issues: https://github.com/sap-linuxlab/community.sap_install/issues diff --git a/SOURCES/sap_hana_preconfigure-ac33871a2ccdf164033482f342dab3d36f51170f.patch b/SOURCES/sap_hana_preconfigure-ac33871a2ccdf164033482f342dab3d36f51170f.patch new file mode 100644 index 0000000..74528d4 --- /dev/null +++ b/SOURCES/sap_hana_preconfigure-ac33871a2ccdf164033482f342dab3d36f51170f.patch @@ -0,0 +1,18 @@ +diff -up sap_hana_preconfigure/handlers/main.yml.me sap_hana_preconfigure/handlers/main.yml +--- sap_hana_preconfigure/handlers/main.yml.me 2022-06-08 18:52:49.832790508 +0200 ++++ sap_hana_preconfigure/handlers/main.yml 2022-06-08 18:53:28.792668038 +0200 +@@ -37,12 +37,14 @@ + - name: "Set the grub.cfg location RHEL" + set_fact: + __sap_hana_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg ++ listen: __sap_hana_preconfigure_regenerate_grub2_conf_handler + when: + - ansible_distribution == 'RedHat' + + - name: "Set the grub.cfg location SLES" + set_fact: + __sap_hana_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg ++ listen: __sap_hana_preconfigure_regenerate_grub2_conf_handler + when: + - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' + diff --git a/SOURCES/sap_hana_preconfigure-fix-issue-#153.patch b/SOURCES/sap_hana_preconfigure-fix-issue-#153.patch new file mode 100644 index 0000000..22551da --- /dev/null +++ b/SOURCES/sap_hana_preconfigure-fix-issue-#153.patch @@ -0,0 +1,12 @@ +diff -up sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml.me sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml +--- sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml.me 2022-06-08 12:49:58.107218399 +0200 ++++ sap_hana_preconfigure/tasks/RedHat/generic/assert-cpu-governor-for-performance.yml 2022-06-08 12:51:53.264830397 +0200 +@@ -25,7 +25,7 @@ + + - name: Assert that file /etc/rc.d/rc.local exists (x86_64 platform only) + assert: +- that: __stat_boot_local.stat.exists ++ that: __sap_hana_preconfigure_register_stat_rc_local_assert.stat.exists + fail_msg: "FAIL: File /etc/rc.d/rc.local does not exist!" + success_msg: "PASS: File /etc/rc.d/rc.local exist." + ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}" diff --git a/SPECS/rhel-system-roles-sap.spec b/SPECS/rhel-system-roles-sap.spec index 367319d..504801b 100644 --- a/SPECS/rhel-system-roles-sap.spec +++ b/SPECS/rhel-system-roles-sap.spec @@ -1,7 +1,13 @@ +%if 0%{?fedora} || 0%{?rhel} >= 9 +%bcond_without ansible +%global ansible_build_dep ansible-core >= 2.11.0 +%else %if 0%{?rhel} && ! 0%{?epel} %bcond_with ansible %else %bcond_without ansible +%global ansible_build_dep ansible >= 2.9.10 +%endif %endif %bcond_with collection_artifact @@ -14,45 +20,47 @@ %bcond_with html %endif -%global collection_namespace sap +%global collection_name sap_install %if 0%{?rhel} %define package_name rhel-system-roles-sap -%global collection_name rhel +%global collection_namespace redhat %else %define package_name linux-system-roles-sap -%global collection_name linux +%global collection_namespace community %endif # 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 3.1.4 +%define collection_version 1.0.2 -%global mainid 411f58b0e8da72cd69827d6ed30d8925bea5cb23 -%global gitcommit_sap d065073dca5617292d768ea0e044994653f84667 -%global gitcommit_sap_hana 083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b -%global gitcommit_sap_netweaver bf771416116b670ccf17f8e289adbe14df20208b -%global rolename1 sap-preconfigure -%global rolename2 sap-hana-preconfigure -%global rolename3 sap-netweaver-preconfigure +%global mainid e2a233f5a0cb68363798bf014b16552cca681bd0 +%global commit_id_sap_install 57211739079e4ef37f51c45c30ea071c0956ad32 +%global rolename1 sap_general_preconfigure +%global rolename2 sap_hana_preconfigure +%global rolename3 sap_netweaver_preconfigure +%global rolename4 sap_hana_install %global src_owner linux-system-roles +%global github_repo_sap_install community.sap_install Name: %{package_name} Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products -Version: 3.1.1 -Release: 10%{?dist} +Version: 3.2.0 +Release: 2%{?dist} License: GPLv3+ -Url: https://github.com/berndfinger +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/sap-preconfigure/archive/%{gitcommit_sap}/sap-preconfigure-%{gitcommit_sap}.tar.gz -Source2: https://github.com/berndfinger/sap-hana-preconfigure/archive/%{gitcommit_sap_hana}/sap-hana-preconfigure-%{gitcommit_sap_hana}.tar.gz -Source3: https://github.com/berndfinger/sap-netweaver-preconfigure/archive/%{gitcommit_sap_netweaver}/sap-netweaver-preconfigure-%{gitcommit_sap_netweaver}.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 # patches 0-49 for sap-preconfigure # patches 50-99 for sap-hana-preconfigure Patch50: sap-hana-preconfigure-md2html-error.patch +Patch51: sap_hana_preconfigure-fix-issue-#153.patch +Patch52: sap_hana_preconfigure-ac33871a2ccdf164033482f342dab3d36f51170f.patch # patches 100-149 for sap-netweaver-preconfigur +# patches 150-199 for sap_general_preconfigure +Patch150: community.sap_install-be6ec7e34a25f078a7fc49166ad2e2a1dc6fc3e4-#135.patch BuildArch: noarch @@ -80,8 +88,12 @@ Requires: python-jmespath Requires: python-netaddr %endif +%if 0%{?rhel} >= 8 +Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0) +%endif + %if %{with ansible} -BuildRequires: ansible >= 2.9.10 +BuildRequires: %{ansible_build_dep} %endif %if %{undefined __ansible_provides} @@ -90,23 +102,19 @@ Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{ver # be compatible with the usual Fedora Provides: Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release} +%if 0%{?fedora} || 0%{?rhel} >= 8 %{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/} -%if %{undefined ansible_collection_build} -%if %{without ansible} -# Empty command. We don't have ansible-galaxy. -%define ansible_collection_build() : %else -%define ansible_collection_build() ansible-galaxy collection build +%if %{?ansible_collection_files:0}%{!?ansible_collection_files:1} +%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/ %endif %endif -%if %{undefined ansible_collection_install} + %if %{without ansible} -# Simply copy everything instead of galaxy-installing the built artifact. -%define ansible_collection_install() mkdir -p %{buildroot}%{ansible_collection_files}; cp -a . %{buildroot}%{ansible_collection_files}/%{collection_name}/ +%define ansible_collection_build_install() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz .; mkdir -p %{buildroot}%{ansible_collection_files}%{collection_name}; (cd %{buildroot}%{ansible_collection_files}%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz) %else -%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz -%endif +%define ansible_collection_build_install() ansible-galaxy collection build; ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz %endif %description @@ -122,57 +130,53 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-% %endif %prep -%setup -q -a1 -a2 -a3 -n auto-maintenance-%{mainid} - -# rename the source directories without gitcommit_sap -mv sap-preconfigure-%{gitcommit_sap} sap-preconfigure -mv sap-hana-preconfigure-%{gitcommit_sap_hana} sap-hana-preconfigure -mv sap-netweaver-preconfigure-%{gitcommit_sap_netweaver} sap-netweaver-preconfigure +%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|name: rhel|name: %{collection_name}|" 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: 3.1.1|version: %{collection_version}|" galaxy.yml +sed -i -e "s|version: 1.0.0|version: %{collection_version}|" galaxy.yml -pushd sap-preconfigure -popd -pushd sap-hana-preconfigure +pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_hana_preconfigure %patch50 -p1 +%patch51 -p1 +%patch52 -p1 popd -pushd sap-netweaver-preconfigure +pushd %{github_repo_sap_install}-%{commit_id_sap_install}/ +%patch150 -p1 popd -# remove git stuff -rm -rf *-preconfigure/.git* +pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/ # remove zero file -rm -f sap-hana-preconfigure/tasks/RedHat_6/recommendations.yml +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 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 -rm -f sap-hana-preconfigure/tasks/sapnote/2013638.yml # RHEL 6.5 - OS settings -rm -f sap-hana-preconfigure/tasks/sapnote/2136965.yml # RHEL 6.6 - OS settings -rm -f sap-hana-preconfigure/tasks/sapnote/2247020.yml # RHEL 6.7 - OS settings -rm -rf sap-hana-preconfigure/tasks/sapnote/2578899 # SLES 15 - installation -rm -rf sap-hana-preconfigure/tasks/sapnote/2684254 # SLES 15 - OS settings for HANA -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 +rm -rf sap_hana_preconfigure/tasks/SLES/ +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 +rm -f sap_hana_preconfigure/tasks/sapnote/2013638.yml # RHEL 6.5 - OS settings +rm -f sap_hana_preconfigure/tasks/sapnote/2136965.yml # RHEL 6.6 - OS settings +rm -f sap_hana_preconfigure/tasks/sapnote/2247020.yml # RHEL 6.7 - OS settings +rm -rf sap_hana_preconfigure/tasks/sapnote/2578899 # SLES 15 - installation +rm -rf sap_hana_preconfigure/tasks/sapnote/2684254 # SLES 15 - OS settings for HANA +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 sh md2html.sh \ -sap-preconfigure/README.md \ -sap-hana-preconfigure/README.md \ -sap-netweaver-preconfigure/README.md +%{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_general_preconfigure/README.md \ +%{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_hana_preconfigure/README.md \ +%{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_netweaver_preconfigure/README.md -for role in %{rolename1} %{rolename2} %{rolename3} ; do +for role in %{rolename1} %{rolename2} %{rolename3} %{rolename4} ; do new_role="$(echo ${role/sap-/} | tr '-' '_')" python3 lsr_role2collection.py --role "$role" \ - --src-path "$role" \ + --src-path %{github_repo_sap_install}-%{commit_id_sap_install}/roles/"$role" \ --src-owner %{src_owner} \ --dest-path .collections \ --readme %{SOURCE4} \ @@ -198,24 +202,23 @@ rm -rf .collections/ansible_collections/%{collection_namespace}/%{collection_nam cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name} -# build collection file -cd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ -%ansible_collection_build - %install mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \ - $RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure \ - $RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure \ - $RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure + $RPM_BUILD_ROOT%{_pkgdocdir}/sap_hana_preconfigure \ + $RPM_BUILD_ROOT%{_pkgdocdir}/sap_general_preconfigure \ + $RPM_BUILD_ROOT%{_pkgdocdir}/sap_netweaver_preconfigure \ + $RPM_BUILD_ROOT%{_pkgdocdir}/sap_hana_install -cp -pR sap-hana-preconfigure sap-preconfigure sap-netweaver-preconfigure $RPM_BUILD_ROOT%{_datadir}/ansible/roles/ -cp -p sap-hana-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure/ -cp -p sap-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure/ -cp -p sap-netweaver-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure/ +pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/ +for f in sap_hana_preconfigure sap_general_preconfigure sap_netweaver_preconfigure sap_hana_install ; do + cp -pR $f $RPM_BUILD_ROOT%{_datadir}/ansible/roles/ + install -m 644 ../LICENSE $f/README.md $RPM_BUILD_ROOT%{_pkgdocdir}/$f +done +popd # install collection files pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ -%ansible_collection_install +%ansible_collection_build_install popd # install collection_artifact @@ -228,9 +231,10 @@ popd %files %dir %{_pkgdocdir} -%dir %{_pkgdocdir}/sap-preconfigure -%dir %{_pkgdocdir}/sap-hana-preconfigure -%dir %{_pkgdocdir}/sap-netweaver-preconfigure +%dir %{_pkgdocdir}/sap_general_preconfigure +%dir %{_pkgdocdir}/sap_hana_preconfigure +%dir %{_pkgdocdir}/sap_netweaver_preconfigure +%dir %{_pkgdocdir}/sap_hana_install %dir %{_datadir}/ansible %dir %{_datadir}/ansible/roles %doc %{_pkgdocdir}/*/README.md @@ -244,6 +248,15 @@ popd %endif %changelog +* Wed Jun 08 2022 Than Ngo - 3.2.0-2 +- sap_general_preconfigure: do not attempt to enable HANA repos for s390x +- sap_hana_preconfigure: using wrong variable name +- sap_hana_preconfigure: Fix issue sap-linuxlab#154 +Related: #2066255 + +* Mon Mar 21 2022 Than Ngo - 3.2.0-1 +- Resolves: #2066255, rebase to new upstream org sap-linuxlab + * Fri Dec 03 2021 Than Ngo - 3.1.1-10 - Related: #2016858, increase release to avoid update conflict