Bug 1693014 (python-pyrpm) - Review Request: python-pyrpm - Python module for parsing RPM spec filesPython module for parsing RPM spec files
Summary: Review Request: python-pyrpm - Python module for parsing RPM spec filesPython...
Keywords:
Status: CLOSED ERRATA
Alias: python-pyrpm
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Georg Sauthoff
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-26 23:57 UTC by Robert-André Mauchin 🐧
Modified: 2019-04-25 01:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-13 00:04:50 UTC
Type: ---
Embargoed:
fedora: fedora-review+


Attachments (Terms of Use)

Description Robert-André Mauchin 🐧 2019-03-26 23:57:22 UTC
Spec URL: https://eclipseo.fedorapeople.org/for-review/python-pyrpm.spec
SRPM URL: https://eclipseo.fedorapeople.org/for-review/python-pyrpm-0.8-1.fc31.src.rpm

Description:
python-rpm-spec is a Python module for parsing RPM spec files. RPMs are build from a package's sources along with a spec file. The spec file controls how the RPM is built. This module allows you to parse spec files and gives you simple access to various bits of information that is contained in the spec file.python-rpm-spec is a Python module for parsing RPM spec files. RPMs are build from a package's sources along with a spec file. The spec file controls how the RPM is built. This module allows you to parse spec files and gives you simple access to various bits of information that is contained in the spec file.

Fedora Account System Username: eclipseo

Comment 1 Robert-André Mauchin 🐧 2019-03-26 23:59:46 UTC
Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=33784491

Comment 2 Georg Sauthoff 2019-03-28 13:45:34 UTC
I can take this review (unless I need extra permissions besides the normal packager ones - fas name: gsauthof).

Comment 3 Georg Sauthoff 2019-03-28 15:25:02 UTC
Ok, my first round of review feedback:

The python3-pip build dependency looks superfluous.

The python3-flit build dependency isn't strictly necessary.

I mean the archive from PyPi includes a setup.py and thus we could use that instead.

For example like this:

--- python-pyrpm.spec.orig	2019-03-28 14:47:24.842994924 +0100
+++ python-pyrpm.spec	2019-03-28 16:04:34.998208523 +0100
@@ -10,12 +10,10 @@
 
 License:        MIT
 URL:            https://github.com/bkircher/python-rpm-spec
-Source0:        %url/archive/%{version}/%{reponame}-%{version}.tar.gz
+Source0:        %pypi_source %{reponame}
 
 BuildArch:      noarch
 BuildRequires:  python3-devel
-BuildRequires:  python3-flit
-BuildRequires:  python3-pip
 %if %{with tests}
 BuildRequires:  python3-pytest
 %endif
@@ -41,11 +39,11 @@
 %prep
 %autosetup -n %{reponame}-%{version}
 
+%build
+%py3_build
 
 %install
-export PYTHONUSERBASE=%{buildroot}%{_prefix}
-export FLIT_NO_NETWORK=1
-flit install --deps none
+%py3_install
 
 
 %if %{with tests}
@@ -58,7 +56,7 @@
 %license LICENSE
 %doc AUTHORS CHANGELOG.md README.md examples/
 %{python3_sitelib}/%{pypi_name}
-%{python3_sitelib}/python_rpm_spec-%{version}.dist-info
+%{python3_sitelib}/python_rpm_spec-*-py*.egg-info
 
 
 %changelog



The description text is duplicated between the source package and sub-package.

It makes sense to de-duplicate it with a macro, e.g.:

%global common_description %{expand:
... the desc ...
}
...
%description
%{common_description}

Comment 4 Robert-André Mauchin 🐧 2019-03-28 17:50:41 UTC
I didn't notice the Pypi source was using setuptools, Flit is a pain in the buttock which doesn't even support specifying the install folder. Flit needs Pip, that's why I added it.
I will update as you say.

Comment 6 Georg Sauthoff 2019-03-28 18:52:55 UTC
The .spec in the .src.rpm is still the old one. Can you update it?

Comment 8 Georg Sauthoff 2019-03-28 21:45:59 UTC
Everything looks good now. I approve the package.

I based my review on https://docs.fedoraproject.org/en-US/packaging-guidelines/ReviewGuidelines/ on the relevant packaging guidelines.

Some output from fedora-review follows:

(I marked the points I manually reviewed with +, also manually marked some points with - and ?)

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

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



===== 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: "Expat License", "Unknown or generated". 23 files have unknown
     license. Detailed output of licensecheck in /home/gms/program/copr-
     fedora/python-pyrpm/review/review-python-pyrpm/licensecheck.txt
[+]: Package contains no bundled libraries without FPC exception.
[+]: Changelog in prescribed format.
[+]: 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
[+]: 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 30720 bytes in 8 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: No rpmlint messages.
[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.
[+]: 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).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-pyrpm-0.8-1.fc29.noarch.rpm
          python-pyrpm-0.8-1.fc29.src.rpm
2 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
python3-pyrpm.noarch: W: invalid-url URL: https://github.com/bkircher/python-rpm-spec <urlopen error [Errno -2] Name or service not known>
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

GS: URL is ok, no net access in mock environment

Requires
--------
python3-pyrpm (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python3-pyrpm:
    python3-pyrpm
    python3.7dist(python-rpm-spec)
    python3dist(python-rpm-spec)



Source checksums
----------------
https://files.pythonhosted.org/packages/source/p/python-rpm-spec/python-rpm-spec-0.8.tar.gz :
  CHECKSUM(SHA256) this package     : 9eca9aa22a0301f3065d6028efb88503bbd343789bb1d3143cf569db1524f696
  CHECKSUM(SHA256) upstream package : 9eca9aa22a0301f3065d6028efb88503bbd343789bb1d3143cf569db1524f696


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -n python-pyrpm
Buildroot used: fedora-29-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 9 Gwyn Ciesla 2019-04-07 12:02:23 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-pyrpm

Comment 10 Fedora Update System 2019-04-08 20:27:04 UTC
python-pyrpm-0.8-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-03e9f3eb72

Comment 11 Fedora Update System 2019-04-08 20:33:30 UTC
python-pyrpm-0.8-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-e563b2436e

Comment 12 Fedora Update System 2019-04-09 01:48:07 UTC
python-pyrpm-0.8-1.fc30 has been pushed to the Fedora 30 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-2019-03e9f3eb72

Comment 13 Fedora Update System 2019-04-09 03:14:04 UTC
python-pyrpm-0.8-1.fc29 has been pushed to the Fedora 29 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-2019-e563b2436e

Comment 14 Fedora Update System 2019-04-13 00:04:50 UTC
python-pyrpm-0.8-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2019-04-25 01:32:57 UTC
python-pyrpm-0.8-1.fc29 has been pushed to the Fedora 29 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.