https://bugzilla.redhat.com/show_bug.cgi?id=1893901
--- Comment #4 from Kevin Fenzi kevin@scrye.com --- (In reply to Robert-André Mauchin 🐧 from comment #3)
These are harmless I think:
ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/network/.travis.yml ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/network/templates/. git_keep ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/network/files/.git_keep ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/default/role/.travis.yml ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/default/role/templates/. git_keep ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/default/role/files/. git_keep ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/default/collection/ roles/.git_keep ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/default/collection/docs/ .git_keep ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/container/.travis.yml ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/container/templates/. git_keep ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/container/files/. git_keep ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/apb/.travis.yml ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/apb/templates/.git_keep ansible-base.noarch: W: hidden-file-or-dir /usr/lib/python3.9/site-packages/ansible/galaxy/data/apb/files/.git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible_test/_data/coveragerc ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible_test/_data/ansible.cfg ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/network/templates/. git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/network/files/.git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/default/role/templates/. git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/default/role/files/. git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/default/collection/ roles/.git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/default/collection/docs/ .git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/container/templates/. git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/container/files/. git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/apb/templates/.git_keep ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible/galaxy/data/apb/files/.git_keep
Please remove them.
I'm fine removing all the .git_keep and .travis.yml, but these two I think are used by ansible_test:
/usr/lib/python3.9/site-packages/ansible_test/_data/coveragerc ansible-base.noarch: E: zero-length /usr/lib/python3.9/site-packages/ansible_test/_data/ansible.cfg ansible-base.noarch: E: zero-length
- Would prefer you use %bcond_with/%bcond_without
%global with_tests 1
I suppose. I hate it's syntax, but sure.
- Please document why this patch is needed:
Patch1: 2.10.3-test-patch.patch
Done.
- Please don't forget to clean the Sphinx build leftovers here
%if 0%{?with_docs} make PYTHON=/usr/bin/python3 SPHINXBUILD=sphinx-build-3 webdocs %else
Can you expand on what build leftovers should be cleaned? Is there a guideline?
- manpages should not be marked as %doc:
Indeed. fixed.
%{_mandir}/man1/ansible*
- that don't work for whole dir, use:
%dir %{_sysconfdir}/ansible/ %config(noreplace) %{_sysconfdir}/ansible/*
Fixed.
- What the point of this:
cp -pr docs/docsite/rst . %if 0%{?with_docs} cp -pr docs/docsite/_build/html %{_builddir}/%{name}-%{version}/html %endif
You could directly include the docs with:
%files -n ansible-base-doc %doc docs/docsite/rst %if 0%{?with_docs} %doc docs/docsite/_build/html %endif
Yeah, you are right. Dropped that.
Here's the diff:
5c5 < %global with_docs 0 ---
%bcond_with docs
10c10 < %global with_tests 1 ---
%bcond_with tests
23d22 < Patch1: 2.10.3-test-patch.patch 30c29,33 < %if 0%{?with_tests} ---
# A 2.10.3 async test uses /usr/bin/python, which we do not have by default. # Patch the test to use /usr/bin/python3 as we have for our build. Patch1: 2.10.3-test-patch.patch
%if %{with tests}
58c61 < %if 0%{?with_docs} ---
%if %{with docs}
133c136 < %if 0%{?with_docs} ---
%if %{with docs}
170,171c173,174 < echo "The upstream Ansible datadir locations have changed. Spec file needs to be updated" < exit 1 ---
echo "The upstream Ansible datadir locations have changed. Spec file needs to be updated" exit 1
186,190d188 < cp -pr docs/docsite/rst . < %if 0%{?with_docs} < cp -pr docs/docsite/_build/html %{_builddir}/%{name}-%{version}/html < %endif < 194a193,196
# no need to ship zero length files find %{buildroot}/%{python3_sitelib} -name .git_keep -exec rm -f {} ; find %{buildroot}/%{python3_sitelib} -name .travis.yml -exec rm -f {} ;
196c198 < %if 0%{?with_tests} ---
%if %{with tests}
210,211c212,214 < %doc %{_mandir}/man1/ansible* < %config(noreplace) %{_sysconfdir}/ansible/ ---
%dir %{_sysconfdir}/ansible/ %config(noreplace) %{_sysconfdir}/ansible/* %{_mandir}/man1/ansible*
222,224c225,227 < %doc rst < %if 0%{?with_docs} < %doc html ---
%doc docs/docsite/rst %if %{with docs} %doc docs/docsite/_build/html
227a231,233
- Sat Nov 07 2020 Kevin Fenzi kevin@scrye.com - 2.10.3-2
- Various review fixes
Spec URL: https://www.scrye.com/~kevin/fedora/ansible-base-review/ansible-base.spec SRPM URL: https://www.scrye.com/~kevin/fedora/ansible-base-review/ansible-base-2.10.2-...
Thanks for the look!