Bug 1671787 - Review Request: python-cursor - python package for hiding terminal cursor
Summary: Review Request: python-cursor - python package for hiding terminal cursor
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Macku
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1671790
TreeView+ depends on / blocked
 
Reported: 2019-02-01 16:28 UTC by Patrik Kopkan
Modified: 2019-03-15 10:17 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-03-15 10:17:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Patrik Kopkan 2019-02-01 16:28:22 UTC
Spec URL: https://pagure.io/python-cursor/raw/master/f/python-cursor.spec
SRPM URL: https://pagure.io/python-cursor/blob/master/f/python-cursor-1.2.0-1.fc29.src.rpm
Description: python library/package for hiding terminal cursors. Includes two executables for turning on/off cursor
Fedora Account System Username: pkopkan

There is problem with license. It is content license. I've already contacted upstream to fix that. Also there is missing license from pypi source and on github there is no versioning so thats the reason behind two sources.

Comment 1 Miro Hrončok 2019-02-01 16:50:45 UTC
Jan, would you like to review this?

Comment 2 Jan Macku 2019-02-02 12:11:56 UTC
Yes, I can. Assign it to me. Thank you.

Comment 3 Jan Macku 2019-02-07 12:53:01 UTC
Hi Patrik,

URL to your SRPM package download html document not SRPM package, can you please post correct URL?

Thank you.

Comment 4 Patrik Kopkan 2019-02-11 15:46:51 UTC
Spec URL: https://pagure.io/python-cursor/raw/master/f/python-cursor.spec
SRPM URL: https://pagure.io/python-cursor/raw/master/f/python-cursor-1.2.0-1.fc29.src.rpm

Rebuilt with gpl license.

I am sorry for such late response I 've must missed email.

Comment 5 Jan Macku 2019-02-15 14:16:58 UTC
(In reply to Patrik Kopkan from comment #4)
> Spec URL: https://pagure.io/python-cursor/raw/master/f/python-cursor.spec
> SRPM URL:
> https://pagure.io/python-cursor/raw/master/f/python-cursor-1.2.0-1.fc29.src.
> rpm

Hi Patrik,

There are some issues:

* You can't use GitHub master branch as a source, because master is changing with every commit. This cause that source hash and upstream hash doesn't match.
  Also you link whole master branch only for two files (README and COPYING), this cause growing of srpm file.
  - Solution: Link README and COPYING files directly as Source X a Y and instead of referencing to master branch refer to commit.
    - https://raw.githubusercontent.com/GijsTimmers/cursor/f40edcd7677f9912a042fee76653a41fefe7dac7/LICENSE
    - https://raw.githubusercontent.com/GijsTimmers/cursor/f40edcd7677f9912a042fee76653a41fefe7dac7/README.md  

* Your spec file doesn't match spec file from srpm (different changelog).

* There is also problem with description. You use two different macros %{summary} and %{Summary}. The problem is that %{Summary} macro doesn't exist.
  If I run rpm -pqi python3-cursor-1.2.0-1.fc29.noarch.rpm, it shows: "Description : %{Summary}".
  - Solution: The best solution would be write an extended version of summary instead of using macro. 

* Remove (patch) shebang from cursor.py.

* Try to contact upstream via mail or create an Issue on GitHub and ask them about man pages. 


Full output from fedora-review tool:

--------------------------------------------

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- Sources used to build the package match the upstream source, as provided
  in the spec URL.
  Note: Upstream MD5sum check error, diff is in
  /home/jamacku/Tmp/cursor/review/python-cursor/diff.txt
  See: http://fedoraproject.org/wiki/Packaging/SourceURL


===== MUST items =====

Generic:
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "*No copyright* Creative Commons Attribution-ShareAlike Public
     License (v2.5)", "Unknown or generated". 15 files have unknown
     license. Detailed output of licensecheck in
     /home/jamacku/Tmp/cursor/review/python-cursor/licensecheck.txt
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: Sources contain only permissible code or content.
[ ]: Macros in Summary, %description expandable at SRPM build time.
     Note: Macros in: python3-cursor (description)
[ ]: Package contains desktop file if it is a GUI application.
[ ]: Development files must be in a -devel package
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[ ]: Requires correct, justified where necessary.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: 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 10240 bytes in 1 files.
[ ]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[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]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[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]: 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:
[ ]: Python eggs must not download any dependencies during the build
     process.
[ ]: A package which is used by another package via an egg interface should
     provide egg info.
[ ]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[ ]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: Package does not include license text files separate from upstream.
[ ]: 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.
[ ]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[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]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: python3-cursor-1.2.0-1.fc29.noarch.rpm
          python-cursor-1.2.0-1.fc29.src.rpm
python3-cursor.noarch: W: unexpanded-macro %description -l C %{Summary}
python3-cursor.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/cursor/cursor.py /usr/bin/env python2
python3-cursor.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/cursor/cursor.py 644 /usr/bin/env python2
python3-cursor.noarch: W: no-manual-page-for-binary cursor_hide
python3-cursor.noarch: W: no-manual-page-for-binary cursor_show
2 packages and 0 specfiles checked; 2 errors, 3 warnings.




Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Requires
--------
python3-cursor (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)



Provides
--------
python3-cursor:
    python3-cursor
    python3.7dist(cursor)
    python3dist(cursor)



Source checksums
----------------
https://files.pythonhosted.org/packages/source/c/cursor/cursor-1.2.0.tar.gz :
  CHECKSUM(SHA256) this package     : 8ee9fe5b925e1001f6ae6c017e93682583d2b4d1ef7130a26cfcdf1651c0032c
  CHECKSUM(SHA256) upstream package : 8ee9fe5b925e1001f6ae6c017e93682583d2b4d1ef7130a26cfcdf1651c0032c
https://github.com/GijsTimmers/cursor/archive/master.zip :
  CHECKSUM(SHA256) this package     : aba7ac45dd64d601da5519f9dacb9cba99d5449ef72be5ba6e6a69727ea6b946
  CHECKSUM(SHA256) upstream package : 2d81934d06862b5baa0d07610c2d5a7276df019ad0d9087d734e9851e3e2747a
diff -r also reports differences

Comment 6 Patrik Kopkan 2019-02-21 12:17:46 UTC
Spec URL: https://pagure.io/python-cursor/raw/master/f/python-cursor.spec
SRPM URL: https://pagure.io/python-cursor/raw/master/f/python-cursor-1.3.1-1.fc29.src.rpm

Thank you. Upstream include license to pypi. About shebang I contacted him and waiting for response.

Comment 7 Jan Macku 2019-02-27 12:42:59 UTC
Hi Patrik,

This looks good to me. 

Missing man pages for cursor_hide and cursor_show is last issue. Did you tried to contact upstream about it?

Thank you,

Jan.

Comment 8 Miro Hrončok 2019-02-27 13:00:39 UTC
BTW In my experience, contacting upstream about missing manpages is mostly waste of packagers and upstreams time. Only do it if you really want to have them.

Several notes by me:

1) Use dot at the end of last %description sentence (twice).
2) Set URL to https://github.com/GijsTimmers/cursor and don't use macros in it so it is clickable directly.
3) Upstream uses setuptools, BR them, don't assume they will be dragged by devel automatically.
4) I'm not happy about another utility library with a strict copyleft license, but I'll bring that to upstream, it should not block this review.

Comment 9 Jan Macku 2019-02-27 13:17:49 UTC
Ok, this looks like easy to use tool, so man pages aren't mandatory.

Comment 11 Miro Hrončok 2019-02-27 19:21:27 UTC
Patrik, see https://github.com/sarugaku/vistir/pull/58 and consider whether you wont to maintain this package anyway or not. It will not be needed for pipenv.

Comment 12 Patrik Kopkan 2019-03-01 15:00:34 UTC
I would drop it. Although there is some library for spinners using that. I warned the upstream about changed in license https://github.com/manrajgrover/halo/issues/118

Comment 13 Miro Hrončok 2019-03-01 15:16:45 UTC
> Although there is some library for spinners using that.

I don't think this should influence the decision whether to package cursor or not.

The primary motivation for this was pipenv. pipenv stopped using it.

Comment 14 Jan Macku 2019-03-06 09:57:39 UTC
Patrik, do you still want to maintain this package?

If so, this package is in my opinion ready to be in Fedora.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[?]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated". 13 files have unknown license. Detailed
     output of licensecheck in /home/jamacku/Tmp/1671787-python-
     cursor/licensecheck.txt
[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.
[?]: 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.
[-]: 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 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[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]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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 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]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: 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]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: 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.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[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]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-cursor-1.3.4-1.fc29.noarch.rpm
          python-cursor-1.3.4-1.fc29.src.rpm
python3-cursor.noarch: W: no-manual-page-for-binary cursor_hide
python3-cursor.noarch: W: no-manual-page-for-binary cursor_show
2 packages and 0 specfiles checked; 0 errors, 2 warnings.




Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
python3-cursor.noarch: W: invalid-url URL: https://pypi.org/project/cursor <urlopen error [Errno -2] Name or service not known>
python3-cursor.noarch: W: no-manual-page-for-binary cursor_hide
python3-cursor.noarch: W: no-manual-page-for-binary cursor_show
1 packages and 0 specfiles checked; 0 errors, 3 warnings.



Requires
--------
python3-cursor (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)



Provides
--------
python3-cursor:
    python3-cursor
    python3.7dist(cursor)
    python3dist(cursor)



Source checksums
----------------
https://files.pythonhosted.org/packages/source/c/cursor/cursor-1.3.4.tar.gz :
  CHECKSUM(SHA256) this package     : 33f279a17789c04efd27a92501a0dad62bb011f8a4cdff93867c798d26508940
  CHECKSUM(SHA256) upstream package : 33f279a17789c04efd27a92501a0dad62bb011f8a4cdff93867c798d26508940

Comment 15 Miro Hrončok 2019-03-08 08:59:07 UTC
Until sponsored, please don't set those flags.

Comment 16 Jan Macku 2019-03-08 09:25:36 UTC
I'm sorry.

Comment 17 Miro Hrončok 2019-03-08 09:38:04 UTC
Don't be :) It's perfectly OK to not now everything from the beginning (or ever).

Comment 18 Patrik Kopkan 2019-03-15 10:17:54 UTC
Because pipenv doesn't need this, I decided that I don't want to maintain this package.

If someone wants to have this in Fedora, please reopen the bug.


Note You need to log in before you can comment on or make changes to this bug.