From 5fdef055fad8ffb88bd962292192ecab83fa115d Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 20 Jun 2022 14:24:51 +0200 Subject: [PATCH 1/7] 4.13 --- manifest.json | 2 +- scripts/_common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 3f0d826..e506b61 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Translation platform using Git and Python", "fr": "Plateforme de traduction utilisant Git et Python" }, - "version": "4.12~ynh1", + "version": "4.13~ynh1", "url": "https://weblate.org", "upstream": { "license": "AGPL-3.0", diff --git a/scripts/_common.sh b/scripts/_common.sh index ba6b277..a020752 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -18,7 +18,7 @@ borgbackup_dependencies="libacl1-dev libacl1 libssl-dev liblz4-dev libzstd-dev l pkg_dependencies="$weblate_dependencies $borgbackup_dependencies" # Weblate's version for PIP and settings file -weblate_version="4.12" +weblate_version="4.13" debian_maj_version=$(sed 's/\..*//' /etc/debian_version) From 99aae94d6b4bbe299e166ff5337ad351754c1565 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 20 Jun 2022 12:26:23 +0000 Subject: [PATCH 2/7] Auto-update README --- README.md | 23 ++++++++++++----------- README_fr.md | 29 +++++++++++++++++------------ 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index a08517b..6c96247 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Weblate for YunoHost -[![Integration level](https://dash.yunohost.org/integration/weblate.svg)](https://dash.yunohost.org/appci/app/weblate) ![](https://ci-apps.yunohost.org/ci/badges/weblate.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/weblate.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/weblate.svg)](https://dash.yunohost.org/appci/app/weblate) ![Working status](https://ci-apps.yunohost.org/ci/badges/weblate.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/weblate.maintain.svg) [![Install Weblate with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=weblate) *[Lire ce readme en français.](./README_fr.md)* @@ -17,13 +17,13 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Weblate is a libre web-based translation tool with tight version control integration. It provides two user interfaces, propagation of translations across components, quality checks and automatic linking to source files. -**Shipped version:** 4.12~ynh1 +**Shipped version:** 4.13~ynh1 **Demo:** https://hosted.weblate.org/ ## Screenshots -![](./doc/screenshots/BigScreenshot.png) +![Screenshot of Weblate](./doc/screenshots/BigScreenshot.png) ## Disclaimers / important information @@ -47,22 +47,23 @@ It doesn't work yet, but while [it looks doable](https://docs.weblate.org/en/lat ## Documentation and resources -* Official app website: https://weblate.org -* Official user documentation: https://docs.weblate.org/ -* Official admin documentation: https://docs.weblate.org/ -* Upstream app code repository: https://github.com/WeblateOrg/weblate -* YunoHost documentation for this app: https://yunohost.org/app_weblate -* Report a bug: https://github.com/YunoHost-Apps/weblate_ynh/issues +* Official app website: +* Official user documentation: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/weblate_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/weblate_ynh/tree/testing --debug or sudo yunohost app upgrade weblate -u https://github.com/YunoHost-Apps/weblate_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 76b5712..867d8ae 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Weblate pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/weblate.svg)](https://dash.yunohost.org/appci/app/weblate) ![](https://ci-apps.yunohost.org/ci/badges/weblate.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/weblate.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/weblate.svg)](https://dash.yunohost.org/appci/app/weblate) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/weblate.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/weblate.maintain.svg) [![Installer Weblate avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=weblate) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Weblate rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* @@ -13,13 +17,13 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Weblate est un outil de traduction libre avec une intégration étroite du contrôle de version. Il fournit deux interfaces utilisateur, la propagation des traductions entre les composants, les contrôles de qualité et la liaison automatique aux fichiers source. -**Version incluse :** 4.12~ynh1 +**Version incluse :** 4.13~ynh1 **Démo :** https://hosted.weblate.org/ ## Captures d'écran -![](./doc/screenshots/BigScreenshot.png) +![Capture d'écran de Weblate](./doc/screenshots/BigScreenshot.png) ## Avertissements / informations importantes @@ -42,22 +46,23 @@ Vous pouvez éditer le fichier `$final_path/local_settings.py` pour activer ou d Cela ne fonctionne pas encore, mais bien que [cela semble faisable](https://docs.weblate.org/en/latest/admin/auth.html?highlight=LDAP#ldap-authentication), je ne suis pas sûr que ce soit le cas une bonne idée de connecter ce genre d'outils à votre LDAP. ## Documentations et ressources -* Site officiel de l'app : https://weblate.org -* Documentation officielle utilisateur : https://docs.weblate.org/ -* Documentation officielle de l'admin : https://docs.weblate.org/ -* Dépôt de code officiel de l'app : https://github.com/WeblateOrg/weblate -* Documentation YunoHost pour cette app : https://yunohost.org/app_weblate -* Signaler un bug : https://github.com/YunoHost-Apps/weblate_ynh/issues +* Site officiel de l'app : +* Documentation officielle utilisateur : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/weblate_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/weblate_ynh/tree/testing --debug ou sudo yunohost app upgrade weblate -u https://github.com/YunoHost-Apps/weblate_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 8656afe8ae24a2e1f8662f29069e34d8f5aa5940 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 13 Jul 2022 00:48:56 +0200 Subject: [PATCH 3/7] Apply example_ynh --- check_process | 6 +++--- scripts/_common.sh | 9 +++++---- scripts/install | 7 ++++--- scripts/restore | 18 +++++++++--------- scripts/upgrade | 31 +++++++++++++++++++------------ 5 files changed, 40 insertions(+), 31 deletions(-) diff --git a/check_process b/check_process index 12dcbbb..f566996 100644 --- a/check_process +++ b/check_process @@ -2,9 +2,9 @@ ; Manifest domain="domain.tld" path="/path" - admin="john" - password="randompass" is_public=1 + admin="john" + password="1Strong-Password" github_account="myaccount" github_token="myoauthtoken" ; Checks @@ -16,7 +16,7 @@ setup_public=1 upgrade=1 # 4.9~ynh1 - upgrade=1 from_commit=7fec5a47a80e00458a31f1270c4ace822961e7bf + upgrade=1 from_commit=7fec5a47a80e00458a31f1270c4ace822961e7bf backup_restore=1 multi_instance=1 port_already_use=0 diff --git a/scripts/_common.sh b/scripts/_common.sh index a020752..d3179a7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -17,9 +17,6 @@ borgbackup_dependencies="libacl1-dev libacl1 libssl-dev liblz4-dev libzstd-dev l pkg_dependencies="$weblate_dependencies $borgbackup_dependencies" -# Weblate's version for PIP and settings file -weblate_version="4.13" - debian_maj_version=$(sed 's/\..*//' /etc/debian_version) if [ "$debian_maj_version" -eq 9 ] ; then @@ -30,6 +27,10 @@ elif [ "$debian_maj_version" -eq 11 ] ; then weblate_pypath="python3.9" fi +#================================================= +# PERSONAL HELPERS +#================================================= + #================================================= # EXPERIMENTAL HELPERS #================================================= @@ -141,5 +142,5 @@ ynh_redis_remove_db() { } #================================================= -# EXPERIMENTAL HELPERS +# FUTURE OFFICIAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 909b8b5..0cbeb4c 100755 --- a/scripts/install +++ b/scripts/install @@ -25,8 +25,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN password=$YNH_APP_ARG_PASSWORD github_account=$YNH_APP_ARG_GITHUB_ACCOUNT github_token=$YNH_APP_ARG_GITHUB_TOKEN @@ -83,7 +83,6 @@ ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name - ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_user --db_name=$db_name ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name @@ -145,7 +144,7 @@ chown -R $app: "$final_path" # Read the "Note" section in https://docs.weblate.org/en/weblate-4.11/admin/install/venv-debian.html#python-modules sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi # Still needed with latest version of weblate? - sudo --user=$app BORG_OPENSSL_PREFIX=/usr/lib/x86_64-linux-gnu/ $final_path/venv/bin/pip install Weblate=="$weblate_version" + sudo --user=$app BORG_OPENSSL_PREFIX=/usr/lib/x86_64-linux-gnu/ $final_path/venv/bin/pip install Weblate=="$(ynh_app_upstream_version)" sudo --user=$app $final_path/venv/bin/pip install psycopg2-binary ruamel.yaml aeidon phply #pip install pytz python-bidi PyYaML Babel pyuca pylibravatar py3dns psycopg2-binary phply django-redis hiredis aeidon ruamel.yaml # specific to YunoHost package: @@ -245,6 +244,8 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then + # Everyone can access the app. + # The "main" permission is automatically created before the install script. ynh_permission_update --permission="main" --add="visitors" fi diff --git a/scripts/restore b/scripts/restore index cc91f76..fb55dac 100755 --- a/scripts/restore +++ b/scripts/restore @@ -23,7 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -43,13 +43,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# 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" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -85,7 +78,14 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=40 ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies" #================================================= -# RESTORE THE PostgreSQL DATABASE +# 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 #================================================= ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=5 diff --git a/scripts/upgrade b/scripts/upgrade index 11ad446..c1620c9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,13 +23,20 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) - -admin_mail=$(ynh_user_get_info "$admin" mail) github_account=$(ynh_app_setting_get --app=$app --key=github_account) github_token=$(ynh_app_setting_get --app=$app --key=github_token) -key=$(ynh_string_random 50) redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) +admin_mail=$(ynh_user_get_info --username="$admin" --key=mail) +key=$(ynh_string_random --length=50) + +#================================================= +# CHECK VERSION +#================================================= +ynh_script_progression --message="Checking version..." + +upgrade_type=$(ynh_check_app_version_changed) + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -89,6 +96,13 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=5 + +ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies" + #================================================= # NGINX CONFIGURATION #================================================= @@ -97,13 +111,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=5 - -ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies" - #================================================= # SPECIFIC UPGRADE #================================================= @@ -210,7 +217,7 @@ upgrade() { # Check the configuration # This may fail in some cases with errors, etc., but the app works and the user can fix issues later. - if [ "$new_version" == "$weblate_version" ]; then + if [ "$new_version" == "$(ynh_app_upstream_version)" ]; then sudo --user=$app $final_path/venv/bin/weblate check --deploy || true fi ) @@ -238,7 +245,7 @@ then upgrade "4.1.1" "../conf/settings.4.1.1.py" fi -upgrade $weblate_version "../conf/settings.py" +upgrade $(ynh_app_upstream_version) "../conf/settings.py" # Set right permissions for curl installation mkdir -p "$final_path/avatar-cache" From 51b2378b16b0d064c3a716b4cd20a7a9c8ed8d5d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 13 Jul 2022 01:15:44 +0200 Subject: [PATCH 4/7] implement autoupdater --- .github/workflows/updater.sh | 59 +++++++++++++++++++++++++++++++++++ .github/workflows/updater.yml | 49 +++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 .github/workflows/updater.sh create mode 100644 .github/workflows/updater.yml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh new file mode 100644 index 0000000..eabb300 --- /dev/null +++ b/.github/workflows/updater.sh @@ -0,0 +1,59 @@ +#!/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]') +repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') +# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) +version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | cut -d "-" -f2 | sort -V | tail -1) + +# 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 + + +#================================================= +# 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 new file mode 100644 index 0000000..fb72ba0 --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,49 @@ +# 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@v2 + 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@v3 + 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 }} + draft: false From 9e49defa24788b568b76a5201e69a96d132e38ec Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 13 Jul 2022 02:11:01 +0200 Subject: [PATCH 5/7] Fix #58 --- conf/libxxhash.src | 7 +++++++ scripts/install | 15 ++++++++++++++- scripts/remove | 13 +++++++++++++ scripts/restore | 13 +++++++++++++ scripts/upgrade | 15 ++++++++++++++- 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 conf/libxxhash.src diff --git a/conf/libxxhash.src b/conf/libxxhash.src new file mode 100644 index 0000000..5d4f0c6 --- /dev/null +++ b/conf/libxxhash.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.1.tar.gz +SOURCE_SUM=3bb6b7d6f30c591dd65aaaff1c8b7a5b94d81687998ca9400082c739a690436c +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.gz +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= +SOURCE_EXTRACT=true diff --git a/scripts/install b/scripts/install index 0cbeb4c..f376c45 100755 --- a/scripts/install +++ b/scripts/install @@ -112,6 +112,19 @@ ynh_add_nginx_config #================================================= # SPECIFIC SETUP +#================================================= +# INSTALL XXHASH +#================================================= +ynh_script_progression --message="Installing xxHash..." + +tempdir="$(mktemp -d)" +ynh_setup_source --dest_dir=$tempdir --source_id="libxxhash" +pushd $tempdir + make + make install +popd +ynh_secure_remove --file="$tempdir" + #================================================= # CONFIGURE HUB #================================================= @@ -139,7 +152,7 @@ chown -R $app: "$final_path" set -o nounset cd "${final_path}" - sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig + sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig xxhash # Read the "Note" section in https://docs.weblate.org/en/weblate-4.11/admin/install/venv-debian.html#python-modules sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi diff --git a/scripts/remove b/scripts/remove index e831757..40bb765 100755 --- a/scripts/remove +++ b/scripts/remove @@ -90,6 +90,19 @@ ynh_script_progression --message="Removing dependencies..." --weight=10 # Remove metapackage and its dependencies ynh_exec_warn_less ynh_remove_app_dependencies +#================================================= +# REMOVE XXHASH +#================================================= +ynh_script_progression --message="Removing xxHash..." + +tempdir="$(mktemp -d)" +ynh_setup_source --dest_dir=$tempdir --source_id="libxxhash" +pushd $tempdir + make + make uninstall +popd +ynh_secure_remove --file="$tempdir" + #================================================= # SPECIFIC REMOVE #================================================= diff --git a/scripts/restore b/scripts/restore index fb55dac..79712aa 100755 --- a/scripts/restore +++ b/scripts/restore @@ -95,6 +95,19 @@ ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# INSTALL XXHASH +#================================================= +ynh_script_progression --message="Installing xxHash..." + +tempdir="$(mktemp -d)" +ynh_setup_source --dest_dir=$tempdir --source_id="libxxhash" +pushd $tempdir + make + make install +popd +ynh_secure_remove --file="$tempdir" + #================================================= # RESTORE VARIOUS FILES #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c1620c9..1d0351e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -113,6 +113,19 @@ ynh_add_nginx_config #================================================= # SPECIFIC UPGRADE +#================================================= +# INSTALL XXHASH +#================================================= +ynh_script_progression --message="Installing xxHash..." + +tempdir="$(mktemp -d)" +ynh_setup_source --dest_dir=$tempdir --source_id="libxxhash" +pushd $tempdir + make + make install +popd +ynh_secure_remove --file="$tempdir" + #================================================= # CONFIGURE HUB #================================================= @@ -165,7 +178,7 @@ upgrade() { set -o nounset cd "${final_path}" - sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig + sudo --user=$app $final_path/venv/bin/pip install --upgrade pip setuptools wheel pkgconfig xxhash # Read the "Note" section in https://docs.weblate.org/en/weblate-4.11/admin/install/venv-debian.html#python-modules sudo --user=$app $final_path/venv/bin/pip install --force-reinstall --no-binary :all: cffi From af98f7511917e7e001a0428c3c986fe9f27065d9 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 21 Jul 2022 16:20:49 +0200 Subject: [PATCH 6/7] 4.13.1 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index e506b61..5d3d38c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Translation platform using Git and Python", "fr": "Plateforme de traduction utilisant Git et Python" }, - "version": "4.13~ynh1", + "version": "4.13.1~ynh1", "url": "https://weblate.org", "upstream": { "license": "AGPL-3.0", From 652cdee0b8805dddecee4e74bd4811a5efd45f6c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 21 Jul 2022 14:20:57 +0000 Subject: [PATCH 7/7] 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 6c96247..0d6980c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Weblate is a libre web-based translation tool with tight version control integration. It provides two user interfaces, propagation of translations across components, quality checks and automatic linking to source files. -**Shipped version:** 4.13~ynh1 +**Shipped version:** 4.13.1~ynh1 **Demo:** https://hosted.weblate.org/ diff --git a/README_fr.md b/README_fr.md index 867d8ae..d2761f6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Weblate est un outil de traduction libre avec une intégration étroite du contrôle de version. Il fournit deux interfaces utilisateur, la propagation des traductions entre les composants, les contrôles de qualité et la liaison automatique aux fichiers source. -**Version incluse :** 4.13~ynh1 +**Version incluse :** 4.13.1~ynh1 **Démo :** https://hosted.weblate.org/