From 54de20ca6829ac1e027defd1910dbcf83115d8c2 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Thu, 25 Jan 2024 20:45:22 +0100 Subject: [PATCH 1/6] During synchronize_users, fetch token independently such that it's redacted by yunohost logging mechanism --- scripts/_common.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2c8bb18..77e1188 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -41,6 +41,8 @@ function set_users_login_source() { function synchronize_users() { ynh_print_info --message="Synchronizing forgejo users" + # Fetch the token independently such that it's redacted by Yunohost logging mechanism + forgejo_api_token=$(ynh_app_setting_get --app=$app --key=forgejo_api_token) # User synchronization must be launched using API : no cli exists for this purpose (https://codeberg.org/forgejo/forgejo/issues/953) - curl --url https://${domain}${path}/api/v1/admin/cron/sync_external_users -X POST -H "Authorization: token $(ynh_app_setting_get --app=$app --key=forgejo_api_token)" -kfsS -} \ No newline at end of file + curl --url https://${domain}${path}/api/v1/admin/cron/sync_external_users -X POST -H "Authorization: token $forgejo_api_token" -kfsS +} From f41ec95f03dcafb9b4631df2d2ddfb72379d527d Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 25 Jan 2024 20:38:30 +0100 Subject: [PATCH 2/6] remove not useful slash --- scripts/_common.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 77e1188..e115cb4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -43,6 +43,10 @@ function synchronize_users() { ynh_print_info --message="Synchronizing forgejo users" # Fetch the token independently such that it's redacted by Yunohost logging mechanism forgejo_api_token=$(ynh_app_setting_get --app=$app --key=forgejo_api_token) + + # Remove trailing slash from path + local no_trailing_slash_path=${path%/} + # User synchronization must be launched using API : no cli exists for this purpose (https://codeberg.org/forgejo/forgejo/issues/953) - curl --url https://${domain}${path}/api/v1/admin/cron/sync_external_users -X POST -H "Authorization: token $forgejo_api_token" -kfsS + curl --url https://${domain}${no_trailing_slash_path}/api/v1/admin/cron/sync_external_users -X POST -H "Authorization: token $forgejo_api_token" -kfsS } From 840e6751f8c03a752941b81bedad520371d27dd0 Mon Sep 17 00:00:00 2001 From: Emmanuel Averty Date: Sat, 10 Feb 2024 14:28:34 +0100 Subject: [PATCH 3/6] feat: Forgejo 1.21.5-0 --- README.md | 2 +- README_fr.md | 4 ++-- manifest.toml | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2be5241..339c4aa 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Brought to you by an inclusive community under the umbrella of Codeberg e.V., a - Customize HTML templates, static files and many others. -**Shipped version:** 1.21.4-0~ynh1 +**Shipped version:** 1.21.5-0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index caacdd1..437ccf4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -34,7 +34,7 @@ Brought to you by an inclusive community under the umbrella of Codeberg e.V., a - Customize HTML templates, static files and many others. -**Version incluse :** 1.21.4-0~ynh1 +**Version incluse :** 1.21.5-0~ynh1 ## Captures d’écran @@ -61,4 +61,4 @@ ou sudo yunohost app upgrade forgejo -u https://github.com/YunoHost-Apps/forgejo_ynh/tree/testing --debug ``` -**Plus d’infos sur le packaging d’applications :** \ No newline at end of file +**Plus d’infos sur le packaging d’applications :** diff --git a/manifest.toml b/manifest.toml index c249121..192e6bf 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Forgejo" description.en = "Lightweight software forge" description.fr = "Forge logiciel légère" -version = "1.21.4-0~ynh1" +version = "1.21.5-0~ynh1" maintainers = ["Emmanuel Averty"] @@ -48,12 +48,12 @@ ram.runtime = "2G" [resources] [resources.sources.main] - amd64.url = "https://codeberg.org/forgejo/forgejo/releases/download/v1.21.4-0/forgejo-1.21.4-0-linux-amd64.xz" - amd64.sha256 = "1ada3e33052c6a6cecfdc2fc2d8ed013784a8cd740633d64112a235a7d554b2d" - arm64.url = "https://codeberg.org/forgejo/forgejo/releases/download/v1.21.4-0/forgejo-1.21.4-0-linux-arm64.xz" - arm64.sha256 = "6b99ac39f0ad8d818f4c381ba27920ffd9fa5f873152f0a4ef9c3487d8980ed5" - armhf.url = "https://codeberg.org/forgejo/forgejo/releases/download/v1.21.4-0/forgejo-1.21.4-0-linux-arm-6.xz" - armhf.sha256 = "e9f463afe3ec46aa13d951a432ff987cff6734d4b5d5fbbe522dfdd662a68291" + amd64.url = "https://codeberg.org/forgejo/forgejo/releases/download/v1.21.5-0/forgejo-1.21.5-0-linux-amd64.xz" + amd64.sha256 = "c288aac36bff1d1a699537694e49b74bbf01d5ddf88e53193f97f6fbd8f26512" + arm64.url = "https://codeberg.org/forgejo/forgejo/releases/download/v1.21.5-0/forgejo-1.21.5-0-linux-arm64.xz" + arm64.sha256 = "a2c481b6c72886d5d0b7b79f24ee06d589d1c65db7412bf3de59ff664360aecb" + armhf.url = "https://codeberg.org/forgejo/forgejo/releases/download/v1.21.5-0/forgejo-1.21.5-0-linux-arm-6.xz" + armhf.sha256 = "7bb71546249d1a69f1146d6bd5f6b537661af18c82b27ca5d459e209b1f8249d" format = "whatever" extract = false # will be extracted during install script rename = "forgejo.xz" From d37413f9002912a948a3e108065be2d8693b58ab Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 10 Feb 2024 13:28:45 +0000 Subject: [PATCH 4/6] Auto-update README --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 437ccf4..4b6b149 100644 --- a/README_fr.md +++ b/README_fr.md @@ -61,4 +61,4 @@ ou sudo yunohost app upgrade forgejo -u https://github.com/YunoHost-Apps/forgejo_ynh/tree/testing --debug ``` -**Plus d’infos sur le packaging d’applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From 8627232b9f76df33b043399bf2bf542c0d55cb37 Mon Sep 17 00:00:00 2001 From: Emmanuel Averty Date: Sat, 10 Feb 2024 17:17:25 +0100 Subject: [PATCH 5/6] fix: set log file mode in app.ini --- conf/app.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/app.ini b/conf/app.ini index 615f467..ac50d96 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -70,10 +70,12 @@ logger.xorm.MODE = xorm FILE_NAME = forgejo.log [log.router] +MODE = file FILE_NAME = router.log LEVEL = Warn [log.xorm] +MODE = file FILE_NAME = xorm.log LEVEL = Warn From 9374d80e24af44864561a6825851b867bd1f24e1 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 14 Feb 2024 19:01:05 +0100 Subject: [PATCH 6/6] add autoupdate strategy --- manifest.toml | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/manifest.toml b/manifest.toml index 192e6bf..5053b0b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ description.fr = "Forge logiciel légère" version = "1.21.5-0~ynh1" -maintainers = ["Emmanuel Averty"] +maintainers = [ "Emmanuel Averty" ] [upstream] license = "MIT" @@ -18,7 +18,7 @@ code = "https://codeberg.org/forgejo/forgejo" [integration] yunohost = ">= 11.2" -architectures = ["amd64", "arm64", "armhf"] +architectures = [ "amd64", "arm64", "armhf" ] multi_instance = true ldap = true sso = true @@ -55,33 +55,38 @@ ram.runtime = "2G" armhf.url = "https://codeberg.org/forgejo/forgejo/releases/download/v1.21.5-0/forgejo-1.21.5-0-linux-arm-6.xz" armhf.sha256 = "7bb71546249d1a69f1146d6bd5f6b537661af18c82b27ca5d459e209b1f8249d" format = "whatever" - extract = false # will be extracted during install script + extract = false # will be extracted during install script rename = "forgejo.xz" - [resources.system_user] - allow_ssh = true + autoupdate.asset.amd64 = "^forgejo-.*-linux-amd64.xz$" + autoupdate.asset.arm64 = "^forgejo-.*-linux-arm64.xz$" + autoupdate.asset.armhf = "^forgejo-.*-linux-arm-6.xz$" + autoupdate.strategy = "latest_forgejo_release" - [resources.ports] - main.default = 6000 +[resources.system_user] +allow_ssh = true - [resources.install_dir] +[resources.ports] +main.default = 6000 - [resources.data_dir] +[resources.install_dir] - [resources.permissions] - main.url = "/" +[resources.data_dir] - admin.show_tile = false - admin.auth_header = false - admin.protected = true +[resources.permissions] +main.url = "/" - api.url = "/api" - api.show_tile = false - api.allowed = "visitors" - api.auth_header = false +admin.show_tile = false +admin.auth_header = false +admin.protected = true - [resources.apt] - packages = "postgresql" +api.url = "/api" +api.show_tile = false +api.allowed = "visitors" +api.auth_header = false - [resources.database] - type = "postgresql" +[resources.apt] +packages = "postgresql" + +[resources.database] +type = "postgresql"