From f021e9565616784429d0708a7326b039459e1e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 17 Sep 2020 22:13:39 +0000 Subject: [PATCH 1/8] Upgrade pgadmin to 4-4.26 --- README.md | 2 +- conf/armv7_buster.src | 4 ++-- conf/armv7_stretch.src | 4 ++-- manifest.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 80f67f9..3d11dc9 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Overview pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Shipped version:** 4-4.25 +**Shipped version:** 4-4.26 Screenshots ----------- diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index fdee009..a595c30 100644 --- a/conf/armv7_buster.src +++ b/conf/armv7_buster.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.25/pgadmin_4-4.25-buster-bin1_armv7l.tar.gz -SOURCE_SUM=1ae1e3d6ec1343c86808cfc578066d56b22a72d7967ca8dbf0fb85ddfd495142 +SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.26/pgadmin_4-4.26-buster-bin1_armv7l.tar.gz +SOURCE_SUM=63c52187f81606ee3b762cf5b553b6bc852df112fdfd021e7a914187bbb23c5e # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/armv7_stretch.src b/conf/armv7_stretch.src index db6283e..7ca98d4 100644 --- a/conf/armv7_stretch.src +++ b/conf/armv7_stretch.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.25/pgadmin_4-4.25-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=283bf536c761644e330f4885d7c19be8eb665d6fc01503486690f1f3c97f2841 +SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.26/pgadmin_4-4.26-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=df432ebbdbeb8d936a632a3f115267a8305c19b8fd05f84e0e38464fda083af3 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index bf850e1..0035325 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage PostgreSQL databases over the web", "fr": "Application web de gestion des bases de données PostgreSQL" }, - "version": "4-4.25~ynh1", + "version": "4-4.26~ynh1", "url": "https://www.pgadmin.org", "license": "PostgreSQL", "maintainer": { From 581e7e0a7b5a1a4925ab593c0b3be8995e3a7c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 19 Nov 2020 23:04:11 +0100 Subject: [PATCH 2/8] Add screenshot --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d11dc9..bb8dcc5 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ pgAdmin is a feature rich Open Source administration and development platform fo Screenshots ----------- -![](https://www.pgadmin.org/static/img/screenshots/pgadmin4-welcome.png) +![](https://www.pgadmin.org/static/COMPILED/assets/img/screenshots/pgadmin4-welcome-light.png) Documentation ------------- From 12d882fe752dbd315890f6753d7f4ce164a48d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 17 Nov 2020 23:51:51 +0100 Subject: [PATCH 3/8] Fix package linter --- scripts/backup | 8 ++++---- scripts/change_url | 8 ++++---- scripts/install | 8 ++++---- scripts/remove | 6 +++--- scripts/restore | 8 ++++---- scripts/upgrade | 8 ++++---- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/scripts/backup b/scripts/backup index 9825ae9..2565a45 100644 --- a/scripts/backup +++ b/scripts/backup @@ -4,16 +4,16 @@ # GENERIC START #================================================= +# Import common cmd +source ../settings/scripts/experimental_helper.sh +source ../settings/scripts/_common.sh + # IMPORT GENERIC HELPERS source /usr/share/yunohost/helpers # Exit if an error occurs during the execution of the script ynh_abort_if_errors -# Import common cmd -source ../settings/scripts/experimental_helper.sh -source ../settings/scripts/_common.sh - # LOAD SETTINGS ynh_script_progression --message="Loading installation settings..." final_path=$(ynh_app_setting_get --app $app --key final_path) diff --git a/scripts/change_url b/scripts/change_url index ce0313d..424c73c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -4,16 +4,16 @@ # GENERIC START #================================================= +# Import common cmd +source ./experimental_helper.sh +source ./_common.sh + # Source YunoHost helpers source /usr/share/yunohost/helpers # Stop script if errors ynh_abort_if_errors -# Import common cmd -source ./experimental_helper.sh -source ./_common.sh - # Retrive arguments ynh_script_progression --message="Loading installation settings..." old_domain=$YNH_APP_OLD_DOMAIN diff --git a/scripts/install b/scripts/install index b775c7f..2dd26a6 100644 --- a/scripts/install +++ b/scripts/install @@ -4,16 +4,16 @@ # GENERIC START #================================================= +# Import common cmd +source ./experimental_helper.sh +source ./_common.sh + # IMPORT GENERIC HELPERS source /usr/share/yunohost/helpers # Exit if an error occurs during the execution of the script ynh_abort_if_errors -# Import common cmd -source ./experimental_helper.sh -source ./_common.sh - ynh_script_progression --message="Validating installation parameters..." # RETRIEVE ARGUMENTS FROM THE MANIFEST diff --git a/scripts/remove b/scripts/remove index 89e7115..17b0d03 100644 --- a/scripts/remove +++ b/scripts/remove @@ -4,9 +4,6 @@ # GENERIC START #================================================= -# Source YunoHost helpers -source /usr/share/yunohost/helpers - # Stop script if errors set -u @@ -14,6 +11,9 @@ set -u source ./experimental_helper.sh source ./_common.sh +# Source YunoHost helpers +source /usr/share/yunohost/helpers + # LOAD SETTINGS ynh_script_progression --message="Loading installation settings..." domain=$(ynh_app_setting_get --app $app --key domain) diff --git a/scripts/restore b/scripts/restore index c73b798..b3db386 100644 --- a/scripts/restore +++ b/scripts/restore @@ -4,16 +4,16 @@ # GENERIC START #================================================= +# Import common cmd +source ../settings/scripts/experimental_helper.sh +source ../settings/scripts/_common.sh + # IMPORT GENERIC HELPERS source /usr/share/yunohost/helpers # Exit if an error occurs during the execution of the script ynh_abort_if_errors -# Import common cmd -source ../settings/scripts/experimental_helper.sh -source ../settings/scripts/_common.sh - # LOAD SETTINGS ynh_script_progression --message="Loading settings..." domain=$(ynh_app_setting_get --app $app --key domain) diff --git a/scripts/upgrade b/scripts/upgrade index 110f580..b1fae6e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -4,16 +4,16 @@ # GENERIC START #================================================= +# Import common cmd +source ./experimental_helper.sh +source ./_common.sh + # IMPORT GENERIC HELPERS source /usr/share/yunohost/helpers # Exit if an error occurs during the execution of the script ynh_abort_if_errors -# Import common cmd -source ./experimental_helper.sh -source ./_common.sh - # LOAD SETTINGS ynh_script_progression --message="Loading installation settings..." domain=$(ynh_app_setting_get --app $app --key domain) From 8abd9b1e5588411ba375609f5e5b966984f6ce16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 16 Oct 2020 00:48:51 +0000 Subject: [PATCH 4/8] Upgrade pgadmin to 4-4.27 --- README.md | 2 +- conf/armv7_buster.src | 4 ++-- conf/armv7_stretch.src | 4 ++-- manifest.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bb8dcc5..d02388d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Overview pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Shipped version:** 4-4.26 +**Shipped version:** 4-4.27 Screenshots ----------- diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index a595c30..3969564 100644 --- a/conf/armv7_buster.src +++ b/conf/armv7_buster.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.26/pgadmin_4-4.26-buster-bin1_armv7l.tar.gz -SOURCE_SUM=63c52187f81606ee3b762cf5b553b6bc852df112fdfd021e7a914187bbb23c5e +SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.27/pgadmin_4-4.27-buster-bin1_armv7l.tar.gz +SOURCE_SUM=358b185a2f5d3ee4a208add879286cc0a218d3f9f80249d52d743649de881d3e # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/armv7_stretch.src b/conf/armv7_stretch.src index 7ca98d4..3ba1080 100644 --- a/conf/armv7_stretch.src +++ b/conf/armv7_stretch.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.26/pgadmin_4-4.26-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=df432ebbdbeb8d936a632a3f115267a8305c19b8fd05f84e0e38464fda083af3 +SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.27/pgadmin_4-4.27-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=090ecf34ddcff8b021a0337237f2de5d3ee8aa97929ed688768ee9fcd2d9dfce # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index 0035325..681aa50 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage PostgreSQL databases over the web", "fr": "Application web de gestion des bases de données PostgreSQL" }, - "version": "4-4.26~ynh1", + "version": "4-4.27~ynh1", "url": "https://www.pgadmin.org", "license": "PostgreSQL", "maintainer": { From 14e6122129d1b5dfd0bb6a069aee3e447d8d2861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 12 Nov 2020 22:59:53 +0000 Subject: [PATCH 5/8] Upgrade pgadmin to 4-4.28 --- README.md | 2 +- conf/armv7_buster.src | 4 ++-- conf/armv7_stretch.src | 4 ++-- manifest.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d02388d..c19b30a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Overview pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Shipped version:** 4-4.27 +**Shipped version:** 4-4.28 Screenshots ----------- diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index 3969564..b58682b 100644 --- a/conf/armv7_buster.src +++ b/conf/armv7_buster.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.27/pgadmin_4-4.27-buster-bin1_armv7l.tar.gz -SOURCE_SUM=358b185a2f5d3ee4a208add879286cc0a218d3f9f80249d52d743649de881d3e +SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.28/pgadmin_4-4.28-buster-bin1_armv7l.tar.gz +SOURCE_SUM=631919aadf076649365df7040c0b51fb5c8aaf45c9770613a38ccb392caea39a # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/armv7_stretch.src b/conf/armv7_stretch.src index 3ba1080..5fc1e3d 100644 --- a/conf/armv7_stretch.src +++ b/conf/armv7_stretch.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.27/pgadmin_4-4.27-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=090ecf34ddcff8b021a0337237f2de5d3ee8aa97929ed688768ee9fcd2d9dfce +SOURCE_URL=https://github.com/Josue-T/pgadmin_python_build/releases/download/v4-4.28/pgadmin_4-4.28-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=f9c786137c9f401e20f738737c12c02ae4f8d645b80544c78752ecba1a5f280d # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index 681aa50..0efa007 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage PostgreSQL databases over the web", "fr": "Application web de gestion des bases de données PostgreSQL" }, - "version": "4-4.27~ynh1", + "version": "4-4.28~ynh1", "url": "https://www.pgadmin.org", "license": "PostgreSQL", "maintainer": { From c1bee3ddc9f430d5ac7a9d1a8fa9fdab4e5f694a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 28 Nov 2020 17:31:42 +0100 Subject: [PATCH 6/8] Fix install/upgrade --- conf/nginx.conf | 2 +- scripts/_common.sh | 6 ------ scripts/backup | 3 +++ scripts/experimental_helper.sh | 2 +- scripts/install | 3 +++ scripts/upgrade | 3 +++ 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index bcd94f2..e184597 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,6 @@ location __PATH__ { include uwsgi_params; - uwsgi_pass unix:///var/run/__NAME__/app.socket; + uwsgi_pass unix:///run/__NAME__/app.socket; uwsgi_read_timeout 180; uwsgi_send_timeout 180; diff --git a/scripts/_common.sh b/scripts/_common.sh index 7457f45..a8abe47 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,12 +8,6 @@ pgadmin_user="pgadmin" python_version="$(python3 -V | cut -d' ' -f2 | cut -d. -f1-2)" dependances="python3-pip build-essential python3-dev python3-venv postgresql uwsgi uwsgi-plugin-python3 expect libpq-dev" -if [[ -e "../settings/manifest.json" ]] || [[ -e "../manifest.json" ]]; then - APP_VERSION=$(ynh_app_upstream_version) - app_main_version=$(echo $APP_VERSION | cut -d'-' -f1) - app_sub_version=$(echo $APP_VERSION | cut -d'-' -f2) -fi - #================================================= # DEFINE ALL COMMON FONCTIONS #================================================= diff --git a/scripts/backup b/scripts/backup index 2565a45..52ff421 100644 --- a/scripts/backup +++ b/scripts/backup @@ -19,6 +19,9 @@ ynh_script_progression --message="Loading installation settings..." final_path=$(ynh_app_setting_get --app $app --key final_path) domain=$(ynh_app_setting_get --app $app --key domain) db_name=$(ynh_app_setting_get --app $app --key db_name) +app_version=$(ynh_app_upstream_version) +app_main_version=$(echo $app_version | cut -d'-' -f1) +app_sub_version=$(echo $app_version | cut -d'-' -f2) #================================================= # STANDARD BACKUP STEPS diff --git a/scripts/experimental_helper.sh b/scripts/experimental_helper.sh index a5cc663..0e70509 100644 --- a/scripts/experimental_helper.sh +++ b/scripts/experimental_helper.sh @@ -17,7 +17,7 @@ After=syslog.target RuntimeDirectory=%i ExecStart=/usr/bin/uwsgi \ --ini /etc/uwsgi/apps-available/%i.ini \ - --socket /var/run/%i/app.socket \ + --socket /run/%i/app.socket \ --logto /var/log/uwsgi/%i/%i.log User=%i Group=www-data diff --git a/scripts/install b/scripts/install index 2dd26a6..389b1d0 100644 --- a/scripts/install +++ b/scripts/install @@ -22,6 +22,9 @@ path_url=$(ynh_normalize_url_path --path_url $YNH_APP_ARG_PATH) admin=$YNH_APP_ARG_ADMIN db_user="pgadmin" admin_pwd=$YNH_APP_ARG_ADMIN_PASSWORD +app_version=$(ynh_app_upstream_version) +app_main_version=$(echo $app_version | cut -d'-' -f1) +app_sub_version=$(echo $app_version | cut -d'-' -f2) # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS test ! -e "$final_path" || ynh_die --message "This path already contains a folder" diff --git a/scripts/upgrade b/scripts/upgrade index b1fae6e..98afbd0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,6 +19,9 @@ ynh_script_progression --message="Loading installation settings..." domain=$(ynh_app_setting_get --app $app --key domain) path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path)) admin=$(ynh_app_setting_get --app $app --key admin) +app_version=$(ynh_app_upstream_version) +app_main_version=$(echo $app_version | cut -d'-' -f1) +app_sub_version=$(echo $app_version | cut -d'-' -f2) # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=10 From 4082157e1460185a6db51ed4250da5972964f1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 28 Nov 2020 19:24:23 +0100 Subject: [PATCH 7/8] Update uwsgi helper --- scripts/experimental_helper.sh | 28 ++++++++++++++-------------- scripts/restore | 3 +++ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/scripts/experimental_helper.sh b/scripts/experimental_helper.sh index 0e70509..8aadcff 100644 --- a/scripts/experimental_helper.sh +++ b/scripts/experimental_helper.sh @@ -6,28 +6,25 @@ # # usage: ynh_check_global_uwsgi_config ynh_check_global_uwsgi_config () { - uwsgi --version || ynh_die --message "You need to add uwsgi (and appropriate plugin) as a dependency" + uwsgi --version || ynh_die --message="You need to add uwsgi (and appropriate plugin) as a dependency" cat > /etc/systemd/system/uwsgi-app@.service < Date: Mon, 7 Dec 2020 16:29:43 +0100 Subject: [PATCH 8/8] Standardize start systemd action and update uwsgi helper --- scripts/_common.sh | 2 +- scripts/change_url | 5 ++--- scripts/experimental_helper.sh | 14 +++++++++----- scripts/install | 4 ++-- scripts/restore | 2 +- scripts/upgrade | 4 ++-- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index a8abe47..59afd95 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ app=$YNH_APP_INSTANCE_NAME final_path=/opt/yunohost/$app -pgadmin_user="pgadmin" +pgadmin_user="$app" python_version="$(python3 -V | cut -d' ' -f2 | cut -d. -f1-2)" dependances="python3-pip build-essential python3-dev python3-venv postgresql uwsgi uwsgi-plugin-python3 expect libpq-dev" diff --git a/scripts/change_url b/scripts/change_url index 424c73c..828f568 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -42,10 +42,9 @@ ynh_add_nginx_config ynh_add_uwsgi_service 'pgadmin_user python_version' # Reload services -ynh_script_progression --message="Reloading services..." -sudo systemctl reload nginx.service +ynh_script_progression --message="Restarting $app services..." --weight=3 ynh_systemd_action --service_name "uwsgi-app@$app.service" --action restart \ - --line_match "WSGI app 0 \(mountpoint='$path_url'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/pgadmin.log" + --line_match "WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/$app.log" sleep 10 ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/experimental_helper.sh b/scripts/experimental_helper.sh index 8aadcff..3b75020 100644 --- a/scripts/experimental_helper.sh +++ b/scripts/experimental_helper.sh @@ -9,22 +9,24 @@ ynh_check_global_uwsgi_config () { uwsgi --version || ynh_die --message="You need to add uwsgi (and appropriate plugin) as a dependency" cat > /etc/systemd/system/uwsgi-app@.service <