Related: #2003630, fix the version of the collection tar file
This commit is contained in:
parent
4e1f97187d
commit
112dd6b589
@ -32,12 +32,15 @@
|
|||||||
%global rolename3 sap-netweaver-preconfigure
|
%global rolename3 sap-netweaver-preconfigure
|
||||||
%global src_owner linux-system-roles
|
%global src_owner linux-system-roles
|
||||||
|
|
||||||
%define irelease 12
|
# 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.2
|
||||||
|
|
||||||
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.1.1
|
||||||
Release: %{irelease}%{?dist}
|
Release: 13%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Url: https://github.com/berndfinger
|
Url: https://github.com/berndfinger
|
||||||
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
|
||||||
@ -80,10 +83,8 @@ Requires: python-netaddr
|
|||||||
BuildRequires: ansible >= 2.9.10
|
BuildRequires: ansible >= 2.9.10
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global collection_version %{version}
|
|
||||||
|
|
||||||
%if %{undefined __ansible_provides}
|
%if %{undefined __ansible_provides}
|
||||||
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{collection_version}
|
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{version}
|
||||||
%endif
|
%endif
|
||||||
# be compatible with the usual Fedora Provides:
|
# be compatible with the usual Fedora Provides:
|
||||||
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release}
|
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release}
|
||||||
@ -103,7 +104,7 @@ Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{vers
|
|||||||
# Simply copy everything instead of galaxy-installing the built artifact.
|
# 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_install() mkdir -p %{buildroot}%{ansible_collection_files}; cp -a . %{buildroot}%{ansible_collection_files}/%{collection_name}/
|
||||||
%else
|
%else
|
||||||
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}-%{irelease}.tar.gz
|
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -116,7 +117,7 @@ to applicable SAP notes so that any SAP software can be installed.
|
|||||||
Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
|
Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
|
||||||
|
|
||||||
%description collection-artifact
|
%description collection-artifact
|
||||||
Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{version}.tar.gz
|
Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -132,7 +133,7 @@ mkdir .collections
|
|||||||
cp %{SOURCE5} galaxy.yml
|
cp %{SOURCE5} galaxy.yml
|
||||||
sed -i -e "s|name: rhel|name: %{collection_name}|" galaxy.yml
|
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: %{version}-%{irelease}|" galaxy.yml
|
sed -i -e "s|version: 3.1.1|version: %{collection_version}|" galaxy.yml
|
||||||
|
|
||||||
# remove git stuff
|
# remove git stuff
|
||||||
rm -rf *-preconfigure/.git*
|
rm -rf *-preconfigure/.git*
|
||||||
@ -213,10 +214,7 @@ popd
|
|||||||
%if %{with collection_artifact}
|
%if %{with collection_artifact}
|
||||||
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
||||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||||
if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then
|
mv %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz $RPM_BUILD_ROOT%{_datadir}/ansible/collections/
|
||||||
mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \
|
|
||||||
$RPM_BUILD_ROOT%{_datadir}/ansible/collections/
|
|
||||||
fi
|
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -234,10 +232,13 @@ popd
|
|||||||
|
|
||||||
%if %{with collection_artifact}
|
%if %{with collection_artifact}
|
||||||
%files collection-artifact
|
%files collection-artifact
|
||||||
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{version}-%{irelease}.tar.gz
|
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* 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
|
- Resolves: #2003630, Pepare the roles for ansible-core 2.11: Only use ansible.core modules
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user