Bug 1445506 - Review Request: python-fedmsg-rabbitmq-serializer - fedmsg consumer to serialize bus messages into a rabbitmq worker queue
Summary: Review Request: python-fedmsg-rabbitmq-serializer - fedmsg consumer to serial...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Athos Ribeiro
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-25 20:11 UTC by Adam Miller
Modified: 2019-08-05 21:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-05 21:02:46 UTC
Type: ---
Embargoed:
athoscribeiro: fedora-review+


Attachments (Terms of Use)
Fix python2 subpackage Requires (923 bytes, patch)
2017-05-17 23:36 UTC, Athos Ribeiro
no flags Details | Diff

Description Adam Miller 2017-04-25 20:11:26 UTC
Spec URL: https://maxamillion.fedorapeople.org/python-fedmsg-rabbitmq-serializer.spec
SRPM URL: https://maxamillion.fedorapeople.org/python-fedmsg-rabbitmq-serializer-0.0.2-1.fc25.src.rpm
Description: fedmsg consumer to serialize bus messages into a rabbitmq worker queue
Fedora Account System Username: maxamillion

Comment 1 Athos Ribeiro 2017-04-30 16:12:11 UTC
Hello Adam,

I am taking this review.

- The package files (consumer.py and __init__.py) were not packaged at all

- Upstream setup.py version reads 0.0.1 while package version tag reads 0.0.2

- The description for the python2- subpackage reads "An python module which provides a convenient example.
", which is probably from an example spec file

- rpmlint throws several warnings about macros in comments. it would be nice to append a '%' before each macro to avoid those warnings (since they are one line macros, they should not be a problem). It also complains about a not capitalized Summary

- It would be nice to have the python2- subpackage Requires: under the python2 subpackage itself, since your specfile is ready for a python3- subpackage

Comment 2 Adam Miller 2017-05-15 22:50:29 UTC
I've fixed all but the last comment, I don't know what you meant by "It would be nice to have the python2- subpackage Requires: under the python2 subpackage itself"

Spec URL: https://maxamillion.fedorapeople.org/python-fedmsg-rabbitmq-serializer.spec
SRPM URL: https://maxamillion.fedorapeople.org/python-fedmsg-rabbitmq-serializer-0.0.5-1.fc25.src.rpm

Comment 3 Athos Ribeiro 2017-05-15 23:18:48 UTC
Hi Adam,

Thanks for the changes!

> I've fixed all but the last comment, I don't know what you meant by "It
> would be nice to have the python2- subpackage Requires: under the python2
> subpackage itself"

The "Requires:" lines should be after "%package -n python2-%{srcname}", so whoever is maintaining the package by the time upstream provides a python3 package won't make the mistake to have the python3 package requiring the python2 dependencies as well. This is not a MUST item for now though. I will proceed with the review asap :)

Comment 4 Athos Ribeiro 2017-05-16 17:20:20 UTC
- Actually, you do need to include the requires under the python2 subpackage (the ones you do not need to move there are the BRs):

  $ rpm -qp --requires python2-fedmsg-rabbitmq-serializer-0.0.5-1.fc27.noarch.rpm
  python(abi) = 2.7
  rpmlib(CompressedFileNames) <= 3.0.4-1
  rpmlib(FileDigests) <= 4.6.0-1
  rpmlib(PartialHardlinkSets) <= 4.0.4-1
  rpmlib(PayloadFilesHavePrefix) <= 4.0-1
  rpmlib(PayloadIsXz) <= 5.2-1

- licensecheck could not detect the license in COPYING. I got the diff from [1] and found out that the indentation is different. Although it should not matter that much, there is a discussion going on in the devel mailing list to adopt a common licenses package, which would possibly operate taking the diffs from these license files and use links to reduce the size of the packages. Of course this is not a blocker for this review, but since you are upstream for this package, it would be nice to use the same file as [1].

- rpmlint complains about the summary not beginning with a capital letter, but since upstream's (you) summary starts with fedmsg, I think that's OK. 

Other than that, the package looks good :)

[1] https://www.gnu.org/licenses/gpl-2.0.txt

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

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

===== 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]: 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.
[!]: 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.
[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).
[?]: 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: python2-fedmsg-rabbitmq-serializer-0.0.5-1.fc27.noarch.rpm
          python-fedmsg-rabbitmq-serializer-0.0.5-1.fc27.src.rpm
python2-fedmsg-rabbitmq-serializer.noarch: W: summary-not-capitalized C fedmsg consumer to serialize bus messages into a rabbitmq worker queue
python-fedmsg-rabbitmq-serializer.src: W: summary-not-capitalized C fedmsg consumer to serialize bus messages into a rabbitmq worker queue
2 packages and 0 specfiles checked; 0 errors, 2 warnings.

Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
python2-fedmsg-rabbitmq-serializer.noarch: W: summary-not-capitalized C fedmsg consumer to serialize bus messages into a rabbitmq worker queue
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

Requires
--------
python2-fedmsg-rabbitmq-serializer (rpmlib, GLIBC filtered):
    python(abi)

Provides
--------
python2-fedmsg-rabbitmq-serializer:
    python-fedmsg-rabbitmq-serializer
    python2-fedmsg-rabbitmq-serializer
    python2.7dist(fedmsg-rabbitmq-serializer)
    python2dist(fedmsg-rabbitmq-serializer)

Source checksums
----------------
https://releases.pagure.org/fedmsg-rabbitmq-serializer/fedmsg-rabbitmq-serializer-0.0.5.tar.gz :
  CHECKSUM(SHA256) this package     : 163be1a3f7fc8aab26e1c2d2a3a2e20a0ffdd6114ec60c9376980826aafc1939
  CHECKSUM(SHA256) upstream package : 163be1a3f7fc8aab26e1c2d2a3a2e20a0ffdd6114ec60c9376980826aafc1939

Comment 5 Adam Miller 2017-05-17 20:33:44 UTC
Just to be clear, are you waiting on anything or is this approved? I wasn't certain. 

Thanks! :)

Comment 6 Athos Ribeiro 2017-05-17 23:36:52 UTC
Created attachment 1279834 [details]
Fix python2 subpackage Requires

> - Actually, you do need to include the requires under the python2 subpackage
> (the ones you do not need to move there are the BRs):
> 
>   $ rpm -qp --requires
> python2-fedmsg-rabbitmq-serializer-0.0.5-1.fc27.noarch.rpm
>   python(abi) = 2.7
>   rpmlib(CompressedFileNames) <= 3.0.4-1
>   rpmlib(FileDigests) <= 4.6.0-1
>   rpmlib(PartialHardlinkSets) <= 4.0.4-1
>   rpmlib(PayloadFilesHavePrefix) <= 4.0-1
>   rpmlib(PayloadIsXz) <= 5.2-1

Your Requires: are not in the python2 subpackage. If you try installing and using this package, you get:

>>> from fedmsg_rabbitmq_serializer import consumer
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/fedmsg_rabbitmq_serializer/consumer.py", line 7, in <module>
    import fedmsg.consumers
ImportError: No module named fedmsg.consumers

Answering the question: yes, the "Requires:" lines should be moved into the python2 subpackage.

This patch should fix it. You can either apply it or just move the Requires into the python2 subpackage so we can approve this :)

Comment 7 Adam Miller 2017-05-19 20:37:17 UTC
Ahhhh ok, sorry. I misunderstood. I'll fix up the nice to haves also.

Thank you.

Comment 9 Athos Ribeiro 2017-05-19 21:28:28 UTC
The link for the new srpm is broken (I believe you uploaded the binary package to your server instead of the srpm.

Since I already reviewed most of the package, I completed the review based on the new spec file.

Requires and provides look good now, package approved!

Requires
--------
python2-fedmsg-rabbitmq-serializer (rpmlib, GLIBC filtered):
    python(abi)
    python-moksha-hub
    python2-fedmsg-consumers
    python2-fedmsg-meta-fedora-infrastructure
    python2-pika



Provides
--------
python2-fedmsg-rabbitmq-serializer:
    python-fedmsg-rabbitmq-serializer
    python2-fedmsg-rabbitmq-serializer
    python2.7dist(fedmsg-rabbitmq-serializer)
    python2dist(fedmsg-rabbitmq-serializer)

Comment 10 Gwyn Ciesla 2017-05-23 16:44:18 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-fedmsg-rabbitmq-serializer


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