The spec file has seen tabs versus spaces fixes a number of times now.
In 096bf89 (2.0.0, 2021-06-03), the spec file was rewritten and all
spaces were replaced with tabs in the tags. Previous fixes included:
- dbfdbf0 (Fix mixed-use-of-spaces-and-tabs warning (in this spec
file), 2018-06-17)
- c74c9bf (Fix mixed-use-of-spaces-and-tabs warning, 2018-05-03)
- 85118ac (... Keep consistent between spaces and tabs, 2005-03-04)
Replace tabs once again as they are not commonly used in spec files and
lead to rpmlint warnings. If we cannot avoid such warnings here, it's a
bit silly to expect others to do so.
We BR the test dependencies unconditionally. Run the tests as well.
Avoid warnings about pytest.mark.no_cover marker; we disable disable
coverage entirely.
Sync the fedora.toml and users-groups.toml configs from upstream.
Change the zstd dependency to zstandard, following upstream 463bef3f
(Use different Python package for ZStandard, 2022-01-03).
Adjust python-magic dependency to file-magic. We already BR file-magic for
the test suite. This ensures we install what we tested and avoids the
problem of python3-file-magic conflicting and obsoleting python3-magic
without providing the same python-dist values¹.
¹ https://bugzilla.redhat.com/1899279
otherwise spec file cannot be parsed and users are getting this odd
error:
python-ogr.spec: E: specfile-error rpm: /usr/bin/rpmspec: No such file
or directory
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Linters and test coverage makes sense in upstream CI, but not that much in Fedora.
This makes testing rpmlint with newer Python releases easier.
It also partially unblocks the Python 3.10 rebuild.
Before:
$ rpmlint python-setuptools.spec
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 58: %endif # with tests
python-setuptools.spec: E: specfile-error
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 67: %endif # without bootstrap
python-setuptools.spec: E: specfile-error
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 181: %endif # with tests
0 packages and 1 specfiles checked; 5 errors, 0 warnings.
After:
$ rpmlint python-setuptools.spec
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 58: %endif # with tests
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 67: %endif # without bootstrap
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 181: %endif # with tests
0 packages and 1 specfiles checked; 3 errors, 0 warnings.