2023-06-13 10:33:58 +00:00
|
|
|
# NOTE: ansible-core is in rhel-8.6 and newer, but not installable
|
|
|
|
# in buildroot as it depended on modular Python.
|
|
|
|
# It has been installable at buildtime in 8.8 and newer.
|
2023-02-03 08:09:41 +00:00
|
|
|
%if 0%{?fedora}
|
|
|
|
BuildRequires: ansible-packaging
|
2022-05-26 04:51:19 +00:00
|
|
|
%else
|
2023-06-13 10:33:58 +00:00
|
|
|
%if 0%{?rhel} >= 8
|
2023-02-03 08:09:41 +00:00
|
|
|
BuildRequires: ansible-core >= 2.11.0
|
2022-05-26 04:51:19 +00:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%bcond_with collection_artifact
|
|
|
|
|
|
|
|
Name: ansible-collection-microsoft-sql
|
|
|
|
Url: https://github.com/linux-system-roles/mssql
|
|
|
|
Summary: The Ansible collection for Microsoft SQL Server management
|
2024-02-22 20:31:03 +00:00
|
|
|
Version: 2.2.3
|
2024-02-27 16:00:32 +00:00
|
|
|
Release: 2%{?dist}
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
License: MIT
|
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
%global rolename mssql
|
2022-05-26 04:51:19 +00:00
|
|
|
%global collection_namespace microsoft
|
|
|
|
%global collection_name sql
|
2023-02-03 08:09:41 +00:00
|
|
|
%global collection_rolename server
|
2022-05-26 04:51:19 +00:00
|
|
|
%global collection_version %{version}
|
2023-02-03 08:09:41 +00:00
|
|
|
%global legacy_rolename %{collection_namespace}.sql-server
|
|
|
|
%global _pkglicensedir %{_licensedir}/%{name}
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
# be compatible with the usual Fedora Provides:
|
|
|
|
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{collection_version}-%{release}
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
# 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
|
2022-06-21 01:27:08 +00:00
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
%if 0%{?rhel}
|
2022-06-21 01:27:08 +00:00
|
|
|
Requires: rhel-system-roles
|
2022-05-26 04:51:19 +00:00
|
|
|
%else
|
2023-02-03 08:09:41 +00:00
|
|
|
Requires: linux-system-roles
|
2022-05-26 04:51:19 +00:00
|
|
|
%endif
|
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
%global mainid eadd06cfa98d244b096cff24cd11b668428b1613
|
2023-02-28 18:11:36 +00:00
|
|
|
# Use either hash or tag for source1id
|
|
|
|
# %%global source1id 50edba099ab2c8b25b225fe760cb5a459b320030
|
|
|
|
%global source1id %{version}
|
2022-05-26 04:51:19 +00:00
|
|
|
%global parenturl https://github.com/linux-system-roles
|
|
|
|
Source: %{parenturl}/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
|
2023-02-28 18:11:36 +00:00
|
|
|
Source1: %{parenturl}/%{rolename}/archive/%{source1id}/%{rolename}-%{source1id}.tar.gz
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2023-06-13 10:33:58 +00:00
|
|
|
# Includes with ansible_collection_build/_install that differ between RHEL versions
|
|
|
|
Source1002: ansible-packaging.inc
|
|
|
|
%include %{SOURCE1002}
|
|
|
|
|
2022-05-26 04:51:19 +00:00
|
|
|
BuildArch: noarch
|
2024-02-22 20:31:03 +00:00
|
|
|
# there is no ansible on i686, so when we get a builder that uses
|
|
|
|
# this arch, the build fails with
|
|
|
|
# No matching package to install: 'ansible-core >= 2.11.0'
|
2024-02-27 16:00:32 +00:00
|
|
|
# unfortunately, this causes the src rpm build tasks to be reported
|
|
|
|
# with the arch of the builder :-( which causes problems with internal
|
|
|
|
# test infrastructure - while we get those issues sorted out, revert
|
|
|
|
# this change - this means that centpkg builds may fail and may have
|
|
|
|
# to be retried
|
|
|
|
# ExcludeArch: i686
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
# Requirements for galaxy_transform.py
|
|
|
|
BuildRequires: python3
|
2023-02-03 08:09:41 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-ruamel-yaml
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
%description
|
2023-02-03 08:09:41 +00:00
|
|
|
This RPM installs the %{collection_namespace}.%{collection_name} Ansible
|
|
|
|
collection that provides the %{collection_rolename} role for Microsoft SQL
|
|
|
|
Server management. This RPM also installs the %{legacy_rolename} role
|
|
|
|
in the legacy roles format for users of Ansible < 2.9.
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
%if %{with collection_artifact}
|
|
|
|
%package collection-artifact
|
|
|
|
Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
|
|
|
|
|
|
|
|
%description collection-artifact
|
2023-02-03 08:09:41 +00:00
|
|
|
Collection artifact for %{name}. This package contains
|
2023-06-13 10:33:58 +00:00
|
|
|
%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
|
2022-05-26 04:51:19 +00:00
|
|
|
%endif
|
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
%pretrans -p <lua>
|
|
|
|
path = "%{ansible_roles_dir}/%{legacy_rolename}"
|
|
|
|
st = posix.stat(path)
|
|
|
|
if st and st.type == "link" then
|
|
|
|
os.remove(path)
|
|
|
|
end
|
|
|
|
|
2022-05-26 04:51:19 +00:00
|
|
|
%prep
|
2023-02-03 08:09:41 +00:00
|
|
|
%setup -q -a1 -n auto-maintenance-%{mainid}
|
|
|
|
|
2023-02-28 18:11:36 +00:00
|
|
|
mv %{rolename}-%{source1id} %{rolename}
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
# Remove symlinks in tests/roles
|
|
|
|
if [ -d %{rolename}/tests/roles ]; then
|
|
|
|
find %{rolename}/tests/roles -type l -exec rm {} \;
|
|
|
|
if [ -d %{rolename}/tests/roles/linux-system-roles.%{rolename} ]; then
|
|
|
|
rm -r %{rolename}/tests/roles/linux-system-roles.%{rolename}
|
|
|
|
fi
|
|
|
|
fi
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
%build
|
2024-01-31 11:38:39 +00:00
|
|
|
# Move a hidden .README.html to a not hidden README.html
|
|
|
|
mv %{rolename}/.README.html %{rolename}/README.html
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
mkdir .collections
|
2024-01-31 11:38:39 +00:00
|
|
|
|
2022-05-26 04:51:19 +00:00
|
|
|
# Copy galaxy.yml for the collection build
|
2023-02-03 08:09:41 +00:00
|
|
|
cp %{rolename}/.collection/galaxy.yml ./
|
2022-07-08 14:10:20 +00:00
|
|
|
|
|
|
|
%if 0%{?rhel}
|
2023-02-03 08:09:41 +00:00
|
|
|
# Ensure the correct entries in galaxy.yml
|
2023-06-13 10:33:58 +00:00
|
|
|
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
|
2022-06-21 01:27:08 +00:00
|
|
|
"Ansible collection for Microsoft SQL Server management" \
|
|
|
|
"https://github.com/linux-system-roles/mssql" \
|
2024-01-31 11:38:39 +00:00
|
|
|
"https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/automating_system_administration_by_using_rhel_system_roles/assembly_configuring-microsoft-sql-server-using-microsoft-sql-server-ansible-role_automating-system-administration-by-using-rhel-system-roles" \
|
|
|
|
"https://access.redhat.com/articles/3050101" \
|
|
|
|
"https://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12332745&summary=Your%20request%20summary&issuetype=1&priority=10200&labels=Partner-Feature-Request&components=12377164" \
|
2022-06-21 01:27:08 +00:00
|
|
|
> galaxy.yml.tmp
|
2022-07-08 14:10:20 +00:00
|
|
|
%else
|
2023-06-13 10:33:58 +00:00
|
|
|
./galaxy_transform.py "%{collection_namespace}" "%{collection_name}" "%{collection_version}" \
|
2022-07-08 14:10:20 +00:00
|
|
|
"Ansible collection for Microsoft SQL Server management" \
|
|
|
|
> galaxy.yml.tmp
|
|
|
|
%endif
|
2022-05-26 04:51:19 +00:00
|
|
|
mv galaxy.yml.tmp galaxy.yml
|
|
|
|
|
2022-07-08 14:10:20 +00:00
|
|
|
%if 0%{?rhel}
|
2023-02-18 00:14:39 +00:00
|
|
|
# Replace "fedora.linux_system_roles" with "redhat.rhel_system_roles"
|
|
|
|
# This is for the "roles calling other roles" case
|
2023-06-13 10:33:58 +00:00
|
|
|
find . -type f -exec \
|
|
|
|
sed -e "s/fedora\.linux_system_roles/redhat.rhel_system_roles/g" \
|
2023-02-18 00:14:39 +00:00
|
|
|
-i {} \;
|
2022-07-08 14:10:20 +00:00
|
|
|
%endif
|
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
# Convert to the collection format
|
|
|
|
python3 lsr_role2collection.py --role "%{rolename}" \
|
|
|
|
--src-path "%{rolename}" \
|
|
|
|
--src-owner linux-system-roles \
|
|
|
|
--dest-path .collections \
|
2024-01-31 11:38:39 +00:00
|
|
|
--readme %{rolename}/.collection/README.md \
|
2023-02-03 08:09:41 +00:00
|
|
|
--namespace %{collection_namespace} \
|
|
|
|
--collection %{collection_name} \
|
|
|
|
--new-role "%{collection_rolename}" \
|
|
|
|
--meta-runtime lsr_role2collection/runtime.yml
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2023-02-18 00:14:39 +00:00
|
|
|
# Replace remnants of "linux-system-roles.mssql" with collection FQDN
|
|
|
|
find .collections/ansible_collections/%{collection_namespace}/%{collection_name}/ -type f -exec \
|
|
|
|
sed -e "s/linux-system-roles[.]%{rolename}\\>/%{collection_namespace}.%{collection_name}.%{collection_rolename}/g" \
|
|
|
|
-i {} \;
|
|
|
|
|
2022-05-26 04:51:19 +00:00
|
|
|
# removing dot files/dirs
|
|
|
|
rm -r .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.[A-Za-z]*
|
2023-02-03 08:09:41 +00:00
|
|
|
rm -r .collections/ansible_collections/%{collection_namespace}/%{collection_name}/tests/%{collection_rolename}/.[A-Za-z]*
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
# Copy CHANGELOG.md from collection role to parent collection dir
|
|
|
|
cp .collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/%{collection_rolename}/CHANGELOG.md \
|
|
|
|
.collections/ansible_collections/%{collection_namespace}/%{collection_name}
|
|
|
|
|
2022-05-26 04:51:19 +00:00
|
|
|
# Copy galaxy.yml to the collection directory
|
|
|
|
cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name}
|
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
# Build collection
|
|
|
|
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
|
|
|
%ansible_collection_build
|
|
|
|
popd
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{ansible_roles_dir}
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
# Step 1: Install the role in legacy format
|
2023-02-03 08:09:41 +00:00
|
|
|
# Copy role in legacy format and rename rolename in tests
|
|
|
|
cp -pR "%{rolename}" "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}"
|
2023-02-18 00:14:39 +00:00
|
|
|
find %{buildroot}%{ansible_roles_dir}/%{legacy_rolename} -type f -exec \
|
2024-02-06 11:47:32 +00:00
|
|
|
sed -e "s/%{collection_namespace}\.%{collection_name}\.%{collection_rolename}/%{legacy_rolename}/g" \
|
2023-02-18 00:14:39 +00:00
|
|
|
-i {} \;
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2024-02-06 11:47:32 +00:00
|
|
|
# Copy README, COPYING, CHANGELOG and LICENSE files to the corresponding directories
|
2023-02-03 08:09:41 +00:00
|
|
|
mkdir -p %{buildroot}%{_pkglicensedir}
|
|
|
|
mkdir -p "%{buildroot}%{_pkgdocdir}/%{legacy_rolename}"
|
|
|
|
ln -sr "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/README.md" \
|
|
|
|
"%{buildroot}%{_pkgdocdir}/%{legacy_rolename}"
|
|
|
|
ln -sr "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/README.html" \
|
|
|
|
"%{buildroot}%{_pkgdocdir}/%{legacy_rolename}"
|
2024-02-06 11:47:32 +00:00
|
|
|
ln -sr "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/CHANGELOG.md" \
|
|
|
|
"%{buildroot}%{_pkgdocdir}/%{legacy_rolename}"
|
2023-02-03 08:09:41 +00:00
|
|
|
if [ -f "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/COPYING" ]; then
|
|
|
|
ln -sr "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/COPYING" \
|
|
|
|
"%{buildroot}%{_pkglicensedir}/%{legacy_rolename}.COPYING"
|
|
|
|
fi
|
|
|
|
if [ -f "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/LICENSE" ]; then
|
|
|
|
ln -sr "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/LICENSE" \
|
|
|
|
"%{buildroot}%{_pkglicensedir}/%{legacy_rolename}.LICENSE"
|
|
|
|
fi
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
# Remove dot files
|
2023-02-03 08:09:41 +00:00
|
|
|
rm -r %{buildroot}%{ansible_roles_dir}/*/.[A-Za-z]*
|
|
|
|
rm -r %{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/tests/.[A-Za-z]*
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
# Step 2: Remove molecule directory from all roles under ansible_roles_dir
|
2023-02-03 08:09:41 +00:00
|
|
|
rm -r %{buildroot}%{ansible_roles_dir}/*/molecule
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
# Step 3: Install the role in collection format
|
2022-05-26 04:51:19 +00:00
|
|
|
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
2023-02-03 08:09:41 +00:00
|
|
|
%ansible_collection_install
|
2022-05-26 04:51:19 +00:00
|
|
|
popd
|
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
mkdir -p %{buildroot}%{_pkgdocdir}/collection/roles
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
# Link collection README to /usr/share/doc/ansible-collection-microsoft-sql/collection.
|
2023-02-03 08:09:41 +00:00
|
|
|
ln -sr %{buildroot}%{ansible_collection_files}%{collection_name}/README.md \
|
|
|
|
%{buildroot}%{_pkgdocdir}/collection
|
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
# Link role READMEs to /usr/share/doc/ansible-collection-microsoft-sql/collection/roles/server
|
|
|
|
mkdir -p %{buildroot}%{_pkgdocdir}/collection/roles/%{collection_rolename}
|
|
|
|
ln -sr %{buildroot}%{ansible_collection_files}%{collection_name}/roles/%{collection_rolename}/README.md \
|
|
|
|
%{buildroot}%{_pkgdocdir}/collection/roles/%{collection_rolename}
|
|
|
|
ln -sr %{buildroot}%{ansible_collection_files}%{collection_name}/roles/%{collection_rolename}/README.html \
|
|
|
|
%{buildroot}%{_pkgdocdir}/collection/roles/%{collection_rolename}
|
2022-05-26 04:51:19 +00:00
|
|
|
|
2024-02-06 11:47:32 +00:00
|
|
|
# Link role CHANGELOG.md to /usr/share/doc/ansible-collection-microsoft-sql/collection/roles/server
|
|
|
|
ln -sr %{buildroot}%{ansible_collection_files}%{collection_name}/roles/%{collection_rolename}/CHANGELOG.md \
|
|
|
|
%{buildroot}%{_pkgdocdir}/collection/roles/%{collection_rolename}
|
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
# Step 4: Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
2022-05-26 04:51:19 +00:00
|
|
|
%if %{with collection_artifact}
|
|
|
|
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
2023-06-13 10:33:58 +00:00
|
|
|
if [ -f %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz ]; then
|
|
|
|
mv %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz \
|
2023-02-03 08:09:41 +00:00
|
|
|
%{buildroot}%{_datadir}/ansible/collections/
|
2022-05-26 04:51:19 +00:00
|
|
|
fi
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
# Step 5: Generate the %%files section in files_section.txt
|
2023-02-03 08:09:41 +00:00
|
|
|
# Bulk files inclusion is not possible because roles store doc and licence
|
|
|
|
# files together with other files
|
2022-05-26 04:51:19 +00:00
|
|
|
format_item_for_files() {
|
|
|
|
# $1 is directory or file name in buildroot
|
2023-02-03 08:09:41 +00:00
|
|
|
# $2 - if true, and item is a directory, use %%dir
|
2022-05-26 04:51:19 +00:00
|
|
|
local item
|
|
|
|
local files_item
|
2023-02-03 08:09:41 +00:00
|
|
|
item="$1" # full path including buildroot
|
|
|
|
files_item=${item##"%{buildroot}"} # path with cut buildroot to be added to %%files
|
2022-05-26 04:51:19 +00:00
|
|
|
if [ -L "$item" ]; then
|
|
|
|
echo "$files_item"
|
|
|
|
elif [ -d "$item" ]; then
|
|
|
|
if [[ "$item" == */doc* ]]; then
|
|
|
|
echo "%doc $files_item"
|
|
|
|
elif [ "${2:-false}" = true ]; then
|
|
|
|
echo "%dir $files_item"
|
|
|
|
else
|
|
|
|
echo "$files_item"
|
|
|
|
fi
|
2023-02-03 08:09:41 +00:00
|
|
|
elif [[ "$item" == */README.md ]] || [[ "$item" == */README.html ]] || [[ "$item" == */CHANGELOG.md ]]; then
|
2022-05-26 04:51:19 +00:00
|
|
|
if [[ "$item" == */private_* ]]; then
|
2023-02-03 08:09:41 +00:00
|
|
|
# mark as regular file, not %%doc
|
2022-05-26 04:51:19 +00:00
|
|
|
echo "$files_item"
|
|
|
|
else
|
|
|
|
echo "%doc $files_item"
|
|
|
|
fi
|
2023-02-03 08:09:41 +00:00
|
|
|
elif [[ "$item" == */COPYING* ]] || [[ "$item" == */LICENSE* ]]; then
|
|
|
|
echo "%""%""license" "$files_item"
|
|
|
|
else
|
2022-05-26 04:51:19 +00:00
|
|
|
echo "$files_item"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
files_section=files_section.txt
|
|
|
|
rm -f $files_section
|
|
|
|
touch $files_section
|
2023-02-03 08:09:41 +00:00
|
|
|
# Dynamically generate files section entries for %%{ansible_collection_files}
|
2022-05-26 04:51:19 +00:00
|
|
|
find %{buildroot}%{ansible_collection_files}%{collection_name} -mindepth 1 -maxdepth 1 | \
|
|
|
|
while read item; do
|
|
|
|
if [[ "$item" == */roles ]]; then
|
|
|
|
format_item_for_files "$item" true >> $files_section
|
|
|
|
find "$item" -mindepth 1 -maxdepth 1 | while read roles_dir; do
|
|
|
|
format_item_for_files "$roles_dir" true >> $files_section
|
|
|
|
find "$roles_dir" -mindepth 1 -maxdepth 1 | while read roles_item; do
|
|
|
|
format_item_for_files "$roles_item" >> $files_section
|
|
|
|
done
|
|
|
|
done
|
|
|
|
else
|
|
|
|
format_item_for_files "$item" >> $files_section
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
# Dynamically generate files section entries for %%{ansible_roles_dir}
|
|
|
|
find %{buildroot}%{ansible_roles_dir} -mindepth 1 -maxdepth 1 | \
|
2022-05-26 04:51:19 +00:00
|
|
|
while read item; do
|
|
|
|
if [ -d "$item" ]; then
|
|
|
|
format_item_for_files "$item" true >> $files_section
|
|
|
|
find "$item" -mindepth 1 -maxdepth 1 | while read roles_item; do
|
|
|
|
format_item_for_files "$roles_item" >> $files_section
|
|
|
|
done
|
|
|
|
else
|
|
|
|
format_item_for_files "$item" >> $files_section
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
%files -f files_section.txt
|
2023-02-03 08:09:41 +00:00
|
|
|
%dir %{_datadir}/ansible
|
|
|
|
%dir %{ansible_roles_dir}
|
|
|
|
%dir %{ansible_collection_files}
|
|
|
|
%dir %{ansible_collection_files}%{collection_name}
|
|
|
|
%doc %{_pkgdocdir}
|
|
|
|
%license %{_pkglicensedir}
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
%if %{with collection_artifact}
|
|
|
|
%files collection-artifact
|
2023-06-13 10:33:58 +00:00
|
|
|
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
|
2022-05-26 04:51:19 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|
2024-02-27 16:00:32 +00:00
|
|
|
* Thu Feb 27 2024 Sergei Petrosian <spetrosi@redhat.com> - 2.2.3-2
|
|
|
|
- Revert ExcludeArch: i686 due to TFT-2460
|
|
|
|
Resolves: RHEL-17080
|
|
|
|
|
2024-02-22 20:31:03 +00:00
|
|
|
* Thu Feb 22 2024 Sergei Petrosian <spetrosi@redhat.com> - 2.2.3-1
|
|
|
|
- Add support for running SQL Server as a SELinux unconfined application with SELinux in enforcing mode on RHEL 9
|
|
|
|
Resolves: RHEL-17080
|
|
|
|
- ExcludeArch: i686
|
|
|
|
|
2024-02-06 11:47:32 +00:00
|
|
|
* Tue Feb 6 2024 Sergei Petrosian <spetrosi@redhat.com> - 2.2.2-1
|
|
|
|
- Update role to version 2.2.2 to fix HA
|
|
|
|
Resolves: RHEL-19202
|
|
|
|
- CHANGELOG.md was missing in some places
|
|
|
|
- In legacy role, sed repalced unexpected strings at some places
|
|
|
|
Resolves: RHEL-23456
|
|
|
|
|
2024-01-31 11:38:39 +00:00
|
|
|
* Wed Jan 31 2024 Sergei Petrosian <spetrosi@redhat.com> - 2.2.1-2
|
|
|
|
- Use latest auto-maintenance for updates in lsr_role2collection.py
|
|
|
|
- Remove with_html, instead use built-in .README.html
|
|
|
|
Resolves: RHEL-23456
|
|
|
|
|
2024-01-29 14:01:48 +00:00
|
|
|
* Mon Jan 29 2024 Sergei Petrosian <spetrosi@redhat.com> - 2.2.1-1
|
|
|
|
- Update role to version 2.2.1 to enhance running on EL 9
|
|
|
|
Resolves: RHEL-17080
|
|
|
|
|
2023-12-12 09:11:40 +00:00
|
|
|
* Mon Dec 11 2023 Sergei Petrosian <spetrosi@redhat.com> - 2.2.0-1
|
|
|
|
- Support installing SQL Server 2022 on RHEL 9 and running as a selinux-confined application
|
|
|
|
Resolves: RHEL-17080
|
|
|
|
- Remove unnecessary variable and RPM requirements for read-scale clusters
|
|
|
|
Resolves: RHEL-19202
|
|
|
|
- Add the mssql_ha_prep_for_pacemaker variable to configure SQL Server for Pacemaker
|
|
|
|
Resolves: RHEL-19204
|
|
|
|
- Deprecate `mssql_ha_cluster_run_role` for `mssql_manage_ha_cluster`
|
|
|
|
Resolves: RHEL-19203
|
|
|
|
|
2023-07-28 11:14:25 +00:00
|
|
|
* Thu Jul 27 2023 Sergei Petrosian <spetrosi@redhat.com> - 2.0.1-1
|
|
|
|
- Update role to version 2.0.1 to enhance AD integration
|
|
|
|
Resolves: RHEL-877
|
|
|
|
Resolves: RHEL-878
|
|
|
|
Resolves: RHEL-879
|
|
|
|
Resolves: RHEL-880
|
|
|
|
|
2023-06-13 10:33:58 +00:00
|
|
|
* Wed May 31 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.4.1-1
|
|
|
|
- Update BuiildRequires to use ansible-core on RHEL > 8.8
|
|
|
|
- Move RHEL related code into an include for spec readability
|
|
|
|
- Update role to version 1.4.1 to add customizable storage paths
|
|
|
|
Resolves: RHEL-528
|
|
|
|
|
2023-02-28 18:11:36 +00:00
|
|
|
* Thu Feb 23 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.3.0-3
|
|
|
|
- Spec: add functionality to build from a commit hash
|
|
|
|
- Use latest 1.3.0 to add flexibility to AD integration functionality
|
|
|
|
Resolves: rhbz#2163696
|
|
|
|
|
2023-02-18 00:14:39 +00:00
|
|
|
* Thu Feb 16 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.3.0-2
|
|
|
|
- Replace fedora.linux_system_roles/redhat.rhel_system_roles and
|
|
|
|
linux-system-roles.mssql with microsoft.sql.server in the role.
|
|
|
|
Resolves: rhbz#2129106
|
|
|
|
- Use latest 1.3.0 to fix ad_Integration issues
|
|
|
|
Resolves: rhbz#2163696
|
|
|
|
|
2023-02-03 08:09:41 +00:00
|
|
|
* Wed Feb 1 2023 Sergei Petrosian <spetrosi@redhat.com> - 1.3.0-1
|
|
|
|
- Keep spec consistent with linux-system-roles
|
|
|
|
- Return conditionals related to EL to keep up- and downstream consistent
|
|
|
|
- Add pretrans scriplet to remove symlinks if exist to fix issue with update
|
|
|
|
- Instead of copying doc and license files create symlinks
|
|
|
|
- Dynamically generate %%files section
|
|
|
|
- Add -t to md2html to generate TOC
|
|
|
|
Resolves: rhbz#2129106
|
|
|
|
- On SQL Server Enterprise Edition, support configuring asynchronous replication
|
|
|
|
Resolves: rhbz#2144820
|
|
|
|
- Support configuring a read-scale SQL server availability group (without pacemaker
|
|
|
|
Resolves: rhbz#2144821
|
|
|
|
- Use the certificate role to create the cert and the key
|
|
|
|
Resolves: rhbz#2144852
|
|
|
|
- Support SQL Server version 2022
|
|
|
|
Resolves: rhbz#2153427
|
|
|
|
- Support integrating with AD Server for authentication
|
|
|
|
Resolves: rhbz#2163696
|
|
|
|
|
|
|
|
* Thu Sep 22 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.4-2
|
|
|
|
- Simplify spec file
|
|
|
|
- Do not install roles to /usr/share/microsoft and then create symlinks
|
|
|
|
to /usr/share/ansible/roles/, instead install directly to
|
|
|
|
/usr/share/ansible/roles/
|
|
|
|
- Remove unused removal of ambiguous python shebangs
|
|
|
|
- Remove all loops because this RPM contains only one role
|
|
|
|
- Remove defsource - simply define the source for mssql
|
|
|
|
- 's|$RPM_BUILD_ROOT|%%{buildroot}|' for consistency
|
|
|
|
- Remove getarchivedir for simplicity
|
|
|
|
- Wrap description by 80 symbols and clarify it
|
|
|
|
- Remove tests/.fmf dir from the RPM
|
|
|
|
Resolves: rhbz#2129106
|
|
|
|
|
2022-09-03 10:10:48 +00:00
|
|
|
* Thu Sep 1 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.4-1
|
|
|
|
- Replicate all provided databases
|
|
|
|
- This change fixes the bug where only the first database provided with
|
|
|
|
mssql_ha_db_names got replicated
|
|
|
|
- Clarify that the role does not remove not listed databases
|
2023-02-03 08:09:41 +00:00
|
|
|
Resolves: rhbz#2129869
|
2022-09-03 10:10:48 +00:00
|
|
|
- Input multiple sql scripts
|
|
|
|
- Allow _input_sql_file vars to accept list of files
|
|
|
|
- Flush handlers prior to inputting post sql script
|
2023-02-03 08:09:41 +00:00
|
|
|
Resolves: rhbz#2129872
|
2022-09-03 10:10:48 +00:00
|
|
|
- Note that ha_cluster is not idempotent
|
|
|
|
- SPEC: Do not update dates in CHANGELOG.md
|
|
|
|
|
2022-08-26 16:12:16 +00:00
|
|
|
* Thu Aug 25 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.3-1
|
|
|
|
- Use firewall role to configure firewall for SQL Server
|
|
|
|
Resolves: rhbz#2120714
|
|
|
|
- Add mssql_ha_virtual_ip
|
|
|
|
Replace mssql_ha_db_name with mssql_ha_db_names to let users replicate multiple DBs
|
|
|
|
Resolves: rhbz#2066338
|
|
|
|
- Replace simple `mssql_input_sql_file` with `pre` and `post` variables
|
|
|
|
Resolves: rhbz#2120713
|
|
|
|
- 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
|
|
|
|
|
2022-07-08 14:10:20 +00:00
|
|
|
* Mon Jul 4 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-3
|
|
|
|
- Update mssql commit
|
|
|
|
Resolves: rhbz#2066338
|
|
|
|
- Add condition for upstream spec build for galaxy_transform
|
|
|
|
- Replace extra-mapping with replacing in the legacy format with sed
|
|
|
|
|
2022-06-21 01:27:08 +00:00
|
|
|
* Fri Jun 17 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-2
|
|
|
|
Return mistakenly deleted galaxy.yml string and bump release
|
|
|
|
|
|
|
|
* Fri Jun 17 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.2.0-1
|
|
|
|
- Add MVP HA functionality to the server role
|
|
|
|
Resolves: rhbz#2066338
|
|
|
|
- Add mssql_tls_remote_src to the server role
|
|
|
|
Resolves: rhbz#2039990
|
|
|
|
- Add Requires: linux-system-roles or rhel-system-roles
|
|
|
|
- Add downstream values to galaxy.yml
|
|
|
|
|
2022-05-26 04:51:19 +00:00
|
|
|
* Mon Mar 21 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.1.1-3
|
|
|
|
- Fix inserting ansible_managed
|
2022-06-21 01:27:08 +00:00
|
|
|
Resolves: rhbz#2065206
|
2022-05-26 04:51:19 +00:00
|
|
|
- Users now can provide a custom URLs to pull packages and RPM key from
|
2022-06-21 01:27:08 +00:00
|
|
|
Resolves: rhbz#2067175
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
* Fri Mar 18 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.1.1-2
|
|
|
|
- RHEL8.6, 9 - add "Requires: ansible-core or ansible"
|
2022-06-21 01:27:08 +00:00
|
|
|
Resolves: rhbz#2067172
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
* 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
|
2022-06-21 01:27:08 +00:00
|
|
|
Resolves rhbz#2065206
|
2022-05-26 04:51:19 +00:00
|
|
|
|
|
|
|
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
* 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
|
|
|
|
- Add support for Microsoft SQL Server 2017
|
|
|
|
|
|
|
|
* Mon Jul 19 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.0.12-2
|
|
|
|
- Copy fix for RHEL 7 builds from rhel-system-roles
|
|
|
|
Link to the original fix:
|
|
|
|
https://src.fedoraproject.org/rpms/linux-system-roles/c/093981119f99ac51a6e06a2714b587e4e2fe287c
|
|
|
|
|
|
|
|
* Tue Jul 13 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.0.12-1
|
|
|
|
- Add the meta-runtime option from the latest auto-maintenance
|
|
|
|
- Use the latest mssql that ships fixes for issues #24,#25,#26,#27,#28,35
|
|
|
|
|
|
|
|
* Tue Jun 29 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.0.11-3
|
|
|
|
- Add a missing slash at the {ansible_collection_files} definition for rhel 7
|
|
|
|
|
|
|
|
* Thu Jun 17 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.0.11-2
|
|
|
|
- Make the ansible_collection_files macro defined in Fedora automatically and
|
|
|
|
in RHEL manually consistent - having slash at the end to clean double-slashes
|
|
|
|
|
|
|
|
* Thu Jun 17 2021 Sergei Petrosian <spetrosi@redhat.com> - 1.0.11-1
|
|
|
|
- Update the version to be consistent with the Galaxy collection at
|
|
|
|
https://galaxy.ansible.com/microsoft/sql
|
|
|
|
|
|
|
|
* Wed Jun 16 2021 Sergei Petrosian <spetrosi@redhat.com> - 0.0.1-5
|
|
|
|
- Update commit hash for mssql
|
|
|
|
|
|
|
|
* Wed Jun 16 2021 Sergei Petrosian <spetrosi@redhat.com> - 0.0.1-4
|
|
|
|
- Generate symlinks for roles in /usr/share/ansible/roles
|
|
|
|
|
|
|
|
* Wed Jun 16 2021 Sergei Petrosian <spetrosi@redhat.com> - 0.0.1-3
|
|
|
|
- Copy changes made to linux-system-roles in this PR:
|
|
|
|
https://src.fedoraproject.org/rpms/linux-system-roles/pull-request/13#
|
|
|
|
- Make spec file available for older versions of OSes.
|
|
|
|
- Drop python3-six dependency which was used by lsr_role2collection.py.
|
|
|
|
- Drop html files from rpm if the version has no markdown parser.
|
|
|
|
- Drop unnecessary python scripts which include python3 only code, e.g.,
|
|
|
|
f-strings.
|
|
|
|
Resolves rhbz#1970165
|
|
|
|
|
|
|
|
* Mon Jun 14 2021 Sergei Petrosian <spetrosi@redhat.com> - 0.0.1-2
|
|
|
|
- Fix long description lines
|
|
|
|
- Fix incorrect role includes in microsoft/sql-server/tests/
|
|
|
|
|
|
|
|
* Thu Jun 3 2021 Sergei Petrosian <spetrosi@redhat.com> - 0.0.1-1
|
|
|
|
- Initial release
|