Package Details: zotero 7.0.13-1

Git Clone URL: https://aur.archlinux.org/zotero.git (read-only, click to copy)
Package Base: zotero
Description: A free, easy-to-use tool to help you collect, organize, cite, and share your research sources.
Upstream URL: https://github.com/zotero/zotero
Licenses: AGPL-3.0-or-later
Submitter: agkphysics
Maintainer: agkphysics
Last Packager: agkphysics
Votes: 35
Popularity: 1.90
First Submitted: 2022-08-13 10:04 (UTC)
Last Updated: 2025-03-03 07:44 (UTC)

Pinned Comments

agkphysics commented on 2023-06-14 11:31 (UTC)

@jeyes https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot

agkphysics commented on 2023-02-08 10:12 (UTC)

If people are having issues, try building with extra-x86_64-build in a clean chroot.

Latest Comments

1 2 3 4 5 6 7 Next › Last »

JonasKonrad commented on 2025-01-17 10:46 (UTC) (edited on 2025-01-17 10:47 (UTC) by JonasKonrad)

I'd recommend having at least an npm audit fix done in PKGBUILD (with audit-level=none so that we will not break the build with that intervention by any means). This improves security, maybe stability; I didn't have any problems building the software that way:

diff --git a/PKGBUILD b/PKGBUILD
index 3b4924f..e3f8809 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -53,6 +53,7 @@ prepare() {

   patch -N -p1 < "$srcdir/disable-updater.patch"

+  npm audit fix --audit-level=none
   npm i --legacy-peer-deps

   git submodule init

agkphysics commented on 2025-01-15 06:52 (UTC)

I've manually added a fetch for the other commit. Seems to just be an issue with their pdf.js repo.

j.r commented on 2025-01-14 10:20 (UTC)

@agkphysics your fix for the dangling commit does not seem to work here

From /build/zotero/src/zotero-epub-js
 * branch            93a4ea402ab36a5406bee699468d0bca691966f5 -> FETCH_HEAD
Submodule path 'epubjs/epub.js': checked out '93a4ea402ab36a5406bee699468d0bca691966f5'
fatal: git upload-pack: not our ref cb447cb9182cc027e536893535e73ad1bc0816b1
fatal: remote error: upload-pack: not our ref cb447cb9182cc027e536893535e73ad1bc0816b1
fatal: Fetched in submodule path 'pdfjs/pdf.js', but it did not contain cb447cb9182cc027e536893535e73ad1bc0816b1. Direct fetching of that commit failed.

pieterm commented on 2025-01-13 21:47 (UTC) (edited on 2025-01-13 21:49 (UTC) by pieterm)

I get a similar but different error now. I'm not sure, but I think it is the same issue, but now in the zotero-client/reader/pdfjs dir.

Adding the --init --recursive --remote to the submodule update does not fix it.

Submodule 'epubjs/epub.js' (https://github.com/zotero/epub.js.git) registered for path 'epubjs/epub.js'
Submodule 'pdfjs/pdf.js' (https://github.com/zotero/pdf.js.git) registered for path 'pdfjs/pdf.js'
Cloning into '/home/pieter/.cache/yay/zotero/src/zotero-client/reader/epubjs/epub.js'...
done.
Cloning into '/home/pieter/.cache/yay/zotero/src/zotero-client/reader/pdfjs/pdf.js'...
done.
From /home/pieter/.cache/yay/zotero/src/zotero-epub-js
 * branch            93a4ea402ab36a5406bee699468d0bca691966f5 -> FETCH_HEAD
Submodule path 'epubjs/epub.js': checked out '93a4ea402ab36a5406bee699468d0bca691966f5'
fatal: git upload-pack: not our ref cb447cb9182cc027e536893535e73ad1bc0816b1
fatal: remote error: upload-pack: not our ref cb447cb9182cc027e536893535e73ad1bc0816b1
fatal: Fetched in submodule path 'pdfjs/pdf.js', but it did not contain cb447cb9182cc027e536893535e73ad1bc0816b1. Direct fetching of that commit failed.
==> ERROR: A failure occurred in prepare().
    Aborting...
 -> error making: zotero-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
zotero - exit status 4

agkphysics commented on 2025-01-09 08:49 (UTC)

Apparently there was a dangling commit on the pdf.js repo which was only referenced by this submodule, which is why Git had trouble finding it.

I have added a temporary fix to fetch the specific commit directly from the repo so that Git should be able to find it. Hopefully this is fixed in the next release.

AmbassadorDave commented on 2025-01-07 23:43 (UTC) (edited on 2025-01-07 23:44 (UTC) by AmbassadorDave)

Adding the params @no_gafam suggested worked for me. Once I learned to add '--editmenu' to the yay command ('yay --editmenu -S zotero'). Thanks, and also to @agkphysics for maintaining this package!

no_gafam commented on 2024-12-08 13:23 (UTC)

Try to add params '--init --recursive --remote' behind 'submodule update' in line 89. Worked for me.

Roboguy420 commented on 2024-12-08 12:23 (UTC)

Building the package fails at prepare():

Submodule path 'pdfjs/pdf.js': checked out 'cb447cb9182cc027e536893535e73ad1bc0816b1'
Submodule 'pdf.js' (https://github.com/zotero/pdf.js.git) registered for path 'pdf.js'
Cloning into '/home/adam/.cache/yay/zotero/src/zotero-client/pdf-worker/pdf.js'...
done.
fatal: git upload-pack: not our ref 95d08fe7707553c23ce9f9c90371622a7aeb591f
fatal: remote error: upload-pack: not our ref 95d08fe7707553c23ce9f9c90371622a7aeb591f
fatal: Fetched in submodule path 'pdf.js', but it did not contain 95d08fe7707553c23ce9f9c90371622a7aeb591f. Direct fetching of that commit failed.
==> ERROR: A failure occurred in prepare().
    Aborting...
 -> error making: zotero-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
zotero - exit status 4

TUC commented on 2024-10-14 08:07 (UTC) (edited on 2024-10-14 08:07 (UTC) by TUC)

IMO there is no need to package the updater. I'd recommend to disable it. That would also avoid problems with git-lfs.

diff --git a/PKGBUILD b/PKGBUILD
index d15f950..607589c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ arch=('x86_64' 'i686')
 url="https://github.com/zotero/zotero"
 license=('AGPL-3.0-or-later')
 depends=('dbus-glib' 'gtk3' 'nss' 'libxt')
-makedepends=('npm' 'git' 'git-lfs' 'zip' 'unzip' 'perl' 'python>=3' 'curl' 'wget' 'rsync' 'nodejs')
+makedepends=('npm' 'git' 'zip' 'unzip' 'perl' 'python>=3' 'curl' 'wget' 'rsync' 'nodejs' 'patch')
 _tag=88ff06841605a2812394060ef4fd3194702d50e0  # git rev-parse $pkgver
 source=("zotero.desktop"
         "zotero-client::git+https://github.com/zotero/zotero.git#tag=${_tag}"
@@ -24,7 +24,8 @@ source=("zotero.desktop"
         "zotero-csl::git+https://github.com/citation-style-language/locales.git"
         "zotero-libreoffice-integration::git+https://github.com/zotero/zotero-libreoffice-integration.git"
         "zotero-pdf-js::git+https://github.com/zotero/pdf.js.git"
-        "zotero-epub-js::git+https://github.com/zotero/epub.js.git")
+        "zotero-epub-js::git+https://github.com/zotero/epub.js.git"
+        "disable_updater.patch")
 sha256sums=('eab76db7a56a4d9aaa17baaf240b82fcf57944a4ddf8ef1b58cc64182426cedc'
             'SKIP'
             'SKIP'
@@ -39,7 +40,8 @@ sha256sums=('eab76db7a56a4d9aaa17baaf240b82fcf57944a4ddf8ef1b58cc64182426cedc'
             'SKIP'
             'SKIP'
             'SKIP'
-            'SKIP')
+            'SKIP'
+            '876ada619be5f1122437e105bb70cec20de1cf43fb533e7bb7b9bf6ff1f7deae')

 pkgver() {
   cd "$srcdir/zotero-client"
@@ -49,9 +51,7 @@ pkgver() {
 prepare() {
   cd "$srcdir/zotero-client"

-  git lfs install --local
-  git remote add network-origin https://github.com/zotero/zotero.git
-  git lfs pull -I app/linux/updater.tar.xz network-origin
+  patch -p1 < ../disable_updater.patch

   npm i --legacy-peer-deps

diff --git a/disable_updater.patch b/disable_updater.patch
new file mode 100644
index 0000000..5f86f07
--- /dev/null
+++ b/disable_updater.patch
@@ -0,0 +1,29 @@
+diff --git a/app/build.sh b/app/build.sh
+index d4046ac6b..b7f2b0b8b 100755
+--- a/app/build.sh
++++ b/app/build.sh
+@@ -886,9 +886,9 @@ if [ $BUILD_LINUX == 1 ]; then
+       cp "$CALLDIR/linux/set_launcher_icon" "$APPDIR"
+       
+       # Use our own updater, because Mozilla's requires updates signed by Mozilla
+-      check_lfs_file "$CALLDIR/linux/updater.tar.xz"
+-      tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater"
+-      chmod 755 "$APPDIR/updater"
++      #check_lfs_file "$CALLDIR/linux/updater.tar.xz"
++      #tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater"
++      #chmod 755 "$APPDIR/updater"
+ 
+       # Copy app files
+       rsync -a "$base_dir/" "$APPDIR/"
+diff --git a/app/linux/mozconfig b/app/linux/mozconfig
+index 8e7fa5cf8..5e2720318 100644
+--- a/app/linux/mozconfig
++++ b/app/linux/mozconfig
+@@ -11,6 +11,7 @@ ac_add_options MOZ_ENABLE_JS_DUMP=1
+ ac_add_options MOZ_ENABLE_FORKSERVER=
+ ac_add_options MOZ_TELEMETRY_REPORTING=
+ ac_add_options MOZ_DATA_REPORTING=
++ac_add_options --disable-updater
+ ac_add_options --disable-tests
+ ac_add_options --disable-debug
+ ac_add_options --disable-debug-symbols

Nazdravi commented on 2024-08-22 19:23 (UTC)

Eventually git-lfs should be a buildtime dependency because it is.