README.html files (main README for the collection and README for
each role) will not be located in /usr/share/ansible/collections, but just put in /usr/share/doc/linux-system-roles/collection in rpm. The README.html files are not included in the collection artifact. Related: rhbz#1961404
This commit is contained in:
parent
031963c284
commit
37a0a35ee7
@ -163,7 +163,7 @@ BuildRequires: ansible >= 2.9.10
|
|||||||
%defcommit 17 779bb78559de58bb5a1f25a4b92039c373ef59a4
|
%defcommit 17 779bb78559de58bb5a1f25a4b92039c373ef59a4
|
||||||
%global rolename17 ha_cluster
|
%global rolename17 ha_cluster
|
||||||
|
|
||||||
%global mainid 8f069305caa0a142c2c6ac14bd4d331282a1c079
|
%global mainid e9e30b03c0fe9387cb0ea8a5e7aac8313de2deef
|
||||||
Source: %{url}auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
|
Source: %{url}auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
|
||||||
Source1: %{archiveurl1}
|
Source1: %{archiveurl1}
|
||||||
Source2: %{archiveurl2}
|
Source2: %{archiveurl2}
|
||||||
@ -392,6 +392,8 @@ cp -p galaxy.yml lsr_role2collection/.ansible-lint \
|
|||||||
|
|
||||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||||
|
|
||||||
|
%ansible_collection_build
|
||||||
|
|
||||||
# converting README.md to README.html
|
# converting README.md to README.html
|
||||||
sh ../../../../md2html.sh -l \
|
sh ../../../../md2html.sh -l \
|
||||||
README.md \
|
README.md \
|
||||||
@ -412,8 +414,26 @@ sh ../../../../md2html.sh -l \
|
|||||||
roles/%{rolename15}/README.md \
|
roles/%{rolename15}/README.md \
|
||||||
roles/%{rolename16}/README.md \
|
roles/%{rolename16}/README.md \
|
||||||
roles/%{rolename17}/README.md
|
roles/%{rolename17}/README.md
|
||||||
%ansible_collection_build
|
|
||||||
|
|
||||||
|
tar -cf - README.html \
|
||||||
|
roles/%{rolename1}/README.html \
|
||||||
|
roles/%{rolename2}/README.html \
|
||||||
|
roles/%{rolename3}/README.html \
|
||||||
|
roles/%{rolename4}/README.html \
|
||||||
|
roles/%{rolename5}/README.html \
|
||||||
|
roles/%{rolename6}/README.html \
|
||||||
|
roles/%{rolename7}/README.html \
|
||||||
|
roles/%{rolename8}/README.html \
|
||||||
|
roles/%{rolename9}/README.html \
|
||||||
|
roles/%{rolename10}/README.html \
|
||||||
|
roles/%{rolename11}/README.html \
|
||||||
|
roles/%{rolename12}/README.html \
|
||||||
|
roles/%{rolename13}/README.html \
|
||||||
|
roles/%{rolename14}/README.html \
|
||||||
|
roles/%{rolename15}/README.html \
|
||||||
|
roles/%{rolename16}/README.html \
|
||||||
|
roles/%{rolename17}/README.html | \
|
||||||
|
(cd ../../../..; tar -xf -)
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -653,14 +673,13 @@ mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection
|
|||||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles
|
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles
|
||||||
|
|
||||||
cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/README.md \
|
cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/README.md \
|
||||||
%{buildroot}%{ansible_collection_files}%{collection_name}/README.html \
|
../../../../README.html $RPM_BUILD_ROOT%{_pkgdocdir}/collection
|
||||||
$RPM_BUILD_ROOT%{_pkgdocdir}/collection
|
|
||||||
|
|
||||||
for rolename in %{rolenames}; do
|
for rolename in %{rolenames}; do
|
||||||
if [ -f %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.md ]; then
|
if [ -f %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.md ]; then
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
|
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
|
||||||
cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.md \
|
cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.md \
|
||||||
%{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/README.html \
|
../../../../roles/%{rolename1}/README.html \
|
||||||
$RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
|
$RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -668,8 +687,8 @@ done
|
|||||||
%if %{with collection_artifact}
|
%if %{with collection_artifact}
|
||||||
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
||||||
if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then
|
if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then
|
||||||
mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \
|
mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \
|
||||||
$RPM_BUILD_ROOT%{_datadir}/ansible/collections/
|
$RPM_BUILD_ROOT%{_datadir}/ansible/collections/
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
popd
|
popd
|
||||||
@ -744,10 +763,6 @@ popd
|
|||||||
%doc %{ansible_collection_files}/%{collection_name}/roles/sshd/README.md
|
%doc %{ansible_collection_files}/%{collection_name}/roles/sshd/README.md
|
||||||
%doc %{ansible_collection_files}/%{collection_name}/roles/ssh/README.md
|
%doc %{ansible_collection_files}/%{collection_name}/roles/ssh/README.md
|
||||||
%doc %{ansible_collection_files}/%{collection_name}/roles/ha_cluster/README.md
|
%doc %{ansible_collection_files}/%{collection_name}/roles/ha_cluster/README.md
|
||||||
# can't use a glob for .md files, only for .html. .md files include READMEs
|
|
||||||
# for private subroles, and we don;t want to tag those as docs.
|
|
||||||
%doc %{ansible_collection_files}/%{collection_name}/README.html
|
|
||||||
%doc %{ansible_collection_files}/%{collection_name}/roles/*/README.html
|
|
||||||
|
|
||||||
%license %{_pkglicensedir}/*
|
%license %{_pkglicensedir}/*
|
||||||
%license %{installbase}/%{roleinstprefix}kdump/COPYING
|
%license %{installbase}/%{roleinstprefix}kdump/COPYING
|
||||||
@ -782,6 +797,10 @@ popd
|
|||||||
- Adding the -collection-artifact subpackage, enabled using
|
- Adding the -collection-artifact subpackage, enabled using
|
||||||
"--with collection_artifact". It is used for importing to
|
"--with collection_artifact". It is used for importing to
|
||||||
ansible galaxy/automation hub.
|
ansible galaxy/automation hub.
|
||||||
|
- README.html files (main README for the collection and README
|
||||||
|
for each role) are not located in /usr/share/ansible/collections,
|
||||||
|
but just put in /usr/share/doc/linux-system-roles/collection in rpm.
|
||||||
|
- The README.html files are not included in the collection artifact.
|
||||||
|
|
||||||
* Tue Apr 6 2021 Pavel Cahyna <pcahyna@redhat.com> - 1.0.1-1
|
* Tue Apr 6 2021 Pavel Cahyna <pcahyna@redhat.com> - 1.0.1-1
|
||||||
- Sync with RHEL version 1.0.1-1.el8
|
- Sync with RHEL version 1.0.1-1.el8
|
||||||
|
Loading…
Reference in New Issue
Block a user