Bug 1328892

Summary: Review Request: commissaire - Simple cluster host management
Product: [Fedora] Fedora Reporter: Matthew Barnes <mbarnes>
Component: Package ReviewAssignee: William Moreno <williamjmorenor>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jdulaney, package-review, 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-07-01 18:21:46 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:

Description Matthew Barnes 2016-04-20 13:50:48 UTC
Spec URL: https://mbarnes.fedorapeople.org/commissaire/commissaire.spec
SRPM URL: https://mbarnes.fedorapeople.org/commissaire/commissaire-0.0.1rc3-1.fc23.src.rpm

Description:
Commissaire allows administrators of a Kubernetes, Atomic Enterprise or
OpenShift installation to perform administrative tasks without the need
to write custom scripts or manually intervene on systems.

Example tasks include:
  * rolling reboot of cluster hosts
  * upgrade software on cluster hosts
  * check the status of cluster hosts
  * scan for known vulnerabilities
  * add a new host to a cluster for container orchestration

Commissaire is part of Project Atomic.
http://commissaire.readthedocs.org/en/latest/

Fedora Account System Username: mbarnes

Comment 1 Matthew Barnes 2016-04-20 17:34:18 UTC
See also the CLI tool package review:
https://bugzilla.redhat.com/show_bug.cgi?id=1328951

Comment 2 William Moreno 2016-06-01 20:19:34 UTC
I am currious about why you build the docs in %build:

# Build docs
%{__python2} setup.py build_sphinx -c doc -b text

But you only include the source .rst files in %doc, also could be better to have the documentation in a subpackage.

%doc doc/apidoc/*.rst

Also this is a python2 package, does upstream support python3? In RHEL/CentOS it is fine, but in Fedora packaging python3 is prefered.

Comment 3 Matthew Barnes 2016-06-01 21:26:38 UTC
Hey William, thanks for taking this up.

FYI, I am part of upstream.  We mainly develop with python2 and are aiming to get this in RHEL/CentOS by way of Fedora, hence the focus on python2.  But I can change it over to python3 for Fedora.

Good question with the docs.  Some of even the textual docs are autogenerated from the python source code, but they should already be complete in a tarball so I don't know why we're rebuilding them.  Let me get back to you on that.

Comment 4 William Moreno 2016-06-01 22:16:57 UTC
Package Review
==============

Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://fedoraproject.org/wiki/Packaging:Guidelines


- About the check issues you can try to include before tests:
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export PYTHONPATH=%{buildroot}/%{python2_sitearch}


- Please check the ownership of this directories: 
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/systemd/system,
     /usr/lib/systemd


- Please check this rpmlint issues:
Rpmlint
-------
Checking: commissaire-0.0.1rc3-1.fc23.noarch.rpm
          commissaire-0.0.1rc3-1.fc23.src.rpm
commissaire.noarch: E: invalid-version 0.0.1rc3
commissaire.noarch: E: script-without-shebang /usr/lib/systemd/system/commissaire.service
commissaire.noarch: W: dangling-relative-symlink /usr/share/licenses/commissaire/COPYING LICENSE
commissaire.noarch: E: script-without-shebang /etc/sysconfig/commissaire
commissaire.noarch: W: no-manual-page-for-binary commissaire
commissaire.src: E: invalid-version 0.0.1rc3
commissaire.src:63: W: macro-in-comment %{__python2}
2 packages and 0 specfiles checked; 4 errors, 3 warnings.


- The spec is not the same in the link than in the src.rpm
Diff spec file in url and in SRPM
---------------------------------
--- /home/makerpm/1328892-commissaire/srpm/commissaire.spec	2016-06-01 21:28:24.581000000 +0000
+++ /home/makerpm/1328892-commissaire/srpm-unpacked/commissaire.spec	2016-04-19 21:54:59.000000000 +0000
@@ -28,7 +28,4 @@
 Requires:  python-requests
 Requires:  py-bcrypt
-
-# Ansible's Python API has no stability guarantees,
-# so keep the acceptable versions on a short leash.
 Requires:  ansible >= 2.0.1.0
 Requires:  ansible < 2.0.2.0
@@ -64,5 +61,5 @@
 %check
 # XXX: Issue with the coverage module.
-#%{__python2} setup.py nosetests
+# %{__python2} setup.py nosetests

===== 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.
[x]: 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.
[x]: 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
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Rpmlint is run on all rpms the build produces.
[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 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]: Binary eggs must be removed in %prep

===== EXTRA items =====

Requires
--------
commissaire (rpmlib, GLIBC filtered):
    /bin/sh
    /usr/bin/python2
    ansible
    py-bcrypt
    python(abi)
    python-cherrypy
    python-jinja2
    python-requests
    python-setuptools
    python2-falcon
    python2-python-etcd

Provides
--------
commissaire:
    commissaire

Source checksums
----------------
https://github.com/projectatomic/commissaire/archive/0.0.1rc3.tar.gz :
  CHECKSUM(SHA256) this package     : 54254a5455ebff1d3cc97dda683af8fb091afe6b793e9fc384f7316632795898
  CHECKSUM(SHA256) upstream package : 54254a5455ebff1d3cc97dda683af8fb091afe6b793e9fc384f7316632795898

Comment 5 Matthew Barnes 2016-06-03 00:38:17 UTC
Updated spec and srpm.

Turns out I was packaging the wrong documentation files.  I don't think a separate -doc subpackage is needed at this time; it's just a few text files.

Switched the package over to Python 3, but tests are still broken due to some bugs in dependencies.  (Also, our tests are written for Python 2 and it looks like some Python 3 compatibility issues have crept in.)

The rpmlint errors I'm inclined to dismiss.  The script-without-shebang errors are for files that are not scripts, and the "rcX" will soon be dropped from the version.

Also, the range of acceptable Ansible versions needs to be extended for what's available in Fedora.  I'm looking into that but I'm not sure it needs to block the package review.

Let me know if I missed anything.

----

SRPM URL: https://mbarnes.fedorapeople.org/commissaire/commissaire-0.0.1rc3-2.fc23.src.rpm

Spec diff:

@@ -1,6 +1,6 @@
 Name:           commissaire
 Version:        0.0.1rc3
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Simple cluster host management
 License:        GPLv3+
 URL:            http://github.com/projectatomic/commissaire
@@ -8,25 +8,28 @@ Source0:        https://github.com/proje
 
 BuildArch:      noarch
 
-BuildRequires:  python-devel
+BuildRequires:  python3-devel
+BuildRequires:  systemd
 
 # For docs
-BuildRequires:  python-sphinx
+BuildRequires:  python3-sphinx
 
 # For tests
-BuildRequires:  python-coverage
-BuildRequires:  python-mock
-BuildRequires:  python-nose
-BuildRequires:  python-flake8
+%if %{with tests}
+BuildRequires:  python3-coverage
+BuildRequires:  python3-mock
+BuildRequires:  python3-nose
+BuildRequires:  python3-flake8
+%endif
 BuildRequires:  pkgconfig(systemd)
 
-Requires:  python-setuptools
-Requires:  python-cherrypy
-Requires:  python2-falcon
-Requires:  python2-python-etcd
-Requires:  python-jinja2
-Requires:  python-requests
-Requires:  py-bcrypt
+Requires:  python3-setuptools
+Requires:  python3-cherrypy
+Requires:  python3-falcon
+Requires:  python3-python-etcd
+Requires:  python3-jinja2
+Requires:  python3-requests
+Requires:  python3-py-bcrypt
 
 # Ansible's Python API has no stability guarantees,
 # so keep the acceptable versions on a short leash.
@@ -51,19 +54,19 @@ Example tasks include:
 
 
 %build
-%py2_build
+%py3_build
 
 # Build docs
-%{__python2} setup.py build_sphinx -c doc -b text
+%{__python3} setup.py build_sphinx -b text
 
 %install
-%py2_install
+%py3_install
 install -D contrib/systemd/commissaire %{buildroot}%{_sysconfdir}/sysconfig/commissaire
 install -D contrib/systemd/commissaire.service %{buildroot}%{_unitdir}/commissaire.service
 
 %check
 # XXX: Issue with the coverage module.
-#%{__python2} setup.py nosetests
+#%{__python3} setup.py nosetests
 
 %post
 %systemd_post %{name}
@@ -77,18 +80,23 @@ install -D contrib/systemd/commissaire.s
 
 
 %files
-%license COPYING
+%license LICENSE
 %doc README.md
 %doc CONTRIBUTORS
 %doc MAINTAINERS
-%doc doc/apidoc/*.rst
+%doc build/sphinx/text/*.txt
 %{_bindir}/commissaire
-%{python2_sitelib}/*
+%{python3_sitelib}/*
 %{_sysconfdir}/sysconfig/commissaire
 %{_unitdir}/commissaire.service
 
 
 %changelog
+* Thu Jun 02 2016 Matthew Barnes <mbarnes> - 0.0.1rc3-2
+- Switch to python3, drop RHEL hackarounds for Fedora.
+- Package the correct documentation files.
+- Add BR: systemd
+
 * Tue Apr 19 2016 Matthew Barnes <mbarnes> - 0.0.1rc3-1
 - Update for RC3.

Comment 6 Matthew Barnes 2016-06-06 17:01:33 UTC
Another update to comply (I think) with guidelines for pre-releases.
This satisfies rpmlint's complaint about the invalid version.

----

SRPM URL: https://mbarnes.fedorapeople.org/commissaire/commissaire-0.0.1-0.3.rc3.fc23.src.rpm

Spec diff:

@@ -1,10 +1,12 @@
+%global prerelease rc3
+
 Name:           commissaire
-Version:        0.0.1rc3
-Release:        2%{?dist}
+Version:        0.0.1
+Release:        0.3.%{prerelease}%{?dist}
 Summary:        Simple cluster host management
 License:        GPLv3+
 URL:            http://github.com/projectatomic/commissaire
-Source0:        https://github.com/projectatomic/%{name}/archive/%{version}.tar.gz
+Source0:        https://github.com/projectatomic/%{name}/archive/%{version}%{prerelease}.tar.gz
 
 BuildArch:      noarch
 
@@ -50,7 +52,7 @@ Example tasks include:
 
 
 %prep
-%autosetup
+%autosetup -n %{name}-%{version}%{prerelease}
 
 
 %build
@@ -92,6 +94,10 @@ install -D contrib/systemd/commissaire.s
 
 
 %changelog
+* Mon Jun 06 2016 Matthew Barnes <mbarnes> - 0.0.1-0.3.rc3
+- Move pre-release indicator ('rc3') to Release tag for compliance with
+  packaging guidelines.
+
 * Thu Jun 02 2016 Matthew Barnes <mbarnes> - 0.0.1rc3-2
 - Switch to python3, drop RHEL hackarounds for Fedora.
 - Package the correct documentation files.

Comment 7 William Moreno 2016-06-06 19:41:41 UTC
I am finw with this packaging, so I am setting the flag to aproveed.

Comment 8 Matthew Barnes 2016-06-07 01:26:18 UTC
Thanks for the quick responses!

Comment 9 Gwyn Ciesla 2016-06-07 19:12:42 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/commissaire

Comment 10 William Moreno 2016-07-01 18:20:58 UTC
Hi.

I see than there are builds of this package in f23 and f24 but I do not see a update in bodhi, please remember to request the update in bodhi.