From ae03ddbb497a37765e38cc290489550f847c7027 Mon Sep 17 00:00:00 2001 From: Aaron Keesing Date: Tue, 15 Oct 2024 00:20:51 +1300 Subject: [PATCH] Disable updater with modified patch from TUC --- .SRCINFO | 6 ++++-- PKGBUILD | 14 +++++++------- disable-updater.patch | 26 ++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 disable-updater.patch diff --git a/.SRCINFO b/.SRCINFO index ffed9f5ff50f..5bd3706d1d28 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,14 +1,13 @@ pkgbase = zotero pkgdesc = A free, easy-to-use tool to help you collect, organize, cite, and share your research sources. pkgver = 7.0.7 - pkgrel = 1 + pkgrel = 2 url = https://github.com/zotero/zotero arch = x86_64 arch = i686 license = AGPL-3.0-or-later makedepends = npm makedepends = git - makedepends = git-lfs makedepends = zip makedepends = unzip makedepends = perl @@ -17,6 +16,7 @@ pkgbase = zotero makedepends = wget makedepends = rsync makedepends = nodejs + makedepends = patch depends = dbus-glib depends = gtk3 depends = nss @@ -36,6 +36,7 @@ pkgbase = zotero source = zotero-libreoffice-integration::git+https://github.com/zotero/zotero-libreoffice-integration.git source = zotero-pdf-js::git+https://github.com/zotero/pdf.js.git source = zotero-epub-js::git+https://github.com/zotero/epub.js.git + source = disable-updater.patch sha256sums = eab76db7a56a4d9aaa17baaf240b82fcf57944a4ddf8ef1b58cc64182426cedc sha256sums = SKIP sha256sums = SKIP @@ -51,5 +52,6 @@ pkgbase = zotero sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP + sha256sums = dc1894ac2e1520c3dae8e9cd5e09608f4bb3298bdede2891a77118187edffa9d pkgname = zotero diff --git a/PKGBUILD b/PKGBUILD index d15f95089c05..611edafff302 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,13 +2,13 @@ pkgname=zotero pkgver=7.0.7 -pkgrel=1 +pkgrel=2 pkgdesc="A free, easy-to-use tool to help you collect, organize, cite, and share your research sources." 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' + 'dc1894ac2e1520c3dae8e9cd5e09608f4bb3298bdede2891a77118187edffa9d') 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 -N -p1 < "$srcdir/disable-updater.patch" npm i --legacy-peer-deps diff --git a/disable-updater.patch b/disable-updater.patch new file mode 100644 index 000000000000..8dd5af1cc072 --- /dev/null +++ b/disable-updater.patch @@ -0,0 +1,26 @@ +diff --git a/app/build.sh b/app/build.sh +index d4046ac6b..0f29a0880 100755 +--- a/app/build.sh ++++ b/app/build.sh +@@ -886,9 +886,6 @@ 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" + + # 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