RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1447914 - opstools-ansible - Ansible Playbooks Opstools server side installer
Summary: opstools-ansible - Ansible Playbooks Opstools server side installer
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: Package Review
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: trunk
Assignee: Matthias Runge
QA Contact: hguemar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-04 08:43 UTC by Juan Badia Payno
Modified: 2021-01-13 12:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-13 12:26:06 UTC
Embargoed:
mrunge: rdo-review+


Attachments (Terms of Use)

Description Juan Badia Payno 2017-05-04 08:43:03 UTC
SPEC: https://github.com/centos-opstools/opstools-ansible/raw/master/opstools-ansible.spec

SRPM: https://github.com/jbadiapa/packages/raw/master/opstools/opstools-ansible-0.1.0-2.el7.centos.src.rpm


rpmlint opstools-ansible.spec ../SRPM/opstools-ansible-0.1.0-2.el7.centos.src.rpm 
1 packages and 1 specfiles checked; 0 errors, 0 warnings.

Comment 1 Matthias Runge 2017-05-05 08:43:23 UTC
fedora-review returns: 
Rpmlint
-------
Checking: opstools-ansible-0.1.0-2.fc27.noarch.rpm
          opstools-ansible-0.1.0-2.fc27.src.rpm
opstools-ansible.noarch: W: incoherent-version-in-changelog 0.0.2-0.20170424 ['0.1.0-2.fc27', '0.1.0-2']
opstools-ansible.noarch: E: wrong-script-interpreter /usr/sbin/opstools-server-installation /usr/bin/env python
opstools-ansible.noarch: W: no-manual-page-for-binary opstools-server-installation
2 packages and 0 specfiles checked; 1 errors, 2 warnings.

Please fix the issues, especially the wring interpreter error. In RPM world, we
know which interpreter is installed at what place.

Comment 2 Martin Magr 2017-05-05 14:34:17 UTC
Not sure if this is problem of package review, but my fedora-review fails on:

DEBUG util.py:522:  Executing command: ['/usr/bin/yum-builddep', '--installroot', '/var/lib/mock/centos-opstools-el7-x86_64/root/', '/var/lib/mock/centos-opstools-el7-x86_64/root//builddir/build/SRPMS/opstools-ansible-0.1.0-2.el7.src.rpm'] with env {'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'LC_MESSAGES': 'C', 'HOSTNAME': 'mock', 'LANG': 'en_US.UTF-8', 'HOME': '/builddir'} and shell False
DEBUG util.py:439:  Yum-utils package has been deprecated, use dnf instead.
DEBUG util.py:439:  See 'man yum2dnf' for more information.
DEBUG util.py:439:  Getting requirements for opstools-ansible-0.1.0-2.el7.src
DEBUG util.py:439:   --> python-tox-2.3.1-1.el7.noarch
DEBUG util.py:439:  Error: No Package found for ansible-lint
DEBUG util.py:439:  Error: No Package found for pandoc
DEBUG util.py:439:  Error: No Package found for yamllint
DEBUG util.py:577:  Child return code was: 1


I've used centos-opstools env for mock. Given that we want to build package within CentOS OpsTools SIG, we gonna need to either build(tag) all the dependencies or avoid being dependent on packages we don't ship.

Comment 3 Juan Badia Payno 2017-05-05 14:45:13 UTC
(In reply to Martin Magr from comment #2)
> Not sure if this is problem of package review, but my fedora-review fails on:
> 
> DEBUG util.py:522:  Executing command: ['/usr/bin/yum-builddep',
> '--installroot', '/var/lib/mock/centos-opstools-el7-x86_64/root/',
> '/var/lib/mock/centos-opstools-el7-x86_64/root//builddir/build/SRPMS/
> opstools-ansible-0.1.0-2.el7.src.rpm'] with env {'PATH':
> '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf
> "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'TERM':
> 'vt100', 'SHELL': '/bin/bash', 'LC_MESSAGES': 'C', 'HOSTNAME': 'mock',
> 'LANG': 'en_US.UTF-8', 'HOME': '/builddir'} and shell False
> DEBUG util.py:439:  Yum-utils package has been deprecated, use dnf instead.
> DEBUG util.py:439:  See 'man yum2dnf' for more information.
> DEBUG util.py:439:  Getting requirements for opstools-ansible-0.1.0-2.el7.src
> DEBUG util.py:439:   --> python-tox-2.3.1-1.el7.noarch
> DEBUG util.py:439:  Error: No Package found for ansible-lint
> DEBUG util.py:439:  Error: No Package found for pandoc
> DEBUG util.py:439:  Error: No Package found for yamllint
> DEBUG util.py:577:  Child return code was: 1
> 
> 
> I've used centos-opstools env for mock. Given that we want to build package
> within CentOS OpsTools SIG, we gonna need to either build(tag) all the
> dependencies or avoid being dependent on packages we don't ship.

It seems that you need to enable the epel repository, or enable another repo with those packages.

Comment 4 Martin Magr 2017-05-09 08:37:28 UTC
You cannot enable EPEL repo when you will be building the package in CBS.

Comment 5 Matthias Runge 2017-08-22 15:51:32 UTC
Package Review
==============

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


Issues:
=======
- Sources used to build the package match the upstream source, as provided
  in the spec URL.
  Note: Check did not completechecksum differs and there are problems
  running diff. Please verify manually.
  See: http://fedoraproject.org/wiki/Packaging/SourceURL


===== 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: "Apache (v2.0)", "*No copyright* Apache", "Unknown or
     generated", "*No copyright* Apache (v2.0)". 185 files have unknown
     license. Detailed output of licensecheck in
     /home/mrunge/review/1447914-opstools-ansible/licensecheck.txt
[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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 112640 bytes in 4 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]: 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

===== 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.
[!]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[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.
[!]: %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:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: opstools-ansible-0.1.0-2.fc27.noarch.rpm
          opstools-ansible-0.1.0-2.fc27.src.rpm
opstools-ansible.noarch: W: no-manual-page-for-binary opstools-server-installation
2 packages and 0 specfiles checked; 0 errors, 1 warnings.




Rpmlint (installed packages)
----------------------------
opstools-ansible.noarch: W: no-manual-page-for-binary opstools-server-installation
1 packages and 0 specfiles checked; 0 errors, 1 warnings.



Diff spec file in url and in SRPM
---------------------------------
--- /home/mrunge/review/1447914-opstools-ansible/srpm/opstools-ansible.spec	2017-08-22 17:35:20.533138410 +0200
+++ /home/mrunge/review/1447914-opstools-ansible/srpm-unpacked/opstools-ansible.spec	2017-05-09 13:39:42.000000000 +0200
@@ -1,17 +1,16 @@
-%global with_docs 0
-%{!?_licensedir: %global license %%doc}
-
 Name:           opstools-ansible
 Version:        0.1.0
-Release:        4%{?dist}
+Release:        2%{?dist}
 Summary:        Ansible playbooks for Operational Tools Server installation
 
 License:        ASL 2.0
 URL:            https://github.com/centos-opstools
-Source0:        https://github.com/centos-opstools/opstools-ansible/archive/master.tar.gz
+Source0:        https://github.com/centos-opstools/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 
 Group:          Applications/System
 BuildArch:      noarch
 
+BuildRequires:  python-markdown
+
 Requires:       ansible > 2.2
 
@@ -19,25 +18,12 @@
 Ansible playbooks for installing the server side of OpenStack operational tools
 
-%if 0%{?with_docs}
-%package docs
-Summary:        Ansible playbooks for Operational Tools Server installation
-
-BuildRequires:  python-sphinx
-
-%description docs
-Ansible playbooks for installing the server side of OpenStack operational tools
-
-It contains documentation for the opstools-ansible.
-%endif
-
 %prep
-%autosetup -n %{name}-master
+%autosetup -n %{name}-%{version}
 sed -i -e 's/^\#!\/usr\/bin\/env\ python/#\!\/usr\/bin\/python2.7/' opstools-server-installation.py
 
 %build
-%if 0%{?with_docs}
-# For building docs
-%{__python2} setup.py build_sphinx
-%endif
+python -m markdown  README.md > README.html
+sed -i -e 's/docs\/tripleo\-integration\.md/docs\/tripleo\-integration\.html/' -e 's/>tripleo\-integration\.md</>tripleo\-integration\.html</' README.html
+python -m markdown  docs/tripleo-integration.md > tripleo-integration.html
 
 %install
@@ -56,22 +42,14 @@
 %files
 %license LICENSE.txt
-%doc README.rst
+%doc README.md
+%doc README.html
+%doc docs/tripleo-integration.md
+%doc tripleo-integration.html
 %{_datadir}/%{name}/
 %{_sbindir}/opstools-server-installation
 
-%if 0%{?with_docs}
-%files docs
-%doc docs/build/html
-%endif
 
-%changelog
-* Wed May 17 2017 Chandan Kumar <chkumar> - 0.1.0-4
-- Remove markdown references from doc
-- Use github master branch tarball
-
-* Mon May 15 2017 Chandan Kumar <chkumar> - 0.1.0-3
-- Added doc subpackage
-- README.md docs are moved to RST
 
+%changelog
 * Mon Apr 24 2017 Juan Badia Payno <jbadiapa> - 0.1.0-2
 - Documentation generated automaticaly


Requires
--------
opstools-ansible (rpmlib, GLIBC filtered):
    /usr/bin/python2.7
    ansible



Provides
--------
opstools-ansible:
    opstools-ansible



Source checksums
----------------
https://github.com/centos-opstools/opstools-ansible/archive/master.tar.gz :
  CHECKSUM(SHA256) this package     : ERROR
  CHECKSUM(SHA256) upstream package : 993e7dac520aa1f3c27d80b39ac01c10a29a469477fed8c2a111a14cc2a5e5af


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1447914
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: Java, C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6


There are a few issues, but none of them are actually blocking this from being included in RDO.

For next time, please make sure the spec file distributed in SRPM and the spec file linked in the review are actually the same.

Files from github do not preserve timestamps, they are generated on-the-fly. Since there is no release, one couldn't speak of "latest release packaged"


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