From 9673016ac11f2d019adb5739e726d94913cb66a1 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 17 2022 08:36:44 +0000 Subject: import rhel-system-roles-sap-3.2.0-3.el9_0 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d832da --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +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 new file mode 100644 index 0000000..a6a65fd --- /dev/null +++ b/.rhel-system-roles-sap.metadata @@ -0,0 +1,2 @@ +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 new file mode 100644 index 0000000..ea15477 --- /dev/null +++ b/SOURCES/README.md @@ -0,0 +1,59 @@ +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, and for installing SAP HANA. + +## Dependencies + +If installing from RPM, any dependencies will be installed with the package. +Otherwise, the dependencies are listed in `requirements.txt` and/or `bindep.txt`. + +## Installation + +There are currently two ways to use the Red Hat Enterprise Linux System Roles for SAP Collection in your setup. + +### Installation from Automation Hub + +You can install the collection from Automation Hub by running: +``` +ansible-galaxy collection install redhat.sap_install +``` + +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. + +### Installation via RPM + +You can install the collection with the software package management tool `dnf` by running: +``` +dnf install rhel-system-roles-sap +``` + +## Documentation +The official RHEL System Roles for SAP documentation can be found [here](https://access.redhat.com/articles/4488731). + +## Support + +### Supported Ansible Versions + +The supported Ansible versions are aligned with currently maintained Ansible versions that support Collections (Ansible 2.9 and later). You can find the list of maintained Ansible versions [here](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-status). + +### Modules and Plugins + +The modules and other plugins in this collection are private, used only internally to the collection, unless otherwise noted. + +### Fully Supported Roles + + + * sap_general_preconfigure + * sap_hana_preconfigure + * sap_netweaver_preconfigure + + + +### Roles in Technology Preview Support + + + * sap_hana_install + diff --git a/SOURCES/galaxy.yml b/SOURCES/galaxy.yml new file mode 100644 index 0000000..b8d68c3 --- /dev/null +++ b/SOURCES/galaxy.yml @@ -0,0 +1,59 @@ +### REQUIRED + +# 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: redhat + +# The name of the collection. Has the same character restrictions as 'namespace' +name: sap_install + +# The version of the collection. Must be compatible with semantic versioning +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 + +# A list of the collection's content authors. Can be just the name or in the format 'Full Name (url) +# @nicks:irc/im.site#channel' +authors: +- Bernd Finger +- Sean Freeman +- Rainer Leber +- Markus Koch + +### OPTIONAL but strongly recommended + +# A short summary description of the collection +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: +- 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 +# mutually exclusive with 'license' +# license_file: '' + +# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character +# requirements as 'namespace' and 'name' +tags: [sap] + +# Collections that this collection requires to be installed for it to be usable. The key of the dict is the +# collection label 'namespace.name'. The value is a version range +# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version +# range specifiers can be set and are separated by ',' +dependencies: {} + +# The URL of the originating SCM repository +repository: https://github.com/sap-linuxlab/community.sap_install + +# The URL to any online docs +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-linuxlab.github.io + +# The URL to the collection issue tracker +issues: https://github.com/sap-linuxlab/community.sap_install/issues diff --git a/SOURCES/sap-hana-preconfigure-md2html-error.patch b/SOURCES/sap-hana-preconfigure-md2html-error.patch new file mode 100644 index 0000000..99821ae --- /dev/null +++ b/SOURCES/sap-hana-preconfigure-md2html-error.patch @@ -0,0 +1,19 @@ +diff -up sap-hana-preconfigure/README.md.me sap-hana-preconfigure/README.md +--- sap-hana-preconfigure/README.md.me 2021-03-22 14:08:21.960414814 +0100 ++++ sap-hana-preconfigure/README.md 2021-03-22 14:10:28.220020075 +0100 +@@ -216,13 +216,13 @@ In case you want the role to set or chec + sap_hana_preconfigure_use_netapp_settings_nfsv3 + ``` + +-### Add the repository for IBM service and productivity tools for POWER (ppc64le only) ++### Add the repository for IBM service and productivity tools (ppc64le only) + In case you do *not* want to automatically add the repository for the IBM service and productivity tools, set the following variable to `no`. Default is `yes`, meaning that the role will download and install the package specified in variable sap_hana_preconfigure_ibm_power_repo_url (see below) and also run the command /opt/ibm/lop/configure to accept the license. + ```yaml + sap_hana_preconfigure_add_ibm_power_repo + ``` + +-### URL for IBM service and productivity tools for POWER (ppc64le only) ++### URL for IBM service and productivity tools (ppc64le only) + The following variable is set to the location of package ibm-power-repo-lastest.noarch.rpm or a package with similar contents, as defined by variable __sap_hana_preconfigure_ibm_power_repo_url in vars/RedHat_7.yml and vars/RedHat_8.yml. + You can replace it by your own URL by setting this variable to a different URL. + ```yaml diff --git a/SPECS/rhel-system-roles-sap.spec b/SPECS/rhel-system-roles-sap.spec new file mode 100644 index 0000000..cd1cd1c --- /dev/null +++ b/SPECS/rhel-system-roles-sap.spec @@ -0,0 +1,355 @@ +%if 0%{?rhel} && ! 0%{?epel} +%bcond_with ansible +%else +%bcond_without ansible +%endif + +%bcond_with collection_artifact + +%if 0%{?fedora} || 0%{?rhel} >= 8 +%bcond_without html +%else +# pandoc is not supported in rhel 7 and older, +# which is needed for converting .md to .html. +%bcond_with html +%endif + +%global collection_name sap_install +%if 0%{?rhel} +%define package_name rhel-system-roles-sap +%global collection_namespace redhat +%else +%define package_name linux-system-roles-sap +%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 1.0.2 + +%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.2.0 +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 +# patches 0-49 for sap-preconfigure +# patches 50-99 for sap-hana-preconfigure +Patch50: sap-hana-preconfigure-md2html-error.patch +# patches 100-149 for sap-netweaver-preconfigur + +BuildArch: noarch + + +%if %{with html} +# Requirements for md2html.sh to build the documentation +%if 0%{?fedora} || 0%{?rhel} >= 9 +BuildRequires: rubygem-kramdown-parser-gfm +%else +BuildRequires: pandoc +BuildRequires: asciidoc +BuildRequires: highlight +%endif +%endif + +# Requirements for galaxy_transform.py +BuildRequires: python3 +%if 0%{?fedora} || 0%{?rhel} >= 8 +BuildRequires: python3dist(ruamel.yaml) +Requires: python3-jmespath +Requires: python3-netaddr +%else +BuildRequires: python3-ruamel-yaml +Requires: python-jmespath +Requires: python-netaddr +%endif + +%if %{with ansible} +BuildRequires: ansible-core >= 2.9.10 +%endif + +%if %{undefined __ansible_provides} +Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{version} +%endif +# 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}/} +%else +%if %{?ansible_collection_files:0}%{!?ansible_collection_files:1} +%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/ +%endif +%endif + + +%if %{without ansible} +%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_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 +Collection of Ansible roles which configures a RHEL system according +to applicable SAP notes so that any SAP software can be installed. + +%if %{with collection_artifact} +%package collection-artifact +Summary: Collection artifact to import to Automation Hub / Ansible Galaxy + +%description collection-artifact +Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz +%endif + +%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 + +pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_hana_preconfigure +%patch50 -p1 +popd + +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 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 \ +%{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} %{rolename4} ; do + new_role="$(echo ${role/sap-/} | tr '-' '_')" + python3 lsr_role2collection.py --role "$role" \ + --src-path %{github_repo_sap_install}-%{commit_id_sap_install}/roles/"$role" \ + --src-owner %{src_owner} \ + --dest-path .collections \ + --readme %{SOURCE4} \ + --namespace %{collection_namespace} \ + --collection %{collection_name} \ + --new-role "$new_role" \ + --extra-mapping "timesync:redhat.rhel_system_roles.timesync,storage:redhat.rhel_system_roles.storage,sap-preconfigure:sap.rhel.preconfigure,sap-hana-preconfigure:sap.rhel.hana_preconfigure,sap-netweaver-preconfigure:sap.rhel.netweaver_preconfigure" +done + +rm -f .collections/ansible_collections/%{collection_namespace}/%{collection_name}/tests/sanity/ignore-2.9.txt +# Merge .sanity-ansible-ignore-2.9-ROLENAME.txt into tests/sanity/ignore-2.9.txt +for role in %{rolenames}; do + if [ -f .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.sanity-ansible-ignore-2.9-"$role".txt ]; + then + cat .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.sanity-ansible-ignore-2.9-"$role".txt \ + >> .collections/ansible_collections/%{collection_namespace}/%{collection_name}/tests/sanity/ignore-2.9.txt + rm -f .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.sanity-ansible-ignore-*-"$role".txt + fi +done + +# removing dot files/dirs +rm -rf .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.[A-Za-z]* + +cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name} + +%install +mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \ + $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 + +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_build_install +popd + +# install collection_artifact +%if %{with collection_artifact} +# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact +pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ +mv %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz $RPM_BUILD_ROOT%{_datadir}/ansible/collections/ +popd +%endif + +%files +%dir %{_pkgdocdir} +%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 +%license %{_pkgdocdir}/*/LICENSE +%{_datadir}/ansible/roles/* +%{ansible_collection_files} + +%if %{with collection_artifact} +%files collection-artifact +%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz +%endif + +%changelog +* Sun Mar 13 2022 Than Ngo - 3.2.0-3 +- Related: #2047282, new rebase + +* Tue Feb 22 2022 Than Ngo - 3.2.0-2 +- Related: #2047282, new rebase, fixed collection basename + +* Mon Jan 31 2022 Than Ngo - 3.2.0-1 +- Resolves: #2047282, Rebase to new upstream org sap-linuxlab + +* Fri Dec 03 2021 Than Ngo - 3.1.1-15 +- Related: #2021579, ansible-lint cleanup + +* Tue Nov 16 2021 Than Ngo - 3.1.1-14 +- Resolves: #2021579, ansible-lint cleanup + +* Fri Oct 15 2021 Than Ngo - 3.1.1-13 +- Fix the version of the collection tar file + +* Fri Oct 15 2021 Than Ngo - 3.1.1-12 +- Resolves: #2003630, Pepare the roles for ansible-core 2.11: Only use ansible.core modules + +* Wed Sep 01 2021 Than Ngo - 3.1.1-11 +- fix yum group install errors on RHEL 7 +- use grubby for setting tsx=on +- set min kernel version for RHEL 8.4 x86_64 + +* Fri Aug 20 2021 Than Ngo - 3.1.1-10 +- Related: #1977195, fix #149, #177, #193, #194 + +* Tue Aug 10 2021 Mohan Boddu - 3.1.1-9 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Jul 16 2021 Than Ngo - 3.1.1-8 +- Related: #1977195, add missing vars/RedHat_9.yml in sap-netweaver-preconfigure + +* Tue Jul 13 2021 Than Ngo - 3.1.1-7 +- Related: #1977195, add missing __sap_preconfigure_envgroups for RHEL 7.x and + missing __sap_hana_preconfigure_req_repos variables for RHEL 8.5 and later + +* Tue Jun 29 2021 Than Ngo - 3.1.1-6 +- Resolves: #1977195, make RHEL system roles for SAP RHEL9 compatible + +* Mon Jun 28 2021 Than Ngo - 3.1.1-5 +- updated tarball, galaxy.yml, README.md + +* Mon Jun 07 2021 Than Ngo - 3.1.1-4 +- update README.md +- Adding the -collection-artifact subpackage, enabled using + "--with collection_artifact". It is used for importing to + ansible galaxy/automation hub. + +* Fri May 21 2021 Than Ngo - 3.1.1-3 +- convert roles to FQCN in the README files + +* Thu May 20 2021 Than Ngo - 3.1.1-2 +- rename dashes by underscores and drop sap- + +* Tue May 18 2021 Than Ngo - 3.1.1-1 +- rebase + +* Wed Apr 14 2021 Than Ngo - 3.1.0-3 +- bz#1928398, rebuilt against new python-ruamel-yaml-0.15.100 for conversion problem + +* Mon Mar 22 2021 Than Ngo - 3.1.0-2 +- rebase + +* Tue Mar 02 2021 Than Ngo - 3.1.0-1 +- added support Transfer SAP roles into collection format + +* Wed Feb 24 2021 Than Ngo - 3.0.1-3 +- Related: #1891642, fixed issue #125 in sap-preconfigure and #163 and #164 in sap-hana-preconfigure + +* Thu Feb 18 2021 Than Ngo - 3.0.1-2 +- Related: #1891642, update sap-hana-preconfigure 3.0.1 and fixed Urls + +* Thu Feb 18 2021 Than Ngo - 3.0.1-1 +- Related: #1891642, rebase to 3.0.1 + +* Mon Feb 15 2021 Than Ngo - 3.0.0-2 +- Related: #1891642, more fixes #145, #148, #149, #150 #147 + +* Thu Jan 28 2021 Than Ngo - 3.0.0-1 +- Resolves: #1891638, bug fixes +- Resolves: #1891642, new features + +* Tue Jan 12 2021 Than Ngo - 2.0.0-8 +- RHEL 9.0.0 Alpha build + +* Mon Sep 21 2020 Than Ngo - 2.0.0-7 +- Related: #1867027, fix #119 + +* Thu Aug 20 2020 Than Ngo - 2.0.0-6 +- Related: #1867027, fix #92 + +* Fri Aug 07 2020 Than Ngo - 2.0.0-5 +- Resolves: #1867027, more fixes for #89, #109, #110, #111, #112, #113, #114, #116 + +* Tue Jul 21 2020 Than Ngo - 2.0.0-4 +- Related: #1844190, more fixes for #84, #85, #86, #88, #98, #104, #105, #107 + +* Fri Jul 03 2020 Than Ngo - 2.0.0-3 +- Related: #1844190, drop 1944799.yml + +* Mon Jun 29 2020 Than Ngo - 2.0.0-2 +- Related: #1844190, more fixes for #78, #79, #81, #82, #94-#97, #99, #101-#102 + +* Mon Jun 08 2020 Than Ngo - 2.0.0-1 +- Resolves: #1844190, rebase to 2.0.0 + +* Thu May 07 2020 Than Ngo - 1.1.1-2 +- Resolves: #1829495, fix summary + +* Mon Oct 21 2019 Than Ngo - 1.1.1-1 +- rebase to 1.1.1 +- always use ansible_hostname + ansible_domain instead of ansible_fqdn +- use {{ ansible_hostname }}.{{ ansible_domain }} instead of {{ ansible_fqdn }} +- added LC_ALL=C before commands for which the outputs are to be evaluated + +* Thu Sep 12 2019 Than Ngo - 1.1-1 +- rebase to 1.1 + +* Fri Jun 28 2019 Than Ngo - 1.0-1 +- Initial release.