import rhel-system-roles-sap-3.3.0-3.el8
This commit is contained in:
parent
6b1e25784d
commit
c9e42a23e4
6
.gitignore
vendored
6
.gitignore
vendored
@ -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-a2c6785d02092bb9142d9f2c170ad4b097d1af2f.tar.gz
|
||||
|
@ -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
|
||||
831f15e14b4fe7bc152c46f882280ac7db0f52f8 SOURCES/community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f.tar.gz
|
||||
|
@ -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, for installing SAP HANA Scale-Up and Scale-Out, and for installing a SAP HANA Two-Node Scale-Up cluster.
|
||||
|
||||
## 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.<role_name>`.
|
||||
After the installation, the roles are available as `redhat.sap_install.<role_name>`.
|
||||
|
||||
Please see the [Using Ansible collections documentation](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for further details.
|
||||
|
||||
@ -43,10 +43,21 @@ 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
|
||||
|
||||
<!--ts-->
|
||||
* preconfigure
|
||||
* hana_preconfigure
|
||||
* netweaver_preconfigure
|
||||
* sap_general_preconfigure
|
||||
* sap_hana_preconfigure
|
||||
* sap_netweaver_preconfigure
|
||||
<!--te-->
|
||||
|
||||
|
||||
### Roles in Technology Preview Support
|
||||
|
||||
<!--ts-->
|
||||
* sap_hana_install
|
||||
* sap_ha_install_hana_hsr
|
||||
* sap_ha_prepare_pacemaker
|
||||
* sap_ha_install_pacemaker
|
||||
* sap_ha_set_hana
|
||||
<!--te-->
|
||||
|
90
SOURCES/community.sap_install-shebang.patch
Normal file
90
SOURCES/community.sap_install-shebang.patch
Normal file
@ -0,0 +1,90 @@
|
||||
diff -up community.sap_install/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py.me community.sap_install/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py
|
||||
--- community.sap_install/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py.me 2022-07-12 16:23:48.262581739 +0200
|
||||
+++ community.sap_install/roles/sap_general_preconfigure/tests/run-sap_general_preconfigure-tests.py 2022-07-12 16:36:43.620709628 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
"""
|
||||
Tests for role sap_general_preconfigure
|
||||
diff -up community.sap_install/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py.me community.sap_install/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py
|
||||
--- community.sap_install/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py.me 2022-07-12 16:36:52.262900877 +0200
|
||||
+++ community.sap_install/roles/sap_hana_install/tests/install/run-sap_hana_install-install-tests.py 2022-07-12 16:36:59.246055414 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
diff -up community.sap_install/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py.me community.sap_install/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py
|
||||
--- community.sap_install/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py.me 2022-07-12 16:37:17.272454327 +0200
|
||||
+++ community.sap_install/roles/sap_hana_install/tests/sapcar/run-sap_hana_install-sapcar-tests.py 2022-07-12 16:37:24.142606360 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
diff -up community.sap_install/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py.me community.sap_install/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py
|
||||
--- community.sap_install/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py.me 2022-07-12 16:37:52.794240408 +0200
|
||||
+++ community.sap_install/roles/sap_hana_preconfigure/tests/run-sap_hana_preconfigure-tests.py 2022-07-12 16:37:58.553367854 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
"""
|
||||
Tests for role sap_hana_preconfigure
|
||||
diff -up community.sap_install/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py.me community.sap_install/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py
|
||||
--- community.sap_install/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py.me 2022-07-12 16:37:34.384833016 +0200
|
||||
+++ community.sap_install/roles/sap_netweaver_preconfigure/tests/run-sap_netweaver_preconfigure-tests.py 2022-07-12 16:37:41.495990384 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
"""
|
||||
Tests for role sap_netweaver_preconfigure
|
||||
diff -up community.sap_install/tools/swpm2_parameters_inifile_generate.py.me community.sap_install/tools/swpm2_parameters_inifile_generate.py
|
||||
--- community.sap_install/tools/swpm2_parameters_inifile_generate.py.me 2022-07-12 16:38:10.026621753 +0200
|
||||
+++ community.sap_install/tools/swpm2_parameters_inifile_generate.py 2022-07-12 16:38:29.915061875 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
diff -up community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_general_preconfigure/tools/beautify-assert-output.sh.me community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_general_preconfigure/tools/beautify-assert-output.sh
|
||||
--- community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_general_preconfigure/tools/beautify-assert-output.sh.me 2022-07-12 17:48:10.476508351 +0200
|
||||
+++ community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_general_preconfigure/tools/beautify-assert-output.sh 2022-07-12 17:48:27.813896005 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/bin/bash
|
||||
|
||||
# default font color: Light Cyan, which should be readable on both bright and dark background
|
||||
__FONT_COLOR=36m
|
||||
diff -up community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_hana_install/files/tmp/tail-f-hdblcm-install-trc.sh.me community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_hana_install/files/tmp/tail-f-hdblcm-install-trc.sh
|
||||
--- community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_hana_install/files/tmp/tail-f-hdblcm-install-trc.sh.me 2022-07-12 17:48:35.527068474 +0200
|
||||
+++ community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_hana_install/files/tmp/tail-f-hdblcm-install-trc.sh 2022-07-12 17:48:43.703251292 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/bin/bash
|
||||
|
||||
while true; do
|
||||
# in case hdblcm has not yet started, we assume that it is waiting for sapdsigner to complete:
|
||||
diff -up community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh.me community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh
|
||||
--- community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh.me 2022-07-12 17:49:22.425117059 +0200
|
||||
+++ community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh 2022-07-12 17:49:30.241291825 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/bin/bash
|
||||
|
||||
# default font color: Light Cyan, which should be readable on both bright and dark background
|
||||
__FONT_COLOR=36m
|
||||
diff -up community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh.me community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh
|
||||
--- community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh.me 2022-07-12 17:48:51.584427510 +0200
|
||||
+++ community.sap_install-29b37456211c8bf825547f614652f24cf324860a/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh 2022-07-12 17:49:00.678630847 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/bin/bash
|
||||
|
||||
# default font color: Light Cyan, which should be readable on both bright and dark background
|
||||
__FONT_COLOR=36m
|
@ -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: __NAMESPACE__
|
||||
|
||||
# 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.1.1
|
||||
|
||||
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
||||
readme: README.md
|
||||
@ -18,18 +18,20 @@ readme: README.md
|
||||
# @nicks:irc/im.site#channel'
|
||||
authors:
|
||||
- Bernd Finger <bfinger@redhat.com>
|
||||
- Sean Freeman <sean.freeman@uk.ibm.com>
|
||||
- Rainer Leber <rainer.leber@sva.de>
|
||||
- Markus Koch <mkoch@redhat.com>
|
||||
- Than Ngo <than@redhat.com>
|
||||
- Markus Moster <mmoster@redhat.com>
|
||||
- Janine Fuchs <jfuchs@redhat.com>
|
||||
|
||||
### 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: Collection of Ansible Roles for SAP software installation on Red Hat Enterprise 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
|
||||
@ -38,7 +40,10 @@ license:
|
||||
|
||||
# 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]
|
||||
tags:
|
||||
- database
|
||||
- application
|
||||
- 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
|
||||
@ -47,13 +52,19 @@ 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
|
||||
|
||||
# A list of file glob-like patterns used to filter any files or directories that should not be included in the build
|
||||
# artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This
|
||||
# uses 'fnmatch' to match the files or directories. Some directories and files like 'galaxy.yml', '*.pyc', '*.retry',
|
||||
# and '.git' are always filtered
|
||||
build_ignore: ['tests', 'internal-*']
|
||||
|
@ -1,6 +1,6 @@
|
||||
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
|
||||
diff -up community.sap_install/roles/sap_hana_preconfigure/README.md.me community.sap_install/roles/sap_hana_preconfigure/README.md
|
||||
--- community.sap_install/roles/sap_hana_preconfigure/README.md.me 2021-03-22 14:08:21.960414814 +0100
|
||||
+++ community.sap_install/roles/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
|
||||
```
|
||||
|
@ -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,
|
||||
@ -14,45 +14,57 @@
|
||||
%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.1.1
|
||||
|
||||
%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 a2c6785d02092bb9142d9f2c170ad4b097d1af2f
|
||||
%global rolename1 sap_general_preconfigure
|
||||
%global rolename2 sap_hana_preconfigure
|
||||
%global rolename3 sap_netweaver_preconfigure
|
||||
%global rolename4 sap_hana_install
|
||||
%global rolename5 sap_ha_set_hana
|
||||
%global rolename6 sap_ha_set_netweaver
|
||||
%global rolename7 sap_hostagent
|
||||
%global rolename8 sap_install_media_detect
|
||||
%global rolename9 sap_storage
|
||||
%global rolename10 sap_swpm
|
||||
%global rolename11 sap_ha_install_hana_hsr
|
||||
%global rolename12 sap_ha_prepare_pacemaker
|
||||
%global rolename13 sap_ha_install_pacemaker
|
||||
%global src_owner linux-system-roles
|
||||
%global github_repo_sap_install community.sap_install
|
||||
%global rolename_rhel %{rolename1} %{rolename2} %{rolename3} %{rolename4} %{rolename5} %{rolename11} %{rolename12} %{rolename13}
|
||||
%global rolename_community %{rolename_rhel} %{rolename1} %{rolename6} %{rolename7} %{rolename8} %{rolename9} %{rolename10}
|
||||
%if 0%{?fedora}
|
||||
%global rolenames %{rolename_community}
|
||||
%else
|
||||
%global rolenames %{rolename_rhel}
|
||||
%endif
|
||||
|
||||
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.3.0
|
||||
Release: 3%{?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
|
||||
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
|
||||
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: https://gitlab.cee.redhat.com/bfinger/build-redhat.sap_install/-/raw/main/README.md
|
||||
Source5: https://gitlab.cee.redhat.com/bfinger/build-redhat.sap_install/-/raw/main/galaxy.yml
|
||||
Patch1: community.sap_install-shebang.patch
|
||||
Patch2: sap-hana-preconfigure-md2html-error.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@ -81,7 +93,7 @@ Requires: python-netaddr
|
||||
%endif
|
||||
|
||||
%if %{with ansible}
|
||||
BuildRequires: ansible >= 2.9.10
|
||||
BuildRequires: ansible-core >= 2.9.10
|
||||
%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,100 +130,85 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-%
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -a1 -a2 -a3 -n auto-maintenance-%{mainid}
|
||||
%setup -q -a1 -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
|
||||
# add correct version and namespace for Automation Hub and Galaxy
|
||||
cp %{SOURCE5} .
|
||||
sed -i -e "s|^namespace: .*|namespace: %{collection_namespace}|" galaxy.yml
|
||||
sed -i -e "s|^version: .*|version: %{collection_version}|" galaxy.yml
|
||||
|
||||
# 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
|
||||
# add correct version for Automation Hub and Galaxy
|
||||
sed -i -e "s|version: 3.1.1|version: %{collection_version}|" galaxy.yml
|
||||
|
||||
pushd sap-preconfigure
|
||||
popd
|
||||
pushd sap-hana-preconfigure
|
||||
%patch50 -p1
|
||||
popd
|
||||
pushd sap-netweaver-preconfigure
|
||||
pushd %{github_repo_sap_install}-%{commit_id_sap_install}/
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
popd
|
||||
|
||||
# remove git stuff
|
||||
rm -rf *-preconfigure/.git*
|
||||
# remove zero file
|
||||
rm -f sap-hana-preconfigure/tasks/RedHat_6/recommendations.yml
|
||||
# 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 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 */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
|
||||
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
|
||||
popd
|
||||
|
||||
%build
|
||||
sh md2html.sh \
|
||||
sap-preconfigure/README.md \
|
||||
sap-hana-preconfigure/README.md \
|
||||
sap-netweaver-preconfigure/README.md
|
||||
|
||||
for role in %{rolename1} %{rolename2} %{rolename3} ; do
|
||||
new_role="$(echo ${role/sap-/} | tr '-' '_')"
|
||||
python3 lsr_role2collection.py --role "$role" \
|
||||
--src-path "$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
|
||||
%if %{with html}
|
||||
readmes=""
|
||||
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
|
||||
readmes="${readmes} %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.md"
|
||||
done
|
||||
sh md2html.sh $readmes
|
||||
%endif
|
||||
|
||||
# removing dot files/dirs
|
||||
rm -rf .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.[A-Za-z]*
|
||||
# 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" \
|
||||
--src-owner %{src_owner} \
|
||||
--dest-path .collections \
|
||||
--readme %{SOURCE4} \
|
||||
--namespace %{collection_namespace} \
|
||||
--collection %{collection_name} \
|
||||
--new-role "$new_role"
|
||||
done
|
||||
|
||||
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
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
|
||||
|
||||
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/
|
||||
# create file selection for documents
|
||||
echo "%dir %{_pkgdocdir}" > files_section.txt
|
||||
for role in %{rolenames} ; do
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/$role
|
||||
cp -pR %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role $RPM_BUILD_ROOT%{_datadir}/ansible/roles/
|
||||
install -m 644 %{github_repo_sap_install}-%{commit_id_sap_install}/LICENSE \
|
||||
%{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.md \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/$role/
|
||||
%if %{with html}
|
||||
install -m 644 %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/README.html \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/$role/
|
||||
%endif
|
||||
echo "%dir %{_pkgdocdir}/$role" >> files_section.txt
|
||||
done
|
||||
|
||||
# install collection files
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
%ansible_collection_install
|
||||
%ansible_collection_build_install
|
||||
popd
|
||||
|
||||
# install collection_artifact
|
||||
@ -226,14 +219,13 @@ mv %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz $RPM_
|
||||
popd
|
||||
%endif
|
||||
|
||||
%files
|
||||
%dir %{_pkgdocdir}
|
||||
%dir %{_pkgdocdir}/sap-preconfigure
|
||||
%dir %{_pkgdocdir}/sap-hana-preconfigure
|
||||
%dir %{_pkgdocdir}/sap-netweaver-preconfigure
|
||||
%files -f files_section.txt
|
||||
%dir %{_datadir}/ansible
|
||||
%dir %{_datadir}/ansible/roles
|
||||
%doc %{_pkgdocdir}/*/README.md
|
||||
%if %{with html}
|
||||
%{_pkgdocdir}/*/README.html
|
||||
%endif
|
||||
%license %{_pkgdocdir}/*/LICENSE
|
||||
%{_datadir}/ansible/roles/*
|
||||
%{ansible_collection_files}
|
||||
@ -244,6 +236,33 @@ popd
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jul 15 2022 Than Ngo <than@redhat.com> - 3.3.0-3
|
||||
- update galaxy.yml and README.md and url
|
||||
Related: #2103633
|
||||
|
||||
* Tue Jul 12 2022 Than Ngo <than@redhat.com> - 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
|
||||
Resolves: #2103633
|
||||
|
||||
* Mon Jul 04 2022 Than Ngo <than@redhat.com> - 3.3.0-1
|
||||
- Resolves: #2103633, include roles for setting up a two-node SAP HANA pacemaker cluster
|
||||
|
||||
|
||||
* Thu Jun 09 2022 Than Ngo <than@redhat.com> - 3.2.0-3
|
||||
- sap_hana_preconfigure: Add vars for RHEL 9.1 managed nodes
|
||||
- sap_general_preconfigure: fix variable inclusion for RHEL minor releases
|
||||
Related: #2063050
|
||||
|
||||
* Wed Jun 08 2022 Than Ngo <than@redhat.com> - 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: #2063050
|
||||
|
||||
* Mon Mar 21 2022 Than Ngo <than@redhat.com> - 3.2.0-1
|
||||
- Resolves: #2063050, rebase to new upstream org sap-linuxlab
|
||||
|
||||
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-10
|
||||
- Related: #2016858, increase release to avoid update conflict
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user