diff --git a/ansible-collection-redhat-rhel_mgmt.spec b/ansible-collection-redhat-rhel_mgmt.spec index 73b7af9..fb07452 100644 --- a/ansible-collection-redhat-rhel_mgmt.spec +++ b/ansible-collection-redhat-rhel_mgmt.spec @@ -67,6 +67,8 @@ Source: https://github.com/pcahyna/fedora.linux_mgmt/archive/%{collection_versio # Collection tarballs from Galaxy # Not used on Fedora. Source901: https://galaxy.ansible.com/download/community-general-5.4.0.tar.gz + +Patch1: redfish-metadata.patch %endif BuildArch: noarch @@ -102,6 +104,10 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-% %endif %setup -n %{extractdir} +%if 0%{?rhel} +%patch1 -p1 +%endif + %if 0%{?rhel} modules=( remote_management/redfish/redfish_{command,config,info}.py ) module_utils=( redfish_utils.py ) @@ -135,12 +141,10 @@ find -type f -exec \ # borrowed from from ansible-collection-ansible-netcommon find -type f ! -executable -type f -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' + -%{SOURCE1} %{collection_namespace} %{collection_name} %{collection_version} > galaxy.yml.new -mv galaxy.yml.new galaxy.yml - %build mkdir -p .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ cp -a * .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ +%{SOURCE1} %{collection_namespace} %{collection_name} %{collection_version} > .collections/ansible_collections/%{collection_namespace}/%{collection_name}/galaxy.yml pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ %ansible_collection_build diff --git a/redfish-metadata.patch b/redfish-metadata.patch new file mode 100644 index 0000000..a71a68d --- /dev/null +++ b/redfish-metadata.patch @@ -0,0 +1,20 @@ +diff -up fedora.linux_mgmt-1.0.0/galaxy.yml~ fedora.linux_mgmt-1.0.0/galaxy.yml +--- fedora.linux_mgmt-1.0.0/galaxy.yml~ 2022-08-18 15:51:16.694699074 +0200 ++++ fedora.linux_mgmt-1.0.0/galaxy.yml 2022-08-18 15:54:51.257016538 +0200 +@@ -19,6 +19,7 @@ readme: README.md + authors: + - Pavel Cahyna + - Bulat Gaifullin (@bgaifullin) ++- Jose Delarosa (@jose-delarosa) + + ### OPTIONAL but strongly recommended + +@@ -32,7 +33,7 @@ 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: [ipmi, linux] ++tags: [ipmi, redfish, linux] + + # 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