Bug 1671790
| Summary: | Review Request: python-vistir - python library including utility functions | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Patrik Kopkan <pkopkan> |
| Component: | Package Review | Assignee: | Zbigniew Jędrzejewski-Szmek <zbyszek> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | eclipseo, mhroncok, package-review, zbyszek |
| Target Milestone: | --- | Flags: | zbyszek:
fedora-review+
|
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | python-vistir-0.4.3-1.fc31 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-07-22 11:51:30 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1664384, 1671787, 1671788 | ||
| Bug Blocks: | |||
|
Description
Patrik Kopkan
2019-02-01 16:38:49 UTC
Spec URL: https://pagure.io/python-vistir/raw/master/f/python-vistir.spec SRPM URL: https://pagure.io/python-vistir/raw/master/f/python-vistir-0.3.0-1.fc29.src.rpm I will not yet try to build this or assign this to me, but several notes:
Patch0: vistir-patch.patch
What is this? Why is it named "patch"? Please make the name as much descriptive as possible, add comment if needed.
# setuptools>=38.2.5
BuildRequires: python3-setuptools
Use the version limit or don't, there is no try. The comment is useless.
Requires: python3dist(colorama)
Requires: python3dist(requests)
Requires: python3dist(six)
Are those not added automatically?
# should be optional because they are bundled but doesn't work
Requires: python3-yaspin
Requires: python3-cursor
What does it actually mean that they should be optional because bundled? What does it mean it doesn't work?
%autosetup -n %{srcname}-%{version} -p2
Try to use git-like patches (-p1) if you can. It makes work for others as easy as possible.
PYTHONPATH=./build/lib %{__python3} -m pytest tests
Try to use the installed package for testing instead. PYTHONPATH=%{buildroot}%{python3_sitelib}.
Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00858076-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00858076-python-vistir/python-vistir-0.3.0-1.fc30.src.rpm I was little bit confused they are just optional. # should be optional because they are bundled but doesn't work
Requires: python3-yaspin
Requires: python3-cursor
What does it actually mean that they should be optional because bundled? What does it mean it doesn't work?
I was little bit confused they are just optional. But tests from test_spinner.py fails if it is missing.
A suggestion about python_to_python3.patch: Don't change "python" to "python3", change it to sys.executable and propose that change upstream. You can link to https://www.python.org/dev/peps/pep-0394/#recommendation > When reinvoking the interpreter from a Python script, querying sys.executable to avoid hardcoded assumptions regarding the interpreter location remains the preferred approach. ------ # this is optional but tests for spinners are failing because of that so I decided to make that hard requires It is not uncommon that tests need also optional dependencies. Reading the code in https://github.com/sarugaku/vistir/blob/master/src/vistir/spin.py I suggest you use Recommends instead of Requires. ------ Any particular reason to mix python3dist(xxx) and python3-xxx in BuildRequires? I stick to one. Also, the #for tests comment is kinda weird, aren't others also needed for tests? ------ # one test require internet to pass %bcond_without internet ... %if %{with internet} -k 'not test_open_file' %endif This feels like a reverted logic. When I use "--without internet" the test that requires internet will run, while when I use "--with internet" the test that requires internet won't run. (Bconds are confusing.) What about this instead: # one test requires internet connection, we deselect it by default unless --with internet is used %bcond_with internet ... %if %{without internet} -k 'not test_open_file' %endif Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00861108-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00861108-python-vistir/python3-vistir-0.3.0-1.fc30.noarch.rpm thanks, i made subpackage for recommends. > i made subpackage for recommends
The linked specfile is not consistent with this statement (there is no subpackage, the recommends are commented out).
Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00861469-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00861469-python-vistir/python-vistir-0.3.0-1.fc30.src.rpm I am sorry I uploaded wrong srpm. Bad shell scripts What happens if the user only installs python3-vistir-spinners? Note that there is still no subpackage: You need an (empty) %files section for it or it is not generated. Also note that the subpackage name is now probably wrong. I suggest you drop the overengineered "subpackage" macro and specify the subpackage name manually instead. Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00861576-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00861576-python-vistir/python-vistir-0.3.0-1.fc30.src.rpm Now it could be fixed I recommend you to read the following guideline: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_requiring_base_package Note that the %{?_isa} part does not apply for noarch packages. (In this case, think of the python3-vistir package as the "base package" when you read the guideline.) Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00862293-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00862293-python-vistir/python-vistir-0.3.0-1.fc30.src.rpm Package Review
==============
Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
Issues:
=======
- description-line-too-long C Miscellaneous utilities for dealing with filesystems, paths, projects, sub-processes, and more.
- dependencies are still not packaged (known)
- have you proposed your patch upstream?
===== MUST items =====
Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
one supported primary architecture.
[x]: Package is licensed with an open-source compatible license and meets
other legal requirements as defined in the legal section of Packaging
Guidelines.
[x]: License field in the package spec file matches the actual license.
[x]: License file installed when any subpackage combination is installed.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
(~1MB) or number of files.
Note: Documentation size is 30720 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Rpmlint is run on all rpms the build produces.
Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
license(s) in its own file, then that file, containing the text of the
license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
%{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local
Python:
[x]: Python eggs must not download any dependencies during the build
process.
[x]: A package which is used by another package via an egg interface should
provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
packages named with the unversioned python- prefix unless no properly
versioned package exists. Dependencies on Python packages instead MUST
use names beginning with python2- or python3- as appropriate.
[x]: Binary eggs must be removed in %prep
===== SHOULD items =====
Generic:
[x]: Reviewer should test that the package builds in mock.
[x]: If the source package does not include license text(s) as a separate
file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
[?]: Package functions as described.
[?]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
justified.
[-]: Description and summary sections in the package spec file contains
translations for supported Non-English languages, if available.
[?]: Package should compile and build into binary rpms on all supported
architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
files.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
$RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.
===== EXTRA items =====
Generic:
[x]: Spec file according to URL is the same as in SRPM.
Rpmlint
-------
Checking: python3-vistir-0.3.0-1.fc30.noarch.rpm
python3-vistir-spinners-0.3.0-1.fc30.noarch.rpm
python-vistir-0.3.0-1.fc30.src.rpm
python3-vistir.noarch: E: description-line-too-long C Miscellaneous utilities for dealing with filesystems, paths, projects, sub-processes, and more.
python3-vistir-spinners.noarch: W: no-documentation
3 packages and 0 specfiles checked; 1 errors, 1 warnings.
Requires
--------
python3-vistir-spinners (rpmlib, GLIBC filtered):
python3-cursor
python3-vistir
python3-yaspin
python3-vistir (rpmlib, GLIBC filtered):
python(abi)
python3.7dist(colorama)
python3.7dist(requests)
python3.7dist(six)
Provides
--------
python3-vistir-spinners:
python3-vistir-spinners
python3-vistir:
python3-vistir
python3.7dist(vistir)
python3dist(vistir)
Source checksums
----------------
https://github.com/sarugaku/vistir/archive/0.3.0.tar.gz :
CHECKSUM(SHA256) this package : e41ce20300edc7656e7d7cba16dacfe0ee833df6f1c14e98feae2938afeb472c
CHECKSUM(SHA256) upstream package : e41ce20300edc7656e7d7cba16dacfe0ee833df6f1c14e98feae2938afeb472c
Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00863065-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00863065-python-vistir/python-vistir-0.3.0-1.fc30.src.rpm Link to propose https://github.com/sarugaku/vistir/issues/59 Spec URl: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-29-x86_64/00865704-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-29-x86_64/00865704-python-vistir/python3-vistir-0.3.0-1.fc29.noarch.rpm upstream agreed on patch. What changed in the specfile? If upstream merges a patch (or even when it is proposed) it is good to add a link to the comment. Liek this: # https://github.com/sarugaku/vistir/issues/59 Patch0: python_to_sys.executable.patch Also, have you tested the upstream's patch instead of yours? I remember there were a lot of little changes. Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00866815-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00866815-python-vistir/python-vistir-0.3.1-1.fc31.src.rpm Test passed. I deleted patch0 and build require for python-cursor. Interesting difference could be bumped version of setuptools because of that it won't be build successfully in fedora 29. > Interesting difference could be bumped version of setuptools because of that it won't be build successfully in fedora 29. The version in Fedora 29 is too low? See https://bodhi.fedoraproject.org/updates/FEDORA-2019-0bf6b7eaf9 No, it is actually not. I didn't check bodhi for newer versions. https://copr.fedorainfracloud.org/coprs/pkopkan/python-vistir/build/868138/ Looking at https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-29-x86_64/00868138-python-vistir/: things look OK, but the -spinners subpackage is uninstallable: Error: Problem: conflicting requests - nothing provides python3-cursor needed by python3-vistir-spinners-0.3.1-1.fc31.noarch It look like 1671787 needs to be revived. Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00887782-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00887782-python-vistir/python-vistir-0.4.0-1.fc31.src.rpm Thank you, I forgot to delete that. Also i bumped the version.
- python3-vistir-spinners has no files? That doesn't seem right
- use %{py3_dist for your BR/RR if you can
- python3-vistir-spinners should probably need a python provide too:
%{?python_provide:%python_provide python3-%{srcname}-spinners}
- Capitalize and add a dot at the end of description:
package which contains requires for spinners in vistir
- Bump to 0.4.3
spinners is a metapackage. Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00972590-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00972590-python-vistir/python-vistir-0.4.3-1.fc31.src.rpm Thank you, for review. I got some inspiration from this thread https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/RTXPOK65IH4OEM3RKX5K2TJIJ2FDLM7P/#Q4VYKMWHMBN7V342JBS6IXESZPU6QJB3 . Anyway the metapackage is not necessary so if you think is more confusing than helpfull, I'll change it. > Anyway the metapackage is not necessary so if you think is more confusing than helpfull, I'll change it.
What is the goal of this metapackage? Why not just use Recommends: ?
I don't get why you need a metapackage only to depend on python3-yaspin, as Zbigniew said, a Recommends zould do the same thing. It give to user info that there is some not strictly required dependency for spinners in vistir. I find that more saying than yaspin. I copied idea from setup.cfg https://github.com/sarugaku/vistir/blob/798a4ecbb528cd160e0d8f8322098c45542ce06c/setup.cfg#L48 It is just little detail on which I don't care much. Then please drop that metapackage and add Recommends; python3-yaspin. Spec URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00974813-python-vistir/python-vistir.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/pkopkan/python-vistir/fedora-rawhide-x86_64/00974813-python-vistir/python3-vistir-0.4.3-1.fc31.noarch.rpm Looks good now.
Three minor things:
- The version in the changelog entry should be adjusted to match
- The description text shouldn't be duplicated. Use the following:
%global _description %{expand:
Miscellaneous utilities for dealing with filesystems,
paths, projects, sub-processes, and more.}
%description %_description
...
%description -n python3-%{srcname} %_description
- Move BuildRequires to the top.
+ package name is OK
+ license is acceptable (ISC)
+ license is specified correctly
+ normal python spec file template is used...
Package is APPROVED.
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/python-vistir |