From 1f27bde29e6072a5d1094fcc86a09d6712780baa Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 10 Feb 2024 09:24:13 +0100 Subject: [PATCH 01/19] Build Ghostscript --- conf/paperless.conf.example | 2 +- manifest.toml | 4 ++++ scripts/install | 16 ++++++++++++++++ scripts/upgrade | 19 +++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/conf/paperless.conf.example b/conf/paperless.conf.example index 81304ec..bb1b1dd 100644 --- a/conf/paperless.conf.example +++ b/conf/paperless.conf.example @@ -81,7 +81,7 @@ PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/*", "._*", ".stfolder/*", ".*"] # Binaries #PAPERLESS_CONVERT_BINARY=/usr/bin/convert -#PAPERLESS_GS_BINARY=/usr/bin/gs +PAPERLESS_GS_BINARY=__INSTALL_DIR__/ghostscript/bin/gs #PAPERLESS_OPTIPNG_BINARY=/usr/bin/optipng # YunoHost tweaks diff --git a/manifest.toml b/manifest.toml index 3aa2cf5..6a4ef8f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -61,6 +61,10 @@ ram.runtime = "350M" autoupdate.strategy = "latest_github_release" autoupdate.asset = "paperless-ngx-.*.tar.xz" + [resources.sources.gs] + url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10021/ghostpdl-10.02.1.tar.gz" + sha256 = "25399af0ef5bb94f2a13c91dc785c128d14f16744c4c92fa7c86e011c23151d8" + [resources.system_user] [resources.install_dir] diff --git a/scripts/install b/scripts/install index 43462c2..d28a2ea 100755 --- a/scripts/install +++ b/scripts/install @@ -17,6 +17,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_setup_source --dest_dir="$install_dir" +ynh_setup_source --dest_dir="$install_dir/ghostscript" --source_id="gs" + chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -55,6 +57,20 @@ pushd $install_dir ) popd +#================================================= +# BUILD GHOSTCRIPT SPECIFIC VERSION +#================================================= +ynh_script_progression --message="Building Ghostscript dependency..." + +pushd $install_dir/ghostscript + ./configure + make + make install +popd + +chown -R $app:$app "$install_dir/ghostscript" +chmod 755 $install_dir/ghostscript/bin/gs + #================================================= # CREATE DATA DIRECTORY #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 78ad9e1..914e689 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,6 +95,25 @@ pushd $install_dir ) popd +#================================================= +# BUILD GHOSTCRIPT SPECIFIC VERSION +#================================================= +if [ ! -f $install_dir/ghostscript/bin/gs ] && [ grep -q "10.02.1" $($install_dir/ghostscript/bin/gs -v) ] +then + ynh_script_progression --message="Building Ghostscript dependency..." + + ynh_setup_source --dest_dir="$install_dir/ghostscript" --source_id="gs" --full_replace + + pushd $install_dir/ghostscript + ./configure + make + make install + popd + + chown -R $app:$app "$install_dir/ghostscript" + chmod 755 $install_dir/ghostscript/bin/gs +fi + #================================================= # UPDATE A CONFIG FILE #================================================= From d62d307ea9d2b8e181533e825f26b369b5959e12 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 12 Feb 2024 17:18:19 +0100 Subject: [PATCH 02/19] Silent build, holy if --- scripts/install | 8 ++++---- scripts/upgrade | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index d28a2ea..89f16eb 100755 --- a/scripts/install +++ b/scripts/install @@ -63,13 +63,13 @@ popd ynh_script_progression --message="Building Ghostscript dependency..." pushd $install_dir/ghostscript - ./configure - make - make install + ynh_exec_warn_less ./configure + ynh_exec_warn_less make + ynh_exec_warn_less make install popd chown -R $app:$app "$install_dir/ghostscript" -chmod 755 $install_dir/ghostscript/bin/gs +chmod 550 $install_dir/ghostscript/bin/gs #================================================= # CREATE DATA DIRECTORY diff --git a/scripts/upgrade b/scripts/upgrade index 914e689..0f9267c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -98,20 +98,20 @@ popd #================================================= # BUILD GHOSTCRIPT SPECIFIC VERSION #================================================= -if [ ! -f $install_dir/ghostscript/bin/gs ] && [ grep -q "10.02.1" $($install_dir/ghostscript/bin/gs -v) ] +if [[ ! -f $install_dir/ghostscript/bin/gs ]] && grep -q "10.02.1" $($install_dir/ghostscript/bin/gs -v) then ynh_script_progression --message="Building Ghostscript dependency..." ynh_setup_source --dest_dir="$install_dir/ghostscript" --source_id="gs" --full_replace pushd $install_dir/ghostscript - ./configure - make - make install + ynh_exec_warn_less ./configure + ynh_exec_warn_less make + ynh_exec_warn_less make install popd chown -R $app:$app "$install_dir/ghostscript" - chmod 755 $install_dir/ghostscript/bin/gs + chmod 550 $install_dir/ghostscript/bin/gs fi #================================================= From 2c06e7091bf9a2b92d164c6d655fe74866589a3e Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 12 Feb 2024 18:06:57 +0100 Subject: [PATCH 03/19] Document Ghostscript build --- doc/PRE_UPGRADE.d/2.4.3~ynh2.md | 3 +++ manifest.toml | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 doc/PRE_UPGRADE.d/2.4.3~ynh2.md diff --git a/doc/PRE_UPGRADE.d/2.4.3~ynh2.md b/doc/PRE_UPGRADE.d/2.4.3~ynh2.md new file mode 100644 index 0000000..a07324f --- /dev/null +++ b/doc/PRE_UPGRADE.d/2.4.3~ynh2.md @@ -0,0 +1,3 @@ +Starting 2.4.3~ynh2, and while YunoHost 12 is yet to be released, Paperless-NGX will require to build its Ghostscript dependency to be able to process documents. + +Expect a longer upgrade ! diff --git a/manifest.toml b/manifest.toml index 6a4ef8f..38073a7 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paperless-ngx" description.en = "Scan, index and archive all your physical documents" description.fr = "Scannez, triez et archivez tous vos documents papiers" -version = "2.5.0~ynh1" +version = "2.5.0~ynh2" maintainers = ["Tagada"] diff --git a/scripts/install b/scripts/install index 89f16eb..349c6c2 100755 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,7 @@ popd #================================================= # BUILD GHOSTCRIPT SPECIFIC VERSION #================================================= -ynh_script_progression --message="Building Ghostscript dependency..." +ynh_script_progression --message="Building Ghostscript dependency... (this will take a long time!)" pushd $install_dir/ghostscript ynh_exec_warn_less ./configure diff --git a/scripts/upgrade b/scripts/upgrade index 0f9267c..7e709de 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -100,7 +100,7 @@ popd #================================================= if [[ ! -f $install_dir/ghostscript/bin/gs ]] && grep -q "10.02.1" $($install_dir/ghostscript/bin/gs -v) then - ynh_script_progression --message="Building Ghostscript dependency..." + ynh_script_progression --message="Building Ghostscript dependency... (this will take a long time!)" ynh_setup_source --dest_dir="$install_dir/ghostscript" --source_id="gs" --full_replace From 1a3c3c71e65ebe75c8d6823c82ea0bcef9560ce0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 12 Feb 2024 17:11:22 +0000 Subject: [PATCH 04/19] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8fde380..4c14676 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Paperless-ngx is a document management system that transforms your physical docu * [More screenshots are available in the documentation](https://paperless-ngx.readthedocs.io/en/latest/screenshots.html). -**Shipped version:** 2.5.0~ynh1 +**Shipped version:** 2.5.0~ynh2 **Demo:** https://demo.paperless-ngx.com/ diff --git a/README_fr.md b/README_fr.md index 26459a6..b201a6c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -33,7 +33,7 @@ Paperless-ngx is a document management system that transforms your physical docu * [More screenshots are available in the documentation](https://paperless-ngx.readthedocs.io/en/latest/screenshots.html). -**Version incluse :** 2.5.0~ynh1 +**Version incluse :** 2.5.0~ynh2 **Démo :** https://demo.paperless-ngx.com/ From 6422d65379b325a5b140fdde9a75d3a1c3b75c9d Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 12 Feb 2024 19:18:14 +0100 Subject: [PATCH 05/19] Fix Ghostscript upgrade condition --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7e709de..a6286cd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -98,7 +98,7 @@ popd #================================================= # BUILD GHOSTCRIPT SPECIFIC VERSION #================================================= -if [[ ! -f $install_dir/ghostscript/bin/gs ]] && grep -q "10.02.1" $($install_dir/ghostscript/bin/gs -v) +if ! dpkg --compare-versions "$($install_dir/ghostscript/bin/gs --version &>/dev/null)" ge "10.02.1" then ynh_script_progression --message="Building Ghostscript dependency... (this will take a long time!)" From db7e38b40baa2d7309bde3779a6dd023de4c3b6f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 12 Feb 2024 18:38:29 +0000 Subject: [PATCH 06/19] Include built gs in Environment --- conf/systemd-consumer.service | 1 + conf/systemd-scheduler.service | 1 + conf/systemd-task-queue.service | 1 + conf/systemd.service | 1 + scripts/install | 2 ++ scripts/upgrade | 2 ++ 6 files changed, 8 insertions(+) diff --git a/conf/systemd-consumer.service b/conf/systemd-consumer.service index 1a1bf8b..9563edc 100644 --- a/conf/systemd-consumer.service +++ b/conf/systemd-consumer.service @@ -6,6 +6,7 @@ Requires=redis.service Type=simple User=__APP__ Group=__APP__ +Environment=PATH=__LOCAL_PATH__ WorkingDirectory=__INSTALL_DIR__/src/ ExecStart=__INSTALL_DIR__/venv/bin/python3 manage.py document_consumer StandardOutput=append:/var/log/__APP__/__APP__-consumer.log diff --git a/conf/systemd-scheduler.service b/conf/systemd-scheduler.service index 240dbfe..5b6f132 100644 --- a/conf/systemd-scheduler.service +++ b/conf/systemd-scheduler.service @@ -6,6 +6,7 @@ Requires=redis.service Type=simple User=__APP__ Group=__APP__ +Environment=PATH=__LOCAL_PATH__ WorkingDirectory=__INSTALL_DIR__/src/ ExecStart=__INSTALL_DIR__/venv/bin/celery --app paperless beat --loglevel INFO StandardOutput=append:/var/log/__APP__/__APP__-scheduler.log diff --git a/conf/systemd-task-queue.service b/conf/systemd-task-queue.service index 72982cc..3e8a1e1 100644 --- a/conf/systemd-task-queue.service +++ b/conf/systemd-task-queue.service @@ -6,6 +6,7 @@ Requires=redis.service Type=simple User=__APP__ Group=__APP__ +Environment=PATH=__LOCAL_PATH__ WorkingDirectory=__INSTALL_DIR__/src/ ExecStart=__INSTALL_DIR__/venv/bin/celery --app paperless worker --loglevel INFO StandardOutput=append:/var/log/__APP__/__APP__-task-queue.log diff --git a/conf/systemd.service b/conf/systemd.service index 1f93cdf..7a88f28 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,6 +8,7 @@ Requires=redis.service Type=simple User=__APP__ Group=__APP__ +Environment=PATH=__LOCAL_PATH__ WorkingDirectory=__INSTALL_DIR__/src/ ExecStart=__INSTALL_DIR__/venv/bin/uvicorn --port=__PORT__ --log-level=warning paperless.asgi:application StandardOutput=append:/var/log/__APP__/__APP__.log diff --git a/scripts/install b/scripts/install index 349c6c2..897ea5a 100755 --- a/scripts/install +++ b/scripts/install @@ -71,6 +71,8 @@ popd chown -R $app:$app "$install_dir/ghostscript" chmod 550 $install_dir/ghostscript/bin/gs +local_path=$install_dir/ghostscript/bin/gs:$PATH + #================================================= # CREATE DATA DIRECTORY #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a6286cd..aef7c3f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -114,6 +114,8 @@ then chmod 550 $install_dir/ghostscript/bin/gs fi +local_path=$install_dir/ghostscript/bin/gs:$PATH + #================================================= # UPDATE A CONFIG FILE #================================================= From 6d8384738f8c7b252bd3f81547699b9e5fd492db Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 12 Feb 2024 21:11:34 +0100 Subject: [PATCH 07/19] Fix custom PATH Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com> --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 897ea5a..e8d9a31 100755 --- a/scripts/install +++ b/scripts/install @@ -71,7 +71,7 @@ popd chown -R $app:$app "$install_dir/ghostscript" chmod 550 $install_dir/ghostscript/bin/gs -local_path=$install_dir/ghostscript/bin/gs:$PATH +local_path=$install_dir/ghostscript/bin/:$PATH #================================================= # CREATE DATA DIRECTORY diff --git a/scripts/upgrade b/scripts/upgrade index aef7c3f..4459ded 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -114,7 +114,7 @@ then chmod 550 $install_dir/ghostscript/bin/gs fi -local_path=$install_dir/ghostscript/bin/gs:$PATH +local_path=$install_dir/ghostscript/bin/:$PATH #================================================= # UPDATE A CONFIG FILE From ae55d77ae6c0ac4721dbbc538f12ec460f5199df Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 12 Feb 2024 22:36:51 +0100 Subject: [PATCH 08/19] =?UTF-8?q?Fix=20Ghostscript=20upgrade=20condition?= =?UTF-8?q?=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4459ded..964ac11 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -98,7 +98,7 @@ popd #================================================= # BUILD GHOSTCRIPT SPECIFIC VERSION #================================================= -if ! dpkg --compare-versions "$($install_dir/ghostscript/bin/gs --version &>/dev/null)" ge "10.02.1" +if ! dpkg --compare-versions "$($install_dir/ghostscript/bin/gs --version 2>/dev/null)" ge "10.02.1" then ynh_script_progression --message="Building Ghostscript dependency... (this will take a long time!)" From c16bcfac55407b73c8c6c622fb9b08604156d68f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 12 Feb 2024 22:48:54 +0100 Subject: [PATCH 09/19] Cleanup after build --- scripts/install | 9 ++++++--- scripts/upgrade | 11 +++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index e8d9a31..d1c02f5 100755 --- a/scripts/install +++ b/scripts/install @@ -66,12 +66,15 @@ pushd $install_dir/ghostscript ynh_exec_warn_less ./configure ynh_exec_warn_less make ynh_exec_warn_less make install + mv bin/ $install_dir/ popd -chown -R $app:$app "$install_dir/ghostscript" -chmod 550 $install_dir/ghostscript/bin/gs +ynh_secure_remove --file="$install_dir/ghostscript" +chmod -R o-rwx "$install_dir/bin" +chown -R $app:$app "$install_dir/bin" +chmod 550 $install_dir/gs -local_path=$install_dir/ghostscript/bin/:$PATH +local_path=$install_dir/bin/:$PATH #================================================= # CREATE DATA DIRECTORY diff --git a/scripts/upgrade b/scripts/upgrade index 964ac11..6ee366f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -98,7 +98,7 @@ popd #================================================= # BUILD GHOSTCRIPT SPECIFIC VERSION #================================================= -if ! dpkg --compare-versions "$($install_dir/ghostscript/bin/gs --version 2>/dev/null)" ge "10.02.1" +if ! dpkg --compare-versions "$($install_dir/bin/gs --version 2>/dev/null)" ge "10.02.1" then ynh_script_progression --message="Building Ghostscript dependency... (this will take a long time!)" @@ -108,13 +108,16 @@ then ynh_exec_warn_less ./configure ynh_exec_warn_less make ynh_exec_warn_less make install + mv bin/ $install_dir/ popd - chown -R $app:$app "$install_dir/ghostscript" - chmod 550 $install_dir/ghostscript/bin/gs + ynh_secure_remove --file="$install_dir/ghostscript" + chmod -R o-rwx "$install_dir/bin" + chown -R $app:$app "$install_dir/bin" + chmod 550 $install_dir/bin/gs fi -local_path=$install_dir/ghostscript/bin/:$PATH +local_path=$install_dir/bin/:$PATH #================================================= # UPDATE A CONFIG FILE From a1324bd8674608e99f6c25467ba2c15cf22a1dc5 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Mon, 12 Feb 2024 23:49:58 +0100 Subject: [PATCH 10/19] Fix gs path in scripts/install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index d1c02f5..7bc1781 100755 --- a/scripts/install +++ b/scripts/install @@ -72,7 +72,7 @@ popd ynh_secure_remove --file="$install_dir/ghostscript" chmod -R o-rwx "$install_dir/bin" chown -R $app:$app "$install_dir/bin" -chmod 550 $install_dir/gs +chmod 550 $install_dir/bin/gs local_path=$install_dir/bin/:$PATH From cb369ca509e4dba7770eea92a1fe403d13a1c81e Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Wed, 14 Feb 2024 13:15:22 +0100 Subject: [PATCH 11/19] Upgrade to v2.5.1 (#73) * Upgrade to v2.5.1 Changelog: https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.5.1 * Auto-update README --- README.md | 2 +- README_fr.md | 2 +- manifest.toml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8fde380..629da51 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Paperless-ngx is a document management system that transforms your physical docu * [More screenshots are available in the documentation](https://paperless-ngx.readthedocs.io/en/latest/screenshots.html). -**Shipped version:** 2.5.0~ynh1 +**Shipped version:** 2.5.1~ynh1 **Demo:** https://demo.paperless-ngx.com/ diff --git a/README_fr.md b/README_fr.md index 26459a6..1d0e6bf 100644 --- a/README_fr.md +++ b/README_fr.md @@ -33,7 +33,7 @@ Paperless-ngx is a document management system that transforms your physical docu * [More screenshots are available in the documentation](https://paperless-ngx.readthedocs.io/en/latest/screenshots.html). -**Version incluse :** 2.5.0~ynh1 +**Version incluse :** 2.5.1~ynh1 **Démo :** https://demo.paperless-ngx.com/ diff --git a/manifest.toml b/manifest.toml index 3aa2cf5..7d73c54 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paperless-ngx" description.en = "Scan, index and archive all your physical documents" description.fr = "Scannez, triez et archivez tous vos documents papiers" -version = "2.5.0~ynh1" +version = "2.5.1~ynh1" maintainers = ["Tagada"] @@ -55,8 +55,8 @@ ram.runtime = "350M" [resources.sources] [resources.sources.main] - url = "https://github.com/paperless-ngx/paperless-ngx/releases/download/v2.5.0/paperless-ngx-v2.5.0.tar.xz" - sha256 = "fa0b90cf9203d1aa89dbf687c43ea103cd616eb7725ae2c6cb6d2ead4d66de6a" + url = "https://github.com/paperless-ngx/paperless-ngx/releases/download/v2.5.1/paperless-ngx-v2.5.1.tar.xz" + sha256 = "5fb32d23c9761f58039a0378fd2c191da03aff66cfac3ea7095a7fd19c5faa57" autoupdate.strategy = "latest_github_release" autoupdate.asset = "paperless-ngx-.*.tar.xz" From 4e9477ca13e64b406dc062b498e60a09555f6185 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 14 Feb 2024 21:31:23 +0100 Subject: [PATCH 12/19] No need to `make install` --- scripts/install | 1 - scripts/upgrade | 1 - 2 files changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index 7bc1781..438bd16 100755 --- a/scripts/install +++ b/scripts/install @@ -65,7 +65,6 @@ ynh_script_progression --message="Building Ghostscript dependency... (this will pushd $install_dir/ghostscript ynh_exec_warn_less ./configure ynh_exec_warn_less make - ynh_exec_warn_less make install mv bin/ $install_dir/ popd diff --git a/scripts/upgrade b/scripts/upgrade index 6ee366f..d10352d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,7 +107,6 @@ then pushd $install_dir/ghostscript ynh_exec_warn_less ./configure ynh_exec_warn_less make - ynh_exec_warn_less make install mv bin/ $install_dir/ popd From 5d15ed7abc63503e2499c79646e880acf1dd175f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 14 Feb 2024 22:08:43 +0100 Subject: [PATCH 13/19] Fix path to `gs` --- conf/paperless.conf.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/paperless.conf.example b/conf/paperless.conf.example index bb1b1dd..91dff1e 100644 --- a/conf/paperless.conf.example +++ b/conf/paperless.conf.example @@ -81,7 +81,7 @@ PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/*", "._*", ".stfolder/*", ".*"] # Binaries #PAPERLESS_CONVERT_BINARY=/usr/bin/convert -PAPERLESS_GS_BINARY=__INSTALL_DIR__/ghostscript/bin/gs +PAPERLESS_GS_BINARY=__INSTALL_DIR__/bin/gs #PAPERLESS_OPTIPNG_BINARY=/usr/bin/optipng # YunoHost tweaks From 731ed07a25df4fc60c3bc464ab87de142849f746 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 15 Feb 2024 18:19:54 +0000 Subject: [PATCH 14/19] Implement imagemagick policy for `convert` calls --- conf/policy.xml | 23 +++++++++++++++++++++++ manifest.toml | 2 +- scripts/install | 6 ++++++ scripts/upgrade | 6 ++++++ 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 conf/policy.xml diff --git a/conf/policy.xml b/conf/policy.xml new file mode 100644 index 0000000..35ec974 --- /dev/null +++ b/conf/policy.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/manifest.toml b/manifest.toml index fb8556e..3206098 100644 --- a/manifest.toml +++ b/manifest.toml @@ -70,7 +70,7 @@ ram.runtime = "350M" [resources.install_dir] [resources.data_dir] - subdirs = ["consume", "data", "media"] + subdirs = ["consume", "data", "media", "imagemagick"] [resources.permissions] main.url = "/" diff --git a/scripts/install b/scripts/install index 438bd16..f5f87df 100755 --- a/scripts/install +++ b/scripts/install @@ -103,6 +103,12 @@ ynh_add_config --template="paperless.conf.example" --destination="$install_dir/p chmod 400 "$install_dir/paperless.conf" chown $app:$app "$install_dir/paperless.conf" +# ImageMagick configuration +mkdir -p "$install_dir/.config/ImageMagick" +ynh_add_config --template="policy.xml" --destination="$install_dir/.config/ImageMagick/policy.xml" +chmod 400 "$install_dir/.config/ImageMagick/policy.xml" +chown -R $app:$app "$install_dir/.config" + #================================================= # SETUP THE DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d10352d..6be9942 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,6 +128,12 @@ ynh_add_config --template="paperless.conf.example" --destination="$install_dir/p chmod 400 "$install_dir/paperless.conf" chown $app:$app "$install_dir/paperless.conf" +# ImageMagick configuration +mkdir -p "$install_dir/.config/ImageMagick" +ynh_add_config --template="policy.xml" --destination="$install_dir/.config/ImageMagick/policy.xml" +chmod 400 "$install_dir/.config/ImageMagick/policy.xml" +chown -R $app:$app "$install_dir/.config" + #================================================= # SETUP THE DATABASE #================================================= From 5d7f56ec391f7e8267b471f998b46e5279080aec Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 15 Feb 2024 18:20:07 +0000 Subject: [PATCH 15/19] Auto-update README --- README.md | 4 ++-- README_fr.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 629da51..a72013f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -62,4 +62,4 @@ or sudo yunohost app upgrade paperless-ngx -u https://github.com/YunoHost-Apps/paperless-ngx_ynh/tree/testing --debug ``` -**More info regarding app packaging:** +**More info regarding app packaging:** \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 1d0e6bf..fbcb36c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,5 +1,5 @@ From cba6e95f465bddc76262001f87c1aa46c375a5a3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 16 Feb 2024 14:59:00 +0000 Subject: [PATCH 16/19] Auto-update README --- README.md | 4 ++-- README_fr.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 629da51..a72013f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -62,4 +62,4 @@ or sudo yunohost app upgrade paperless-ngx -u https://github.com/YunoHost-Apps/paperless-ngx_ynh/tree/testing --debug ``` -**More info regarding app packaging:** +**More info regarding app packaging:** \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 1d0e6bf..fbcb36c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,5 +1,5 @@ From d50f94c94ce8abaa5ecd54672cafedefab5f8d88 Mon Sep 17 00:00:00 2001 From: Kayou Date: Fri, 16 Feb 2024 15:59:54 +0100 Subject: [PATCH 17/19] fix systemd services on computer boot --- conf/systemd-consumer.service | 2 ++ conf/systemd-scheduler.service | 2 ++ conf/systemd-task-queue.service | 2 ++ 3 files changed, 6 insertions(+) diff --git a/conf/systemd-consumer.service b/conf/systemd-consumer.service index 1a1bf8b..f58079b 100644 --- a/conf/systemd-consumer.service +++ b/conf/systemd-consumer.service @@ -1,5 +1,7 @@ [Unit] Description=Paperless consumer +After=network.target +Wants=network.target Requires=redis.service [Service] diff --git a/conf/systemd-scheduler.service b/conf/systemd-scheduler.service index 240dbfe..1042ba3 100644 --- a/conf/systemd-scheduler.service +++ b/conf/systemd-scheduler.service @@ -1,5 +1,7 @@ [Unit] Description=Paperless scheduler +After=network.target +Wants=network.target Requires=redis.service [Service] diff --git a/conf/systemd-task-queue.service b/conf/systemd-task-queue.service index 72982cc..cb31951 100644 --- a/conf/systemd-task-queue.service +++ b/conf/systemd-task-queue.service @@ -1,5 +1,7 @@ [Unit] Description=Paperless task-queue +After=network.target +Wants=network.target Requires=redis.service [Service] From 28b9c83c0f6208b9295d37a30a01b1ba9110fd09 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 16 Feb 2024 17:10:36 +0100 Subject: [PATCH 18/19] Upgrade to v2.5.3 https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.5.3 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 7d73c54..1db0cbb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paperless-ngx" description.en = "Scan, index and archive all your physical documents" description.fr = "Scannez, triez et archivez tous vos documents papiers" -version = "2.5.1~ynh1" +version = "2.5.3~ynh1" maintainers = ["Tagada"] @@ -55,8 +55,8 @@ ram.runtime = "350M" [resources.sources] [resources.sources.main] - url = "https://github.com/paperless-ngx/paperless-ngx/releases/download/v2.5.1/paperless-ngx-v2.5.1.tar.xz" - sha256 = "5fb32d23c9761f58039a0378fd2c191da03aff66cfac3ea7095a7fd19c5faa57" + url = "https://github.com/paperless-ngx/paperless-ngx/releases/download/v2.5.3/paperless-ngx-v2.5.3.tar.xz" + sha256 = "61b2c4a44663ac414994b0b0ce02938ec102c14c3f63d1e3259cb2f24ca9bda8" autoupdate.strategy = "latest_github_release" autoupdate.asset = "paperless-ngx-.*.tar.xz" From 9cf86dff224b9e4fd06bc6cf0c2d3e0bf59e6bff Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 16 Feb 2024 16:10:40 +0000 Subject: [PATCH 19/19] Auto-update README --- README.md | 6 +++--- README_fr.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 629da51..4fd84b3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -33,7 +33,7 @@ Paperless-ngx is a document management system that transforms your physical docu * [More screenshots are available in the documentation](https://paperless-ngx.readthedocs.io/en/latest/screenshots.html). -**Shipped version:** 2.5.1~ynh1 +**Shipped version:** 2.5.3~ynh1 **Demo:** https://demo.paperless-ngx.com/ @@ -62,4 +62,4 @@ or sudo yunohost app upgrade paperless-ngx -u https://github.com/YunoHost-Apps/paperless-ngx_ynh/tree/testing --debug ``` -**More info regarding app packaging:** +**More info regarding app packaging:** \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 1d0e6bf..24fbbf0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,5 +1,5 @@ @@ -33,7 +33,7 @@ Paperless-ngx is a document management system that transforms your physical docu * [More screenshots are available in the documentation](https://paperless-ngx.readthedocs.io/en/latest/screenshots.html). -**Version incluse :** 2.5.1~ynh1 +**Version incluse :** 2.5.3~ynh1 **Démo :** https://demo.paperless-ngx.com/