Bug 869440 - Bring Anki 2 to Fedora
Summary: Bring Anki 2 to Fedora
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anki
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Christian Krause
QA Contact: Fedora Extras Quality Assurance
URL: http://ankisrs.net/anki2.html
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-23 21:46 UTC by Marcin Zajaczkowski
Modified: 2013-01-24 22:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-24 22:00:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
First pass at updating anki to 2.0 (8.59 KB, text/x-rpm-spec)
2012-12-26 12:29 UTC, Christophe Fergeau
no flags Details
Patched used in the updated .spec (6.00 KB, patch)
2012-12-26 12:30 UTC, Christophe Fergeau
no flags Details | Diff
2nd pass of updating anki to 2.0 (12.61 KB, patch)
2012-12-27 19:52 UTC, Christian Krause
no flags Details | Diff
3nd pass of updating anki to 2.0 (13.85 KB, patch)
2013-01-03 01:06 UTC, Christian Krause
no flags Details | Diff
4th pass of updating anki to 2.0 (6.59 KB, patch)
2013-01-10 23:53 UTC, Christian Krause
no flags Details | Diff

Description Marcin Zajaczkowski 2012-10-23 21:46:52 UTC
Description of problem:
Anki 2 has been released recently. It would nice to have it in Fedora.

Additional info:
Anki 2 is a significant upgrade and as I understand it is not compatible with Anki 1.2 (after upgrade a web account you can't use Anki 1.2 anymore). There are still some problems with mobile clients, so some people would like to stay with Anki 1.2. I don't know if it wouldn't useful to make a package for Anki 2 in a form which could coexist with Anki 1.2 on the same system (something like python and python3).

Comment 1 fropeter 2012-11-16 16:34:10 UTC
+1
It would be nice to have on f17 too, not just f18/rawhide. 

From http://ankisrs.net/anki2.html heading 'Upgrading'
"The upgrade process will automatically import your old decks, but leave them untouched. If you decide you wish to revert to the previous version of Anki, your old data will still be there."

Comment 2 Christophe Fergeau 2012-12-26 12:26:59 UTC
(In reply to comment #1)
> From http://ankisrs.net/anki2.html heading 'Upgrading'
> "The upgrade process will automatically import your old decks, but leave
> them untouched. If you decide you wish to revert to the previous version of
> Anki, your old data will still be there."


Yes, new data is converted to ~/Anki while old data stays in ~/.anki

Comment 3 Christophe Fergeau 2012-12-26 12:29:12 UTC
Created attachment 669204 [details]
First pass at updating anki to 2.0

I've spent some time modifying the existing .spec to update it to 2.0.3. It could probably still use some cleanups from people more familiar with python packaging best practices, but this is still a useful starting point as the package builds and runs on my machine.

Comment 4 Christophe Fergeau 2012-12-26 12:30:22 UTC
Created attachment 669205 [details]
Patched used in the updated .spec

This just removes one indentation level from aqt/share.py as otherwise the build errors out because of wrong indentation in this file.

Comment 5 Christian Krause 2012-12-27 19:52:58 UTC
Created attachment 669689 [details]
2nd pass of updating anki to 2.0

Thanks for the help.

I've used your patch as starting point and polished the spec file a little bit:
- fix source URL
- fix %lang handling (still strange since anki does not use /usr/share/locale)
- update no-update patch
- spec file cleanup
- remove pre-compiled binaries in thirdparty directory in %prep
- added some requirements

I intend to do some further testing (especially updating from 1.2 to 2.0) in the next days and then push out a new package.

Comment 6 Christian Krause 2013-01-03 01:06:41 UTC
Created attachment 671808 [details]
3nd pass of updating anki to 2.0

I did some testing regarding updating from anki-1.2 to anki-2.0 and so far I haven't seen any issues.

Additional changes to new version of spec file:
- some %post/%postun scripts for the mime data
- adjusted license (since anki changed to AGPLv3)

Remaining issue: I'll have to review the various licenses used in anki in detail. Unfortunately the source contains a mixture of: AGPLv3, GPLv3, MIT and BSD.

Comment 7 Christian Krause 2013-01-10 23:53:03 UTC
Created attachment 676589 [details]
4th pass of updating anki to 2.0

Finally I could solve all outstanding issues.

I'm uploading now the latest diff which will update anki to 2.0.4.

Changes:
- change some file locations
- update license tag

The package will most likely be available in the rawhide tomorrow.

Comment 8 Fedora Update System 2013-01-13 03:04:33 UTC
anki-2.0.4-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anki-2.0.4-1.fc18

Comment 9 Fedora Update System 2013-01-13 03:05:44 UTC
anki-2.0.4-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/anki-2.0.4-1.fc17

Comment 10 Fedora Update System 2013-01-14 04:22:55 UTC
Package anki-2.0.4-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anki-2.0.4-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-0777/anki-2.0.4-1.fc18
then log in and leave karma (feedback).

Comment 11 Christophe Fergeau 2013-01-22 16:40:14 UTC
I have only tested the version from comment #5, but I got a message from anki saying that a new version is available, and suggesting to install it, I guess this should be patched away.

Comment 12 Christian Krause 2013-01-22 18:30:11 UTC
(In reply to comment #11)
> I have only tested the version from comment #5, but I got a message from
> anki saying that a new version is available, and suggesting to install it, I
> guess this should be patched away.

The spec file in #5 should include the no-update patch which should disable the update check.

I'm using the following build: http://koji.fedoraproject.org/koji/buildinfo?buildID=377732 and I was not asked to update to the new 2.0.5 release.

Probably a local config settings overrides the global setting and/or the global config (from your own anki 2 installation without the no-update patch) was used as a template for your local config.

To find the root cause for your issue, please can you update to exactly the mentioned build (which is the one in updates testing) and check again?

Additionally, you can try to start anki as a different (new) user who doesn't already have an ~/Anki directory.

Comment 13 Christophe Fergeau 2013-01-22 18:45:52 UTC
(In reply to comment #12)
> The spec file in #5 should include the no-update patch which should disable
> the update check.
> 

Ah ok, all should be good then, I didn't have time to test the latest build, but still wanted to mention this before I forget. I'll try the newest build just now.

Comment 14 Christophe Fergeau 2013-01-22 21:38:37 UTC
I tested your latest build and I indeed don't get any upgrade popups

Comment 15 Fedora Update System 2013-01-24 22:00:17 UTC
anki-2.0.4-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2013-01-24 22:37:39 UTC
anki-2.0.4-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


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