From ff180b0033350a84e0cc5b7820c45304b25c705b Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Sun, 7 May 2023 23:49:48 +0200 Subject: [PATCH 01/38] Update tests.toml --- tests.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index 71e7a74..4299b9c 100644 --- a/tests.toml +++ b/tests.toml @@ -14,4 +14,4 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.89f4f52.name = "Upgrade from 13.0.5" + test_upgrade_from.89f4f52.name = "13.1.4.1" From b6abe8e729afce4b740b265858614690c3ed570c Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Sun, 7 May 2023 23:51:55 +0200 Subject: [PATCH 02/38] Update v14.0.0rc --- manifest.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.toml b/manifest.toml index 5abc9e2..05e4b87 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Calckey" description.en = "Fork of Misskey with better UI/UX, security, features" description.fr = "Un fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités" -version = "13.1.4.1~ynh1" +version = "14.0.0rc~ynh1" maintainers = ["oufmilo"] @@ -40,8 +40,8 @@ ram.runtime = "2G" [resources] [resources.sources.main] - url = "https://codeberg.org/calckey/calckey/archive/v13.1.4.1.tar.gz" - sha256 = "5bd66e8ade6abaf205da6c4ad9a9389719c09ce0bbf672389e1b84af48afcbbc" + url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc.tar.gz" + sha256 = "3dc6023c4c816ab3504a8f2c7d2c2b2c908cb58c0cda0821631a314a29d3b0f6" [resources.system_user] @@ -54,7 +54,7 @@ ram.runtime = "2G" main.default = 3020 [resources.apt] - packages = "ffmpeg, postgresql, build-essential" + packages = "ffmpeg, postgresql, build-essential, curl" [resources.database] - type = "postgresql" \ No newline at end of file + type = "postgresql" From a4c866cd1c7bb018d8a9c97bab50d892c074ed32 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Sun, 7 May 2023 23:59:40 +0200 Subject: [PATCH 03/38] Update upgrade --- scripts/upgrade | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index aca8f7e..e792239 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,7 @@ upgrade_type=$(ynh_check_app_version_changed) # ENSURE DOWNWARD COMPATIBILITY #================================================= -if ynh_compare_current_package_version --comparison lt --version 12.105.0~ynh1 +if ynh_compare_current_package_version --comparison lt --version 13.0.5~ynh1 then ynh_die --message="Sorry, this version is not upgradable to the latest version :(" fi @@ -99,12 +99,15 @@ ynh_add_nginx_config ynh_script_progression --message="Building app..." pushd "$install_dir" - corepack enable - corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm clean-all - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run build - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run migrate + curl https://sh.rustup.rs -sSf | ynh_exec_as $app sh -s -- -y + export PATH="$install_dir/.cargo/bin:$PATH" + ynh_use_nodejs + corepack enable + corepack prepare pnpm@latest --activate + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm clean-all + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run migrate popd #================================================= From 6c5f4d2a9fe694b6377ebc40186de71f732ac427 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 8 May 2023 00:01:57 +0200 Subject: [PATCH 04/38] Update restore --- scripts/restore | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 0fea344..8002398 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,10 +34,12 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= # REINSTALL PNPM #================================================= -ynh_script_progression --message="Reinstalling pnpm..." --weight=1 +ynh_script_progression --message="Reinstalling pnpm + rust..." --weight=1 -# Define and install pnpm +# Define and install pnpm + rust pushd "$install_dir" + curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app 'sh -s -- -y' + export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs corepack enable corepack prepare pnpm@latest --activate From 554610cb77149b6896c97a789dc9638ddab05a74 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 8 May 2023 00:03:33 +0200 Subject: [PATCH 05/38] Update install --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 4973de6..14993fa 100644 --- a/scripts/install +++ b/scripts/install @@ -67,6 +67,8 @@ chown $app:$app "$install_dir/.config/default.yml" ynh_script_progression --message="Building app... This will take some time." --weight=15 pushd "$install_dir" + curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app 'sh -s -- -y' + export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs corepack enable corepack prepare pnpm@latest --activate From 265514f55e83aea057570f3da9040d11eedc87b9 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 8 May 2023 00:18:19 +0200 Subject: [PATCH 06/38] Fix syntax --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 14993fa..b2f5681 100644 --- a/scripts/install +++ b/scripts/install @@ -67,7 +67,7 @@ chown $app:$app "$install_dir/.config/default.yml" ynh_script_progression --message="Building app... This will take some time." --weight=15 pushd "$install_dir" - curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app 'sh -s -- -y' + curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs corepack enable From e0ba4a33eb19536e3ffcdfcd45814e1f4f89daa6 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 8 May 2023 09:26:54 +0200 Subject: [PATCH 07/38] Fix syntax --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 8002398..27a899f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -38,7 +38,7 @@ ynh_script_progression --message="Reinstalling pnpm + rust..." --weight=1 # Define and install pnpm + rust pushd "$install_dir" - curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app 'sh -s -- -y' + curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs corepack enable From 3778492bd8808285722572e78cdb5986c8685ad3 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 8 May 2023 11:27:18 +0200 Subject: [PATCH 08/38] Update restore --- scripts/restore | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/restore b/scripts/restore index 27a899f..a8499dd 100644 --- a/scripts/restore +++ b/scripts/restore @@ -45,6 +45,7 @@ pushd "$install_dir" corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run init popd #================================================= From 5e813114e5f7b1c40f45786398897ea9cf497056 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 8 May 2023 11:28:12 +0200 Subject: [PATCH 09/38] Fix warning info --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index e792239..2c4a585 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,7 +99,7 @@ ynh_add_nginx_config ynh_script_progression --message="Building app..." pushd "$install_dir" - curl https://sh.rustup.rs -sSf | ynh_exec_as $app sh -s -- -y + curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs corepack enable From 178c79a1341c4a7d080dd33f4b799866ca15fa06 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 8 May 2023 12:13:08 +0200 Subject: [PATCH 10/38] Fix message --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2c4a585..682f2a4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -96,7 +96,7 @@ ynh_add_nginx_config #================================================= # BUILD APP #================================================= -ynh_script_progression --message="Building app..." +ynh_script_progression --message="Installing rust and building app…" pushd "$install_dir" curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y From dc6c7bfe8cebac90602bce3c88c8b165fc167120 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 8 May 2023 12:35:59 +0200 Subject: [PATCH 11/38] Update restore --- scripts/restore | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index a8499dd..27a899f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -45,7 +45,6 @@ pushd "$install_dir" corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run init popd #================================================= From d34abc940da2a724acb6e077b7be9a28902e0328 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 8 May 2023 14:33:51 +0000 Subject: [PATCH 12/38] 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 80bd35c..502f563 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ A greatly enhanced fork of Misskey with better UI/UX, security, features, and mo -**Shipped version:** 13.1.4.1~ynh1 +**Shipped version:** 14.0.0rc~ynh1 **Demo:** https://i.calckey.cloud/ diff --git a/README_fr.md b/README_fr.md index fe38311..ad0de22 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ Un fork grandement amélioré de Misskey avec une meilleure UI/UX, sécurité, f Calckey ajoute de nombreux changements de qualité de vie et des corrections de bogues pour les utilisateurs et les administrateurs d'instance. -**Version incluse :** 13.1.4.1~ynh1 +**Version incluse :** 14.0.0rc~ynh1 **Démo :** https://i.calckey.cloud/ From c79b5822b10690c6be1abed1e7b140b6d0762564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 20 May 2023 20:37:55 +0200 Subject: [PATCH 13/38] Update manifest.toml --- manifest.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.toml b/manifest.toml index 05e4b87..1a2d965 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,12 +16,12 @@ demo = "https://i.calckey.cloud/" code = "https://codeberg.org/calckey/calckey" [integration] -yunohost = ">= 11.1.14" -architectures = "all" +yunohost = ">= 11.1.19" +architectures = "all" multi_instance = false -ldap = "not_relevant" -sso = "not_relevant" -disk = "50M" +ldap = "not_relevant" +sso = "not_relevant" +disk = "50M" ram.build = "2G" ram.runtime = "2G" From 07cac4c66188ca66402cda81d646c615b455bc52 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Wed, 14 Jun 2023 13:45:38 +0200 Subject: [PATCH 14/38] v14.0.0rc2 --- manifest.toml | 8 ++++---- scripts/_common.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.toml b/manifest.toml index 05e4b87..ef5e99f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Calckey" description.en = "Fork of Misskey with better UI/UX, security, features" description.fr = "Un fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités" -version = "14.0.0rc~ynh1" +version = "14.0.0rc2~ynh1" maintainers = ["oufmilo"] @@ -16,7 +16,7 @@ demo = "https://i.calckey.cloud/" code = "https://codeberg.org/calckey/calckey" [integration] -yunohost = ">= 11.1.14" +yunohost = ">= 11.1.19" architectures = "all" multi_instance = false ldap = "not_relevant" @@ -40,8 +40,8 @@ ram.runtime = "2G" [resources] [resources.sources.main] - url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc.tar.gz" - sha256 = "3dc6023c4c816ab3504a8f2c7d2c2b2c908cb58c0cda0821631a314a29d3b0f6" + url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc2c.tar.gz" + sha256 = "8cce26734c67a1c9b360b178127301dbb14b4cc969d3343340873a765e9a4d56" [resources.system_user] diff --git a/scripts/_common.sh b/scripts/_common.sh index 42e7239..6d92371 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ # PHP APP SPECIFIC #================================================= -NODEJS_VERSION="19" +NODEJS_VERSION="20" #================================================= # PERSONAL HELPERS From 6f67b148cf86fa2711a2f51a5c456cce4a5c1907 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Wed, 14 Jun 2023 14:11:12 +0200 Subject: [PATCH 15/38] NodeJS-19 --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 6d92371..42e7239 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ # PHP APP SPECIFIC #================================================= -NODEJS_VERSION="20" +NODEJS_VERSION="19" #================================================= # PERSONAL HELPERS From 30d4b0b1799f2d9147bb2effa98077cbddabcbba Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 25 Jun 2023 14:48:32 +0200 Subject: [PATCH 16/38] v14.0.0-rc3 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 1a2d965..cadea7d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Calckey" description.en = "Fork of Misskey with better UI/UX, security, features" description.fr = "Un fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités" -version = "14.0.0rc~ynh1" +version = "14.0.0rc3~ynh1" maintainers = ["oufmilo"] @@ -40,8 +40,8 @@ ram.runtime = "2G" [resources] [resources.sources.main] - url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc.tar.gz" - sha256 = "3dc6023c4c816ab3504a8f2c7d2c2b2c908cb58c0cda0821631a314a29d3b0f6" + url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc3.tar.gz" + sha256 = "844db89913cdc026e390cc69e923c9c63a2e11b2230e36cba8e9642f73d8c059" [resources.system_user] From 2f944983d2f3b1c935122401a3ffd3e43bf0267c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 28 Jun 2023 06:53:03 +0000 Subject: [PATCH 17/38] 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 502f563..0074a28 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ A greatly enhanced fork of Misskey with better UI/UX, security, features, and mo -**Shipped version:** 14.0.0rc~ynh1 +**Shipped version:** 14.0.0rc3~ynh1 **Demo:** https://i.calckey.cloud/ diff --git a/README_fr.md b/README_fr.md index ad0de22..df5f007 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ Un fork grandement amélioré de Misskey avec une meilleure UI/UX, sécurité, f Calckey ajoute de nombreux changements de qualité de vie et des corrections de bogues pour les utilisateurs et les administrateurs d'instance. -**Version incluse :** 14.0.0rc~ynh1 +**Version incluse :** 14.0.0rc3~ynh1 **Démo :** https://i.calckey.cloud/ From 6a13f186fec3f5f48439b814b85c45b73df375d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:01:02 +0200 Subject: [PATCH 18/38] cleaning --- .github/workflows/updater.sh | 140 ---------------------------------- .github/workflows/updater.yml | 50 ------------ conf/nginx.conf | 1 - manifest.toml | 4 +- scripts/install | 11 --- scripts/remove | 4 - scripts/restore | 4 - scripts/upgrade | 8 -- 8 files changed, 2 insertions(+), 220 deletions(-) delete mode 100755 .github/workflows/updater.sh delete mode 100644 .github/workflows/updater.yml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh deleted file mode 100755 index 7643597..0000000 --- a/.github/workflows/updater.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/bash - -#================================================= -# PACKAGE UPDATING HELPER -#================================================= - -# This script is meant to be run by GitHub Actions -# The YunoHost-Apps organisation offers a template Action to run this script periodically -# Since each app is different, maintainers can adapt its contents so as to perform -# automatic actions when a new upstream release is detected. - -# Remove this exit command when you are ready to run this Action - -exit 1 - -#================================================= -# FETCHING LATEST RELEASE AND ITS ASSETS -#================================================= - -# Fetching information -current_version=$(cat manifest.toml | tomlq -j '.version|split("~")[0]') -repo=$(cat manifest.toml | tomlq -j '.upstream.code|split("https://codeberg.org/")[1]') - -# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) -latest_release_json=$(curl --silent "https://codeberg.org/api/v1/repos/calckey/calckey/releases" | jq -r '[.[] | select( .prerelease != true )][0]') -version=$(echo $latest_release_json | jq -r '.tag_name') -assets=$(echo $latest_release_json | jq -r '[ .tarball_url ] | join(" ") | @sh' | tr -d "'") - -# Later down the script, we assume the version has only digits and dots -# Sometimes the release name starts with a "v", so let's filter it out. -# You may need more tweaks here if the upstream repository has different naming conventions. -if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then - version=${version:1} -fi - -# Setting up the environment variables -echo "Current version: $current_version" -echo "Latest release from upstream: $version" -echo "VERSION=$version" >> $GITHUB_ENV -echo "REPO=$repo" >> $GITHUB_ENV -# For the time being, let's assume the script will fail -echo "PROCEED=false" >> $GITHUB_ENV - -# Proceed only if the retrieved version is greater than the current one -if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then - echo "::warning ::No new version available" - exit 0 -# Proceed only if a PR for this new version does not already exist -elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then - echo "::warning ::A branch already exists for this update" - exit 0 -fi - -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - -#================================================= -# UPDATE SOURCE FILES -#================================================= - -# Here we use the $assets variable to get the resources published in the upstream release. -# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do - -echo "Handling asset at $asset_url" - -# Assign the asset to a source file in conf/ directory -# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) -# Leave $src empty to ignore the asset -case $asset_url in - *"admin"*) - src="app" - ;; - *"update"*) - src="app-upgrade" - ;; - *) - src="" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then - -# Create the temporary directory -tempdir="$(mktemp -d)" - -# Download sources and calculate checksum -filename=${asset_url##*/} -curl --silent -4 -L $asset_url -o "$tempdir/$filename" -checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - -# Delete temporary directory -rm -rf $tempdir - -# Get extension -if [[ $filename == *.tar.gz ]]; then - extension=tar.gz -else - extension=${filename##*.} -fi - -# Rewrite source file -cat < conf/$src.src -SOURCE_URL=$asset_url -SOURCE_SUM=$checksum -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=$extension -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= -EOT -echo "... conf/$src.src updated" - -else -echo "... asset ignored" -fi - -done - -#================================================= -# SPECIFIC UPDATE STEPS -#================================================= - -# Any action on the app's source code can be done. -# The GitHub Action workflow takes care of committing all changes after this script ends. - -#================================================= -# GENERIC FINALIZATION -#================================================= - -# Replace new version in manifest -echo "$(tomlq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.toml)" > manifest.toml - -# No need to update the README, yunohost-bot takes care of it - -# The Action will proceed only if the PROCEED environment variable is set to true -echo "PROCEED=true" >> $GITHUB_ENV -exit 0 diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml deleted file mode 100644 index 4a866ff..0000000 --- a/.github/workflows/updater.yml +++ /dev/null @@ -1,50 +0,0 @@ -# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected. -# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization. -# This file should be enough by itself, but feel free to tune it to your needs. -# It calls updater.sh, which is where you should put the app-specific update steps. -name: Check for new upstream releases -on: - # Allow to manually trigger the workflow - workflow_dispatch: - # Run it every day at 6:00 UTC - schedule: - - cron: '0 6 * * *' -jobs: - updater: - runs-on: ubuntu-latest - steps: - - name: Fetch the source code - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Run the updater script - id: run_updater - run: | - # Setting up Git user - git config --global user.name 'yunohost-bot' - git config --global user.email 'yunohost-bot@users.noreply.github.com' - # Run the updater script - /bin/bash .github/workflows/updater.sh - - name: Commit changes - id: commit - if: ${{ env.PROCEED == 'true' }} - run: | - git commit -am "Upgrade to v$VERSION" - - name: Create Pull Request - id: cpr - if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update to version ${{ env.VERSION }} - committer: 'yunohost-bot ' - author: 'yunohost-bot ' - signoff: false - base: testing - branch: ci-auto-update-v${{ env.VERSION }} - delete-branch: true - title: 'Upgrade to version ${{ env.VERSION }}' - body: | - Upgrade to v${{ env.VERSION }} - [See upstream release page](https://github.com/${{ env.REPO }}/releases/tag/v${{ env.VERSION }}) - draft: false diff --git a/conf/nginx.conf b/conf/nginx.conf index b62c14a..32ad407 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,6 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/manifest.toml b/manifest.toml index cadea7d..5bc76a6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,7 +3,7 @@ packaging_format = 2 id = "calckey" name = "Calckey" description.en = "Fork of Misskey with better UI/UX, security, features" -description.fr = "Un fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités" +description.fr = "Fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités" version = "14.0.0rc3~ynh1" @@ -16,7 +16,7 @@ demo = "https://i.calckey.cloud/" code = "https://codeberg.org/calckey/calckey" [integration] -yunohost = ">= 11.1.19" +yunohost = ">= 11.1.21" architectures = "all" multi_instance = false ldap = "not_relevant" diff --git a/scripts/install b/scripts/install index b2f5681..b8c6756 100644 --- a/scripts/install +++ b/scripts/install @@ -9,16 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - - - -#================================================= -# STANDARD MODIFICATIONS -#================================================= - #================================================= # INSTALL DEPENDENCIES #================================================= @@ -109,7 +99,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="All workers started" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index 1164548..292ef1f 100755 --- a/scripts/remove +++ b/scripts/remove @@ -71,10 +71,6 @@ ynh_remove_nodejs # Remove the log files ynh_secure_remove --file="/var/log/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 27a899f..aa86938 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,10 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD RESTORATION STEPS -#================================================= - #================================================= # RESTORE THE APP MAIN DIR #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 682f2a4..3f7c7d7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,11 +9,9 @@ source _common.sh source /usr/share/yunohost/helpers - #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -34,11 +32,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 # Stop service before backup, to not loose message in case of failed upgrade and restore ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped" -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -142,7 +135,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="All workers started" - #================================================= # END OF SCRIPT #================================================= From 9e1aee5a4aec79045e425ef0767ecc948dc7da10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:01:25 +0200 Subject: [PATCH 19/38] Update DESCRIPTION.md --- doc/DESCRIPTION.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 77f8b46..484bcf7 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,4 +1,3 @@ - A greatly enhanced fork of Misskey with better UI/UX, security, features, and more! https://i.calckey.cloud/ From ea4ee5a09730dcce95d7ec8bbe74b8b8583d885c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 7 Jul 2023 14:01:29 +0000 Subject: [PATCH 20/38] Auto-update README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 0074a28..6e45184 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,6 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview - A greatly enhanced fork of Misskey with better UI/UX, security, features, and more! https://i.calckey.cloud/ From d1be19ed952bde10f8b70a124fdfb91a4cea2336 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:10:47 +0200 Subject: [PATCH 21/38] Fix restore --- scripts/restore | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/restore b/scripts/restore index 27a899f..12713c8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -31,6 +31,23 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=5 # Define and install dependencies ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +# Configure redis +redis_db=$(ynh_redis_get_free_db) +ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" + +ynh_add_config --template="../conf/default.yml" --destination="$install_dir/.config/default.yml" + +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" +chmod 400 "$install_dir/.config/default.yml" +chown $app:$app "$install_dir/.config/default.yml" + #================================================= # REINSTALL PNPM #================================================= From a92e034f152e53ce7be4c0191ccc185add73907d Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 17 Jul 2023 22:32:37 +0200 Subject: [PATCH 22/38] Fix v14.0.0rc3 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index ef5e99f..b8ae361 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Calckey" description.en = "Fork of Misskey with better UI/UX, security, features" description.fr = "Un fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités" -version = "14.0.0rc2~ynh1" +version = "14.0.0rc3~ynh1" maintainers = ["oufmilo"] @@ -40,8 +40,8 @@ ram.runtime = "2G" [resources] [resources.sources.main] - url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc2c.tar.gz" - sha256 = "8cce26734c67a1c9b360b178127301dbb14b4cc969d3343340873a765e9a4d56" + url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc3.tar.gz" + sha256 = "844db89913cdc026e390cc69e923c9c63a2e11b2230e36cba8e9642f73d8c059" [resources.system_user] From ab8a3b96419098cc704dd328fc62129807ebdf4e Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Fri, 21 Jul 2023 11:21:30 +0200 Subject: [PATCH 23/38] Upgrade Firefish --- manifest.toml | 4 ++-- scripts/_common.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index da64d8c..997e22d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -40,8 +40,8 @@ ram.runtime = "2G" [resources] [resources.sources.main] - url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc3.tar.gz" - sha256 = "844db89913cdc026e390cc69e923c9c63a2e11b2230e36cba8e9642f73d8c059" + url = "https://codeberg.org/firefish/firefish/archive/v1.0.1.tar.gz" + sha256 = "a28f74da8271c5e403ef99b77b12e13dbbb58d3b2a093b5a4205579ab162f26a" [resources.system_user] diff --git a/scripts/_common.sh b/scripts/_common.sh index 42e7239..6d92371 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ # PHP APP SPECIFIC #================================================= -NODEJS_VERSION="19" +NODEJS_VERSION="20" #================================================= # PERSONAL HELPERS From 53e693b99932abdb48a8278a0bd989c31d79f965 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Fri, 21 Jul 2023 14:51:35 +0200 Subject: [PATCH 24/38] Revert "Upgrade Firefish" This reverts commit ab8a3b96419098cc704dd328fc62129807ebdf4e. --- manifest.toml | 4 ++-- scripts/_common.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 997e22d..da64d8c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -40,8 +40,8 @@ ram.runtime = "2G" [resources] [resources.sources.main] - url = "https://codeberg.org/firefish/firefish/archive/v1.0.1.tar.gz" - sha256 = "a28f74da8271c5e403ef99b77b12e13dbbb58d3b2a093b5a4205579ab162f26a" + url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc3.tar.gz" + sha256 = "844db89913cdc026e390cc69e923c9c63a2e11b2230e36cba8e9642f73d8c059" [resources.system_user] diff --git a/scripts/_common.sh b/scripts/_common.sh index 6d92371..42e7239 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ # PHP APP SPECIFIC #================================================= -NODEJS_VERSION="20" +NODEJS_VERSION="19" #================================================= # PERSONAL HELPERS From af015f67baffff19c39d166e56bf8e907da25a46 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Tue, 1 Aug 2023 22:14:13 +0200 Subject: [PATCH 25/38] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index da64d8c..be3cc11 100644 --- a/manifest.toml +++ b/manifest.toml @@ -40,8 +40,8 @@ ram.runtime = "2G" [resources] [resources.sources.main] - url = "https://codeberg.org/calckey/calckey/archive/v14.0.0-rc3.tar.gz" - sha256 = "844db89913cdc026e390cc69e923c9c63a2e11b2230e36cba8e9642f73d8c059" + url = "https://git.joinfirefish.org/firefish/firefish/-/archive/v14.0.0-rc3/firefish-v14.0.0-rc3.tar.gz" + sha256 = "628c455a3f7bb5203ff98f3130c75ca168384379ddec20905b98b5e8c97ce285" [resources.system_user] From 027bae77c0f4acc6cd166f81a843f7be35725db6 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 26 Sep 2023 11:14:36 +0200 Subject: [PATCH 26/38] Add deprecation notice --- manifest.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifest.toml b/manifest.toml index be3cc11..295a2e9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -15,6 +15,10 @@ website = "https://i.calckey.cloud/" demo = "https://i.calckey.cloud/" code = "https://codeberg.org/calckey/calckey" +[antifeatures] +deprecated-software.en = "Calckey has been replaced by Firefish, install that new app instead. A migration procedure is being developed for existing instances." +deprecated-software.fr = "Calckey a été remplacée par Firefish, installez plutôt cette nouvelle application. Une procédure de migration est en cours de développement pour les instances existantes." + [integration] yunohost = ">= 11.1.19" architectures = "all" From 25e9b49ee96e985d62704fd81338b2a9c5e82803 Mon Sep 17 00:00:00 2001 From: Mateusz <2871798+orhtej2@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:40:58 +0200 Subject: [PATCH 27/38] Update install --- scripts/install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index b8c6756..ce27ed3 100644 --- a/scripts/install +++ b/scripts/install @@ -60,8 +60,10 @@ pushd "$install_dir" curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs - corepack enable - corepack prepare pnpm@latest --activate + env $ynh_node_load_PATH corepack enable + env $ynh_node_load_PATH corepack prepare pnpm@latest --activate + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run init From 94ecd3e0a9a5dd97ae2843e8f28ec895dbbd0dc5 Mon Sep 17 00:00:00 2001 From: Mateusz <2871798+orhtej2@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:43:01 +0200 Subject: [PATCH 28/38] Update upgrade --- scripts/upgrade | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3f7c7d7..9dcbe1c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,8 +95,10 @@ pushd "$install_dir" curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs - corepack enable - corepack prepare pnpm@latest --activate + env $ynh_node_load_PATH corepack enable + env $ynh_node_load_PATH corepack prepare pnpm@latest --activate + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm clean-all ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run build From e61711e278b29ee9ba34d4c832ce28277129bb84 Mon Sep 17 00:00:00 2001 From: Mateusz <2871798+orhtej2@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:57:06 +0200 Subject: [PATCH 29/38] Update manifest.toml --- manifest.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 295a2e9..617cbd6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -33,7 +33,6 @@ ram.runtime = "2G" [install.domain] # this is a generic question - ask strings are automatically handled by Yunohost's core type = "domain" - full_domain = true [install.init_main_permission] help.en = "If enabled, Calckey will be accessible by people who do not have an account. This can be changed later via the webadmin." From d3eb6f23304917a3ad744f1f4107dc23d55c52db Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Tue, 21 May 2024 10:32:28 +0200 Subject: [PATCH 30/38] Update scripts/install Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com> --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index ce27ed3..bc079fc 100644 --- a/scripts/install +++ b/scripts/install @@ -64,7 +64,7 @@ pushd "$install_dir" env $ynh_node_load_PATH corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run init popd From 3f246b8bf3fb3a9647e919e27328a4f438f135c7 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Tue, 21 May 2024 10:32:47 +0200 Subject: [PATCH 31/38] Update scripts/install Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com> --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index bc079fc..dfc5ddb 100644 --- a/scripts/install +++ b/scripts/install @@ -65,7 +65,7 @@ pushd "$install_dir" ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack pnpm install - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production corepack pnpm build ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run init popd From fbbdd5bc05eba4f9b6738a95d15a06402a375dd0 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Tue, 21 May 2024 10:32:58 +0200 Subject: [PATCH 32/38] Update scripts/install Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com> --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index dfc5ddb..11f00eb 100644 --- a/scripts/install +++ b/scripts/install @@ -66,7 +66,7 @@ pushd "$install_dir" ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production corepack pnpm build - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run init + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack pnpm run init popd #================================================= From eaecec32c4c5bf4ba7ca856a4319a49a1102390f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 May 2024 11:05:18 +0200 Subject: [PATCH 33/38] fix linter --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9dcbe1c..1113901 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,7 +30,7 @@ fi ynh_script_progression --message="Stopping a systemd service..." --weight=1 # Stop service before backup, to not loose message in case of failed upgrade and restore -ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped" +ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd #================================================= # STANDARD UPGRADE STEPS From 76005a9fcb8c028313072a4461000fc5dbffa64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 May 2024 11:14:16 +0200 Subject: [PATCH 34/38] cleaning --- manifest.toml | 1 - scripts/backup | 11 -------- scripts/install | 39 ++++++++------------------- scripts/remove | 31 --------------------- scripts/restore | 71 ++++--------------------------------------------- scripts/upgrade | 39 +++++---------------------- 6 files changed, 22 insertions(+), 170 deletions(-) diff --git a/manifest.toml b/manifest.toml index 3ec69f7..112aa04 100644 --- a/manifest.toml +++ b/manifest.toml @@ -31,7 +31,6 @@ ram.runtime = "2G" [install] [install.domain] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "domain" [install.init_main_permission] diff --git a/scripts/backup b/scripts/backup index b88b274..9ab520f 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,7 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= @@ -28,18 +27,8 @@ ynh_backup --src_path="$install_dir" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/install b/scripts/install index 11f00eb..1d7a253 100644 --- a/scripts/install +++ b/scripts/install @@ -9,10 +9,14 @@ source _common.sh source /usr/share/yunohost/helpers +# Configure redis +redis_db=$(ynh_redis_get_free_db) +ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" + #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies... This might take some time." --weight=3 +ynh_script_progression --message="Installing Node..." --weight=3 ynh_install_nodejs --nodejs_version=$NODEJS_VERSION @@ -24,30 +28,17 @@ ynh_script_progression --message="Setting up source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=3 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # ADD A CONFIGURATION #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -# Configure redis -redis_db=$(ynh_redis_get_free_db) -ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" +ynh_add_config --template="default.yml" --destination="$install_dir/.config/default.yml" -ynh_add_config --template="../conf/default.yml" --destination="$install_dir/.config/default.yml" - -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" chmod 400 "$install_dir/.config/default.yml" chown $app:$app "$install_dir/.config/default.yml" @@ -74,23 +65,15 @@ popd #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -env_path="$PATH" +# Create a dedicated NGINX config +ynh_add_nginx_config + # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Configuring log rotation..." --weight=1 - # Use logrotate to manage application logfile(s) ynh_use_logrotate -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="A interplanetary blogging platform" --log="/var/log/$app/$app.log" #================================================= diff --git a/scripts/remove b/scripts/remove index 292ef1f..307cb76 100755 --- a/scripts/remove +++ b/scripts/remove @@ -23,51 +23,20 @@ then yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 - # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# REMOVE THE REDIS DATABASE -#================================================= -ynh_script_progression --message="Removing the redis database..." --weight=1 - ynh_redis_remove_db "$redis_db" -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - # Remove metapackage and its dependencies ynh_remove_nodejs -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= - # Remove the log files ynh_secure_remove --file="/var/log/$app" diff --git a/scripts/restore b/scripts/restore index c34a937..081c792 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,15 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# RESTORE THE APP MAIN DIR -#================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=1 - -ynh_restore_file --origin_path="$install_dir" - -#================================================= -# SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -28,44 +19,15 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=5 ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= -# ADD A CONFIGURATION +# RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Restoring the app main directory..." --weight=1 -# Configure redis -redis_db=$(ynh_redis_get_free_db) -ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" - -ynh_add_config --template="../conf/default.yml" --destination="$install_dir/.config/default.yml" +ynh_restore_file --origin_path="$install_dir" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -chmod 400 "$install_dir/.config/default.yml" -chown $app:$app "$install_dir/.config/default.yml" - -#================================================= -# REINSTALL PNPM -#================================================= -ynh_script_progression --message="Reinstalling pnpm + rust..." --weight=1 - -# Define and install pnpm + rust -pushd "$install_dir" - curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y - export PATH="$install_dir/.cargo/bin:$PATH" - ynh_use_nodejs - corepack enable - corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm build -popd - -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE POSTGRESQL DATABASE @@ -74,34 +36,18 @@ ynh_script_progression --message="Restoring the PostgreSQL database..." --weight ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # RESTORE SYSTEMD #================================================= ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/logrotate.d/$app" -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="A interplanetary blogging platform" --log="/var/log/$app/$app.log" #================================================= @@ -111,13 +57,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="All workers started" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1113901..d77cf83 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -54,14 +48,10 @@ fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep=".config/default.yml" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep=".config/default.yml" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" @@ -78,14 +68,6 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_script_progression --message="Removing old version dependency..." ynh_secure_remove --file="$install_dir/.yarn" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # BUILD APP #================================================= @@ -110,24 +92,15 @@ popd #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 +# Create a dedicated NGINX config +ynh_add_nginx_config + # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 - # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="A interplanetary blogging platform" --log="/var/log/$app/$app.log" #================================================= From ce81d479729a5f125f1cc14685e4ee351478f2c4 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 21 May 2024 09:14:22 +0000 Subject: [PATCH 35/38] Auto-update READMEs --- ALL_README.md | 2 +- README_es.md | 3 +-- README_eu.md | 3 +-- README_fr.md | 2 +- README_gl.md | 3 +-- README_zh_Hans.md | 3 +-- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ALL_README.md b/ALL_README.md index 8938aae..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,7 +1,7 @@ # All available README files by language - [Read the README in English](README.md) -- [Lee el README en español](README_es.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README_es.md b/README_es.md index b8c8415..02c0057 100644 --- a/README_es.md +++ b/README_es.md @@ -16,7 +16,6 @@ No se debe editar a mano. ## Descripción general - A greatly enhanced fork of Misskey with better UI/UX, security, features, and more! https://i.calckey.cloud/ @@ -25,7 +24,7 @@ A greatly enhanced fork of Misskey with better UI/UX, security, features, and mo -**Versión actual:** 13.1.4.1~ynh1 +**Versión actual:** 14.0.0rc3~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 58a2f62..b8a3dba 100644 --- a/README_eu.md +++ b/README_eu.md @@ -16,7 +16,6 @@ EZ editatu eskuz. ## Aurreikuspena - A greatly enhanced fork of Misskey with better UI/UX, security, features, and more! https://i.calckey.cloud/ @@ -25,7 +24,7 @@ A greatly enhanced fork of Misskey with better UI/UX, security, features, and mo -**Paketatutako bertsioa:** 13.1.4.1~ynh1 +**Paketatutako bertsioa:** 14.0.0rc3~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 1e82a5c..0f89e2f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ Un fork grandement amélioré de Misskey avec une meilleure UI/UX, sécurité, f Calckey ajoute de nombreux changements de qualité de vie et des corrections de bogues pour les utilisateurs et les administrateurs d'instance. -**Version incluse :** 14.0.0rc3~ynh1 +**Version incluse :** 14.0.0rc3~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index ecbe9ab..b3f0d15 100644 --- a/README_gl.md +++ b/README_gl.md @@ -16,7 +16,6 @@ NON debe editarse manualmente. ## Vista xeral - A greatly enhanced fork of Misskey with better UI/UX, security, features, and more! https://i.calckey.cloud/ @@ -25,7 +24,7 @@ A greatly enhanced fork of Misskey with better UI/UX, security, features, and mo -**Versión proporcionada:** 13.1.4.1~ynh1 +**Versión proporcionada:** 14.0.0rc3~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 5f4826c..626ad7e 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -16,7 +16,6 @@ ## 概况 - A greatly enhanced fork of Misskey with better UI/UX, security, features, and more! https://i.calckey.cloud/ @@ -25,7 +24,7 @@ A greatly enhanced fork of Misskey with better UI/UX, security, features, and mo -**分发版本:** 13.1.4.1~ynh1 +**分发版本:** 14.0.0rc3~ynh1 **演示:** From 0615313c7a9d984c6c304695273e738ffb5e26f3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 6 Aug 2024 08:21:36 +0000 Subject: [PATCH 36/38] Auto-update READMEs --- README_id.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README_id.md b/README_id.md index 5ca9d6e..3cd6654 100644 --- a/README_id.md +++ b/README_id.md @@ -16,7 +16,6 @@ Ini TIDAK boleh diedit dengan tangan. ## Ringkasan - A greatly enhanced fork of Misskey with better UI/UX, security, features, and more! https://i.calckey.cloud/ @@ -25,7 +24,7 @@ A greatly enhanced fork of Misskey with better UI/UX, security, features, and mo -**Versi terkirim:** 13.1.4.1~ynh1 +**Versi terkirim:** 14.0.0rc3~ynh1 **Demo:** From 01b38ce2dbe71ea35235ea4600a02a4c61240434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:23:50 +0200 Subject: [PATCH 37/38] fix --- scripts/install | 5 +---- scripts/upgrade | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index 1d7a253..14110bf 100644 --- a/scripts/install +++ b/scripts/install @@ -51,10 +51,7 @@ pushd "$install_dir" curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs - env $ynh_node_load_PATH corepack enable - env $ynh_node_load_PATH corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare pnpm@latest --activate + ynh_exec_warn_less env $ynh_node_load_PATH corepack enable && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production corepack pnpm build ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack pnpm run init diff --git a/scripts/upgrade b/scripts/upgrade index 7ca69ed..28b1a5a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,10 +77,7 @@ pushd "$install_dir" curl https://sh.rustup.rs -sSf | ynh_exec_warn_less ynh_exec_as $app sh -s -- -y export PATH="$install_dir/.cargo/bin:$PATH" ynh_use_nodejs - env $ynh_node_load_PATH corepack enable - env $ynh_node_load_PATH corepack prepare pnpm@latest --activate - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare pnpm@latest --activate + ynh_exec_warn_less env $ynh_node_load_PATH corepack enable && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm clean-all ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production pnpm run build From 8b1605c9f13fde309c76a7ed9ed873864d129c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:24:04 +0200 Subject: [PATCH 38/38] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index d377d38..6ef7440 100644 --- a/manifest.toml +++ b/manifest.toml @@ -56,7 +56,7 @@ ram.runtime = "2G" main.default = 3020 [resources.apt] - packages = "ffmpeg, postgresql, build-essential, redis-server" + packages = "ffmpeg, postgresql, build-essential, redis-server, curl" [resources.database] type = "postgresql"