import rhel-system-roles-sap-3.2.0-1.el9

This commit is contained in:
CentOS Sources 2022-03-01 08:33:33 -05:00 committed by Stepan Oksanichenko
parent e79a1f6e0b
commit 14621f4a5d
4 changed files with 62 additions and 69 deletions

6
.gitignore vendored
View File

@ -1,4 +1,2 @@
SOURCES/auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz SOURCES/auto-maintenance-d64d1be7904aa8f279b117da6f2a31b3d4b6e43e.tar.gz
SOURCES/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz SOURCES/community.sap_install-7956ecd9bd289c608f6e5c0d51c5139ae9a6d349.tar.gz
SOURCES/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz
SOURCES/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz

View File

@ -1,4 +1,2 @@
2c8f0a9cddc4b6ecdfb149c22c86c8c18394aff9 SOURCES/auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz 4399a6faf1b13960418be86e6689fbd2e2ada8d3 SOURCES/auto-maintenance-d64d1be7904aa8f279b117da6f2a31b3d4b6e43e.tar.gz
80114f5c167f5f1fa940c3c21145498f54d97f5b SOURCES/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz 0b5012ce3fe50a8eddcb112278208c496c6b0c58 SOURCES/community.sap_install-7956ecd9bd289c608f6e5c0d51c5139ae9a6d349.tar.gz
0883d358ca5eb466fad455af80fa1cf8abdef29f SOURCES/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz
e9bf401559ab460d4a3079fab8faa2bd7183b170 SOURCES/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz

View File

@ -3,13 +3,13 @@
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all # 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 # content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
# underscores or numbers and cannot contain consecutive underscores # underscores or numbers and cannot contain consecutive underscores
namespace: sap namespace: sap-linuxlab
# The name of the collection. Has the same character restrictions as 'namespace' # The name of the collection. Has the same character restrictions as 'namespace'
name: rhel name: rhel
# The version of the collection. Must be compatible with semantic versioning # The version of the collection. Must be compatible with semantic versioning
version: 3.1.1 version: 3.2.0
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection # The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md readme: README.md

View File

@ -14,39 +14,38 @@
%bcond_with html %bcond_with html
%endif %endif
%global collection_namespace sap %global collection_namespace sap-linuxlab
%if 0%{?rhel} %if 0%{?rhel}
%define package_name rhel-system-roles-sap %define package_name rhel-system-roles-sap
%global collection_name rhel %global collection_name rhel
%else %else
%define package_name linux-system-roles-sap %define package_name linux-system-roles-sap
%global collection_name linux %global collection_name community
%endif %endif
# collection_version has to be increased by every rebuild # collection_version has to be increased by every rebuild
# otherwise, it cannot be uploaded to Automation Hub and Galaxy # otherwise, it cannot be uploaded to Automation Hub and Galaxy
# due to version conflict # due to version conflict
%define collection_version 3.1.4 %define collection_version 3.2.0
%global mainid 411f58b0e8da72cd69827d6ed30d8925bea5cb23 %global mainid d64d1be7904aa8f279b117da6f2a31b3d4b6e43e
%global gitcommit_sap d065073dca5617292d768ea0e044994653f84667 %global commit_id_sap_install 7956ecd9bd289c608f6e5c0d51c5139ae9a6d349
%global gitcommit_sap_hana 083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b %global rolename1 sap_general_preconfigure
%global gitcommit_sap_netweaver bf771416116b670ccf17f8e289adbe14df20208b %global rolename2 sap_hana_preconfigure
%global rolename1 sap-preconfigure %global rolename3 sap_netweaver_preconfigure
%global rolename2 sap-hana-preconfigure %global rolename4 sap_hana_install
%global rolename3 sap-netweaver-preconfigure
%global src_owner linux-system-roles %global src_owner linux-system-roles
%global github_repo_sap_install community.sap_install
Name: %{package_name} Name: %{package_name}
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
Version: 3.1.1 Version: 3.2.0
Release: 15%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+
Url: https://github.com/berndfinger Url: https://github.com/sap-linuxlab/community.sap_install
Source0: https://github.com/linux-system-roles/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz 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 Source1: https://github.com/sap-linuxlab/%{github_repo_sap_install}archive/%{github_repo_sap_install}/%{github_repo_sap_install}-%{commit_id_sap_install}.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 Source4: README.md
Source5: galaxy.yml Source5: galaxy.yml
# patches 0-49 for sap-preconfigure # patches 0-49 for sap-preconfigure
@ -81,7 +80,7 @@ Requires: python-netaddr
%endif %endif
%if %{with ansible} %if %{with ansible}
BuildRequires: ansible >= 2.9.10 BuildRequires: ansible-core >= 2.9.10
%endif %endif
%if %{undefined __ansible_provides} %if %{undefined __ansible_provides}
@ -122,12 +121,7 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-%
%endif %endif
%prep %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
# cp own galaxy.yml and rename the collection name correctly for Automation Hub and Galaxy # cp own galaxy.yml and rename the collection name correctly for Automation Hub and Galaxy
mkdir .collections mkdir .collections
@ -136,43 +130,39 @@ sed -i -e "s|name: rhel|name: %{collection_name}|" galaxy.yml
# add correct version for Automation Hub and Galaxy # 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: 3.1.1|version: %{collection_version}|" galaxy.yml
pushd sap-preconfigure pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_hana_preconfigure
popd
pushd sap-hana-preconfigure
%patch50 -p1 %patch50 -p1
popd popd
pushd sap-netweaver-preconfigure
popd
# remove git stuff pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/
rm -rf *-preconfigure/.git*
# remove zero file # 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 # remove all SLES stuff and RHEL 6 stuff
rm -rf sap-hana-preconfigure/tasks/SLES/ 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/1275776 # SLES - sapconf, saptune, etc
rm -rf sap-hana-preconfigure/tasks/sapnote/1944799 # SLES - HANA install and config guidelines 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/1944799.yml
rm -f sap-hana-preconfigure/tasks/sapnote/2013638.yml # RHEL 6.5 - OS settings 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/2136965.yml # RHEL 6.6 - OS settings
rm -f sap-hana-preconfigure/tasks/sapnote/2247020.yml # RHEL 6.7 - 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/2578899 # SLES 15 - installation
rm -rf sap-hana-preconfigure/tasks/sapnote/2684254 # SLES 15 - OS settings for HANA 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.5.yml
rm -f sap-hana-preconfigure/vars/RedHat_6.6.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/RedHat_6.7.yml
rm -f sap-hana-preconfigure/vars/SLES_15.yml rm -f sap_hana_preconfigure/vars/SLES_15.yml
popd
%build %build
sh md2html.sh \ sh md2html.sh \
sap-preconfigure/README.md \ %{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_general_preconfigure/README.md \
sap-hana-preconfigure/README.md \ %{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_hana_preconfigure/README.md \
sap-netweaver-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 '-' '_')" new_role="$(echo ${role/sap-/} | tr '-' '_')"
python3 lsr_role2collection.py --role "$role" \ 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} \ --src-owner %{src_owner} \
--dest-path .collections \ --dest-path .collections \
--readme %{SOURCE4} \ --readme %{SOURCE4} \
@ -204,14 +194,17 @@ cd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%install %install
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \ mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure \ $RPM_BUILD_ROOT%{_pkgdocdir}/sap_hana_preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure \ $RPM_BUILD_ROOT%{_pkgdocdir}/sap_general_preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-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/ pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/
cp -p sap-hana-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure/ for f in sap_hana_preconfigure sap_general_preconfigure sap_netweaver_preconfigure sap_hana_install ; do
cp -p sap-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure/ cp -pR $f $RPM_BUILD_ROOT%{_datadir}/ansible/roles/
cp -p sap-netweaver-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure/ install -m 644 ../LICENSE $f/README.md $RPM_BUILD_ROOT%{_pkgdocdir}/$f
done
popd
# install collection files # install collection files
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
@ -228,9 +221,10 @@ popd
%files %files
%dir %{_pkgdocdir} %dir %{_pkgdocdir}
%dir %{_pkgdocdir}/sap-preconfigure %dir %{_pkgdocdir}/sap_general_preconfigure
%dir %{_pkgdocdir}/sap-hana-preconfigure %dir %{_pkgdocdir}/sap_hana_preconfigure
%dir %{_pkgdocdir}/sap-netweaver-preconfigure %dir %{_pkgdocdir}/sap_netweaver_preconfigure
%dir %{_pkgdocdir}/sap_hana_install
%dir %{_datadir}/ansible %dir %{_datadir}/ansible
%dir %{_datadir}/ansible/roles %dir %{_datadir}/ansible/roles
%doc %{_pkgdocdir}/*/README.md %doc %{_pkgdocdir}/*/README.md
@ -244,6 +238,9 @@ popd
%endif %endif
%changelog %changelog
* Mon Jan 31 2022 Than Ngo <than@redhat.com> - 3.2.0-1
- Resolves: #2047282, Rebase to new upstream org sap-linuxlab
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-15 * Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-15
- Related: #2021579, ansible-lint cleanup - Related: #2021579, ansible-lint cleanup