Bug 830418 - Review Request: python-django-avatar - A reusable django application for handling user avatars
Summary: Review Request: python-django-avatar - A reusable django application for han...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 736776
TreeView+ depends on / blocked
 
Reported: 2012-06-09 12:20 UTC by Praveen Kumar
Modified: 2012-11-06 11:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-06 11:35:41 UTC
Type: ---
Embargoed:
mrunge: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Praveen Kumar 2012-06-09 12:20:23 UTC
Spec URL: http://kumarpraveen.fedorapeople.org/django-avatar/python-django-avatar.spec
SRPM URL: http://kumarpraveen.fedorapeople.org/django-avatar/python-django-avatar-2.0a1-1.20120609git097ed8.fc17.src.rpm

Description: Django-avatar is a reusable application for handling user avatars. It has the ability to default to Gravatar if no avatar is found for a certain user.it is automatically generates thumbnails and stores them to your default file storage back end for retrieval later.

Fedora Account System Username:kumarpraveen

koji output : http://koji.fedoraproject.org/koji/taskinfo?taskID=4143230

Comment 1 Matthias Runge 2012-06-25 18:48:47 UTC
%files -f django.lang
%doc CHANGELOG CONTRIBUTORS.txt README.txt LICENSE.txt
%{python_sitelib}/avatar/
%{python_sitelib}/*.egg-info/


The last two dirs are not included in the built rpm. Hint: Leave out the trailing slash.

Comment 2 Matthias Runge 2012-07-02 06:10:05 UTC
(In reply to comment #1)
> %files -f django.lang
> %doc CHANGELOG CONTRIBUTORS.txt README.txt LICENSE.txt
> %{python_sitelib}/avatar/
> %{python_sitelib}/*.egg-info/
> 
> 
> The last two dirs are not included in the built rpm. Hint: Leave out the
> trailing slash.

Naah, please scratch that last comment, the dirs are also included.

Comment 3 Praveen Kumar 2012-07-02 14:33:39 UTC
Yes, I checked that using rpmls, and all directories are already included. Any way I didn't make any changes yet.

Comment 4 Matthias Runge 2012-07-03 20:31:57 UTC
Package Review
==============

Key:
- = N/A
x = Pass
! = Fail
? = Not evaluated



==== Generic ====
[x]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: MUST Package successfully compiles and builds into binary rpms on at
     least one supported primary architecture.
[x]: MUST %build honors applicable compiler flags or justifies otherwise.
[x]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: MUST Buildroot is not present
     Note: Unless packager wants to package for EPEL5 this is fine
[x]: MUST Package contains no bundled libraries.
[!]: MUST Changelog in prescribed format.
[x]: MUST Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: Clean would be needed if support for EPEL is required
[x]: MUST Sources contain only permissible code or content.
[x]: MUST Each %files section contains %defattr if rpm < 4.4
     Note: Note: defattr macros not found. They would be needed for EPEL5
[x]: MUST Macros in Summary, %description expandable at SRPM build time.
[x]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[x]: MUST Package is not known to require ExcludeArch.
[x]: MUST Permissions on files are set properly.
[!]: MUST Package does not contain duplicates in %files.
     Note: warning: File listed twice: /usr/lib/python2.7/site-
     packages/avatar/locale/de/LC_MESSAGES/django.mo
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[x]: MUST Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf would be needed if support for EPEL5 is required
[x]: MUST Large documentation files are in a -doc subpackage, if required.
[x]: MUST 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]: MUST License field in the package spec file matches the actual license.
[x]: MUST Package consistently uses macros (instead of hard-coded directory
     names).
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[x]: MUST Package must own all directories that it creates.
[x]: MUST Package does not own files or directories owned by other packages.
[x]: MUST Package installs properly.
[x]: MUST Requires correct, justified where necessary.
[!]: MUST Rpmlint output is silent.

rpmlint python-django-avatar-2.0a1-1.20120609git097ed8.fc18.noarch.rpm

1 packages and 0 specfiles checked; 0 errors, 0 warnings.


rpmlint python-django-avatar-2.0a1-1.20120609git097ed8.fc18.src.rpm

python-django-avatar.src:25: W: mixed-use-of-spaces-and-tabs (spaces: line 25, tab: line 5)
python-django-avatar.src: W: invalid-url Source0: python-django-avatar-2.0a1.20120609git097ed8.tar.xz
1 packages and 0 specfiles checked; 0 errors, 2 warnings.


[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
Package has no sources or they are generated by developer
[x]: MUST Spec file is legible and written in American English.
[x]: MUST Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[-]: MUST Package contains a SysV-style init script if in need of one.
[x]: MUST File names are valid UTF-8.
[-]: MUST Useful -debuginfo package or justification otherwise.
[x]: SHOULD Reviewer should test that the package builds in mock.
[x]: SHOULD 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]: SHOULD Dist tag is present.
[x]: SHOULD No file requires outside of /etc, /bin, /sbin, /usr/bin,
     /usr/sbin.
[x]: SHOULD Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[?]: SHOULD Package functions as described.
[x]: SHOULD Latest version is packaged.
[x]: SHOULD Package does not include license text files separate from
     upstream.
[x]: SHOULD SourceX is a working URL.
[x]: SHOULD Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: SHOULD Package should compile and build into binary rpms on all supported
     architectures.
[x]: SHOULD %check is present and all tests pass.
[x]: SHOULD Packages should try to preserve timestamps of original installed
     files.
[x]: SHOULD Spec use %global instead of %define.

Issues:
[!]: MUST Package does not contain duplicates in %files.
     Note: warning: File listed twice: /usr/lib/python2.7/site-
     packages/avatar/locale/de/LC_MESSAGES/django.mo
See: http://fedoraproject.org/wiki/Packaging/Guidelines#DuplicateFiles
[!]: MUST Rpmlint output is silent.

rpmlint python-django-avatar-2.0a1-1.20120609git097ed8.fc18.noarch.rpm

1 packages and 0 specfiles checked; 0 errors, 0 warnings.


rpmlint python-django-avatar-2.0a1-1.20120609git097ed8.fc18.src.rpm

python-django-avatar.src:25: W: mixed-use-of-spaces-and-tabs (spaces: line 25, tab: line 5)
python-django-avatar.src: W: invalid-url Source0: python-django-avatar-2.0a1.20120609git097ed8.tar.xz
1 packages and 0 specfiles checked; 0 errors, 2 warnings.


See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint

I'm aware, this is a review required for package renaming. obsoletes are correct, when the version is set correct. (see below)


I see some issues:
- rpmdev-vercmp 2.0a1-1.20120609git097ed8 2.0a1-5.20110709git097ed8
2.0a1-1.20120609git097ed8 < 2.0a1-5.20110709git097ed8
(your latest version is smaller than earlier versions)
  when correcting the last version, the changelog is also in prescribed format.
- you have duplicate files /usr/lib/python2.7/site-
     packages/avatar/locale/de/LC_MESSAGES/django.mo
 you'll avoid this using this snippet here:
# Language files; not under /usr/share, need to be handled manually
(cd $RPM_BUILD_ROOT && find . -name 'django.?o') | sed -e 's|^.||' | sed -e \
  's:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \
  >> %{name}.lang

and include %{name}.lang in files.

- there are also tests included, but it is not compatible with django-1.4
- I suggest, you should merge the code attached to  https://github.com/ericflo/django-avatar/pull/30 (support for django-1.4)

Comment 5 Matthias Runge 2012-08-17 19:06:37 UTC
ping?

Comment 6 Praveen Kumar 2012-08-18 11:48:50 UTC
Hi,

I am not able to figure out how to do that merge, there is another dev who made some changes for django >=1.4 suport.
https://github.com/ericflo/django-avatar/pull/37 
I need some guide here to make the correct changes.

Comment 7 Matthias Runge 2012-08-22 19:31:55 UTC
OK, 

following https://help.github.com/articles/merging-a-pull-request
you need to get 
https://github.com/ericflo/django-avatar/pull/37.patch
save it e.g as django-avatar-django-1.4.patch

include it:
# support django-1.4 according to
# https://github.com/ericflo/django-avatar/pull/37
Patch0: django-avatar-django-1.4.patch
...

(append the term ".patch" to the pull request)
and apply that patch to the code:
%patch0 -p1

Another thing, I've noticed:
During build, some warnings appear:
warning: File listed twice: /usr/lib/python2.7/site-packages/avatar/locale/de/LC_MESSAGES/django.mo
warning: File listed twice: /usr/lib/python2.7/site-packages/avatar/locale/fr/LC_MESSAGES/django.mo
warning: File listed twice: /usr/lib/python2.7/site-packages/avatar/locale/pt_BR/LC_MESSAGES/django.mo

You need to take care of that. In the main django-package, we list all files separately. That's not fashionable, but surely does it. If you find another solution, I'm fine with it.

Comment 9 Matthias Runge 2012-08-26 12:46:04 UTC
Two minors:
- you should append one comment about the patch (e.g. # ensure django-1.4 compatibility) (or so
- some more serious:
(from files section):

%{python_sitelib}/avatar/management/*
%{python_sitelib}/avatar/media/*
%{python_sitelib}/avatar/templates/*
%{python_sitelib}/avatar/templatetags/*

Those lines include all files in those directories, but not those dirs themself:
(eg):
[mrunge@turing results]$ rpm -qlp python-django-avatar-2.0a1-2.20120609git097ed8.fc19.noarch.rpm | grep templatetags
/usr/lib/python2.7/site-packages/avatar/templatetags/__init__.py
/usr/lib/python2.7/site-packages/avatar/templatetags/__init__.pyc
/usr/lib/python2.7/site-packages/avatar/templatetags/__init__.pyo
/usr/lib/python2.7/site-packages/avatar/templatetags/avatar_tags.py
/usr/lib/python2.7/site-packages/avatar/templatetags/avatar_tags.pyc
/usr/lib/python2.7/site-packages/avatar/templatetags/avatar_tags.pyo

note: the templatetags directory is not listed.

I'm sure, you'll correct that during import, won't you?

Package approved.

Comment 10 Praveen Kumar 2012-08-26 13:50:23 UTC
Sure, will make those changes before importing.

Comment 11 Praveen Kumar 2012-08-26 14:06:28 UTC
New Package SCM Request
=======================
Package Name: python-django-avatar
Short Description: Django module for integrate the reCaptcha service
Owners: kumarpraveen
Branches: f18 devel

Comment 12 Gwyn Ciesla 2012-08-27 01:44:42 UTC
Git done (by process-git-requests).

Comment 13 Fedora Update System 2012-08-27 02:24:54 UTC
python-django-avatar-2.0a1-2.20120609git097ed8.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-django-avatar-2.0a1-2.20120609git097ed8.fc18

Comment 14 Fedora Update System 2012-08-27 16:29:40 UTC
python-django-avatar-2.0a1-2.20120609git097ed8.fc18 has been pushed to the Fedora 18 testing repository.


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