Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 623871 - Review Request: flies-python-client - library and client for working with Flies server
Review Request: flies-python-client - library and client for working with Fli...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Jens Petersen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-12 22:05 EDT by James Ni
Modified: 2010-12-02 14:34 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-02 22:45:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dchen: fedora‑review+
tibbs: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description James Ni 2010-08-12 22:05:11 EDT
Spec URL: http://jamesni.fedorapeople.org/flies-python-client/flies-python-client.spec
SRPM URL: http://jamesni.fedorapeople.org/flies-python-client/flies-python-client-0.0.2-1.fc13.src.rpm

Description: 
Hi, I just finished the packaging flies-python-client, I would appreciate a sponsor and review so that i can get it into Fedora Extras
 
Flies Python client is a client that working with Flies server for creating project and iteration, retrieving info of all the projects on Flies server, retrieving info of single project or single iteration. It also provide functions for pushing or pulling the publican files from/to Flies server. 
Flies Python client also include a library which provide basic operations for communicating with Flies server.
Comment 1 Ding-Yi Chen 2010-08-15 22:15:43 EDT
Hi,
Just done a quick review, and found some problem.

1. It does not build with:
koji build --scratch dist-f13 SRPMS/flies-python-client-0.0.2-1.fc13.src.rpm

Seems like you need to remove BuildArch: noarch from your spec.

2. Error messages from using following command:
find . -name "flies-python-client*.rpm" -exec rpmlint -i  '{}' \;

flies-python-client.src: E: description-line-too-long C Flies Python client is a client that communicate with Flies server for creating project
Your description lines must not exceed 80 characters. If a line is exceeding
this number, cut it to fit in two lines.

flies-python-client.src: E: no-changelogname-tag
There is no %changelog tag in your spec file. To insert it, just insert a
'%changelog' in your spec file and rebuild it.

flies-python-client.src: W: no-url-tag
The URL tag is missing.

flies-python-client.src:37: W: libdir-macro-in-noarch-package (main package) %{_libdir}/*
The %{_libdir} or %{_lib} macro was found in a noarch package in a section
that gets included in binary packages.  This is most likely an error because
these macros are expanded on the build host and their values vary between
architectures, probably resulting in a package that does not work properly on
all architectures at runtime. Investigate whether the package is really
architecture independent or if some other dir/macro should be instead.

flies-python-client.src: W: no-cleaning-of-buildroot %install
You should clean $RPM_BUILD_ROOT in the %clean section and in the beginning of
the %install section. Use "rm -rf $RPM_BUILD_ROOT". Some rpm configurations do
this automatically; if your package is only going to be built in such
configurations, you can ignore this warning for the section(s) where your rpm
takes care of it.

1 packages and 0 specfiles checked; 2 errors, 3 warnings.
flies-python-client.noarch: E: explicit-lib-dependency python-polib
You must let rpm find the library dependencies by itself. Do not put unneeded
explicit Requires: tags.

flies-python-client.noarch: E: description-line-too-long C Flies Python client is a client that communicate with Flies server for creating project
Your description lines must not exceed 80 characters. If a line is exceeding
this number, cut it to fit in two lines.

flies-python-client.noarch: E: no-changelogname-tag
There is no %changelog tag in your spec file. To insert it, just insert a
'%changelog' in your spec file and rebuild it.

flies-python-client.noarch: W: no-url-tag
The URL tag is missing.

flies-python-client.noarch: E: non-executable-script /usr/lib/python2.6/site-packages/fliesclient/flies.py 0644L /usr/bin/env
This text file contains a shebang or is located in a path dedicated for
executables, but lacks the executable bits and cannot thus be executed.  If
the file is meant to be an executable script, add the executable bits,
otherwise remove the shebang or move the file elsewhere.

flies-python-client.noarch: E: zero-length /usr/share/doc/flies-python-client-0.0.2/README
Comment 2 James Ni 2010-08-16 04:55:03 EDT
I have modify the spec file and flies.py. The koji build is successful and rpmlint is also passed without error. I have replace the source rpm and spec file on fedorapeople.
Comment 3 Ding-Yi Chen 2010-08-17 01:41:55 EDT
Um, I have seen the new file, would you mind to bump the release version (release version +1) and upload the new file to avoid the confusion? thanks!
Comment 4 James Ni 2010-08-17 02:57:57 EDT
Ok, I just change the release version and upload the new file:

Spec URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client.spec
SRPM URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client-0.0.2-2.fc13.src.rpm
Comment 5 Ding-Yi Chen 2010-08-17 21:09:15 EDT
Thanks for your hard work, however, there are issues regarding package and usage.

Packages:
1. You package is LGPLv2+, which means that you need to include both COPYING and COPYING.LESSER in your package. (see http://www.gnu.org/licenses/gpl-howto.html) 

2. To make this package build in Fedora-12 (and possible RHEL5 / RHEL6). You can add following to your BuildRequires section:
%if 0%{?fedora} < 13
BuildRequires: python-devel
%endif

Usage:
After build, I read the README and http://code.google.com/p/flies/wiki/FliesPythonClient, it does not tell me how to: 
1. Connect the server. There is an option in .fliesrc, but that doesn't seem to work.
2. Authenticate myself. I suppose there's a way to let me type password, submit a key, or something like that.

Also, when executing flies list, it outputed following error:
Traceback (most recent call last):
  File "/usr/bin/flies", line 8, in <module>
    load_entry_point('flies-python-client==0.0.2', 'console_scripts', 'flies')()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 277, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2180, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1913, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.6/site-packages/fliesclient/flies.py", line 30, in <module>
    from flieslib.client import FliesResource
  File "/usr/lib/python2.6/site-packages/fliesclient/flieslib/__init__.py", line 23, in <module>
    from client import *
  File "/usr/lib/python2.6/site-packages/fliesclient/flieslib/client.py", line 29, in <module>
    from resservice import ResourceService
  File "/usr/lib/python2.6/site-packages/fliesclient/flieslib/resservice.py", line 35, in <module>
    from publican import Publican
ImportError: No module named publican
Comment 6 Jens Petersen 2010-08-19 02:04:32 EDT
I am offering to sponsor James upon successful completion of this review.
Comment 7 James Ni 2010-08-22 10:48:37 EDT
I made some modify for the source code, license file, Spec file and README based on Ding's comment, and submit the new version to fedorapeople. You can find the new version in following URL:

Spec URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client.spec
SRPM URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client-0.0.3-1.fc13.src.rpm
Comment 8 James Ni 2010-08-22 23:12:19 EDT
I just submit a new release of the package, including an example configuration file and adding dependency needed by fedora 12(and less). You could also find the example configuration file named fliesrc.txt on "http://jamesni.fedorapeople.org/flies-python-client/fliesrc.txt".

Spec URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client.spec
SRPM URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client-0.0.3-2.fc13.src.rpm
Comment 9 Ding-Yi Chen 2010-08-23 21:11:29 EDT
Not quiet sure what the cause is, but when I run "flies list" it starts outputting:
Traceback (most recent call last):
  File "/usr/bin/flies", line 9, in <module>
    load_entry_point('flies-python-client==0.0.3', 'console_scripts', 'flies')()
  File "/usr/lib/python2.6/site-packages/fliesclient/flies.py", line 551, in main
    client.run()
  File "/usr/lib/python2.6/site-packages/fliesclient/flies.py", line 528, in run
    self._list_projects()
  File "/usr/lib/python2.6/site-packages/fliesclient/flies.py", line 155, in _list_projects
    print ("Id:          %s")%project.id
  File "/usr/lib/python2.6/site-packages/fliesclient/flieslib/jsonmodel.py", line 39, in id
    return self.json.get('id')
AttributeError: 'unicode' object has no attribute 'get'

This happen in both Fedora-13 and Fedora-12.
Mind have a look with that?
Comment 10 James Ni 2010-08-25 12:39:56 EDT
I suspect this error related to cache of httplib2, but not sure about that. I have modify the code and submit a new package.

Spec URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client.spec
SRPM URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client-0.0.3-3.fc13.src.rpm
Comment 11 Ding-Yi Chen 2010-08-25 20:20:30 EDT
Well, I've tested 0.0.3-3 on both Fedora-12 and Fedora-13, the problem still exist.
Is there a way to clean/rebuild the cache by hand?

BTW, whenever you changed source, please remember to update the version number, e.g. from version 0.0.3 to 0.0.4.

Release number is for the case that:
1. You change the spec.
2. You add new patch.
without touch the source tarball.

If you change both source and spec, you only need to update the version number,
e.g. 0.0.3-3 -> 0.0.4-1.

Regards,
Comment 12 James Ni 2010-08-30 21:25:28 EDT
I submit a new version that resolve some issues related to flies-python-client.

Spec URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client.spec
SRPM URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client-0.0.4-1.fc13.src.rpm
Comment 13 James Ni 2010-08-30 22:37:30 EDT
I found a import error when running the flies command, that's because i rename the module resservice in the package to docservice, but still leave some clause in the package. I sumbit a new version of the python-client to fix that error.

Spec URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client.spec
SRPM URL:
http://jamesni.fedorapeople.org/flies-python-client/flies-python-client-0.0.5-1.fc13.src.rpm
Comment 14 Ding-Yi Chen 2010-08-31 00:21:07 EDT
Hi James,
rpmlint does produce following warnings and error:
1. flies-python-client.src: W: invalid-url Source0: http://jamesni.fedorapeople.org/flies-python-client/flies-python-client-0.0.5.tar.gz HTTP Error 404: Not Found
    This can be fixed easily by uploading the source tarball to jamesni.fedorapeople.org.
    But guess you will probably use github as your hosting later. 

2. flies-python-client.noarch: E: explicit-lib-dependency python-httplib2
    We need that for using it with Fedora-12 (and possible with RHEL6),
    so no need to touch it.
     
3. flies-python-client.noarch: W: no-manual-page-for-binary flies
    You can always add man page later.  Currently having README and command line help
    is sufficient.

Your package therefore pass the review.
You may asked SCM to have following branches:
Branches: f12 f13 f14 el6
But not el5, because it does not run on el5.
(It builds though).

MUST:
+  rpmlint output is acceptable.
     Note: issues listed in previous paragraph.
+  Package meets naming and packaging guidelines.
+  Package meets licensing guidelines, and match the source license.
+  Source files match upstream.
+  specfile is properly named, is cleanly written
+  Spec file is written in American English.
+  Spec file is legible.
+  dist tag is present.
+  BuildRoot is proper.
+  BuildRequires are proper.
+  Requires are proper.
+  %install starts with rm -rf %{buildroot} (or $RPM_BUILD_ROOT)
+  %clean contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT)
+  %doc files present.
+ %doc files do not interfere runtime application.
+ Macros are consistently used.
+ Package builds in koji.
+  Package contains code or permissible content.
+  Package installed properly.
+  No system library is bundled.
+  Not relocatable, unless proper justification is presented.
+  %files section must include a %defattr(...) line, and file permissions are correct.
+  No duplication in %files
+ File names are in valid UTF-8.
+  Own all directory it creates.
+  Files or directories are not owned by other packages.
+  No .la libtool archives exists.

SHOULD:
+  License text are in separate files.
+  Package build in mock.
+  Package can build in all supported architectures.
+  Package runs properly.
+  No direct files dependencies, unless they are in either /etc, /bin, /sbin, /usr/bin, or /usr/sbin

APPROVED
Comment 15 Jens Petersen 2010-08-31 02:48:28 EDT
Src tarball has been uploaded:
e9aef2ec33d72453c7231ed0e3c75523  flies-python-client-0.0.5.tar.gz

Thanks Ding-Yi for the detailed review and testing.
Builds and runs for me and I checked the src files
include license headers.

As Sponsor I am also approving this package.
James Ni please go ahead and apply for Packager
group membership and I will sponsor you.
Comment 16 Jens Petersen 2010-08-31 04:00:43 EDT
Next you can request the package to be added following
https://fedoraproject.org/wiki/Package_SCM_admin_requests
Comment 17 James Ni 2010-08-31 23:07:28 EDT
New Package SCM Request
=======================
Package Name: flies-python-client
Short Description: Flies Python client is a client that communicate with Flies server.
Owners: jamesni
Branches: f12 f13 f14 el6
InitialCC: dchen petersen
Comment 18 Kevin Fenzi 2010-09-01 15:31:55 EDT
The bug summary doesn't match the package name here. 

Could you correct the summary and then resubmit the git request with the 
correct name? Thanks.
Comment 19 James Ni 2010-09-01 21:48:30 EDT
New Package SCM Request
=======================
Package Name: flies-python-client
Short Description: flies-python-client is a client that communicate with Flies
server.
Owners: jamesni
Branches: f12 f13 f14 el6
InitialCC: dchen petersen
Comment 20 Jens Petersen 2010-09-01 22:14:26 EDT
Git done (by process-git-requests).
Comment 21 James Ni 2010-09-02 22:45:00 EDT
I have push the source to git, and make a update in bodhi.
Comment 22 James Ni 2010-12-01 03:39:21 EST
Package Change Request
======================
Package Name: flies-python-client
New Branches: el5
Owners: jamesni
InitialCC: dchen petersen
Comment 23 Jason Tibbitts 2010-12-02 14:34:17 EST
Git done (by process-git-requests).

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