Bug 1582276 - Review Request: python-distroinfo - packaging metadata interface
Summary: Review Request: python-distroinfo - packaging metadata interface
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Javier Peña
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-24 17:14 UTC by Jakub Ruzicka
Modified: 2018-06-07 12:46 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-06-07 11:49:58 UTC
jpena: fedora-review+


Attachments (Terms of Use)

Description Jakub Ruzicka 2018-05-24 17:14:24 UTC
Spec URL: http://jruzicka.fedorapeople.org/pkgs/python-distroinfo.spec
SRPM URL: http://jruzicka.fedorapeople.org/pkgs/python-distroinfo-0.0.1-1.fc29.src.rpm
Description: a python module for parsing, validating and querying
distribution/packaging metadata stored in human readable and reviewable
text/YAML files
Fedora Account System Username: jruzicka

Comment 1 Dick Marinus 2018-05-25 09:32:45 UTC
My informal review:

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.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "*No copyright* Apache", "Unknown or generated", "*No
     copyright* Apache (v2.0)". 41 files have unknown license. Detailed
     output of licensecheck in /home/meeuw/git/fedora/python-distroinfo
     /review-python-distroinfo/licensecheck.txt
[-]: License file installed when any subpackage combination is installed.
[-]: 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.
[-]: 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 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 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:
[-]: 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.
[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:
[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.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python2-distroinfo , python3-distroinfo
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: 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-distroinfo-0.0.1-1.fc28.noarch.rpm
          python3-distroinfo-0.0.1-1.fc28.noarch.rpm
          python-distroinfo-0.0.1-1.fc28.src.rpm
python2-distroinfo.noarch: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python2-distroinfo.noarch: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python2-distroinfo.noarch: W: spelling-error %description -l en_US rdoinfo -> informed
python3-distroinfo.noarch: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python3-distroinfo.noarch: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python3-distroinfo.noarch: W: spelling-error %description -l en_US rdoinfo -> informed
python-distroinfo.src: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python-distroinfo.src: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python-distroinfo.src: W: spelling-error %description -l en_US rdoinfo -> informed
3 packages and 0 specfiles checked; 0 errors, 9 warnings.




Rpmlint (installed packages)
----------------------------
python3-distroinfo.noarch: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python3-distroinfo.noarch: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python3-distroinfo.noarch: W: spelling-error %description -l en_US rdoinfo -> informed
python3-distroinfo.noarch: W: invalid-url URL: https://github.com/softwarefactory-project/distroinfo <urlopen error [Errno -2] Name or service not known>
python2-distroinfo.noarch: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python2-distroinfo.noarch: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python2-distroinfo.noarch: W: spelling-error %description -l en_US rdoinfo -> informed
python2-distroinfo.noarch: W: invalid-url URL: https://github.com/softwarefactory-project/distroinfo <urlopen error [Errno -2] Name or service not known>
2 packages and 0 specfiles checked; 0 errors, 8 warnings.



Requires
--------
python3-distroinfo (rpmlib, GLIBC filtered):
    python(abi)
    python3-PyYAML
    python3-pbr
    python3-requests
    python3-six

python2-distroinfo (rpmlib, GLIBC filtered):
    PyYAML
    python(abi)
    python-six
    python2-pbr
    python2-requests



Provides
--------
python3-distroinfo:
    python3-distroinfo
    python3.6dist(distroinfo)
    python3dist(distroinfo)

python2-distroinfo:
    python-distroinfo
    python2-distroinfo
    python2.7dist(distroinfo)
    python2dist(distroinfo)



Source checksums
----------------
https://pypi.io/packages/source/d/distroinfo/distroinfo-0.0.1.tar.gz :
  CHECKSUM(SHA256) this package     : c6919c327e86bca736b93e09b73d73e2c2ff77419ce6a817a1fe16826403e0d3
  CHECKSUM(SHA256) upstream package : c6919c327e86bca736b93e09b73d73e2c2ff77419ce6a817a1fe16826403e0d3


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -n python-distroinfo
Buildroot used: fedora-28-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 2 Dick Marinus 2018-05-25 10:10:04 UTC
I've compared your specfile to a specfile generated by pyp2rpm-3.3.2 and found the following differences:

1. https://pypi.io instead of https://files.pythonhosted.org (I don't know which is better)
2. Summary: %{summary} is used in the subpackages instead of duplicating the same text
3. Instead of using Requires: python2-<<pypiname>> the python2dist(<<pypiname>>) macro (?) is used (I don't know what's better)
4. You're using %{sname} in: %{python2_sitelib}/%{sname} (I think you should fix this)
5. playbooks/README.md isn't packaged

Besides this, I think it might be a good idea to deduplicate the %descriptions by using a macro:

%global _description\
distroinfo is a python module for parsing, validating and querying\
distribution/packaging metadata stored in human readable and reviewable\
text/YAML files.\
\
distroinfo is a generic (re)implementation of rdoinfo parser which proved\
well suited for the task of interfacing with distribution metadata in a human\
friendly way. If you consider code reviews human friendly, that is.\

Which can be used as:
%description %_description
etc.

Comment 3 Javier Peña 2018-05-25 11:14:04 UTC
Package review notes:

- Please make sure that the python-six requirement is changed to "python2-six" when importing, to comply with https://fedoraproject.org/wiki/Packaging:Python#Dependencies

- Other than that, the package is APPROVED.


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.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "*No copyright* Apache", "Unknown or generated", "*No
     copyright* Apache (v2.0)". 41 files have unknown license. Detailed
     output of licensecheck in /tmp/1582276-python-
     distroinfo/licensecheck.txt
[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.
     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 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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python2-distroinfo , python3-distroinfo
[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.
[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-distroinfo-0.0.1-1.fc29.noarch.rpm
          python3-distroinfo-0.0.1-1.fc29.noarch.rpm
          python-distroinfo-0.0.1-1.fc29.src.rpm
python2-distroinfo.noarch: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python2-distroinfo.noarch: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python2-distroinfo.noarch: W: spelling-error %description -l en_US rdoinfo -> informed
python3-distroinfo.noarch: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python3-distroinfo.noarch: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python3-distroinfo.noarch: W: spelling-error %description -l en_US rdoinfo -> informed
python-distroinfo.src: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python-distroinfo.src: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python-distroinfo.src: W: spelling-error %description -l en_US rdoinfo -> informed
3 packages and 0 specfiles checked; 0 errors, 9 warnings.




Rpmlint (installed packages)
----------------------------
python3-distroinfo.noarch: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python3-distroinfo.noarch: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python3-distroinfo.noarch: W: spelling-error %description -l en_US rdoinfo -> informed
python3-distroinfo.noarch: W: invalid-url URL: https://github.com/softwarefactory-project/distroinfo <urlopen error [Errno -2] Name or service not known>
python2-distroinfo.noarch: W: summary-not-capitalized C parsing, validating and querying distribution metadata stored in text/YAML files
python2-distroinfo.noarch: W: spelling-error %description -l en_US reviewable -> review able, review-able, irretrievable
python2-distroinfo.noarch: W: spelling-error %description -l en_US rdoinfo -> informed
python2-distroinfo.noarch: W: invalid-url URL: https://github.com/softwarefactory-project/distroinfo <urlopen error [Errno -2] Name or service not known>
2 packages and 0 specfiles checked; 0 errors, 8 warnings.



Requires
--------
python3-distroinfo (rpmlib, GLIBC filtered):
    python(abi)
    python3-PyYAML
    python3-pbr
    python3-requests
    python3-six

python2-distroinfo (rpmlib, GLIBC filtered):
    PyYAML
    python(abi)
    python-six
    python2-pbr
    python2-requests



Provides
--------
python3-distroinfo:
    python3-distroinfo
    python3.6dist(distroinfo)
    python3dist(distroinfo)

python2-distroinfo:
    python-distroinfo
    python2-distroinfo
    python2.7dist(distroinfo)
    python2dist(distroinfo)



Source checksums
----------------
https://pypi.io/packages/source/d/distroinfo/distroinfo-0.0.1.tar.gz :
  CHECKSUM(SHA256) this package     : c6919c327e86bca736b93e09b73d73e2c2ff77419ce6a817a1fe16826403e0d3
  CHECKSUM(SHA256) upstream package : c6919c327e86bca736b93e09b73d73e2c2ff77419ce6a817a1fe16826403e0d3


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1582276 -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 4 Jakub Ruzicka 2018-05-25 12:15:52 UTC
Thank you both for your reviews!

I'll address all raised concerns directly in the new distgit.

Nice trick with pyp2rpm, I appreciate the example for %_description - I didn't like the redundancy, but wasn't sure if multi-line macros aren't problematic somehow.

Note to self: I need to see how python2dist(<<pypiname>>) macro works, because it sounds exactly like what py2rpm() from pymod2pkg does in renderspec.

Comment 5 Gwyn Ciesla 2018-05-29 13:23:24 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-distroinfo

Comment 6 Fedora Update System 2018-05-30 19:29:48 UTC
python-distroinfo-0.0.1-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-8d6d19debb

Comment 7 Fedora Update System 2018-05-30 19:29:56 UTC
python-distroinfo-0.0.1-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-773e0f2a12

Comment 8 Fedora Update System 2018-05-30 19:30:02 UTC
python-distroinfo-0.0.1-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-257cd81642

Comment 9 Fedora Update System 2018-05-31 11:34:20 UTC
python-distroinfo-0.0.1-3.fc27 has been pushed to the Fedora 27 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-2018-257cd81642

Comment 10 Fedora Update System 2018-05-31 11:44:02 UTC
python-distroinfo-0.0.1-3.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2018-773e0f2a12

Comment 11 Fedora Update System 2018-05-31 13:01:06 UTC
python-distroinfo-0.0.1-3.fc28 has been pushed to the Fedora 28 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-2018-8d6d19debb

Comment 12 Fedora Update System 2018-06-07 11:49:58 UTC
python-distroinfo-0.0.1-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2018-06-07 12:35:06 UTC
python-distroinfo-0.0.1-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2018-06-07 12:46:38 UTC
python-distroinfo-0.0.1-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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