From 9fec065e585ce506ca316b86f66a27f45b57a146 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 29 Apr 2024 23:37:25 +0200 Subject: [PATCH 1/5] Remove old auto-updater --- .github/workflows/updater.sh | 122 ---------------------------------- .github/workflows/updater.yml | 52 --------------- 2 files changed, 174 deletions(-) delete mode 100644 .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 100644 index 76b7599..0000000 --- a/.github/workflows/updater.sh +++ /dev/null @@ -1,122 +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. - -#================================================= -# FETCHING LATEST RELEASE AND ITS ASSETS -#================================================= - -# Fetching information -current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -# 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://git.pleroma.social/api/v4/projects/2/releases" | jq -r '[.[] | select( .upcoming_release != true )][0]') -version=$(echo $latest_release_json | jq -r '.tag_name') -assets=$(echo $latest_release_json | jq -r '[ .assets.sources[].url ] | join(" ") | @sh' | tr -d "'") -release=$(echo $latest_release_json | jq -r '[ ._links.self ] | join(" ")' | tr -d "'") -description=$(echo $latest_release_json | jq -r '[ .description ] | join(" ")' | tr -d "'") -commit_id=$(echo $latest_release_json | jq -r '[ .commit.id ] | join(" ")' | tr -d "'") -pipeline_id=$(curl --silent "https://git.pleroma.social/api/v4/projects/2/pipelines?sha=$commit_id&ref=stable" | jq -r '[ .[] | .id|tostring ] | join(" ") ' | 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 "RELEASE=$release" >> $GITHUB_ENV -echo "DESCRIPTION<> $GITHUB_ENV -echo "$description" >> $GITHUB_ENV -echo "EOF" >> $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 - -#================================================= -# UPDATE SOURCE FILES -#================================================= - -# Let's loop over the available architectures -architectures=("amd64" "arm64" "arm") -for arch in ${architectures[@]}; do - - echo "Processing $arch release" - - job_url=$(curl --silent "https://git.pleroma.social/api/v4/projects/2/pipelines/$pipeline_id/jobs" | jq -r '.[] | select((.status=="success") and (.stage=="release") and (.name=="'$arch'")) | .web_url') - - if [ ! -z "$job_url" ]; then - - asset_url="$job_url/artifacts/download?file_type=archive" - - # Create the temporary directory - tempdir="$(mktemp -d)" - - # Download sources and calculate checksum - filename="asset-$arch.zip" - curl --silent -4 -L $asset_url -o "$tempdir/$filename" - checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - - # Delete temporary directory - rm -rf $tempdir - - if [ $arch == "arm" ]; then - arch="armhf" - fi - - # Rewrite source file - cat < conf/$arch.src -SOURCE_URL=$asset_url -SOURCE_SUM=$checksum -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= -EOT - echo "... conf/$arch.src updated" - - else - echo "... artifact ignored" - echo "::warning ::Artifact for $arch was not updated" - 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 "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json - -# 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 64f2a2f..0000000 --- a/.github/workflows/updater.yml +++ /dev/null @@ -1,52 +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](${{ env.RELEASE }}) - Provided description: - ${{ env.DESCRIPTION }} - draft: false From 01c55ad72859262199219cfe8a9662bff52920c4 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 17 May 2024 11:04:39 +0000 Subject: [PATCH 2/5] Auto-update READMEs --- ALL_README.md | 1 + README_es.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 2 +- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 README_es.md diff --git a/ALL_README.md b/ALL_README.md index a01b345..8938aae 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Lee 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 new file mode 100644 index 0000000..0bb910f --- /dev/null +++ b/README_es.md @@ -0,0 +1,52 @@ + + +# Pleroma para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/pleroma.svg)](https://dash.yunohost.org/appci/app/pleroma) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/pleroma.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/pleroma.maintain.svg) + +[![Instalar Pleroma con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pleroma) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarPleroma rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub. What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed. + +For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post/what-is-pleroma/) + +**Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web + + +**Versión actual:** 2.6.2~ynh1 + +## Capturas + +![Captura de Pleroma](./doc/screenshots/screenshot1.png) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación administrador oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/pleroma_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/pleroma_ynh/tree/testing --debug +o +sudo yunohost app upgrade pleroma -u https://github.com/YunoHost-Apps/pleroma_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 98538c5..3053ea5 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,7 +3,7 @@ 请勿手动编辑。 --> -# YunoHost 的 Pleroma +# YunoHost 上的 Pleroma [![集成程度](https://dash.yunohost.org/integration/pleroma.svg)](https://dash.yunohost.org/appci/app/pleroma) ![工作状态](https://ci-apps.yunohost.org/ci/badges/pleroma.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/pleroma.maintain.svg) From 09bf5fd3845210a3f713108e3b84fca5f7e6d65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 May 2024 13:10:02 +0200 Subject: [PATCH 3/5] cleaning --- manifest.toml | 6 +++--- scripts/upgrade | 1 + tests.toml | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9cc65f2..edefc56 100644 --- a/manifest.toml +++ b/manifest.toml @@ -9,7 +9,7 @@ description.fr = "Serveur de réseautage social fédéré basé sur des protocol version = "2.6.2~ynh1" -maintainers = ["Anmol Sharma", "yalh76"] +maintainers = [] [upstream] license = "AGPL-3.0-only" @@ -26,8 +26,8 @@ multi_instance = false ldap = true sso = false disk = "200M" -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.build = "50M" +ram.runtime = "50M" [install] [install.domain] diff --git a/scripts/upgrade b/scripts/upgrade index 7cf57d7..b7cbe84 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,6 +107,7 @@ if [ "$cache" -eq 1 ]; then ynh_add_config --template="../conf/cache.conf" --destination="/etc/nginx/conf.d/$app-cache.conf" cat ../conf/media.conf >> ../conf/nginx.conf fi + # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/tests.toml b/tests.toml index 6df4ead..ae63e1e 100644 --- a/tests.toml +++ b/tests.toml @@ -4,5 +4,4 @@ test_format = 1.0 [default] - test_upgrade_from.e6d9935af254018baf326281662c55407170694d.name = "2.4.1" test_upgrade_from.ba16bc8bee7715c479a7ee575ec5f7d9970a84f8.name = "2.4.3" From 6239091aa309c6574d8676948fc5d2c91d3de7d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 May 2024 15:09:53 +0200 Subject: [PATCH 4/5] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index edefc56..22d98de 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Pleroma" description.en = "Federated social networking server built on open protocols" description.fr = "Serveur de réseautage social fédéré basé sur des protocoles ouverts" -version = "2.6.2~ynh1" +version = "2.6.2~ynh2" maintainers = [] From 132a7c2f8ef2800956d9849473c86ad72a8e4bec Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 17 May 2024 13:09:58 +0000 Subject: [PATCH 5/5] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cd95bf4..a4c33c8 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post **Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web -**Shipped version:** 2.6.2~ynh1 +**Shipped version:** 2.6.2~ynh2 ## Screenshots diff --git a/README_es.md b/README_es.md index 0bb910f..5c2b621 100644 --- a/README_es.md +++ b/README_es.md @@ -23,7 +23,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post **Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web -**Versión actual:** 2.6.2~ynh1 +**Versión actual:** 2.6.2~ynh2 ## Capturas diff --git a/README_eu.md b/README_eu.md index 4ae088c..02da166 100644 --- a/README_eu.md +++ b/README_eu.md @@ -23,7 +23,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post **Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web -**Paketatutako bertsioa:** 2.6.2~ynh1 +**Paketatutako bertsioa:** 2.6.2~ynh2 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index b7548a4..a5ab06a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ Pour des informations plus détaillées sur Pleroma voir [What is Pleroma](https **Interface utilisateur Mastodon pour Pleroma :** Ajouter `/web` à la fin du nom de domaine (URL) de votre installation, par exemple : `https://pleroma.domain.tld/web` -**Version incluse :** 2.6.2~ynh1 +**Version incluse :** 2.6.2~ynh2 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index bbf504e..4bb9dcd 100644 --- a/README_gl.md +++ b/README_gl.md @@ -23,7 +23,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post **Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web -**Versión proporcionada:** 2.6.2~ynh1 +**Versión proporcionada:** 2.6.2~ynh2 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 3053ea5..b7fab21 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -23,7 +23,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post **Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web -**分发版本:** 2.6.2~ynh1 +**分发版本:** 2.6.2~ynh2 ## 截图