Bug 1285941

Summary: Review Request: python-flower - A web based tool for monitoring and administrating Celery clusters
Product: [Fedora] Fedora Reporter: Jeremy Cline <jeremy>
Component: Package ReviewAssignee: William Moreno <williamjmorenor>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: package-review, rbarlow, williamjmorenor
Target Milestone: ---Flags: williamjmorenor: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-20 21:54:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1286300, 1291007, 1294537    
Bug Blocks:    

Description Jeremy Cline 2015-11-27 02:43:46 UTC
Spec URL: https://raw.githubusercontent.com/jeremycline/python-flower-packaging/master/python-flower.spec
SRPM URL: https://github.com/jeremycline/python-flower-packaging/raw/master/python-flower-0.8.3-1.fc23.src.rpm
Description: A web based tool for monitoring and administrating Celery clusters. It offers
real-time monitoring using Celery events, remote control of workers and tasks,
broker monitoring, and an HTTP API.
Fedora Account System Username: jcline
Koji Scratch Build for Fedora 23: http://koji.fedoraproject.org/koji/taskinfo?taskID=11989793

This is my first package submission and I am looking for a sponsor. I would like this package to be included in F22, F23, and Rawhide.

Comment 1 William Moreno 2015-11-27 20:21:10 UTC
This app can run as a system service? I mean you can enable it to run at boot time? If yes you MUST provide a unit file to enable systemd to admin the service.

Look like you need a mentor, I can take your review request and be your packager mentor, but to take your review request I will request you to run some informal reviews to show how do you understand the Fedora Packaging Guidelines. 

If you agree to run some informals review as part of your mentoring process just ping me and I will take this review.

Comment 2 Jeremy Cline 2015-11-28 16:34:50 UTC
(In reply to William Moreno from comment #1)
> This app can run as a system service? I mean you can enable it to run at
> boot time? If yes you MUST provide a unit file to enable systemd to admin
> the service.

The app does not currently provide a way to run as a system service (as I understand it), but upon reflection I think it would be best to package it with a systemd unit file.

> Look like you need a mentor, I can take your review request and be your
> packager mentor, but to take your review request I will request you to run
> some informal reviews to show how do you understand the Fedora Packaging
> Guidelines.

Great! I'm more than happy to perform some informal reviews. I'll aim to get a few done over the next week, if that sounds like a reasonable time-line.

Comment 3 William Moreno 2015-11-30 15:16:32 UTC
OK

I will take your review request and be your mentor to become a Fedora Packager.

Comment 4 Jeremy Cline 2015-12-02 04:41:39 UTC
I completed an informal review: https://bugzilla.redhat.com/show_bug.cgi?id=1286699

I'll see if I can knock a few more out in the next week.

Comment 5 Jeremy Cline 2015-12-10 02:56:25 UTC
I've completed a second informal review: https://bugzilla.redhat.com/show_bug.cgi?id=1288886

Comment 6 Jeremy Cline 2015-12-10 03:21:02 UTC
I've completed a third informal review: https://bugzilla.redhat.com/show_bug.cgi?id=1279104

Based on my new-found knowledge, there are a few things I'd like to update in my own spec file. I hope to finish this up tonight, but it may not happen until the weekend.

Comment 8 Upstream Release Monitoring 2015-12-10 23:51:13 UTC
williamjmorenor's scratch build of python-flower-0.8.3-1.fc23.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=12142482

Comment 9 William Moreno 2015-12-11 17:48:48 UTC
OK you have done 3 informals review so here your review, python packages and generally easy to package but who will see in the review than Fedora Packaging Guidelines forces to a high quality packaging even for simple apps, this is the reason because always is better to install from repos than directly from pypi.

Package Review
==============
1. [!]: Large documentation must go in a -doc subpackage.
There is a docs directoty in the tarball than contains a sphinx documentation you need futures sphinx sphinxcontrib-fulltoc and sphinxcontrib-httpdomain check if those BuildRequires are available in Fedora, if not you will need to package thpse firts. Those docs must go in a docs subpackage.

Note than the tarball contains a /docs/.build/html directori, you can include this in docs but it is allways prefered remove this files and build the documentations from sources in the rpm build process.

2. Include the AUTHORS and CHANGES files with %doc

3. [!]: %check is present and all tests pass.
Upstream Provides some test than you need to run in %%check, you need to add mock to run the test.

4. [!]: Package contains systemd file(s) if in need.
This app SERVE a web interface so you must provide a unit file (flower.service)

5. [!]: Binary eggs must be removed in %prep
Tarball contains egg info than you must remove in %%prep

6. [!]: Sources contain only permissible code or content.
Also need to run a rm -rg *.pyc to remove the python bytecode in the tarball and package only with source python files (.py) rpmbuild will create it owns bite code.

7. [!]: Package does not generate any conflict.
   [!]: Requires correct, justified where necessary.
You have a colition in %{_bindir} when you install flower with python2 this create a executable named flower, then you install with python3 and this owerwrite the flower executable, then you include de python3 flower executable in the python2 subpackage, this create than the flower executable in the python2 package have a python3 shebang so the python2 package requires python3 and will not work if the python3 subpackage ins't installed.

python2-flower (rpmlib, GLIBC filtered):
    /usr/bin/python3

You need to install with python2 and rename the flower executable to flower-py2 then install with python3 and in %files do:

%files -n python2-%{srcname}
%{_bindir}/%{srcname}-py2

%files -n python3-%{srcname}
%{_bindir}/%{srcname}

8. rpmlint is unhappy about the missing man pages for the executables files in bindir, you can use sphinx to build a manpage and include it in the package.

======

Try to fix those issues as part as your packaging learning, a really good wait to learn if looking at others spec files in Fedora PKGDB, if you need help to fix some of those issues just ping me.

======

===== MUST items =====
Generic:
[Pass]: Package is licensed with an open-source compatible license and meets
        other legal requirements as defined in the legal section of Packaging
        Guidelines.
[Pass]: License field in the package spec file matches the actual license.
[Pass]: License file installed when any subpackage combination is installed.
[Pass]: Package contains no bundled libraries without FPC exception.
[Pass]: Changelog in prescribed format.
[NA]:   Package contains desktop file if it is a GUI application.
[NA]:   Development files must be in a -devel package
[Pass]: Package uses nothing in %doc for runtime.
[Pass]: Package consistently uses macros
[Pass]: Package is named according to the Package Naming Guidelines.
[Pass]: Package obeys FHS, except libexecdir and /usr/target.
[NA]:   If the package is a rename of another package, proper Obsoletes and
        Provides are present.
[Pass]: Spec file is legible and written in American English.
[Pass]: Package is not known to require an ExcludeArch tag.
[Pass]: Package successfully compiles and builds into binary rpms on at least
        one supported primary architecture.
[Pass]: Package installs properly.
[Pass]: Rpmlint is run on all rpms the build produces.
[Pass]: 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.
[Pass]: Package requires other packages for directories it uses.
[Pass]: Package must own all directories that it creates.
[Pass]: Package does not own files or directories owned by other packages.
[Pass]: All build dependencies are listed in BuildRequires, except for any
        that are listed in the exceptions section of Packaging Guidelines.
[Pass]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[Pass]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
        beginning of %install.
[Pass]: Macros in Summary, %description expandable at SRPM build time.
[Pass]: Dist tag is present.
[Pass]: Package does not contain duplicates in %files.
[Pass]: Permissions on files are set properly.
[Pass]: Package use %makeinstall only when make install DESTDIR=... doesn't
        work.
[Pass]: Package is named using only allowed ASCII characters.
[Pass]: Package does not use a name that already exists.
[Pass]: Package is not relocatable.
[Pass]: Sources used to build the package match the upstream source, as
        provided in the spec URL.
[Pass]: Spec file name must match the spec package %{name}, in the format
        %{name}.spec.
[Pass]: File names are valid UTF-8.
[Pass]: Packages must not store files under /srv, /opt or /usr/local

Python:
[Pass]: Python eggs must not download any dependencies during the build
        process.
[Pass]: A package which is used by another package via an egg interface should
        provide egg info.
[!]:    Package meets the Packaging Guidelines::Python
[Pass]: Package contains BR: python2-devel or python3-devel

===== SHOULD items =====
Generic:
[NA]:  If the source package does not include license text(s) as a separate
       file from upstream, the packager SHOULD query upstream to include it.
[Pass]: Final provides and requires are sane (see attachments).
[NA]:   Fully versioned dependency in subpackages if applicable.
[?]:    Package functions as described.
[Pass]: Latest version is packaged.
[Pass]: Package does not include license text files separate from upstream.
[NA]:   Description and summary sections in the package spec file contains
        translations for supported Non-English languages, if available.
[Pass]: Package should compile and build into binary rpms on all supported
        architectures.
[Pass]: Packages should try to preserve timestamps of original installed
        files.
[Pass]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[Pass]: Sources can be downloaded from URI in Source: tag
[Pass]: Reviewer should test that the package builds in mock.
[Pass]: Buildroot is not present
[Pass]: Package has no %clean section with rm -rf %{buildroot} (or
        $RPM_BUILD_ROOT)
[Pass]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[Pass]: SourceX is a working URL.
[Pass]: Spec use %global instead of %define unless justified.

===== EXTRA items =====
Generic:
[Pass]: Rpmlint is run on all installed packages.
[Pass]: Spec file according to URL is the same as in SRPM.

Rpmlint
-------
Checking: python2-flower-0.8.3-1.fc23.noarch.rpm
          python3-flower-0.8.3-1.fc23.noarch.rpm
          python-flower-0.8.3-1.fc23.src.rpm
python2-flower.noarch: W: no-manual-page-for-binary flower
python3-flower.noarch: W: no-manual-page-for-binary flower
3 packages and 0 specfiles checked; 0 errors, 2 warnings.

Rpmlint (installed packages)
----------------------------
python3-flower.noarch: W: no-manual-page-for-binary flower
python2-flower.noarch: W: no-manual-page-for-binary flower
2 packages and 0 specfiles checked; 0 errors, 2 warnings.

Requires
--------
python3-flower (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3-babel
    python3-celery
    python3-pytz
    python3-tornado

python2-flower (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python-babel
    python-celery
    python-tornado
    pytz

Provides
--------
python3-flower:
    python3-flower

python2-flower:
    python-flower
    python2-flower

Source checksums
----------------
https://pypi.python.org/packages/source/f/flower/flower-0.8.3.tar.gz :
  CHECKSUM(SHA256) this package     : ca6ae26361e58491d51eaded0ee7134087f4ea3cdd00ac158d903dc02dd0e85b
  CHECKSUM(SHA256) upstream package : ca6ae26361e58491d51eaded0ee7134087f4ea3cdd00ac158d903dc02dd0e85b

Comment 10 Jeremy Cline 2015-12-12 17:52:49 UTC
Thanks William!

I've got a lot to fix here, but sphinxcontrib-fulltoc isn't packaged for Fedora, so I've started by submitting a review request for it[0].

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1291007

Comment 11 Jeremy Cline 2015-12-26 05:27:25 UTC
Spec URL: https://raw.githubusercontent.com/jeremycline/python-flower-packaging/master/python-flower.spec
SRPM URL: https://github.com/jeremycline/python-flower-packaging/raw/master/python-flower-0.8.3-2.fc23.src.rpm

Updated based on review:
  - I decided to remove Python 2 support, since I currently only plan to package this for Fedora 23+.
  - Included man pages
  - Separate doc package (built from source)
  - prep cleanup
  - The tests are now run
  - A systemd service unit is included

Comment 12 Upstream Release Monitoring 2015-12-28 22:20:34 UTC
williamjmorenor's scratch build of python-flower-0.8.3-2.fc23.src.rpm for rawhide failed http://koji.fedoraproject.org/koji/taskinfo?taskID=12335113

Comment 13 William Moreno 2015-12-28 23:04:07 UTC
There is a issue instaling python2-sphinx, it was reported, you can wait until the issue is fixed or build the package without the docs. I hope the issue will be fixed soon.

Comment 14 Upstream Release Monitoring 2015-12-29 19:59:26 UTC
jcline's scratch build of python-flower-0.8.3-2.fc23.src.rpm for rawhide failed http://koji.fedoraproject.org/koji/taskinfo?taskID=12344430

Comment 15 Upstream Release Monitoring 2015-12-29 23:58:07 UTC
jcline's scratch build of python-flower-0.8.3-2.fc23.src.rpm for rawhide failed http://koji.fedoraproject.org/koji/taskinfo?taskID=12346105

Comment 16 Upstream Release Monitoring 2015-12-30 00:03:48 UTC
jcline's scratch build of python-flower-0.8.3-2.fc23.src.rpm for rawhide failed http://koji.fedoraproject.org/koji/taskinfo?taskID=12346135

Comment 17 Upstream Release Monitoring 2015-12-30 00:29:14 UTC
jcline's scratch build of python-flower-0.8.3-2.fc23.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=12346273

Comment 19 William Moreno 2015-12-30 18:37:29 UTC
Package Review
==============
1. [!]: Package requires other packages for directories it uses.
        Note: No known owner of /etc/flower
   [!]: Package requires other packages for directories it uses.
        Note: No known owner of /etc/flower
   [!]: Package must own all directories that it creates.
        Note: Directories without known owners: /etc/flower

2. Looks like there some files with a /usr/bin/python sheban than make python3-flower requires both python2(abi) and python3.

3. Upstream provides a Dockerfile, Vagrantfile and a ansible playbook than can be good to include in this package, also do not forget to send the unit file to upstream, apen a pull request and link the pull request in the spec.

===== 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.
[!]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[x]: 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. 
[!]: 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 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]: %config files are marked noreplace or the reason is justified.
[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]: No %config files under /usr.
[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).
[x]: 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.
[-]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: Uses parallel make %{?_smp_mflags} macro.
[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: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.

Rpmlint
-------
Checking: python3-flower-0.8.3-3.fc24.noarch.rpm
          python-flower-doc-0.8.3-3.fc24.noarch.rpm
          python-flower-0.8.3-3.fc24.src.rpm
3 packages and 0 specfiles checked; 0 errors, 0 warnings.

Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No existe el fichero o el directorio
2 packages and 0 specfiles checked; 0 errors, 0 warnings.

Requires
--------
python-flower-doc (rpmlib, GLIBC filtered):

python3-flower (rpmlib, GLIBC filtered):
    /usr/bin/python3
    config(python3-flower)
    python(abi)
    python3-babel
    python3-celery
    python3-pytz
    python3-tornado
    systemd

Provides
--------
python-flower-doc:
    python-flower-doc

python3-flower:
    config(python3-flower)
    python3-flower

Source checksums
----------------
https://pypi.python.org/packages/source/f/flower/flower-0.8.3.tar.gz :
  CHECKSUM(SHA256) this package     : ca6ae26361e58491d51eaded0ee7134087f4ea3cdd00ac158d903dc02dd0e85b
  CHECKSUM(SHA256) upstream package : ca6ae26361e58491d51eaded0ee7134087f4ea3cdd00ac158d903dc02dd0e85b

Comment 20 Upstream Release Monitoring 2016-01-01 00:25:17 UTC
jcline's scratch build of python-flower-0.8.3-4.fc23.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=12363484

Comment 21 Jeremy Cline 2016-01-01 00:38:15 UTC
Spec URL: https://raw.githubusercontent.com/jeremycline/python-flower-packaging/master/python-flower.spec
SRPM URL: https://github.com/jeremycline/python-flower-packaging/raw/master/python-flower-0.8.3-4.fc23.src.rpm

Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=12363484

I've patched the /usr/bin/python shebang. I don't believe we should include the Dockerfile, Vagrantfile, or the Ansible playbooks. Those are for developers and not users. Finally, I don't believe it is appropriate to contribute the service file upstream as it has paths in it that are distro dependent and upstream itself wouldn't distribute it.

Comment 22 Randy Barlow 2016-01-07 15:16:30 UTC
Hello William! I wanted to chime in and say that I also don't think the Dockerfile, Vagrantfile, or Ansible code belong in the RPM package. I'd love to see this package get approved so I can use it on my dev box.

Comment 23 William Moreno 2016-01-07 23:13:35 UTC
Packaged Aproved
================

Comment 24 Gwyn Ciesla 2016-01-08 15:20:47 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/python-flower

Comment 25 Fedora Update System 2016-01-08 18:21:07 UTC
python-flower-0.8.3-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6a09ffb1a8

Comment 26 Fedora Update System 2016-01-09 18:21:21 UTC
python-flower-0.8.3-4.fc23 has been pushed to the Fedora 23 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-2016-6a09ffb1a8

Comment 27 Fedora Update System 2016-01-12 19:11:07 UTC
python-flower-0.8.3-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3a0ac4971c

Comment 28 Fedora Update System 2016-01-13 07:53:33 UTC
python-flower-0.8.3-5.fc23 has been pushed to the Fedora 23 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-2016-3a0ac4971c

Comment 29 Fedora Update System 2016-01-20 21:54:27 UTC
python-flower-0.8.3-5.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.