import ansible-collection-microsoft-sql-1.2.3-1.el9

This commit is contained in:
CentOS Sources 2022-09-27 05:28:50 -04:00 committed by root
parent 258a2fc326
commit b516a99164
3 changed files with 121 additions and 11 deletions

View File

@ -1,2 +1,2 @@
99df2e20aff7ec8c244218a45bbcd3d68b791311 SOURCES/auto-maintenance-cdc706f14614ef5e80bbce8db10beb369e889df9.tar.gz 99df2e20aff7ec8c244218a45bbcd3d68b791311 SOURCES/auto-maintenance-cdc706f14614ef5e80bbce8db10beb369e889df9.tar.gz
6fd1a1faa5e3c0108b1cbc7a031b6e3e5dde76e0 SOURCES/mssql-78ea547ef9e23e20015794a1e48c7d6d21229293.tar.gz efe869a482b93c0b0289621a82e1718ac55e4ed4 SOURCES/mssql-1.2.3.tar.gz

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/auto-maintenance-cdc706f14614ef5e80bbce8db10beb369e889df9.tar.gz SOURCES/auto-maintenance-cdc706f14614ef5e80bbce8db10beb369e889df9.tar.gz
SOURCES/mssql-78ea547ef9e23e20015794a1e48c7d6d21229293.tar.gz SOURCES/mssql-1.2.3.tar.gz

View File

@ -1,7 +1,16 @@
# NOTE: Even though ansible-core is in 8.6, it is only available
# at *runtime*, not at *buildtime* - so we can't have
# ansible-core as a build_dep on RHEL8
%if 0%{?fedora} || 0%{?rhel} >= 9
%bcond_without ansible
%global ansible_build_dep ansible-core >= 2.11.0
%else
%if 0%{?rhel} && ! 0%{?epel} %if 0%{?rhel} && ! 0%{?epel}
%bcond_with ansible %bcond_with ansible
%else %else
%bcond_without ansible %bcond_without ansible
%global ansible_build_dep ansible >= 2.9.10
%endif
%endif %endif
%bcond_with collection_artifact %bcond_with collection_artifact
@ -16,8 +25,8 @@
Name: ansible-collection-microsoft-sql 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.1.0 Version: 1.2.3
Release: 2%{?dist} Release: 1%{?dist}
#Group: Development/Libraries #Group: Development/Libraries
License: MIT License: MIT
@ -44,8 +53,25 @@ License: MIT
%endif %endif
%endif %endif
# ansible-core is in rhel 8.6 and later - default to ansible-core, but allow
# the use of ansible if present - we may revisit this if the automatic dependency
# generator is added to ansible-core in RHEL
# Fedora - the automatic generator will add this - no need to explicit declare
# it in the spec file
# EL7 - no dependency on ansible because there is no ansible in el7 - user is
# responsible for knowing they have to install ansible
%if 0%{?rhel} >= 8
Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0)
%endif
%if 0%{?fedora}
Requires: linux-system-roles
%else
Requires: rhel-system-roles
%endif
%if %{with ansible} %if %{with ansible}
BuildRequires: ansible >= 2.9.10 BuildRequires: %{ansible_build_dep}
%endif %endif
%if %{without ansible} %if %{without ansible}
@ -56,7 +82,7 @@ BuildRequires: ansible >= 2.9.10
%define ansible_collection_build_install() ansible-galaxy collection build; ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz %define ansible_collection_build_install() ansible-galaxy collection build; ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz
%endif %endif
# For each role, call defcommit() and the point to it with SourceN: %{archiveurlN}. # For each role, call defsource() and the point to it with SourceN: %{archiveurlN}.
%global archiveext tar.gz %global archiveext tar.gz
# list of source role names # list of source role names
%global rolenames %nil %global rolenames %nil
@ -71,8 +97,8 @@ BuildRequires: ansible >= 2.9.10
%global parenturl https://github.com/linux-system-roles %global parenturl https://github.com/linux-system-roles
%define defcommit() %{expand:%%global ref%{1} %{2} # You can feed either tag or commit to defsource
%%global shortcommit%{1} %%(c=%%{ref%{1}}; echo ${c:0:7}) %define defsource() %{expand:%%global ref%{1} %{2}
%%global extractdir%{1} %%{expand:%%getarchivedir %{1}} %%global extractdir%{1} %%{expand:%%getarchivedir %{1}}
%%global archiveurl%{1} %%{parenturl}/%%{rolename%{1}}/archive/%%{ref%{1}}/%%{rolename%{1}}-%%{ref%{1}}.tar.gz %%global archiveurl%{1} %%{parenturl}/%%{rolename%{1}}/archive/%%{ref%{1}}/%%{rolename%{1}}-%%{ref%{1}}.tar.gz
%%global rolenames %%{?rolenames} %%{rolename%{1}} %%global rolenames %%{?rolenames} %%{rolename%{1}}
@ -84,7 +110,7 @@ BuildRequires: ansible >= 2.9.10
%%global collection_rolenames %%{?collection_rolenames} [%{rolename%{1}}]="%{collection_rolename%{1}}" %%global collection_rolenames %%{?collection_rolenames} [%{rolename%{1}}]="%{collection_rolename%{1}}"
} }
%defcommit 1 78ea547ef9e23e20015794a1e48c7d6d21229293 %defsource 1 1.2.3
%global rolename1 mssql %global rolename1 mssql
%global target_rolename1 sql-server %global target_rolename1 sql-server
%global collection_rolename1 server %global collection_rolename1 server
@ -109,7 +135,7 @@ BuildRequires: highlight
# Requirements for galaxy_transform.py # Requirements for galaxy_transform.py
BuildRequires: python3 BuildRequires: python3
%if 0%{?fedora} || 0%{?rhel} >= 8 %if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: python3dist(ruamel.yaml) BuildRequires: %{py3_dist ruamel.yaml}
%else %else
BuildRequires: python3-ruamel-yaml BuildRequires: python3-ruamel-yaml
%endif %endif
@ -171,13 +197,38 @@ 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
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" "Ansible collection for Microsoft SQL Server management" > galaxy.yml.tmp %if 0%{?rhel}
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
"Ansible collection for Microsoft SQL Server management" \
"https://github.com/linux-system-roles/mssql" \
"https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/administration_and_configuration_tasks_using_system_roles_in_rhel/assembly_configuring-microsoft-sql-server-using-microsoft-sql-server-ansible-role_assembly_updating-packages-to-enable-automation-for-the-rhel-system-roles" \
"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" \
> 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/CHANGELOG.md \
$rolename/README.md \
$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" \
@ -196,6 +247,13 @@ rm -r .collections/ansible_collections/%{collection_namespace}/%{collection_name
# Copy galaxy.yml to the collection directory # Copy galaxy.yml to the collection directory
cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name} cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name}
# Update CHANGELOG.md with the current date and copy it to collection dir
curr_date=$(date +'%Y-%m-%d')
sed -i "s/^\([%{version}] - \).*/\1$curr_date/g" \
.collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/%{collection_rolename1}/CHANGELOG.md
mv .collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/%{collection_rolename1}/CHANGELOG.md \
.collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%install %install
mkdir -p $RPM_BUILD_ROOT%{installbase} mkdir -p $RPM_BUILD_ROOT%{installbase}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
@ -385,9 +443,61 @@ fi
%endif %endif
%changelog %changelog
* Thu Aug 25 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.3-1
- Use firewall role to configure firewall for SQL Server
Resolves: rhbz#2120709
- Add mssql_ha_virtual_ip
Replace mssql_ha_db_name with mssql_ha_db_names to let users replicate multiple DBs
Resolves: rhbz#2066337
- Replace simple `mssql_input_sql_file` with `pre` and `post` variables
Resolves: rhbz#2120712
- Add Requires: linux-system-roles or rhel-system-roles
- Replace fedora.linux_system_roles:redhat.rhel_system_roles on RHEL
- Add downstream values to galaxy.yml
- Change defcommit to defsource that takes both tags and commits
- Update CHANGELOG.md with the current date and copy it to collection dir
* 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
- Add MVP HA functionality to the server role
Resolves: rhbz#2066337
- Add mssql_tls_remote_src to the server role
Resolves: rhbz#2098212
- Add Requires: linux-system-roles or rhel-system-roles
- Add downstream values to galaxy.yml
* Mon Mar 21 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.1.1-3
- Fix inserting ansible_managed
Resolves: rhbz#2057652
- Users now can provide a custom URLs to pull packages and RPM key from
Resolves: rhbz#2070452
- Add "Requires: ansible-core or ansible"
Resolves: rhbz#2067496
* Fri Mar 18 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.1.1-2
- RHEL8.6, 9 - add "Requires: ansible-core or ansible"
Resolves: rhbz#2065669 (EL9)
* Thu Mar 17 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.1.1-1
- Insert the "Ansible managed" comment to the /var/opt/mssql/mssql.conf file
Resolves rhbz#2064690 (EL9)
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Sep 23 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.1.0-2 * Thu Sep 23 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.1.0-2
- Bump release to build with gating.yaml added - Bump release to build with gating.yaml added
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jul 21 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.1.0-1 * Wed Jul 21 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.1.0-1
- Add support for Microsoft SQL Server 2017 - Add support for Microsoft SQL Server 2017