Update mssql commit, fix replacing fedora.linux_system_roles
- Update mssql commit Resolves: rhbz#2066337 - Add condition for upstream spec build for galaxy_transform - Replace extra-mapping with replacing in the legacy format with sed
This commit is contained in:
parent
388b3ca77a
commit
18dd927b56
@ -26,7 +26,7 @@ Name: ansible-collection-microsoft-sql
|
|||||||
Url: https://github.com/linux-system-roles/mssql
|
Url: https://github.com/linux-system-roles/mssql
|
||||||
Summary: The Ansible collection for Microsoft SQL Server management
|
Summary: The Ansible collection for Microsoft SQL Server management
|
||||||
Version: 1.2.0
|
Version: 1.2.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
|
|
||||||
#Group: Development/Libraries
|
#Group: Development/Libraries
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -111,7 +111,7 @@ BuildRequires: %{ansible_build_dep}
|
|||||||
%%global collection_rolenames %%{?collection_rolenames} [%{rolename%{1}}]="%{collection_rolename%{1}}"
|
%%global collection_rolenames %%{?collection_rolenames} [%{rolename%{1}}]="%{collection_rolename%{1}}"
|
||||||
}
|
}
|
||||||
|
|
||||||
%defcommit 1 27201be4f2e557a6dcde36463354a1de0cbadb08
|
%defcommit 1 4eb3dd55defd801a5032efa597983cbbec4bbeea
|
||||||
%global rolename1 mssql
|
%global rolename1 mssql
|
||||||
%global target_rolename1 sql-server
|
%global target_rolename1 sql-server
|
||||||
%global collection_rolename1 server
|
%global collection_rolename1 server
|
||||||
@ -198,7 +198,9 @@ mkdir .collections
|
|||||||
cp %{rolename1}/.collection/README.md lsr_role2collection/collection_readme.md
|
cp %{rolename1}/.collection/README.md lsr_role2collection/collection_readme.md
|
||||||
# Copy galaxy.yml for the collection build
|
# Copy galaxy.yml for the collection build
|
||||||
cp %{rolename1}/.collection/galaxy.yml ./
|
cp %{rolename1}/.collection/galaxy.yml ./
|
||||||
|
|
||||||
# Ensure the correct entries in galaxy.yml
|
# Ensure the correct entries in galaxy.yml
|
||||||
|
%if 0%{?rhel}
|
||||||
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
|
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
|
||||||
"Ansible collection for Microsoft SQL Server management" \
|
"Ansible collection for Microsoft SQL Server management" \
|
||||||
"https://github.com/linux-system-roles/mssql" \
|
"https://github.com/linux-system-roles/mssql" \
|
||||||
@ -206,11 +208,24 @@ cp %{rolename1}/.collection/galaxy.yml ./
|
|||||||
"https://github.com/linux-system-roles/mssql/blob/master/README.md" \
|
"https://github.com/linux-system-roles/mssql/blob/master/README.md" \
|
||||||
"https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%208&component=ansible-collection-microsoft-sql" \
|
"https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%208&component=ansible-collection-microsoft-sql" \
|
||||||
> galaxy.yml.tmp
|
> galaxy.yml.tmp
|
||||||
|
%else
|
||||||
|
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
|
||||||
|
"Ansible collection for Microsoft SQL Server management" \
|
||||||
|
> galaxy.yml.tmp
|
||||||
|
%endif
|
||||||
mv galaxy.yml.tmp galaxy.yml
|
mv galaxy.yml.tmp galaxy.yml
|
||||||
|
|
||||||
# Declare the array containing collection rolenames to convert roles to
|
# Declare the array containing collection rolenames to convert roles to
|
||||||
declare -A COLLECTION_ROLENAMES=(%{collection_rolenames})
|
declare -A COLLECTION_ROLENAMES=(%{collection_rolenames})
|
||||||
|
|
||||||
|
# Replace fedora.linux_system_roles with redhat.rhel_system_roles
|
||||||
|
%if 0%{?rhel}
|
||||||
|
for rolename in %{rolenames}; do
|
||||||
|
sed -i 's/fedora\.linux_system_roles/redhat.rhel_system_roles/g' \
|
||||||
|
$rolename/tasks/*.yml $rolename/tests/*.yml $rolename/meta/*.yml
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
# Convert roles to the collection format
|
# Convert roles to the collection format
|
||||||
for rolename in %{rolenames}; do
|
for rolename in %{rolenames}; do
|
||||||
python3 lsr_role2collection.py --role "$rolename" \
|
python3 lsr_role2collection.py --role "$rolename" \
|
||||||
@ -220,8 +235,7 @@ for rolename in %{rolenames}; do
|
|||||||
--readme lsr_role2collection/collection_readme.md \
|
--readme lsr_role2collection/collection_readme.md \
|
||||||
--namespace %{collection_namespace} --collection %{collection_name} \
|
--namespace %{collection_namespace} --collection %{collection_name} \
|
||||||
--new-role "${COLLECTION_ROLENAMES[${rolename}]}" \
|
--new-role "${COLLECTION_ROLENAMES[${rolename}]}" \
|
||||||
--meta-runtime lsr_role2collection/runtime.yml \
|
--meta-runtime lsr_role2collection/runtime.yml
|
||||||
--extra-mapping "fedora.linux_system_roles:redhat.rhel_system_roles"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# removing dot files/dirs
|
# removing dot files/dirs
|
||||||
@ -419,6 +433,12 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 4 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-2
|
||||||
|
- Update mssql commit
|
||||||
|
Resolves: rhbz#2066337
|
||||||
|
- Add condition for upstream spec build for galaxy_transform
|
||||||
|
- Replace extra-mapping with replacing in the legacy format with sed
|
||||||
|
|
||||||
* Fri Jun 17 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-1
|
* Fri Jun 17 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-1
|
||||||
- Add MVP HA functionality to the server role
|
- Add MVP HA functionality to the server role
|
||||||
Resolves: rhbz#2066337
|
Resolves: rhbz#2066337
|
||||||
|
Loading…
Reference in New Issue
Block a user