From 776485ea0275ddae8cdf15d70d43c800d8621afa Mon Sep 17 00:00:00 2001 From: Sebastian Fleer Date: Fri, 9 Aug 2024 16:41:01 +0200 Subject: [PATCH] Zotero 7 (#205) * Zotero 7.0 beta build (#125) * Update Zotero-7.0.0-beta.48+0cab24fb8_linux-x86_64.tar.bz2 to 7.0.0-beta.49 (#131) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update beta to 7.0.0-beta.50 manually (#132) until https://github.com/flathub/flatpak-external-data-checker/issues/395 is fixed. * Update Zotero-7.0.0-beta.50+8239d04d5_linux-x86_64.tar.bz2 to 7.0.0-beta.51 (#133) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Clean up appdata.xml (#134) Use correct ID, drop unnecessary entries. * Update Zotero-7.0.0-beta.51+7c5600913_linux-x86_64.tar.bz2 to 7.0.0-beta.52 (#135) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.52+2f8e536f2_linux-x86_64.tar.bz2 to 7.0.0-beta.53 (#136) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.53+969031a37_linux-x86_64.tar.bz2 to 7.0.0-beta.54 (#137) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.54+6b996d4f9_linux-x86_64.tar.bz2 to 7.0.0-beta.55 (#138) * install symbolic icon to the correct directory (#139) * Update Zotero-7.0.0-beta.55+9151fb355_linux-x86_64.tar.bz2 to 7.0.0-beta.56 (#140) * Update Zotero-7.0.0-beta.56+9edfcba9a_linux-x86_64.tar.bz2 to 7.0.0-beta.57 (#141) * Update Zotero-7.0.0-beta.57+3acef799f_linux-x86_64.tar.bz2 to 7.0.0-beta.58 (#142) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Deactivate updater using policies.json (#143) * Update Zotero-7.0.0-beta.58+2665090aa_linux-x86_64.tar.bz2 to 7.0.0-beta.59 (#144) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.59+009a2ca38_linux-x86_64.tar.bz2 to 7.0.0-beta.60 (#145) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.60+91e1c6ca3_linux-x86_64.tar.bz2 to 7.0.0-beta.63 (#146) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.63+52856ae69_linux-x86_64.tar.bz2 to 7.0.0-beta.64 (#147) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.64+8f8c0d079_linux-x86_64.tar.bz2 to 7.0.0-beta.65 (#148) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.65+b047f3d90_linux-x86_64.tar.bz2 to 7.0.0-beta.66 (#151) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.66+d0299a1ac_linux-x86_64.tar.bz2 to 7.0.0-beta.67 (#152) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.67+92a04fcff_linux-x86_64.tar.bz2 to 7.0.0-beta.68 (#153) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Alternative Implementation for #155 (#156) * permission changes and documentations - remove xdg-dirs to harden permissions - add persistent folder to make hardening easier - add documentation about keeping home permission * add documentation about permission hardening in app description * Update Zotero-7.0.0-beta.68+c31a40c74_linux-x86_64.tar.bz2 to 7.0.0-beta.70 (#158) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.70+d654daae2_linux-x86_64.tar.bz2 to 7.0.0-beta.72 (#159) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.72+128a540af_linux-x86_64.tar.bz2 to 7.0.0-beta.74 (#161) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.74+2e8073ab9_linux-x86_64.tar.bz2 to 7.0.0-beta.75 (#162) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.75+f7dc68c7f_linux-x86_64.tar.bz2 to 7.0.0-beta.76 (#163) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.76+91054acfe_linux-x86_64.tar.bz2 to 7.0.0-beta.77 (#164) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.77+adaa61f2c_linux-x86_64.tar.bz2 to 7.0.0-beta.78 (#166) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.78+5be5ca941_linux-x86_64.tar.bz2 to 7.0.0-beta.79 (#167) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.79+95d5a5417_linux-x86_64.tar.bz2 to 7.0.0-beta.80 (#168) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.80+9de70613a_linux-x86_64.tar.bz2 to 7.0.0-beta.81 (#169) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.81+721f54fe4_linux-x86_64.tar.bz2 to 7.0.0-beta.82 (#170) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * Update Zotero-7.0.0-beta.82+79fa160e4_linux-x86_64.tar.bz2 to 7.0.0-beta.83 (#171) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.83+066eda731_linux-x86_64.tar.bz2 to 7.0.0-beta.84 (#173) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.84+71f83c0a3_linux-x86_64.tar.bz2 to 7.0.0-beta.85 (#175) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.85+c0c00a00e_linux-x86_64.tar.bz2 to 7.0.0-beta.88 (#176) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.88+137a1ddcc_linux-x86_64.tar.bz2 to 7.0.0-beta.91 (#177) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.91+3c6625f3c_linux-x86_64.tar.bz2 to 7.0.0-beta.92 (#178) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.92+d5bb667fb_linux-x86_64.tar.bz2 to 7.0.0-beta.95 (#181) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.95+694ccecf4_linux-x86_64.tar.bz2 to 7.0.0-beta.98 (#184) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.98+0b3eda5d8_linux-x86_64.tar.bz2 to 7.0.0-beta.99 (#185) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.99+174bde745_linux-x86_64.tar.bz2 to 7.0.0-beta.100 (#187) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.100+06741ceb6_linux-x86_64.tar.bz2 to 7.0.0-beta.101 (#188) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.101+220bb4383_linux-x86_64.tar.bz2 to 7.0.0-beta.103 (#189) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.103+691d26886_linux-x86_64.tar.bz2 to 7.0.0-beta.104 (#190) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.104+7e01a7d0e_linux-x86_64.tar.bz2 to 7.0.0-beta.106 (#192) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.106+bf5964513_linux-x86_64.tar.bz2 to 7.0.0-beta.108 (#194) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.108+80cc97125_linux-x86_64.tar.bz2 to 7.0.0-beta.109 (#195) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> * zotero: Update Zotero-7.0.0-beta.109+687399d9b_linux-x86_64.tar.bz2 to 7.0.0-beta.110 (#196) Co-authored-by: Flatpak External Data Checker <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Benedikt Co-authored-by: Cheng Zhang --- org.zotero.Zotero.appdata.xml | 25 ++++++++++++++----- org.zotero.Zotero.yaml | 47 +++++++++++++++++++---------------- policies.json | 5 ++++ 3 files changed, 50 insertions(+), 27 deletions(-) create mode 100644 policies.json diff --git a/org.zotero.Zotero.appdata.xml b/org.zotero.Zotero.appdata.xml index f61e164..a8610f8 100644 --- a/org.zotero.Zotero.appdata.xml +++ b/org.zotero.Zotero.appdata.xml @@ -5,12 +5,24 @@ CC0-1.0 AGPL-3.0 Zotero - Collect, organize and cite research + Collect, organize, cite, and share research

Zotero [zoh-TAIR-oh] is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.

+

+ NOTE: The user home permission is provided for compatiblity purpose. + Because zotero 7 supports portal file chooser, home access permission can be safely removed as follows: + First, move folders "~/.zotero" and "~/Zotero" to the app sandbox, typically in "~/.var/app/org.zotero.Zotero/"; + then, remove home access premission in flatseal, KDE setting, + or use command "flatpak override --user --nofilesystem=home org.zotero.Zotero"; and restart zotero. +

+

+ The drag and drop functionality might break after rejecting the permission for home directory, + please use file chooser instead, or grant permission to the drag and drop location via + "flatpak override --user --filesystem=/PATH/TO/DragAndDrop org.zotero.Zotero" or flatseal. +

NOTE: If your Zotero folder is not located inside your home directory (~/) and is outside your xdg-user-dirs, please grant permission to access that @@ -18,7 +30,7 @@ "flatpak override --user --filesystem=/PATH/TO/ZOTEROFOLDER org.zotero.Zotero").

- NOTE: This flatpak is not verified by, affiliated with, or supported by the Zotero project. + NOTE: This wrapper is not verified by, affiliated with, or supported by the Zotero project.

@@ -30,11 +42,12 @@ https://www.zotero.org/support/ https://www.zotero.org/support/dev/localization org.zotero.Zotero.desktop - - Corporation for Digital Scholarship - + Corporation for Digital Scholarship guillaumepoiriermorency@gmail.com + + + @@ -73,4 +86,4 @@ none none - + \ No newline at end of file diff --git a/org.zotero.Zotero.yaml b/org.zotero.Zotero.yaml index bac0390..ef482e9 100644 --- a/org.zotero.Zotero.yaml +++ b/org.zotero.Zotero.yaml @@ -1,29 +1,33 @@ id: org.zotero.Zotero runtime: org.freedesktop.Platform -runtime-version: '23.08' +runtime-version: "23.08" sdk: org.freedesktop.Sdk command: zotero rename-desktop-file: zotero.desktop finish-args: - - --socket=x11 + - --socket=fallback-x11 + - --socket=wayland - --share=ipc - --share=network - --filesystem=home - - --filesystem=xdg-desktop - - --filesystem=xdg-documents - - --filesystem=xdg-download - - --filesystem=xdg-music - - --filesystem=xdg-pictures - - --filesystem=xdg-public-share - - --filesystem=xdg-videos + - --persist=.zotero + - --persist=Zotero + # below file permission can be removed with minimal impact on usability, + # we keep these permissions to preserve the functionality of the unsandboxed version + # See: https://github.com/flathub/org.zotero.Zotero/issues/82 + # and the app description for details. + - --filesystem=home +cleanup: + - /share/zotero/${FLATPAK_ID}.appdata.xml + - /share/zotero/policies.json modules: - shared-modules/dbus-glib/dbus-glib.json - name: zotero buildsystem: simple sources: - type: archive - url: https://download.zotero.org/client/release/6.0.35/Zotero-6.0.35_linux-x86_64.tar.bz2 - sha512: f74574ecddba45c15f4cb61015969af0bdbc594e8f7f7707d6e5d6f6f74dca839b1f71cada2f5c66b530da28719a832ed0cc93c0684e948e17591a46fde50297 + url: https://download.zotero.org/client/release/7.0/Zotero-7.0_linux-x86_64.tar.bz2 + sha512: dd2b1484ae99da841558067e83898e57ad210a9b16c099e944aea81b9fcaf760484c7f98664b150c9811907c9e30b814e8ff6345ee9e04b7eb38c07106bdc849 only-arches: - x86_64 x-checker-data: @@ -32,25 +36,26 @@ modules: pattern: https://download.zotero.org/client/release/([0-9.]+)/Zotero-([0-9.]+)_linux-x86_64.tar.bz2 - type: file path: org.zotero.Zotero.appdata.xml + - type: file + path: policies.json build-commands: - mkdir -p /app/{bin,share} - cp -R . /app/share/zotero - - install -D chrome/icons/default/default16.png /app/share/icons/hicolor/16x16/apps/${FLATPAK_ID}.png - - install -D chrome/icons/default/default32.png /app/share/icons/hicolor/32x32/apps/${FLATPAK_ID}.png - - install -D chrome/icons/default/default48.png /app/share/icons/hicolor/48x48/apps/${FLATPAK_ID}.png - - install -D chrome/icons/default/default256.png /app/share/icons/hicolor/256x256/apps/${FLATPAK_ID}.png + - install -D icons/icon32.png /app/share/icons/hicolor/32x32/apps/${FLATPAK_ID}.png + - install -D icons/icon64.png /app/share/icons/hicolor/64x64/apps/${FLATPAK_ID}.png + - install -D icons/icon128.png /app/share/icons/hicolor/128x128/apps/${FLATPAK_ID}.png + - install -D icons/symbolic.svg /app/share/icons/hicolor/symbolic/apps/${FLATPAK_ID}.svg - >- desktop-file-install --dir=/app/share/applications --set-key=Exec --set-value='zotero -url %U' --set-key=Icon --set-value=${FLATPAK_ID} - --remove-key=SingleMainWindow - --set-key=X-GNOME-SingleWindow --set-value=true --add-mime-type=x-scheme-handler/zotero zotero.desktop - install -D ${FLATPAK_ID}.appdata.xml /app/share/appdata/${FLATPAK_ID}.appdata.xml - ln -s /app/share/zotero/zotero /app/bin/zotero - - >- - sed -i - 's/pref("app.update.enabled", true);/pref("app.update.enabled", false);/' - /app/share/zotero/defaults/preferences/prefs.js + # disable auto-updates + # https://support.mozilla.org/en-US/kb/customizing-firefox-using-policiesjson + # https://mozilla.github.io/policy-templates/#disableappupdate + - mkdir -p /app/share/zotero/distribution + - install -D policies.json /app/share/zotero/distribution/policies.json diff --git a/policies.json b/policies.json new file mode 100644 index 0000000..b45ce53 --- /dev/null +++ b/policies.json @@ -0,0 +1,5 @@ +{ + "policies": { + "DisableAppUpdate": true + } +} \ No newline at end of file