Bug 1433757 - Review Request: python-glyphsLib - A bridge from Glyphs source files to UFOs
Summary: Review Request: python-glyphsLib - A bridge from Glyphs source files to UFOs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Fabio Valentini
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1433626 1433744
Blocks: 1441023
TreeView+ depends on / blocked
 
Reported: 2017-03-19 20:35 UTC by Athos Ribeiro
Modified: 2017-08-29 17:22 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-24 19:21:45 UTC
Type: ---
decathorpe: fedora-review+


Attachments (Terms of Use)

Description Athos Ribeiro 2017-03-19 20:35:28 UTC
Spec URL: https://athoscr.fedorapeople.org/packaging/python-glyphslib.spec
SRPM URL: https://athoscr.fedorapeople.org/packaging/python-glyphslib-1.5.2-1.fc25.src.rpm

Description: This library provides a bridge from Glyphs source files (.glyphs) to UFOs (Unified Font Object).

Fedora Account System Username: athoscr

Comment 2 Elliott Sales de Andrade 2017-07-08 08:27:32 UTC
This is not a formal review. I did not have any chance to test out that
this works, but the tests pass. This is not the latest version of the
package and there are a few minor rpmlint issues below.


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: "Apache (v2.0)", "Unknown or generated", "*No copyright* Apache
     (v2.0)". 15 files have unknown license. Detailed output of
     licensecheck in 1433757-python-glyphslib/licensecheck.txt
     * glyphsLib-1.6.0/Lib/glyphsLib/glyphdata_generated.py - this is MIT license though licensecheck can't figure that out.
     * glyphsLib-1.6.0/tests/data/*.designspace - I'm not sure whether the ASL could apply to these XML-like files
[x]: License file installed when any subpackage combination is installed.
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/python3.6/site-
     packages, /usr/lib/python3.6
[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.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 4 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 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.
[!]: Final provides and requires are sane (see attachments). - see rpmlint
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python2-glyphslib , python3-glyphslib
[?]: Package functions as described.
[!]: 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.
[x]: %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:
[!]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
     * Spelling errors are fine.
     * Both Python files indicated below should have the shebang removed.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python2-glyphslib-1.6.0-1.fc27.noarch.rpm
          python3-glyphslib-1.6.0-1.fc27.noarch.rpm
          python-glyphslib-1.6.0-1.fc27.src.rpm
python2-glyphslib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python2-glyphslib.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/glyphsLib/__main__.py 644 /usr/bin/python
python2-glyphslib.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/glyphsLib/__init__.py 644 /usr/bin/python
python3-glyphslib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python3-glyphslib.noarch: E: non-executable-script /usr/lib/python3.6/site-packages/glyphsLib/__init__.py 644 /usr/bin/python
python3-glyphslib.noarch: E: non-executable-script /usr/lib/python3.6/site-packages/glyphsLib/__main__.py 644 /usr/bin/python
python3-glyphslib.noarch: W: no-manual-page-for-binary glyphs2ufo
python-glyphslib.src: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
3 packages and 0 specfiles checked; 4 errors, 4 warnings.




Rpmlint (installed packages)
----------------------------
python2-glyphslib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python2-glyphslib.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/glyphsLib/__init__.py 644 /usr/bin/python
python2-glyphslib.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/glyphsLib/__main__.py 644 /usr/bin/python
python3-glyphslib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python3-glyphslib.noarch: E: non-executable-script /usr/lib/python3.6/site-packages/glyphsLib/__init__.py 644 /usr/bin/python
python3-glyphslib.noarch: E: non-executable-script /usr/lib/python3.6/site-packages/glyphsLib/__main__.py 644 /usr/bin/python
python3-glyphslib.noarch: W: no-manual-page-for-binary glyphs2ufo
2 packages and 0 specfiles checked; 4 errors, 3 warnings.



Requires
--------
python2-glyphslib (rpmlib, GLIBC filtered):
    python(abi)
    python2-defcon
    python2-fonttools
    python2-mutatormath

python3-glyphslib (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3-defcon
    python3-fonttools
    python3-mutatormath



Provides
--------
python2-glyphslib:
    python-glyphslib
    python2-glyphslib
    python2.7dist(glyphslib)
    python2dist(glyphslib)

python3-glyphslib:
    python3-glyphslib
    python3.6dist(glyphslib)
    python3dist(glyphslib)



Source checksums
----------------
https://github.com/googlei18n/glyphsLib/archive/v1.6.0/glyphsLib-1.6.0.tar.gz :
  CHECKSUM(SHA256) this package     : aa61e3dc35bc996708d1321d8f90a366c9e746dbe822032552842680f79639f6
  CHECKSUM(SHA256) upstream package : aa61e3dc35bc996708d1321d8f90a366c9e746dbe822032552842680f79639f6


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -m fedora-rawhide-x86_64 -b 1433757
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 3 Fabio Valentini 2017-07-08 17:11:32 UTC
Taking this review.

Comment 4 Fabio Valentini 2017-07-08 17:37:07 UTC
A few initial remarks:
- Is there a reason you're using the tarball from github, not pypi?
- The upstream name for the project and python package is "glyphsLib" - as long as there isn't a good reason for not doing so, stick to it for your package (-> python-glyphsLib; no need for a separate %{pkgname}).
- The latest version is 1.7.5, your packaging is for version 1.6.0 - please update.

Comment 5 Athos Ribeiro 2017-07-13 14:56:23 UTC
Thank you Elliot and Fabio :)

- I believe that when pypi started providing random URLs only, python packagers started preferring to fetch sources from github. Since this new pypi.org seems to be a 'pre-production' instance, I would rather fetch sources from github, since there are tags in upstream repositories. I will switch to pypi if needed, though :)

- Project name changed. I do prefer to use them just like upstream, but some reviewers do complain about cammelcases :(

- Package updated! 

Spec URL: https://athoscr.fedorapeople.org/packaging/python-glyphsLib.spec
SRPM URL: https://athoscr.fedorapeople.org/packaging/python-glyphsLib-1.7.5-1.fc25.src.rpm

Comment 6 Elliott Sales de Andrade 2017-07-13 22:46:57 UTC
A non-random URL can be done like:
https://files.pythonhosted.org/packages/source/g/%{srcname}/%{srcname}-%{version}.tar.gz

Comment 7 Fabio Valentini 2017-07-14 15:39:56 UTC
Package Review
==============

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


=====   ISSUES   =====

__init__.py and __main__.py contain a python shebang (in the case of
python3-glyphsLib, even the wrong one) - see rpmlint output. You might want to patch those two files to remove the shebangs in those two files.

(It seems the %python_provide macro is doing case-insentive stuff, but
there's nothing we can do about that (see Provides lists below).)

Besides the one issue I pointed out, the package looks good.


===== 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.
[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.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of 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.
[-]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
[?]: 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.
[x]: 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]: 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: python2-glyphsLib-1.7.5-1.fc27.noarch.rpm
          python3-glyphsLib-1.7.5-1.fc27.noarch.rpm
          python-glyphsLib-1.7.5-1.fc27.src.rpm
python2-glyphsLib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python2-glyphsLib.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/glyphsLib/__init__.py 644 /usr/bin/python 
python2-glyphsLib.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/glyphsLib/__main__.py 644 /usr/bin/python 
python3-glyphsLib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python3-glyphsLib.noarch: E: non-executable-script /usr/lib/python3.6/site-packages/glyphsLib/__init__.py 644 /usr/bin/python 
python3-glyphsLib.noarch: E: non-executable-script /usr/lib/python3.6/site-packages/glyphsLib/__main__.py 644 /usr/bin/python 
python3-glyphsLib.noarch: W: no-manual-page-for-binary glyphs2ufo
python-glyphsLib.src: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
3 packages and 0 specfiles checked; 4 errors, 4 warnings.




Rpmlint (installed packages)
----------------------------
python2-glyphsLib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python2-glyphsLib.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/glyphsLib/__init__.py 644 /usr/bin/python 
python2-glyphsLib.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/glyphsLib/__main__.py 644 /usr/bin/python 
python3-glyphsLib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python3-glyphsLib.noarch: E: non-executable-script /usr/lib/python3.6/site-packages/glyphsLib/__init__.py 644 /usr/bin/python 
python3-glyphsLib.noarch: E: non-executable-script /usr/lib/python3.6/site-packages/glyphsLib/__main__.py 644 /usr/bin/python 
python3-glyphsLib.noarch: W: no-manual-page-for-binary glyphs2ufo
2 packages and 0 specfiles checked; 4 errors, 3 warnings.



Requires
--------
python2-glyphsLib (rpmlib, GLIBC filtered):
    python(abi)
    python2-defcon
    python2-fonttools
    python2-mutatormath

python3-glyphsLib (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3-defcon
    python3-fonttools
    python3-mutatormath



Provides
--------
python2-glyphsLib:
    python-glyphsLib
    python2-glyphsLib
    python2.7dist(glyphslib)
    python2dist(glyphslib)

python3-glyphsLib:
    python3-glyphsLib
    python3.6dist(glyphslib)
    python3dist(glyphslib)



Source checksums
----------------
https://github.com/googlei18n/glyphsLib/archive/v1.7.5/glyphsLib-1.7.5.tar.gz :
  CHECKSUM(SHA256) this package     : 286fc5eb27a5956c2d4e34cb1afa768207109c3974edfe70c412f603fe266b96
  CHECKSUM(SHA256) upstream package : 286fc5eb27a5956c2d4e34cb1afa768207109c3974edfe70c412f603fe266b96


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1433757 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 8 Athos Ribeiro 2017-07-14 21:39:25 UTC
Hi Fabio,

Thanks for the revoew. Sorry for not running rpmlint before submitting the package for review.

I am applying a patch to remove the shebangs, as suggested. I also opened a PR upstream to remove them, which was already merged [1]

Elliot, thanks for the link! Again, if you guys think I should for some reason, I would not oppose to change the URLs to fetch sources from pypi (although I always see packagers with conflicting opinions here for python packages).

Here are the new sources:

Spec URL: https://athoscr.fedorapeople.org/packaging/python-glyphsLib.spec
SRPM URL: https://athoscr.fedorapeople.org/packaging/python-glyphsLib-1.7.5-2.fc25.src.rpm

This is the rpmlint output now [2]

[1] https://github.com/googlei18n/glyphsLib/pull/198


[2]
python2-glyphsLib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python3-glyphsLib.noarch: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
python3-glyphsLib.noarch: W: no-manual-page-for-binary glyphs2ufo
python-glyphsLib.src: W: spelling-error %description -l en_US glyphs -> glyph, glyph s
3 packages and 0 specfiles checked; 0 errors, 4 warnings.

Comment 9 Fabio Valentini 2017-07-15 09:02:26 UTC
I don't particularly care whether you use the github or pypi sources, but since there's no reason to use the pypi ones, "official" github sources are the way to go IMO.

Only issue I had with this package (shebangs) has been resolved, so approving.

Comment 10 Athos Ribeiro 2017-07-16 02:07:00 UTC
Thank you for the review, Fabio and Elliott!

Comment 11 Gwyn Ciesla 2017-07-16 18:06:17 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-glyphsLib

Comment 12 Fedora Update System 2017-07-16 20:31:36 UTC
python-glyphsLib-1.7.5-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c4dc487a1e

Comment 13 Fedora Update System 2017-07-17 03:25:51 UTC
python-glyphsLib-1.7.5-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c4dc487a1e

Comment 14 Fedora Update System 2017-07-24 19:21:45 UTC
python-glyphsLib-1.7.5-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Shawn Starr 2017-08-29 17:22:26 UTC
Built for rawhide also now


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