Bug 869440 - Bring Anki 2 to Fedora
Bring Anki 2 to Fedora
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: anki (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Christian Krause
Fedora Extras Quality Assurance
http://ankisrs.net/anki2.html
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-23 17:46 EDT by Marcin Zajaczkowski
Modified: 2013-01-24 17:37 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-24 17:00:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Marcin Zajaczkowski 2012-10-23 17:46:52 EDT
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 11:34:10 EST
+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 07:26:59 EST
(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 07:29:12 EST
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 07:30:22 EST
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 14:52:58 EST
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-02 20:06:41 EST
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 18:53:03 EST
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-12 22:04:33 EST
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-12 22:05:44 EST
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-13 23:22:55 EST
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 11:40:14 EST
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 13:30:11 EST
(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 13:45:52 EST
(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 16:38:37 EST
I tested your latest build and I indeed don't get any upgrade popups
Comment 15 Fedora Update System 2013-01-24 17:00:17 EST
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 17:37:39 EST
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.