The rpm package contains collection README.html files only in
%_pkgdocdir and its subdirs, but the collection artifact tarball has README.html in each roles/ROLE directory along with README.md. Fixing it to make the collection artifact tarball consistent with the collection part in rpm. Related: rhbz#1961404 Following bz's are solved with the previous rebases. Related: rhbz#1935957 storage: An unhandled exception occurred while running the lookup plugin 'first_found'. Related: rhbz#1944296 certificate: ipa-server package missing in RHEL-9 - Failed: Ensure that IPA server packages are installed Related: rhbz#1944557 tlog: Always install sssd.conf to enable files domain Related: rhbz#1944561 crypto_policies: The NO-CAMELLIA is not available in RHEL9 package anymore. Use a module that is available in all systems Related: rhbz#1944579 ssh: Add support for RHEL-9 in meta/main.yml, add file vars/RedHat_9.yml Related: rhbz#1945337 nbde_client: /bin/sh: line 1: cryptsetup: command not found Related: rhbz#1945359 selinux umount: /sys/fs/selinux: target is busy. Related: rhbz#1945376 ssh: file not found: file not found: /etc/ssh/ssh_config.d/00-ansible.conf Related: rhbz#1945378 ssh: file not found: /etc/ssh/ssh_config.d/99-last.conf Related: rhbz#1945380 ssh: Check if the selected options are in 'Include /etc/ssh/ssh_config.d/*.conf' in config.content | b64decode Related: rhbz#1945385 ssh: options_before.stdout == options_after.stdout
This commit is contained in:
parent
6611d4664d
commit
a7186593d4
@ -54,17 +54,11 @@ BuildRequires: ansible >= 2.9.10
|
||||
%endif
|
||||
|
||||
%if %{without ansible}
|
||||
# Empty command. We don't have ansible-galaxy.
|
||||
%define ansible_collection_build() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .
|
||||
%else
|
||||
%define ansible_collection_build() ansible-galaxy collection build
|
||||
%endif
|
||||
|
||||
%if %{without ansible}
|
||||
# We don't have ansible-galaxy.
|
||||
# Simply copy everything instead of galaxy-installing the built artifact.
|
||||
%define ansible_collection_install() mkdir -p %{buildroot}%{ansible_collection_files}/%{collection_name}; (cd %{buildroot}%{ansible_collection_files}/%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz)
|
||||
%define ansible_collection_build_install() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .; mkdir -p %{buildroot}%{ansible_collection_files}/%{collection_name}; (cd %{buildroot}%{ansible_collection_files}/%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz)
|
||||
%else
|
||||
%define ansible_collection_install() 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
|
||||
|
||||
# For each role, call either defcommit() or deftag(). The other macros
|
||||
@ -342,13 +336,6 @@ sed -i -e 's/^\(## Table of Contents\)/## Background\n\1/' \
|
||||
sed -i -e '/^## Table of Contents/,/^## Background/d' \
|
||||
.collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/logging/README.md
|
||||
|
||||
# converting README.md to README.html for collection
|
||||
readmes=".collections/ansible_collections/%{collection_namespace}/%{collection_name}/README.md"
|
||||
for role in %{rolenames}; do
|
||||
readmes="${readmes} .collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/$role/README.md"
|
||||
done
|
||||
sh md2html.sh $readmes
|
||||
|
||||
# Remove internal links from readme files
|
||||
# They are not rendered properly on AH.
|
||||
for role in %{rolenames}; do
|
||||
@ -356,10 +343,6 @@ for role in %{rolenames}; do
|
||||
.collections/ansible_collections/%{collection_namespace}/%{collection_name}/roles/$role/README.md
|
||||
done
|
||||
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
%ansible_collection_build
|
||||
popd
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{installbase}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
|
||||
@ -424,29 +407,30 @@ rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/tests/.git*
|
||||
# must be updated if changing the file path
|
||||
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
%ansible_collection_install
|
||||
%ansible_collection_build_install
|
||||
popd
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles
|
||||
|
||||
cp -p %{buildroot}%{ansible_collection_files}/%{collection_name}/README.md \
|
||||
%{buildroot}%{ansible_collection_files}/%{collection_name}/README.html \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/collection
|
||||
# no html files in collection directory
|
||||
rm -f %{buildroot}%{ansible_collection_files}/%{collection_name}/README.html
|
||||
|
||||
for rolename in %{rolenames}; do
|
||||
if [ -f %{buildroot}%{ansible_collection_files}/%{collection_name}/roles/${rolename}/README.md ]; then
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
|
||||
cp -p %{buildroot}%{ansible_collection_files}/%{collection_name}/roles/${rolename}/README.md \
|
||||
%{buildroot}%{ansible_collection_files}/%{collection_name}/roles/${rolename}/README.html \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
|
||||
# no html files in collection directory
|
||||
rm -f %{buildroot}%{ansible_collection_files}/%{collection_name}/roles/${rolename}/README.html
|
||||
fi
|
||||
done
|
||||
|
||||
# converting README.md to README.html for collection in $RPM_BUILD_ROOT%{_pkgdocdir}/collection
|
||||
readmes="$RPM_BUILD_ROOT%{_pkgdocdir}/collection/README.md"
|
||||
for role in %{rolenames}; do
|
||||
readmes="${readmes} $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${role}/README.md"
|
||||
done
|
||||
sh md2html.sh $readmes
|
||||
|
||||
%if %{with collection_artifact}
|
||||
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
|
Loading…
Reference in New Issue
Block a user