Compare commits

...

No commits in common. "c8" and "c9s" have entirely different histories.
c8 ... c9s

9 changed files with 39636 additions and 228 deletions

37
.gitignore vendored
View File

@ -1,3 +1,34 @@
SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz
SOURCES/community.sap_install-f0deb287aaa0fb7d992b95a04b14e263b6690c23.tar.gz
SOURCES/prepare-redhat.sap_install-main.tar.bz2
/sap-hana-preconfigure.tar.gz
/sap-netweaver-preconfigure.tar.gz
/sap-preconfigure.tar.gz
/auto-maintenance-ec364d2e0bd422b69f34871a1188114f368097a0.tar.gz
/sap-hana-preconfigure-9acfe7bb4b832303a302a728464a828b1ead7ca0.tar.gz
/sap-netweaver-preconfigure-337ba5580ba862e1adac59dcda8a126cdf561225.tar.gz
/sap-preconfigure-ce400b56d217571e2e9acd3e2558817333c673da.tar.gz
/galaxy.yml
/README.md
/sap-hana-preconfigure-9f22b540bc41e2d10fbc1250b36a7ef08129feb2.tar.gz
/sap-preconfigure-9bed558b55cedc8939f6b3d4436436a6aaaf095c.tar.gz
/sap-hana-preconfigure-a53a244c4e774e17cf427b51d7be36336fd21a7f.tar.gz
/sap-netweaver-preconfigure-32d59f5c419b0a9997207e2e11cb215b5e616250.tar.gz
/sap-preconfigure-108c1d7f754debc58e1e29bb72c3dcb11e3721b0.tar.gz
/auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz
/sap-hana-preconfigure-b6a188c4f29c185da7cc68704b83e0a447563496.tar.gz
/sap-netweaver-preconfigure-34f6dc9421cfa6af951c9b8f2315f1b52bd75e0a.tar.gz
/sap-preconfigure-ba8714a7683ace6172b8b1cf787a9699fbe2b24c.tar.gz
/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz
/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz
/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz
/community.sap_install-7956ecd9bd289c608f6e5c0d51c5139ae9a6d349.tar.gz
/auto-maintenance-d64d1be7904aa8f279b117da6f2a31b3d4b6e43e.tar.gz
/community.sap_install-d8330042de222480c78e040846db8bffe4321cf4.tar.gz
/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz
/community.sap_install-57211739079e4ef37f51c45c30ea071c0956ad32.tar.gz
/community.sap_install-29b37456211c8bf825547f614652f24cf324860a.tar.gz
/community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f.tar.gz
/community.sap_install-d6756cbaed7657d6ca3508a97dcc3617e995999f.tar.gz
/prepare-redhat.sap_install-main.tar.bz2
/community.sap_install-f0deb287aaa0fb7d992b95a04b14e263b6690c23.tar.gz
/community.sap_install-60f5f40497d54c46b0bd3f79ef1fef4ada148119.tar.gz
/redhat.sap_install-1.3.4.tar.gz
/redhat.sap_install-1.3.5.tar.gz

View File

@ -1,3 +0,0 @@
584f8d1681adf13cb7af256a7b38d94ca80dcab2 SOURCES/auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz
d991a279d5d4b5a991f229a29d20e772132af519 SOURCES/community.sap_install-f0deb287aaa0fb7d992b95a04b14e263b6690c23.tar.gz
017c84ab579375755b104b85d5eb77b26a117a80 SOURCES/prepare-redhat.sap_install-main.tar.bz2

View File

@ -1,90 +0,0 @@
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

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,128 @@
commit 83db825f7f30445408efa6061631d8dd0590e891
Author: Than Ngo <than@redhat.com>
Date: Thu Jan 25 16:17:21 2024 +0100
add missing tools folders
Signed-off-by: Than Ngo <than@redhat.com>
diff --git a/roles/sap_general_preconfigure/tools/beautify-assert-output.sh b/roles/sap_general_preconfigure/tools/beautify-assert-output.sh
new file mode 100755
index 0000000..f48087c
--- /dev/null
+++ b/roles/sap_general_preconfigure/tools/beautify-assert-output.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# default font color: Light Cyan, which should be readable on both bright and dark background
+__FONT_COLOR=36m
+
+if [[ ${1}. == "font_light_gray". ]]; then
+ __FONT_COLOR=37m
+elif [[ ${1}. == "font_no_color". ]]; then
+ __FONT_COLOR=30m
+fi
+
+if [[ ${2}. == "reset." ]]; then
+ awk 'BEGIN{printf ("\033['${__FONT_COLOR}'Resetting font color\n")}'
+ exit
+fi
+
+awk '{sub (" \"msg\": ", "")}
+ /TASK/{task_line=$0}
+ /fatal:/{fatal_line=$0; nfatal[host]++}
+ /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0}
+ /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2}
+ /SAP note/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0}
+ /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0}
+ /PASS:/{npass[host]++; print "\033[32m[" host"] "$0}
+ /INFO:/{print "\033[34m[" host"] "$0}
+ /changed/&&/unreachable/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) {
+ printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033['${__FONT_COLOR}' Last TASK and fatal output:\n"); print task_line, fatal_line
+ exit 199
+ }
+ else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033['${__FONT_COLOR}'\n", nfail[var], nwarn[var], npass[var])}
+ if (nfail[var] != 0) exit (nfail[var])
+ }'
diff --git a/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh b/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh
new file mode 100755
index 0000000..f48087c
--- /dev/null
+++ b/roles/sap_hana_preconfigure/tools/beautify-assert-output.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# default font color: Light Cyan, which should be readable on both bright and dark background
+__FONT_COLOR=36m
+
+if [[ ${1}. == "font_light_gray". ]]; then
+ __FONT_COLOR=37m
+elif [[ ${1}. == "font_no_color". ]]; then
+ __FONT_COLOR=30m
+fi
+
+if [[ ${2}. == "reset." ]]; then
+ awk 'BEGIN{printf ("\033['${__FONT_COLOR}'Resetting font color\n")}'
+ exit
+fi
+
+awk '{sub (" \"msg\": ", "")}
+ /TASK/{task_line=$0}
+ /fatal:/{fatal_line=$0; nfatal[host]++}
+ /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0}
+ /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2}
+ /SAP note/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0}
+ /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0}
+ /PASS:/{npass[host]++; print "\033[32m[" host"] "$0}
+ /INFO:/{print "\033[34m[" host"] "$0}
+ /changed/&&/unreachable/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) {
+ printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033['${__FONT_COLOR}' Last TASK and fatal output:\n"); print task_line, fatal_line
+ exit 199
+ }
+ else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033['${__FONT_COLOR}'\n", nfail[var], nwarn[var], npass[var])}
+ if (nfail[var] != 0) exit (nfail[var])
+ }'
diff --git a/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh b/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh
new file mode 100755
index 0000000..f48087c
--- /dev/null
+++ b/roles/sap_netweaver_preconfigure/tools/beautify-assert-output.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# default font color: Light Cyan, which should be readable on both bright and dark background
+__FONT_COLOR=36m
+
+if [[ ${1}. == "font_light_gray". ]]; then
+ __FONT_COLOR=37m
+elif [[ ${1}. == "font_no_color". ]]; then
+ __FONT_COLOR=30m
+fi
+
+if [[ ${2}. == "reset." ]]; then
+ awk 'BEGIN{printf ("\033['${__FONT_COLOR}'Resetting font color\n")}'
+ exit
+fi
+
+awk '{sub (" \"msg\": ", "")}
+ /TASK/{task_line=$0}
+ /fatal:/{fatal_line=$0; nfatal[host]++}
+ /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0}
+ /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2}
+ /SAP note/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0}
+ /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0}
+ /PASS:/{npass[host]++; print "\033[32m[" host"] "$0}
+ /INFO:/{print "\033[34m[" host"] "$0}
+ /changed/&&/unreachable/{print "\033['${__FONT_COLOR}'[" host"] "$0}
+ END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) {
+ printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033['${__FONT_COLOR}' Last TASK and fatal output:\n"); print task_line, fatal_line
+ exit 199
+ }
+ else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033['${__FONT_COLOR}'\n", nfail[var], nwarn[var], npass[var])}
+ if (nfail[var] != 0) exit (nfail[var])
+ }'

View File

@ -1,11 +1,9 @@
%if 0%{?rhel} && ! 0%{?epel}
%bcond_with ansible
%else
%bcond_without ansible
%endif
# disable collection_artifact by default
%bcond_with collection_artifact
# disable collection by default since version 3.6.0 (1.3.5)
%bcond_with collection
%if 0%{?fedora} || 0%{?rhel} > 8
%bcond_without html
%else
@ -26,45 +24,45 @@
# 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.2.1
%define collection_version 1.3.5
%global mainid e2a233f5a0cb68363798bf014b16552cca681bd0
%global commit_id_sap_install f0deb287aaa0fb7d992b95a04b14e263b6690c23
%global commit_id_sap_install %{collection_version}
%global rolename1 sap_general_preconfigure
%global rolename2 sap_hana_preconfigure
%global rolename3 sap_netweaver_preconfigure
%global rolename4 sap_hana_install
%global rolename2 sap_ha_install_hana_hsr
%global rolename3 sap_hana_install
%global rolename4 sap_hana_preconfigure
%global rolename5 sap_ha_pacemaker_cluster
%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 rolename6 sap_hypervisor_node_preconfigure
%global rolename7 sap_netweaver_preconfigure
%global rolename8 sap_swpm
%global rolename9 sap_vm_preconfigure
%global src_owner linux-system-roles
%global github_repo_sap_install community.sap_install
%global rolename_rhel %{rolename1} %{rolename2} %{rolename3} %{rolename4} %{rolename5} %{rolename10} %{rolename11}
%global rolename_community %{rolename_rhel} %{rolename1} %{rolename6} %{rolename7} %{rolename8} %{rolename9}
%if 0%{?fedora}
%global rolenames %{rolename_community}
%else
%global github_repo_sap_install redhat.sap_install
%global rolename_rhel %{rolename1} %{rolename2} %{rolename3} %{rolename4} %{rolename5} %{rolename6} %{rolename7} %{rolename8} %{rolename9}
%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.4.0
Release: 3%{?dist}
License: GPLv3+
Url: https://github.com/berndfinger/community.sap_install
Version: 3.6.0
Release: 4%{?dist}
License: GPL-3.0-or-later
Url: https://github.com/redhat-sap/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
# files/README.md, files/roles/sap_swpm/README.md from https://gitlab.cee.redhat.com/sap-linuxlab/prepare-redhat.sap_install
Source2: prepare-redhat.sap_install-main.tar.bz2
Patch1: community.sap_install-shebang.patch
Source1: https://github.com/redhat-sap/redhat.sap_install/archive/%{commit_id_sap_install}/%{github_repo_sap_install}-%{commit_id_sap_install}.tar.gz
# add collection files
Patch1: redhat.sap_install-1.3.5-collections-files-324bfb8bab50d2baa1c4aacdb59e4e5c9e2ba74f.patch
# add tests files
Patch2: redhat.sap_install-1.3.4-add_tests.patch
# add tools files
Patch3: redhat.sap_install-1.3.4-add_tools.patch
BuildArch: noarch
Requires: rhel-system-roles
%if %{with html}
# Requirements for md2html.sh to build the documentation
@ -89,8 +87,14 @@ Requires: python-jmespath
Requires: python-netaddr
%endif
%if %{with ansible}
BuildRequires: ansible-core >= 2.9.10
# NOTE: ansible-core is in rhel-8.6 and newer, but not installable
# in buildroot as it depended on modular Python.
# It has been installable at buildtime in 8.8 and newer.
%if %{with collection}
%if 0%{?rhel} >= 8
BuildRequires: ansible-core >= 2.11.0
Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0)
%endif
%endif
%if %{undefined __ansible_provides}
@ -99,6 +103,10 @@ Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{ver
# be compatible with the usual Fedora Provides:
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release}
# ansible-galaxy is available by ansible-core on RHEL 8.6 and newer at buildtime.
%define ansible_collection_build() ansible-galaxy collection build
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%if 0%{?fedora} || 0%{?rhel} >= 8
%{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/}
%else
@ -107,13 +115,6 @@ Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{vers
%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.
@ -127,55 +128,26 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-%
%endif
%prep
%setup -q -a1 -a2 -n auto-maintenance-%{mainid}
# 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
# update README.md and roles/sap_swpm/README.md
cp prepare-redhat.sap_install-main/README.md %{github_repo_sap_install}-%{commit_id_sap_install}/
cp prepare-redhat.sap_install-main/files/roles/sap_swpm/README.md %{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_swpm/README.md
%setup -q -a1 -n auto-maintenance-%{mainid}
pushd %{github_repo_sap_install}-%{commit_id_sap_install}/
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
# workaround for md2html error
sed -i -e "s|for POWER ||g" roles/sap_hana_preconfigure/README.md
%patch1 -p1
# modify collection-requirements.yml, fedora.linux_system_roles -> redhat.rhel_system_roles
for r in %{rolenames} ; do
yml=roles/${r}/meta/collection-requirements.yml
[ -f ${yml} ] && sed -i "s,fedora.linux_system_roles,redhat.rhel_system_roles," ${yml}
done
# modify defaults/main.yml, fedora.linux_system_roles -> redhat.rhel_system_roles
for r in %{rolenames} ; do
yml=roles/${r}/defaults/main.yml
[ -f ${yml} ] && sed -i "s,system_roles_collection: 'fedora.linux_system_roles',system_roles_collection: 'redhat.rhel_system_roles'," ${yml}
done
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 all SLES stuff and RHEL 6 stuff
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
# fix python and bash shebangs
find -type f \( -iname "*.py" \) -exec sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!/usr/bin/python3=' {} +
find -type f \( -iname "*.sh" \) -exec sed -i '1s=^#! */bin/bash=#!/usr/bin/bash=' {} +
# remove json files, these are already present in the collection subdirectory
rm -f FILES.json MANIFEST.json
%build
%if %{with html}
@ -186,6 +158,7 @@ done
sh md2html.sh $readmes %{github_repo_sap_install}-%{commit_id_sap_install}/README.md
%endif
%if %{with collection}
# create dest-path
mkdir .collections
@ -200,6 +173,15 @@ LANG=en_US.utf-8 LC_ALL=en_US.utf-8 python3 lsr_role2collection.py --role "$role
done
cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name}
# update README.md
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.md .collections/ansible_collections/%{collection_namespace}/%{collection_name}
# Build the collection
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%ansible_collection_build
popd
%endif
%install
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \
@ -208,6 +190,7 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \
# create file selection for documents
echo "%dir %{_pkgdocdir}" > files_section.txt
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.md $RPM_BUILD_ROOT%{_pkgdocdir}/
%if %{with html}
cp %{github_repo_sap_install}-%{commit_id_sap_install}/README.html $RPM_BUILD_ROOT%{_pkgdocdir}/
%endif
@ -227,9 +210,13 @@ install -m 644 %{github_repo_sap_install}-%{commit_id_sap_install}/roles/$role/R
done
# install collection files
%if %{with collection}
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%ansible_collection_build_install
%ansible_collection_install
popd
%else
cp -pR %{github_repo_sap_install}-%{commit_id_sap_install}/collections $RPM_BUILD_ROOT%{_datadir}/ansible/
%endif
# install collection_artifact
%if %{with collection_artifact}
@ -243,94 +230,163 @@ popd
%dir %{_datadir}/ansible
%dir %{_datadir}/ansible/roles
%doc %{_pkgdocdir}/*/README.md
%license %{_pkgdocdir}/*/LICENSE
%{_datadir}/ansible/roles/*
%if %{with html}
%{_pkgdocdir}/*/README.html
%endif
%license %{_pkgdocdir}/*/LICENSE
%{_datadir}/ansible/roles/*
%if %{with collection}
%{ansible_collection_files}
%else
%{_datadir}/ansible/collections
%endif
%if %{with collection_artifact}
%files collection-artifact
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%endif
%changelog
* Mon Feb 05 2024 Than Ngo <than@redhat.com> - 3.6.0-4
- sap_hypervisor_node_preconfigure: fix for role name and path for included tasks
- update collection files
Related: RHEL-16895
* Thu Jan 25 2024 Than Ngo <than@redhat.com> - 3.6.0-3
- fix typo
Related: RHEL-16895
* Thu Jan 25 2024 Than Ngo <than@redhat.com> - 3.6.0-2
- add tests and tools
- fix bash and python shebangs
Related: RHEL-16895
* Mon Jan 22 2024 Than Ngo <than@redhat.com> - 3.6.0-1
- rebase sap roles to version 1.3.4
- add collection files
- update README files and add missing galaxy.yml, LICENSE
- fix syntax error for defining dependent collections in galaxy.yml
Resolves: RHEL-16895
* Thu May 04 2023 Than Ngo <than@redhat.com> - 3.5.0-2
- Related: #2185038, update README.md files
* Tue May 02 2023 Than Ngo <than@redhat.com> - 3.5.0-1
- update README, drop requirements-sap_swpm.yml
- migrate to SPDC license
- convert patch macro use to the most compatible syntax
- rebase sap roles to version 1.2.3
Resolves: #2185038
* Mon Jan 30 2023 Than Ngo <than@redhat.com> - 3.4.0-3
- Related: #2155876, rebase sap roles to version 1.2.1
- Related: #2155870, rebase sap roles to version 1.2.1
* Thu Jan 19 2023 Than Ngo <than@redhat.com> - 3.4.0-2
- Related: #2155876, compat-sap-c++-10 is not available for RHEL 8.2 and earlier on hardware platform s390x
- compat-sap-c++-10 is not available for RHEL 8.2 and earlier on hardware platform s390x
Related: #2155870
* Wed Jan 11 2023 Than Ngo <than@redhat.com> - 3.4.0-1
- Resolves: #2155876, rebase sap roles to version 1.2.0
* Tue Jan 10 2023 Than Ngo <than@redhat.com> - 3.4.0-1
- Resolves: #2155870, rebase to 1.2.0 upstream version
* Tue Nov 22 2022 Than Ngo <than@redhat.com> - 3.3.0-4
- Resolves: #2142957, drop deprecated paramater for Ansible 2.14
* Mon Nov 28 2022 Than Ngo <than@redhat.com> - 3.3.0-5
- Related: #2143280, add missing repo vars for rhel-9.x
* Fri Jul 15 2022 Than Ngo <than@redhat.com> - 3.3.0-3
- update galaxy.yml and README.md and url
Related: #2103633
* Fri Nov 25 2022 Than Ngo <than@redhat.com> - 3.3.0-4
- Resolves: #2143280, drop deprecated paramater for Ansible 2.14
* Thu Jul 14 2022 Than Ngo <than@redhat.com> - 3.3.0-3
- more fixes, update README.md
Related: #2101373
* 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
Resolves: #2101373
* 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
- Resolves: #2101373, 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-5
- increase release
Related: #2065407
* 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
* Wed Jun 08 2022 Than Ngo <than@redhat.com> - 3.2.0-4
- sap_hana_preconfigure: using wrong variable name
- sap_hana_preconfigure: Fix issue sap-linuxlab#154
Related: #2063050
- do not attempt to enable HANA repos for s390x
- sap_general_preconfigure: fix variable inclusion for RHEL minor releases
- sap_hana_preconfigure: Add vars for RHEL 9.1 managed nodes
- sap_hana_preconfigure: Fix issue #154
Related: #2065407
* Mon Mar 21 2022 Than Ngo <than@redhat.com> - 3.2.0-1
- Resolves: #2063050, rebase to new upstream org sap-linuxlab
* Sun Mar 13 2022 Than Ngo <than@redhat.com> - 3.2.0-3
- Resolves: #2065407, new rebase
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-10
- Related: #2016858, increase release to avoid update conflict
* Tue Feb 22 2022 Than Ngo <than@redhat.com> - 3.2.0-2
- Related: #2047282, new rebase, fixed collection basename
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-8
- Related: #2016858, rebase
* Mon Jan 31 2022 Than Ngo <than@redhat.com> - 3.2.0-1
- Resolves: #2047282, Rebase to new upstream org sap-linuxlab
* Tue Nov 16 2021 Than Ngo <than@redhat.com> - 3.1.1-7
- Resolves: #2016858, ansible-lint cleanup
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-15
- Related: #2021579, ansible-lint cleanup
* Wed Sep 08 2021 Than Ngo <than@redhat.com> - 3.1.1-6
- set min kernel version for RHEL 8.4 x86_64
* Tue Nov 16 2021 Than Ngo <than@redhat.com> - 3.1.1-14
- Resolves: #2021579, ansible-lint cleanup
* Fri Oct 15 2021 Than Ngo <than@redhat.com> - 3.1.1-13
- Fix the version of the collection tar file
* Fri Oct 15 2021 Than Ngo <than@redhat.com> - 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 <than@redhat.com> - 3.1.1-11
- fix yum group install errors on RHEL 7
- use grubby for setting tsx=on
- add tsx=on to the kernel command line unconditionally
- set min kernel version for RHEL 8.4 x86_64
* Wed Sep 01 2021 Than Ngo <than@redhat.com> - 3.1.1-5
- Related: #1928398, fix yum group install errors on RHEL 7
* Fri Aug 20 2021 Than Ngo <than@redhat.com> - 3.1.1-10
- Related: #1977195, fix #149, #177, #193, #194
* Fri Aug 20 2021 Than Ngo <than@redhat.com> - 3.1.1-4
- Related: #1928398, fix #149, #177, #193, #194
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.1-9
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Jul 12 2021 Than Ngo <than@redhat.com> - 3.1.1-3
- add missing __sap_preconfigure_envgroups for RHEL 7.x
- add __sap_hana_preconfigure_req_repos variables for RHEL 8.5 and later
Related: #1928398
* Fri Jul 16 2021 Than Ngo <than@redhat.com> - 3.1.1-8
- Related: #1977195, add missing vars/RedHat_9.yml in sap-netweaver-preconfigure
* Thu Jul 01 2021 Than Ngo <than@redhat.com> - 3.1.1-2
- Related: #1928398, add missing changelogs
* Tue Jul 13 2021 Than Ngo <than@redhat.com> - 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 <than@redhat.com> - 3.1.1-1
- Resolves: #1928398, rebase to 3.1.1 for Ansible Collections
* Tue Jun 29 2021 Than Ngo <than@redhat.com> - 3.1.1-6
- Resolves: #1977195, make RHEL system roles for SAP RHEL9 compatible
* Fri Mar 05 2021 Than Ngo <than@redhat.com> - 3.0.1-4
- fixed issue #130 in sap-preconfigure
- fixed typos in README.md in sap_hana_preconfigure
- added detailed explanations for sap_hana_preconfigure_kernel_parameters_ppc64le in README.md
- fixed issue #170 in sap_hana_preconfigure
Related: #1891642
* Mon Jun 28 2021 Than Ngo <than@redhat.com> - 3.1.1-5
- updated tarball, galaxy.yml, README.md
* Mon Jun 07 2021 Than Ngo <than@redhat.com> - 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 <than@redhat.com> - 3.1.1-3
- convert roles to FQCN in the README files
* Thu May 20 2021 Than Ngo <than@redhat.com> - 3.1.1-2
- rename dashes by underscores and drop sap-
* Tue May 18 2021 Than Ngo <than@redhat.com> - 3.1.1-1
- rebase
* Wed Apr 14 2021 Than Ngo <than@redhat.com> - 3.1.0-3
- bz#1928398, rebuilt against new python-ruamel-yaml-0.15.100 for conversion problem
* Mon Mar 22 2021 Than Ngo <than@redhat.com> - 3.1.0-2
- rebase
* Tue Mar 02 2021 Than Ngo <than@redhat.com> - 3.1.0-1
- added support Transfer SAP roles into collection format
* Wed Feb 24 2021 Than Ngo <than@redhat.com> - 3.0.1-3
- Related: #1891642, fixed issue #125 in sap-preconfigure and #163 and #164 in sap-hana-preconfigure
@ -348,6 +404,9 @@ Related: #2063050
- Resolves: #1891638, bug fixes
- Resolves: #1891642, new features
* Tue Jan 12 2021 Than Ngo <than@redhat.com> - 2.0.0-8
- RHEL 9.0.0 Alpha build
* Mon Sep 21 2020 Than Ngo <than@redhat.com> - 2.0.0-7
- Related: #1867027, fix #119

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (auto-maintenance-e2a233f5a0cb68363798bf014b16552cca681bd0.tar.gz) = 3d5c784e668605eb8b7862227b456da05ff5dedf84411131a27118b501b6a9bbe8894c4f29e6de4230fe534ef6b2de4653c56a904857d9eb11b452d31aed143c
SHA512 (redhat.sap_install-1.3.5.tar.gz) = 7c15aff5d0fa2c21200d73d901bf659175a952de4de0ae2f7cd6909d75134f769d9ac466ce2a39e2bfafc7177fb55f484bb8232d8095f25b5deb6086c5ef1287