Fixes for general-meta tests

This commit is contained in:
Sergei Petrosian 2024-02-01 19:32:40 +01:00 committed by root
parent bee761069a
commit 93d842e994
2 changed files with 16 additions and 3 deletions

View File

@ -0,0 +1,2 @@
b0ee52fd3c4f8d57f2414bee6b1a944f9002b13f auto-maintenance-eadd06cfa98d244b096cff24cd11b668428b1613.tar.gz
6524470bfbe13ea2e02cab66f259a4cbd5b74e17 mssql-2.2.1.tar.gz

View File

@ -15,7 +15,7 @@ Name: ansible-collection-microsoft-sql
Url: https://github.com/linux-system-roles/mssql
Summary: The Ansible collection for Microsoft SQL Server management
Version: 2.2.1
Release: 2%{?dist}
Release: 3%{?dist}
License: MIT
@ -172,16 +172,18 @@ mkdir -p %{buildroot}%{ansible_roles_dir}
# Copy role in legacy format and rename rolename in tests
cp -pR "%{rolename}" "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}"
find %{buildroot}%{ansible_roles_dir}/%{legacy_rolename} -type f -exec \
sed -e "s/%{collection_namespace}.%{collection_name}.%{collection_rolename}/%{legacy_rolename}/g" \
sed -e "s/%{collection_namespace}\.%{collection_name}\.%{collection_rolename}/%{legacy_rolename}/g" \
-i {} \;
# Copy README, COPYING, and LICENSE files to the corresponding directories
# Copy README, COPYING, CHANGELOG and LICENSE files to the corresponding directories
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}"
ln -sr "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/CHANGELOG.md" \
"%{buildroot}%{_pkgdocdir}/%{legacy_rolename}"
if [ -f "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/COPYING" ]; then
ln -sr "%{buildroot}%{ansible_roles_dir}/%{legacy_rolename}/COPYING" \
"%{buildroot}%{_pkglicensedir}/%{legacy_rolename}.COPYING"
@ -216,6 +218,10 @@ ln -sr %{buildroot}%{ansible_collection_files}%{collection_name}/roles/%{collect
ln -sr %{buildroot}%{ansible_collection_files}%{collection_name}/roles/%{collection_rolename}/README.html \
%{buildroot}%{_pkgdocdir}/collection/roles/%{collection_rolename}
# 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}
# Step 4: Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
%if %{with collection_artifact}
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
@ -306,6 +312,11 @@ find %{buildroot}%{ansible_roles_dir} -mindepth 1 -maxdepth 1 | \
%endif
%changelog
* Fri Feb 2 2024 Sergei Petrosian <spetrosi@redhat.com> - 2.2.1-3
- CHANGELOG.md was missing in some places
- In legacy role, sed repalced unexpected strings at some places
Resolves: RHEL-23455
* 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