Spec URL: https://tokyo.mandre.org/~martin/packaging/openstack-tripleo-validations.spec SRPM URL: https://tokyo.mandre.org/~martin/packaging/openstack-tripleo-validations-0.0.1-1.fc24.src.rpm Description: A collection of Ansible playbooks to detect and report potential issues during TripleO deployments.
I've moved the spec file to https://github.com/mandre/tripleo-validations-packaging, I figured it would be easier to respond to feedback if I versionate my changes. Added html documentation and test subpackage.
Hello Martin, Thanks for submitting for Package Review: Below is my comments: [1.] Replace Version: and Release: fields to 'XXX' as dlrn takes both of these from the tags set on the git repositories [2.] include python-pbr and python-setuptools to Requires also. [3.] remove this line rm -rf *.egg-info, please do not delete egg files, it contains text fixtures which does not get copied under %{python2_sitelib}/<pypi_module>/tests folders. [4.] please include Build Requires and Requires for openstack-tripleo-validations-tests based on packages present in test-requirements.txt and also include Requires: %{name} = %{version}-%{release} [5.] include %check %{__python2} setup.py testr to run the tests while building the rpms. [6.] For Building Documentation you can simply use: Add this line above in the spec file: %global with_doc %{!?_without_doc:1}%{?_without_doc:0} # docs generation export PYTHONPATH="$( pwd ):$PYTHONPATH" pushd doc %if 0%{?with_doc} SPHINX_DEBUG=1 sphinx-build -b html source build/html # Fix hidden-file-or-dir warnings rm -fr build/html/.doctrees build/html/.buildinfo %endif popd [7.] Since docs are not so big, please include it under %files section as %doc doc/build/html [8.] Include egg files in %files section %{python2_sitelib}/*-*.egg-info [9.] These two lines are not required: %{_datadir}/%{name} +%{_defaultdocdir}/%{name} Rest looks ok to me. Thanks, Chandan Kumar
Thanks Chandan for the very thorough review. I've created the tripleo-validations spec file based on the one of tripleo-common and other information I could find on RDO website but apparently missed quite a few things. (In reply to Chandan Kumar from comment #2) > Hello Martin, > > Thanks for submitting for Package Review: > > Below is my comments: > > [1.] Replace Version: and Release: fields to 'XXX' as dlrn takes both of > these from the tags set on the git repositories Done. https://github.com/mandre/tripleo-validations-packaging/commit/51b40f927d1420512ae664eb559395ac29620763 > [2.] include python-pbr and python-setuptools to Requires also. Done. https://github.com/mandre/tripleo-validations-packaging/commit/1b2908852128a3cac84bda1815c0b630ae364df4 > [3.] remove this line rm -rf *.egg-info, please do not delete egg files, it > contains text fixtures which does not get copied under > %{python2_sitelib}/<pypi_module>/tests folders. Done. https://github.com/mandre/tripleo-validations-packaging/commit/1308d380d422c00fc03d29550fb46d84458ec2f3 > [4.] please include Build Requires and Requires for > openstack-tripleo-validations-tests based on packages present in > test-requirements.txt I'm not too sure about what should be in Requires and BuildRequires for the test package. I've looked at other spec files but couldn't find a package in RDO which has more than the "Requires: %{name} = %{version}-%{release}" line. > and also include Requires: %{name} = %{version}-%{release} Done. https://github.com/mandre/tripleo-validations-packaging/commit/5604bfcde9fe428b56e9ffb8a2ced2abc2462c68 > [5.] include > %check > %{__python2} setup.py testr to run the tests while building the rpms. Done. https://github.com/mandre/tripleo-validations-packaging/commit/49d33ac3681a86028e7b2b21c1137017b42c5842 > [6.] For Building Documentation you can simply use: > > Add this line above in the spec file: > %global with_doc %{!?_without_doc:1}%{?_without_doc:0} > > # docs generation > export PYTHONPATH="$( pwd ):$PYTHONPATH" > pushd doc > %if 0%{?with_doc} > SPHINX_DEBUG=1 sphinx-build -b html source build/html > # Fix hidden-file-or-dir warnings > rm -fr build/html/.doctrees build/html/.buildinfo > %endif > popd Done. https://github.com/mandre/tripleo-validations-packaging/commit/4f442b3fe76c38551fddf7809e60e4eb321fbfd3 > [7.] Since docs are not so big, please include it under %files section > as %doc doc/build/html > > [8.] Include egg files in %files section > > %{python2_sitelib}/*-*.egg-info > > [9.] These two lines are not required: > %{_datadir}/%{name} > +%{_defaultdocdir}/%{name} 7, 8, and 9 done in https://github.com/mandre/tripleo-validations-packaging/commit/5223b90950d0aa04ac43b21589fd3afdfe8bf562 > Rest looks ok to me. > > Thanks, > > Chandan Kumar
Just a little update: I was able to successfully build tripleo-validations package with spec file at https://raw.githubusercontent.com/mandre/tripleo-validations-packaging/bde878b7482eac1945e76d7348c16a01b4a9bde6/openstack-tripleo-validations.spec I needed https://review.openstack.org/#/c/322178/ in tripleo-validations though, otherwise the build fails due to missing /usr/share/openstack-tripleo-validations directory.
Martin it looks like 322178 was merged, what's the next step?
Jason, that just means the package should build cleanly now. Is there anything else we ought to do/fix or do we just wait?
Haikel/Chandan, anything else we need on this?
Hello Martin, The specs looks good now. Please attach the latest srpm to this bug for further review. Thanks, Chandan Kumar
Hello Martin, [1.] some more correction in the spec file, Documentation size is 675840 bytes in 51 files. so we need to add a doc subpackage, we need to move files under this package. [2.] Some rpmlint errors on packages: openstack-tripleo-validations.noarch: E: zero-length /usr/share/doc/openstack-tripleo-validations/html/_sources/validations-post-deployment.txt openstack-tripleo-validations.noarch: E: zero-length /usr/share/doc/openstack-tripleo-validations/html/_sources/validations-pre-deployment.txt https://fedoraproject.org/wiki/Common_Rpmlint_issues#zero-length this link will help to fix it. Thanks, Chandan Kumar
Created attachment 1193490 [details] Latest SRPM
(In reply to Chandan Kumar from comment #9) > Hello Martin, > > [1.] some more correction in the spec file, > Documentation size is 675840 bytes in 51 files. so we need to add a doc > subpackage, we need to move files under this package. These are almost entirely due to the html format of the doc (static assets generated automatically). Can we consider switching to a text format to reduce the size and avoid creating a doc subpackage? > [2.] Some rpmlint errors on packages: > openstack-tripleo-validations.noarch: E: zero-length > /usr/share/doc/openstack-tripleo-validations/html/_sources/validations-post- > deployment.txt > openstack-tripleo-validations.noarch: E: zero-length > /usr/share/doc/openstack-tripleo-validations/html/_sources/validations-pre- > deployment.txt These files are needed. They are sourced by the README file and were introduced in https://github.com/openstack/tripleo-validations/commit/7456102348bef7535a82338acab631bd4999397f
Created attachment 1193491 [details] Latest SRPM
Hello Martin, I have added the doc subpackage, tripleo-validation executables and fixed rpmlints in this review https://github.com/mandre/tripleo-validations-packaging/pull/1 Please have a look. Thanks, Chandan Kumar
Hi Chandan, I confirm the changes you made look good to me. Thanks a lot.
Hello Martin, Thanks for the changes, The spec file looks ok to me. Please make sure the current generated rpms for this spec file works properly. @hguemar, please have a look, anything more needed for further package approval. Thanks, Chandan Kumar
The RPM built with spec at https://raw.githubusercontent.com/mandre/tripleo-validations-packaging/master/openstack-tripleo-validations.spec works as expected. Thanks, Martin
spec is good for the initial import, after project is created in review.rdoproject.org
Ok, builds and runs correctly. Few items needs to be fixed before approval: * Provides/Obsoletes: tripleo-validations is useless, this is a new package, we're just messing up RPM dep solver for free. * doc generation must be moved to %build * use $PWD instead of forking shell with $( pwd)
Hi Haïkel, I addressed your comments in https://raw.githubusercontent.com/mandre/tripleo-validations-packaging/65c35c6714b6429cd0e0814c16cdd646e1ed4f8b/openstack-tripleo-validations.spec.
Let's import this latest spec into review.rdoproject.org and continue commenting there, I've few more nitpicks but it's not worth blocking initial review here. IMHO we should import initial spec as soon as basic licensing check is done then iterate in the initial gerrit review (step 3. in https://www.rdoproject.org/documentation/rdo-packaging/#how-to-add-a-new-package-to-rdo-trunk )
Available for testing in the RDO Newton3 testing repo: http://buildlogs.centos.org/centos/7/cloud/x86_64/rdo-trunk-master-tested/openstack-tripleo-validations-5.1.1-0.20160907135818.3652f12.el7.centos.noarch.rpm How-to-test steps from https://etherpad.openstack.org/p/rdo-test-days-newton-m3 * install openstack-tripleo-validations package on the undercloud * source ~/stackrc * ansible-playbook -i /bin/tripleo-ansible-inventory /usr/share/openstack-tripleo-validations/validations/some_validation.yaml
This landed so closing.