Bug 485159

Summary: Review Request: anki - Flashcard program for using space repetition learning
Product: [Fedora] Fedora Reporter: Christian Krause <chkr>
Component: Package ReviewAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: fedora-package-review, notting, tcallawa
Target Milestone: ---Flags: tcallawa: fedora-review+
kevin: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.9.9.6-4.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-05 16:30:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christian Krause 2009-02-11 22:51:20 UTC
anki - Flashcard program for using space repetition learning
Spec URL: http://www-user.tu-chemnitz.de/~tiwi/anki.spec
SRPM URL: http://www-user.tu-chemnitz.de/~tiwi/anki-0.9.9.6-1.fc10.src.rpm
Description: Anki is a program designed to help you remember facts (such as words
and phrases in a foreign language) as easily, quickly and efficiently
as possible. Anki is based on a theory called spaced repetition.

This is my first package and so I'm seeking a sponsor.

Comment 1 Christian Krause 2009-02-13 22:13:32 UTC
I've updated the packages:
- fixed an installation problem
- corrected the license field with the help of Jason Tibbitts (fedora-legal mailing list)

Spec URL: http://www-user.tu-chemnitz.de/~tiwi/anki.spec
SRPM URL: http://www-user.tu-chemnitz.de/~tiwi/anki-0.9.9.6-2.fc10.src.rpm

Comment 2 Christian Krause 2009-02-18 19:19:08 UTC
Anyone wants to pick up this review?

Comment 3 Tom "spot" Callaway 2009-02-27 15:13:48 UTC
Christian, at first glance, this package looks great. I only noticed one thing when I did the review:

The package is internationalized, with .mo files for libanki and libankiqt. Unfortunately, they're in a location that %find_lang (https://fedoraproject.org/wiki/Packaging/Guidelines#Handling_Locale_Files) doesn't know how to find them in (%{python_sitelib}/ankiqt/locale/*/LC_MESSAGES). Since you can't use %find_lang, you're going to have to tag those files manually, like this:

%lang(cs) %{python_sitelib}/ankiqt/locale/cs_*/

(rpm tags on the first half of the locale country code only)

Unfortunately, this will make your %files more complicated, as you cannot simply claim the toplevel directory or these files will be listed twice.

Start with something like this:

%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog CREDITS README*
%dir %{python_sitelib}/ankiqt/
%{python_sitelib}/ankiqt/*.py*
%{python_sitelib}/ankiqt/forms/
%{python_sitelib}/ankiqt/ui/
%dir %{python_sitelib}/ankiqt/locale/
%lang(cs) %{python_sitelib}/ankiqt/locale/cs_*/
%lang(de) %{python_sitelib}/ankiqt/locale/de_*/
...

It is also possible to script a version of find_lang that can find these files and tag them properly in a file list to use in %files, but that might be more complicated than doing what I've proposed.

rpmlint caught this problem, you should run rpmlint on your packages to look for issues like this. :)

Show me a new package that has this issue fixed and I'll finish out this review.

Comment 4 Christian Krause 2009-02-27 20:21:38 UTC
Thank you very much for the review!

(In reply to comment #3)
> The package is internationalized, with .mo files for libanki and libankiqt.
> Unfortunately, they're in a location that %find_lang
> (https://fedoraproject.org/wiki/Packaging/Guidelines#Handling_Locale_Files)
> doesn't know how to find them in
> (%{python_sitelib}/ankiqt/locale/*/LC_MESSAGES). Since you can't use
> %find_lang, you're going to have to tag those files manually, like this:

I've fixed the problem as suggested.

> It is also possible to script a version of find_lang that can find these files
> and tag them properly in a file list to use in %files, but that might be more
> complicated than doing what I've proposed.

Yeah, this makes the spec file a little bit more complicated. I'll try to get this problem fixed upstream, but for now I think it's ok! ;-)

> rpmlint caught this problem, you should run rpmlint on your packages to look
> for issues like this. :)

rpmlint SPECS/anki.spec RPMS/noarch/anki-0.9.9.6-3.fc10.noarch.rpm SRPMS/anki-0.9.9.6-3.fc10.src.rpm 
anki.src: W: strange-permission generate-anki-tarball.sh 0755
2 packages and 1 specfiles checked; 0 errors, 1 warnings.

The remaining warning is about the mode of the script to generate the distributable tarball. Since the file is an executable shell script it may be ok...

> Show me a new package that has this issue fixed and I'll finish out this
> review.

Great! The new package is uploaded:

Spec URL: http://www-user.tu-chemnitz.de/~tiwi/anki.spec
SRPM URL: http://www-user.tu-chemnitz.de/~tiwi/anki-0.9.9.6-3.fc10.src.rpm

and builds fine in F10 and F11:

https://koji.fedoraproject.org/koji/taskinfo?taskID=1206089
https://koji.fedoraproject.org/koji/taskinfo?taskID=1206084

Comment 5 Tom "spot" Callaway 2009-02-27 20:46:58 UTC
== Review ==

Good:

- rpmlint checks return:
anki.src: W: strange-permission generate-anki-tarball.sh 0755
Safe to ignore.

- package meets naming guidelines
- package meets packaging guidelines
- license (GPLv3+ and MIT) OK, text in %doc, matches source
- spec file legible, in am. english
- source matches upstream
- package compiles on devel (x86_64)
- no missing BR
- no unnecessary BR
- locales okay
- not relocatable
- owns all directories that it creates
- no duplicate files
- permissions ok
- %clean ok
- macro use consistent
- code, not content
- no need for -docs
- nothing in %doc affects runtime 
- desktop file okay

APPROVED.

Comment 6 Christian Krause 2009-02-27 22:40:04 UTC
New Package CVS Request
=======================
Package Name: anki
Short Description: Flashcard program for using space repetition learning
Owners: chkr
Branches: F-10
InitialCC:

Comment 7 Kevin Fenzi 2009-03-01 00:28:16 UTC
cvs done.

Comment 8 Fedora Update System 2009-03-02 19:46:20 UTC
anki-0.9.9.6-4.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/anki-0.9.9.6-4.fc10

Comment 9 Fedora Update System 2009-03-04 16:26:20 UTC
anki-0.9.9.6-4.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update anki'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-2322

Comment 10 Tom "spot" Callaway 2009-03-04 22:31:11 UTC
Go ahead and push this into stable and close out this bug. No one is going to test a new package in testing. :)

Comment 11 Christian Krause 2009-03-04 22:36:30 UTC
(In reply to comment #10)
> Go ahead and push this into stable and close out this bug. No one is going to
> test a new package in testing. :)

Sure - I've just pushed it to stable 5 minutes ago. ;-)

Thank you again for all the support and help!

Comment 12 Fedora Update System 2009-03-05 16:30:11 UTC
anki-0.9.9.6-4.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2009-03-08 17:26:59 UTC
anki-0.9.9.6-4.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/anki-0.9.9.6-4.fc9

Comment 14 Fedora Update System 2009-03-09 22:45:01 UTC
anki-0.9.9.6-4.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.