Bug 1669793 - Review Request: python-vpoller - Distributed vSphere API Proxy
Summary: Review Request: python-vpoller - Distributed vSphere API Proxy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1659777
Blocks: 1698639
TreeView+ depends on / blocked
 
Reported: 2019-01-27 07:48 UTC by Raphael Groner
Modified: 2019-08-17 00:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-25 00:30:11 UTC
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Raphael Groner 2019-01-27 07:48:14 UTC
Spec URL: http://raphgro.fedorapeople.org/review/py/vmw/python-vpoller.spec
SRPM URL: http://raphgro.fedorapeople.org/review/py/vmw/python-vpoller-0.7.1-1.fc29.src.rpm

Description:

vPoller is a distributed VMware vSphere API Proxy,
designed for discovering and polling of vSphere objects.

It uses the VMware vSphere API in order to perform discovery
and polling of vSphere objects.

vPoller uses the ZeroMQ messaging library for distributing
tasks to workers and load balancing of client requests.

vPoller can be integrated with other systems, which require
access to vSphere objects, but do not have native support
for it.

Possible scenarios where vPoller could be used is integration
with monitoring systems as part of the discovery and polling
process in order to provide monitoring of your VMware vSphere
environment.

Comment 1 Raphael Groner 2019-01-27 07:49:29 UTC
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=32280142

Comment 2 Hirotaka Wakabayashi 2019-01-31 12:33:29 UTC
Hello, this is an unofficial review. Please read it for your reference.

Summary
=======

1. rpmbuild error
2. rpmlint result
3. License
4. Others

Details
=======

1. rpmbuild error
-----------------

The 'sphinx-build' command, which is provided by python2-sphinx, is required
in "make -O  -C docs html".  sphinx-build-3 should be used in this case.

2. rpmlint on the binary rpm
-----------------------------

rpmlint on the binary rpm package in my environment(fc29) reports errors and
warnings.

* spelling-error warnings are not problems.
* wrong-script-interpreter errors can be problems when users manually install
  them. Here is the guideline.
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shebang_lines
* hidden-file-or-dir warning should be fixed if the hidden file is no use for
  users.
* no-manual-page-for-binary should be fixed. Here is the guideline. You might
  know that help2man is a useful tool.
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages

::

   python3-vpoller.noarch: W: spelling-error Summary(en_US) vSphere -> v Sphere, sphere
   python3-vpoller.noarch: W: spelling-error %description -l en_US vSphere -> v Sphere, sphere
   python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/contrib/zabbix/externalscripts/cvpoller-zabbix /usr/bin/env bash
   python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/contrib/zabbix/externalscripts/vpoller-zabbix /usr/bin/env bash
   python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/misc-tools/bootstrap-vpoller.sh /usr/bin/env sh
   python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/misc-tools/request-simulator.sh /usr/bin/env bash
   python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/zabbix/externalscripts/cvpoller-zabbix /usr/bin/env sh
   python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/zabbix/externalscripts/cvpoller-zabbix-vm-disk-get /usr/bin/env sh
   python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/zabbix/externalscripts/vpoller-zabbix /usr/bin/env sh
   python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/zabbix/vsphere-import/zabbix-vsphere-import /usr/bin/env python
   python3-vpoller.noarch: W: hidden-file-or-dir /usr/share/doc/python3-vpoller/html/.buildinfo
   python3-vpoller.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/python3-vpoller/html/objects.inv
   python3-vpoller.noarch: W: file-not-utf8 /usr/share/doc/python3-vpoller/html/objects.inv
   python3-vpoller.noarch: W: no-manual-page-for-binary vpoller-client
   python3-vpoller.noarch: W: no-manual-page-for-binary vpoller-proxy
   python3-vpoller.noarch: W: no-manual-page-for-binary vpoller-worker
   1 packages and 0 specfiles checked; 8 errors, 8 warnings.

3. License
-----------

py-vpoller is licensed under the BSD License, but are files in contrib dir and
extra also licensed under the BSD License?  If not clear, it is always
preferred to ask upstream. See the following guideline.
https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_clarification

4. Others
---------

Fedora guideline recommends putting "python_enable_dependency_generator" just
before the main package’s %description declaration.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_automatically_generated_dependencies

You can use the %{py_dist_name} macro that simply transforms any standardized
name to the canonical format.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_requires_and_buildrequires_with_standardized_names
For example::

   > BuildRequires:  python%{python3_pkgversion}-docopt
   > BuildRequires:  python%{python3_pkgversion}-zmq
   > BuildRequires:  python%{python3_pkgversion}-vconnector
   > BuildRequires:  python%{python3_pkgversion}-pyvmomi
   > BuildRequires:  python%{python3_pkgversion}-sphinx

could be::

   > BuildRequires:  %{py3_dist docopt zmq vconnector pyvmomi sphinx}


Thanks in advance,
Hirotaka Wakabayashi

Comment 3 Raphael Groner 2019-02-02 12:39:55 UTC
Thanks for the hints. I'll fix ASAP.

Especially good to look into rpmlint output, I did not have amy chance because my local repo cache for mock seemed to be outdated and failed to try by myself in prior.

The idea with help2man came originally from me but I obviously failed here to apply. Thanks for caring. :-)

No idea what's meant with sphinx-build, it works on koji, see snippet from build.log:
+ PYTHONPATH=../src
+ SPHINXOPTS=-j48
+ /usr/bin/make -O -j48 -C docs html
make: Entering directory '/builddir/build/BUILD/py-vpoller-0.7.1/docs'
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.7.6
making output directory...

Comment 4 Robert-André Mauchin 2019-02-16 14:54:58 UTC
Also add a comment explaining why the patch is needed/what does it do.

Comment 5 Raphael Groner 2019-02-19 00:15:32 UTC
Bug #1667641 about python-tabulate needs to get resolved first because it's about an (indirect) dependency for python-vpoller, both also planned in epel7.

Comment 6 Raphael Groner 2019-04-10 20:14:54 UTC
SPEC: https://raphgro.fedorapeople.org/review/py/vmw/python-vpoller.spec
SRPM: https://raphgro.fedorapeople.org/review/py/vmw/python-vpoller-0.7.3-1.fc29.src.rpm

%changelog
* Wed Apr 10 2019 Raphael Groner <> - 0.7.3-1
- new version
- drop upstreamed license patch
- generate manpages
- fix rpmlint

Comment 7 Robert-André Mauchin 2019-04-10 20:48:50 UTC
 - Fix help2man and chmod

# wrong-script-interpreter
for dir in contrib extra ; do
 find ${dir} -type f -not -name \*.md -exec chmod 0644 '{}' \;
done


%install
%py3_install

# manpages
install -d %{buildroot}%{_mandir}/man.1
for suffix in client proxy worker ; do
PYTHONPATH=%{buildroot}%{python3_sitelib} help2man --no-discard-stderr \
           -o %{buildroot}%{_mandir}/man.1/%{name}-${suffix}.1 \
           %{buildroot}%{_bindir}/%{modname}-${suffix}
done

[…]


%{_mandir}/man.1/%{modname}-*.1*

 -

# skip useless files
find docs/_build/html -name .\* -print -delete 

   Use:

rm -rf docs/_build/html/.{doctrees,buildinfo}

 - %doc docs/_build/* → %doc docs/_build//html

Comment 8 Robert-André Mauchin 2019-04-10 20:51:11 UTC
Sorry:

# wrong-script-interpreter
for dir in contrib extra ; do
 find ${dir} -type f -not -name \*.md -exec chmod 0644 '{}' \;
done


%install
%py3_install

# manpages
install -d %{buildroot}%{_mandir}/man.1
for suffix in client proxy worker ; do
PYTHONPATH=%{buildroot}%{python3_sitelib} help2man --no-discard-stderr \
           -o %{buildroot}%{_mandir}/man.1/%{modname}-${suffix}.1 \
           %{buildroot}%{_bindir}/%{modname}-${suffix}
done

Comment 9 Robert-André Mauchin 2019-04-10 20:56:32 UTC
 - It's man1 not man.1:

# wrong-script-interpreter
for dir in contrib extra ; do
 find ${dir} -type f -not -name \*.md -exec chmod 0644 '{}' \;
done


%install
%py3_install

# manpages
install -d %{buildroot}%{_mandir}/man.1
for suffix in client proxy worker ; do
PYTHONPATH=%{buildroot}%{python3_sitelib} help2man --no-discard-stderr \
           -o %{buildroot}%{_mandir}/man1/%{modname}-${suffix}.1 \
           %{buildroot}%{_bindir}/%{modname}-${suffix}
done

[…]


%{_mandir}/man1/%{modname}-*.1*

Comment 10 Robert-André Mauchin 2019-04-10 21:02:04 UTC
 - Split the doc into a separate subpackage

 - still have the wrong script interpreter, not sure why


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

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


Issues:
=======
- Large documentation must go in a -doc subpackage. Large could be size
  (~1MB) or number of files.
  Note: Documentation size is 8140800 bytes in 150 files.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_documentation


===== 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: "Unknown or generated", "BSD 2-clause "Simplified" License",
     "*No copyright* BSD (unspecified)", "GNU General Public License (v2)".
     122 files have unknown license. Detailed output of licensecheck in
     /home/bob/packaging/review/python-vpoller/review-python-
     vpoller/licensecheck.txt
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/man/man.1
[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]: 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 does not own files or directories owned by other packages.
[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]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[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]: 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.
[-]: %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: python3-vpoller-0.7.3-1.fc31.noarch.rpm
          python-vpoller-0.7.3-1.fc31.src.rpm
python3-vpoller.noarch: W: spelling-error Summary(en_US) vSphere -> v Sphere, sphere
python3-vpoller.noarch: W: spelling-error %description -l en_US vSphere -> v Sphere, sphere
python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/contrib/zabbix/externalscripts/cvpoller-zabbix /usr/bin/env bash
python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/contrib/zabbix/externalscripts/vpoller-zabbix /usr/bin/env bash
python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/misc-tools/bootstrap-vpoller.sh /usr/bin/env sh
python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/misc-tools/request-simulator.sh /usr/bin/env bash
python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/zabbix/externalscripts/cvpoller-zabbix /usr/bin/env sh
python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/zabbix/externalscripts/cvpoller-zabbix-vm-disk-get /usr/bin/env sh
python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/zabbix/externalscripts/vpoller-zabbix /usr/bin/env sh
python3-vpoller.noarch: E: wrong-script-interpreter /usr/share/doc/python3-vpoller/extra/zabbix/vsphere-import/zabbix-vsphere-import /usr/bin/env python
python3-vpoller.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/python3-vpoller/html/objects.inv
python3-vpoller.noarch: W: file-not-utf8 /usr/share/doc/python3-vpoller/html/objects.inv
python-vpoller.src: W: spelling-error Summary(en_US) vSphere -> v Sphere, sphere
python-vpoller.src: W: spelling-error %description -l en_US vSphere -> v Sphere, sphere
2 packages and 0 specfiles checked; 8 errors, 6 warnings.

Comment 11 Robert-André Mauchin 2019-04-10 21:27:17 UTC
 - All right, this fixes it:

%build
%py3_build
PYTHONPATH=../src SPHINXBUILD=sphinx-build-3 SPHINXOPTS=%{_smp_mflags} %make_build -C docs html
rm -rf docs/_build/html/.{doctrees,buildinfo}

# wrong-script-interpreter
grep -rl "/usr/bin/env" | xargs chmod 0644
grep -rl "/usr/bin/env" | xargs sed -i "s|#!/usr/bin/env |/usr/bin/|"

%install
%py3_install

# manpages
install -d %{buildroot}%{_mandir}/man1
for suffix in client proxy worker ; do
PYTHONPATH=%{buildroot}%{python3_sitelib} help2man --no-discard-stderr \
           -o %{buildroot}%{_mandir}/man1/%{modname}-${suffix}.1 \
           %{buildroot}%{_bindir}/%{modname}-${suffix}
done

Comment 12 Raphael Groner 2019-04-14 19:14:13 UTC
SPEC: https://raphgro.fedorapeople.org/review/py/vmw/python-vpoller.spec
SRPM: https://raphgro.fedorapeople.org/review/py/vmw/python-vpoller-0.7.3-2.fc29.src.rpm

Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=34172251

* Sun Apr 14 2019 Raphael Groner <> - 0.7.3-2
- split subpackages for doc and bin
- move BR into subpackages

Comment 13 Robert-André Mauchin 2019-04-14 19:33:22 UTC
LGTM, package approved.

Comment 14 Raphael Groner 2019-04-14 20:28:18 UTC
Thanks for the review. The package import 'll happen soonish.

Comment 15 Raphael Groner 2019-04-16 16:49:46 UTC
Any thoughts against a build in epel7? Obviously, we need all dependencies to be available, incl. python-vconnector (bug #1659777).

Rawhide requested: https://pagure.io/releng/fedora-scm-requests/issue/11130

Comment 16 Raphael Groner 2019-04-16 16:52:27 UTC
epel7 requested: https://pagure.io/releng/fedora-scm-requests/issue/11132

Comment 17 Gwyn Ciesla 2019-04-16 18:30:56 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-vpoller

Comment 18 Raphael Groner 2019-05-04 19:07:49 UTC
(In reply to Raphael Groner from comment #16)
> epel7 requested: https://pagure.io/releng/fedora-scm-requests/issue/11132

Waiting for a resolution to get a build of python36-zmq:
https://src.fedoraproject.org/rpms/python-zmq/pull-request/3

Comment 19 Fedora Update System 2019-05-20 20:32:15 UTC
python-vpoller-0.7.3-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-e7b909634e

Comment 20 Fedora Update System 2019-05-21 03:46:12 UTC
python-vpoller-0.7.3-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-2019-e7b909634e

Comment 21 Raphael Groner 2019-05-24 07:53:29 UTC
Copied from bodhi: tis 13 hours ago

python-vpoller-doc-0.7.3-3.el7.noarch requires /sbin/runscript which is not provided by any package.

Comment 22 Fedora Update System 2019-07-03 16:59:04 UTC
FEDORA-EPEL-2019-b642a98978 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-b642a98978

Comment 23 Fedora Update System 2019-07-04 01:16:03 UTC
python-vpoller-0.7.3-4.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-2019-b642a98978

Comment 24 Fedora Update System 2019-07-25 00:30:11 UTC
python-vpoller-0.7.3-4.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2019-08-01 11:21:49 UTC
FEDORA-EPEL-2019-51cc802fd3 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-51cc802fd3

Comment 26 Fedora Update System 2019-08-01 11:40:20 UTC
FEDORA-EPEL-2019-51cc802fd3 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-51cc802fd3

Comment 27 Fedora Update System 2019-08-01 18:50:03 UTC
FEDORA-2019-ec1e6048c9 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ec1e6048c9

Comment 28 Fedora Update System 2019-08-02 00:55:19 UTC
python-vpoller-0.7.3-6.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-ec1e6048c9

Comment 29 Fedora Update System 2019-08-02 01:06:30 UTC
python-vpoller-0.7.3-6.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-2019-51cc802fd3

Comment 30 Fedora Update System 2019-08-11 01:13:02 UTC
python-vpoller-0.7.3-6.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 31 Fedora Update System 2019-08-17 00:40:37 UTC
python-vpoller-0.7.3-6.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.