Bug 913296 - Review Request: salt-api - An API to the salt management and remote execution system
Summary: Review Request: salt-api - An API to the salt management and remote execution...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Clint Savage
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-20 21:38 UTC by Andrew Niemantsverdriet
Modified: 2013-03-11 17:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-11 17:44:29 UTC
Type: ---
Embargoed:
herlo1: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Andrew Niemantsverdriet 2013-02-20 21:38:06 UTC
Spec URL: http://kaptk2.fedorapeople.org/salt-api.spec
SRPM URL: http://kaptk2.fedorapeople.org/salt-api-0.7.5-1.fc18.src.rpm
Description: salt-api is a modular interface on top of Salt that can provide a variety of entry points into a running Salt system. It can start and manage multiple interfaces allowing a REST API to coexist with XMLRPC or even a Websocket API.
Fedora Account System Username: kaptk2

Addtional Info: Koji build
http://koji.fedoraproject.org/koji/taskinfo?taskID=5037974

Comment 1 Clint Savage 2013-02-21 21:12:27 UTC
Attempting to run fedora-review against this package provides me with failures. I decided to run it in mock to see what errors I might find. To my surprise, I found the following:

$ mock -vr fedora-18-x86_64 --rebuild /home/herlo/913296-salt-api/srpm/salt-api-0.7.5-1.fc18.src.rpm

..snip..

DEBUG: + /usr/bin/python setup.py install -O1 --root /builddir/build/BUILDROOT/salt-api-0.7.5-1.fc18.x86_64
DEBUG: /var/tmp/rpm-tmp.PPwIP4: line 35: /usr/bin/python: No such file or directory

It looks like you have no BuildRequires or BRs. BRs are used when building an rpm, a Require (or R) is a dependency that will be installed when the package is installed (via yum or rpm).

To that end, I would suggest at least the following BRs:

salt (this package also BRs python, so you'll get python there)

I'm checking to see if there are other deps, but this might be good enough for now.

Comment 2 Andrew Niemantsverdriet 2013-02-21 21:23:57 UTC
(In reply to comment #1)
> Attempting to run fedora-review against this package provides me with
> failures. I decided to run it in mock to see what errors I might find. To my
> surprise, I found the following:
> 
> $ mock -vr fedora-18-x86_64 --rebuild
> /home/herlo/913296-salt-api/srpm/salt-api-0.7.5-1.fc18.src.rpm
> 
> ..snip..
> 
> DEBUG: + /usr/bin/python setup.py install -O1 --root
> /builddir/build/BUILDROOT/salt-api-0.7.5-1.fc18.x86_64
> DEBUG: /var/tmp/rpm-tmp.PPwIP4: line 35: /usr/bin/python: No such file or
> directory
> 
> It looks like you have no BuildRequires or BRs. BRs are used when building
> an rpm, a Require (or R) is a dependency that will be installed when the
> package is installed (via yum or rpm).
> 
> To that end, I would suggest at least the following BRs:
> 
> salt (this package also BRs python, so you'll get python there)
> 
> I'm checking to see if there are other deps, but this might be good enough
> for now.

Updated .spec file at the URL provided above to reflect requested changes.

Comment 3 Clint Savage 2013-02-22 05:42:26 UTC
Here's the output of fedora-review

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

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


Issues:
=======
[!]: Package contains BR: python2-devel or python3-devel
See: http://fedoraproject.org/wiki/Packaging:Python#BuildRequires


===== 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]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[-]: %build honors applicable compiler flags or justifies otherwise.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package contains no bundled libraries.
[x]: Changelog in prescribed format.
[ ]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf %{buildroot} present but not required
[x]: Sources contain only permissible code or content.
[x]: Each %files section contains %defattr if rpm < 4.4
     Note: %defattr present but not needed
[x]: Macros in Summary, %description expandable at SRPM build time.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[-]: Package requires other packages for directories it uses.
[-]: Package uses nothing in %doc for runtime.
[x]: Package is not known to require ExcludeArch.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package complies to the Packaging Guidelines
[x]: Spec file lacks Packager, Vendor, PreReq tags.
[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 %doc.
[x]: License field in the package spec file matches the actual license.
[x]: Package consistently uses macro is (instead of hard-coded directory
     names).
[x]: Package is named using only allowed ASCII characters.
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
     Note: Package contains no Conflicts: tag(s)
[x]: Package do not use a name that already exist
[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]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package installs properly.
[x]: Package is not relocatable.
[x]: Requires correct, justified where necessary.
[x]: CheckResultdir
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file is legible and written in American English.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: Package contains systemd file(s) if in need.
[x]: File names are valid UTF-8.
[-]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

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

===== SHOULD items =====

Generic:
[x]: Reviewer should test that the package builds in mock.
[ ]: Buildroot is not present
     Note: Buildroot: present but not needed
[ ]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: %clean present but not required
[-]: 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]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: The placement of pkgconfig(.pc) files are correct.
[-]: Scriptlets must be sane, if used.
[x]: SourceX tarball generation or download is documented.
[x]: SourceX / PatchY prefixed with %{name}.
[x]: SourceX is a working URL.
[?]: 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.
[ ]: Packages should try to preserve timestamps of original installed files.
[!]: Spec use %global instead of %define.
     Note: %define pybasever 2.6 %define __python_ver 26 %define __python
     %{_bindir}/python%{?pybasever}

===== 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.
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.

Rpmlint
-------
Checking: salt-api-0.7.5-1.fc18.src.rpm
          salt-api-0.7.5-1.fc18.noarch.rpm
salt-api.src: W: file-size-mismatch salt-api-0.7.5.tar.gz = 40960, http://pypi.python.org/packages/source/s/salt-api/salt-api-0.7.5.tar.gz = 33401
2 packages and 0 specfiles checked; 0 errors, 1 warnings.


Rpmlint (installed packages)
----------------------------
# rpmlint salt-api
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
# echo 'rpmlint-done:'

Requires
--------
salt-api-0.7.5-1.fc18.noarch.rpm (rpmlib, GLIBC filtered):

    /bin/sh
    /usr/bin/python
    python(abi) = 2.7
    python-cherrypy
    salt
    systemd-units

Provides
--------
salt-api-0.7.5-1.fc18.noarch.rpm:

    salt-api = 0.7.5-1.fc18

MD5-sum check
-------------
http://pypi.python.org/packages/source/s/salt-api/salt-api-0.7.5.tar.gz :
  CHECKSUM(SHA256) this package     : 74319ecc34f7f90888307c8c91e20d68c65b3fa7dbe19e2c1660ab5c0414069d
  CHECKSUM(SHA256) upstream package : 5057c2468aea492607addf694033f8d36796cf55bfd6ff7abfc277842edb51a1
However, diff -r shows no differences


Generated by fedora-review 0.3.1 (b71abc1) last change: 2012-10-16
Buildroot used: fedora-18-x86_64
Command line :/usr/bin/fedora-review -b 913296

-------------------------------------------

The review shows a couple concerns, one is the desire for python2-devel. I'm not sure that's required here, since it seems that salt also doesn't require this library. But the https://fedoraproject.org/wiki/Packaging:Python#BuildRequires suggests this is necessary. I will do a bit of legwork here to confirm it is indeed required.

Additionally, the tarball checksum doesn't match the upstream tarball. However, the diff above shows no differences. I'm guessing this is because you created your own tarball. When I build my rpms, I do a simple wget to the SOURCES directory to ensure I have the current upstream tarball. 

I performed a review of the spec file as well and suggest cleaning up trailing spaces from your description lines.

-------------------------------------------

cat rpmlint.txt 
Checking: salt-api-0.7.5-1.fc18.src.rpm
          salt-api-0.7.5-1.fc18.noarch.rpm
salt-api.src: W: file-size-mismatch salt-api-0.7.5.tar.gz = 40960, http://pypi.python.org/packages/source/s/salt-api/salt-api-0.7.5.tar.gz = 33401
2 packages and 0 specfiles checked; 0 errors, 1 warnings.

Comment 4 Thomas Spura 2013-02-22 07:47:36 UTC
(In reply to comment #2)
> Updated .spec file at the URL provided above to reflect requested changes.

Please always bump the release, write in the changelog what you changed and provide new links here.

(In reply to comment #3)
> The review shows a couple concerns, one is the desire for python2-devel. I'm
> not sure that's required here, since it seems that salt also doesn't require
> this library. But the
> https://fedoraproject.org/wiki/Packaging:Python#BuildRequires suggests this
> is necessary. I will do a bit of legwork here to confirm it is indeed
> required.

All python packages must require that by definition. This way it's ensured, that /usr/bin/python and all headers are installed, in case it isn't a noarch package. In this case a BR on python would be sufficient, but we defined in the Guidelines to BR python?-devel nevertheless.

> Additionally, the tarball checksum doesn't match the upstream tarball.
> However, the diff above shows no differences. I'm guessing this is because
> you created your own tarball. When I build my rpms, I do a simple wget to
> the SOURCES directory to ensure I have the current upstream tarball. 

I normally do a "spectool -g $specfile" to get the sources.

Comment 5 Clint Savage 2013-02-23 04:26:30 UTC
Thomas,

Thanks for your comments. It's interesting because when you approved salt, i didn't have python?-devel as a BR. I'll make sure to add it in the next version. However, maybe that's a newish requirement for python pages?

Haven't played with spectool, thanks for the tip!


Andrew,

I agree with Thomas on bumping the release. I forgot to mention this previously, so it's probably good to update your spec and srpm now and post the update here.

Comment 6 Thomas Spura 2013-02-23 10:58:08 UTC
(In reply to comment #5)
> Thanks for your comments. It's interesting because when you approved salt, i
> didn't have python?-devel as a BR. I'll make sure to add it in the next
> version. However, maybe that's a newish requirement for python pages?

Hmm, then I should have missed it there. It only changed from python-devel to python2-devel not too long ago, but I believe the BR on python-devel was there long before.
When looking at the git logs, that was already added with the initial import:
http://pkgs.fedoraproject.org/cgit/salt.git/commit/?id=bfbe7b1cb0e711e0e1324ed87b6d2726e9df8141

So it should just change to python2-devel instead of python-devel sometime. But as we won't switch to python3 soon, it's not an urgent issue for old packages.

> Haven't played with spectool, thanks for the tip!

You're welcome :)

Comment 7 Andrew Niemantsverdriet 2013-02-25 18:39:02 UTC
Spec URL: http://kaptk2.fedorapeople.org/salt-api.spec
SRPM URL: http://kaptk2.fedorapeople.org/salt-api-0.7.5-1.fc18.src.rpm

Updated the .spec and SRPM as suggested by the comments

Comment 8 Clint Savage 2013-02-25 18:54:21 UTC
Andrew,

You need to increment the  the Release value and update your changelog to match.

Comment 9 Andrew Niemantsverdriet 2013-02-25 18:57:46 UTC
(In reply to comment #8)
> Andrew,
> 
> You need to increment the  the Release value and update your changelog to
> match.

Spec URL: http://kaptk2.fedorapeople.org/salt-api.spec
SRPM URL: http://kaptk2.fedorapeople.org/salt-api-0.7.5-2.fc18.src.rpm

Sorry fixed now.

Comment 10 Clint Savage 2013-02-25 19:17:08 UTC
Your changelog should detail the changes. Seeing as this document will likely have more suggestions, I wouldn't point to a link about the review :)

If you do want to put a pointer to an issue, you can do something like (RHBZ#913296), for instance. It's a very common shorthand.

I've run the fedora-review again and the suggestions we made look good, otherwise.

Thomas, do you have any other suggestions? And are you a packager sponsor? Andrew is going to need one as I am just doing the review.

Comment 11 Clint Savage 2013-02-25 20:55:42 UTC
Oh, I missed that Andrew is already a packager. Never mind on the sponsor part.

Comment 12 Andrew Niemantsverdriet 2013-03-07 17:42:50 UTC
(In reply to comment #10)
> Your changelog should detail the changes. Seeing as this document will
> likely have more suggestions, I wouldn't point to a link about the review :)
> 
> If you do want to put a pointer to an issue, you can do something like
> (RHBZ#913296), for instance. It's a very common shorthand.
> 
> I've run the fedora-review again and the suggestions we made look good,
> otherwise.
> 
> Thomas, do you have any other suggestions? And are you a packager sponsor?
> Andrew is going to need one as I am just doing the review.

I have updated the change log and uploaded new files.

Spec URL: http://kaptk2.fedorapeople.org/salt-api.spec
SRPM URL: http://kaptk2.fedorapeople.org/salt-api-0.7.5-3.fc18.src.rpm

Comment 13 Thomas Spura 2013-03-08 13:23:55 UTC
(In reply to comment #10)
> Thomas, do you have any other suggestions?

No, all looks sane on a very brief look.

> And are you a packager sponsor?
> Andrew is going to need one as I am just doing the review.

I already sponsored Andrew a while ago (and that's why I was watching this bug ;)).

Comment 14 Clint Savage 2013-03-11 04:28:34 UTC
Looks good, I'm approving this package. Good work Andrew!

Comment 15 Andrew Niemantsverdriet 2013-03-11 14:44:47 UTC
New Package SCM Request
=======================
Package Name: salt-api
Short Description: salt-api is a modular interface on top of Salt that can provide a variety of entry points into a running Salt system.
Owners: kaptk2
Branches: f16 f17 f18 el5 el6
InitialCC:

Comment 16 Gwyn Ciesla 2013-03-11 15:26:21 UTC
Git done (by process-git-requests).


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