Package Details: anki 24.04.1-3

Git Clone URL: https://aur.archlinux.org/anki.git (read-only, click to copy)
Package Base: anki
Description: Helps you remember facts (like words/phrases in a foreign language) efficiently
Upstream URL: https://apps.ankiweb.net/
Keywords: anki languages learning vocabulary
Licenses: AGPL3
Conflicts: anki-bin, anki-git, anki-qt5
Submitter: demize
Maintainer: AlexBocken
Last Packager: AlexBocken
Votes: 160
Popularity: 7.78
First Submitted: 2021-09-17 22:31 (UTC)
Last Updated: 2024-05-25 10:44 (UTC)

Required by (2)

Sources (7)

Latest Comments

« First ‹ Previous 1 .. 23 24 25 26 27 28 29 Next › Last »

Nocifer commented on 2021-09-19 17:00 (UTC)

Yeah, as I mentioned, the fact that almost all distros carry a very old version of Anki makes it seem highly suspect that something is very wrong with it. In fact that's what prompted me to try and build it manually, out of curiosity to see what kind of convoluted build process its devs have managed to create... only to find out that it's really as simple as I described in my previous comment: download the source, run a single Bazel command, done.

Reading @demize's last comment, I too got the impression that there's some bad blood here, and that they're actually more fed up with Anki's devs attitude and their changing the build process "yet again", rather than with the build process itself. It also doesn't help that as far as I can tell by skimming through the source files, the previous build process was convoluted as hell. The sad thing is that you've probably guessed correctly: switching to Bazel seems like an attempt on the devs' part to simplify the build process. Case in point, the 5 patches you mentioned are no longer needed and the sources now come in a single tarball. But they've definitely failed to get the message across :(

Anyway, I don't think me adopting this package would be any good, because there's already anki-release-source which does the job more than adequately. A better option would probably be to merge these two packages, i.e. remove anki-release-source and have its maintainer adopt this one instead and update it to the latest version.

Nocifer commented on 2021-09-19 16:16 (UTC) (edited on 2021-09-19 17:08 (UTC) by Nocifer)

Heya. Are we absolutely certain that this needs Bazel 4.0.0 to be built? Because I just removed the file .bazelversion from the project's root and proceeded to compile normally with Bazel 4.2.0, and I encountered no issues at all. Could it be that the devs only meant to pin 4.x.x as opposed to the previously used 3.x.x branch, and have simply neglected to account for the minor version updates? Whatever the case, I'd venture that here in Arch-land we could probably safely depend on the official, up-to-date Bazel.

EDIT: And another thing, the anki package has just been moved into the AUR and orphaned by its maintainer, so @AlexBocken I think you should consider adopting anki and bringing it up to date by merging it with this package.

lolilolicon commented on 2021-09-19 16:14 (UTC)

Congratulations to your building Anki successfully.

I'll admit I haven't any time or will to try and build anki, considering all the "social proof", etc. As I said, I'm staying on the last official pkg for now. I figured it must be worth opening a discussion on GH, since almost all distros are leaving anki out-of-date for years. In Arch we don't do that, so the pkg was dropped to AUR.

@Nocifer, perhaps you can adopt this pkg? and work with the maintainers of the other anki pkgs in AUR to bring this up to date?

A few more points. Whether bazel is good or bad I don't know; it doesn't seem simple or easy to use. I think the thing is 1) anki hasn't been easy to build. Look at anki 2.1.35-3: there are 5 patches and 3 additional source tarballs. demize must have put much effort into it. (@Nocifer, if you or anyone else adopts this pkg, make sure to check if the patches are no longer needed.) 2) anki upstream has changed their build system multiple times, each time requiring packagers to rewrite their build scripts. Why did they switch to bazel, for example? If perchance they were also trying to make it easier to package anki, well, packagers haven't got the message!

Nocifer commented on 2021-09-19 15:20 (UTC) (edited on 2021-09-19 15:36 (UTC) by Nocifer)

@lolilolicon I came here to investigate Anki being orphaned and ended up reading your post on Anki's github page. I'll reply here so as to not spam their issue tracker with off-topic stuff:

IMHO Bazel is not a perfect build system for sure, but I don't see anything particularly hard about downloading the Anki sources, installing Bazel and its dependencies, and running "bazel build --config opt dist" as per the official documentation. That's also how the AUR package anki-release-source does it.

Granted, there are some quirks:

1) Building Anki apparently requires Bazel 4.0.0, so on Arch there is an issue with our Bazel package having already been updated to the apparently incompatible 4.2.0; but that's easily rectified either by downloading Bazel 4.0.0 manually or by installing the bazel40-bin package that has been newly created by the anki-release-source package maintainer.

2) Also, for some reason I can't seem to build Anki successfully because it fails to compile some Typescript module dependency. But this also happens when I try to install anki-release-source, and there aren't any complaints about build failures on its AUR page, which means it could be some misconfiguration on my end. EDIT: Actually scratch that, 5 minutes of investigating the issue was enough to find me a solution and after I fixed it, I managed to successfully build Anki with no issues at all.

On the other hand, 99% of distros carrying an old version of Anki does seem very suspicious about it being problematic to update. But I really can't believe it's due to Bazel being too hard to use.

lolilolicon commented on 2021-09-19 02:02 (UTC) (edited on 2021-09-19 02:06 (UTC) by lolilolicon)

I really hope this gets back into the official repos.

I've opened an issue "Is Anki too hard to build?" to start what seems to be a much-needed discussion.

Do the other anki packages in the AUR (anki-git, anki-release-source, etc.) work? Judging by the fact that anki got dropped from the repos, I suppose it ain't that simple?

I'm staying on anki 2.1.35-3 for as long as it still works. I haven't updated my system for weeks: Will my next -Syu necessitate an anki rebuild?

ironborn commented on 2021-08-29 16:48 (UTC)

Wrong SHA256 checksum for https://github.com/ankitects/anki/archive/refs/tags/2.1.47.tar.gz. Should be e7cf87a11b7e3e6577a5d1e30d366546e8b161f8ae3e34e3dcd132ec99119103

cobaltspace commented on 2021-07-30 21:57 (UTC)

python-stringcase might be a new dependency.

AlexBocken commented on 2021-07-28 13:21 (UTC)

@cobaltspace thanks for the idea and detailed write-up! Definitely seems like a good idea which is easy to maintain. I've added it to the package.

cobaltspace commented on 2021-07-28 05:32 (UTC)

Update checking should probably be patched out.

no-update.patch:

--- a/qt/aqt/update.py
+++ b/qt/aqt/update.py
@@ -34,6 +34,8 @@
         }

     def run(self) -> None:
+        return
+
         if not self.config["updates"]:
             return
         d = self._data()

addition to PKGBUILD:

prepare() {
    cd "anki-$pkgver"

    patch -p1 < "$srcdir/no-update.patch"
}

also add no-update.patch to PKGBUILD's source array

AlexBocken commented on 2021-07-12 08:09 (UTC) (edited on 2021-07-12 13:22 (UTC) by AlexBocken)

@nagi12147 Thanks for the error reporting! Seems like community/bazel got updated. Anki still wants bazel 4.0.0 though.

Currently there is no bazel 4.0.0 package in the AUR but I'm thinking about maybe adding one. In the meantime you can download an appropriate bazel binary from the given URL.

(for x86_64 Linux: https://github.com/bazelbuild/bazel/releases/download/4.0.0/bazel-4.0.0-linux-x86_64 )

mv it somewhere like /usr/local/bin/bazel (don't forget to chmod +xbeforehand) and the install process should work again.

Edit:

This package now uses AUR/bazel40-bin to compile since community/bazel has moved to 4.1.0 but anki requires 4.0.0 Thanks again to @nagi12147 for the error report.