From fb20f2e9b6610a3ec09559a0b973477ee2341e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sun, 21 Apr 2024 12:04:09 +0200 Subject: [PATCH 01/10] Remove log only if purge are enabled --- scripts/remove | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/remove b/scripts/remove index 5752a1e..8d8c063 100644 --- a/scripts/remove +++ b/scripts/remove @@ -33,8 +33,10 @@ ynh_remove_nginx_config #================================================= ynh_script_progression --message="Removing various files..." --weight=1 -# Remove the log files -ynh_secure_remove --file="/var/log/$app" +if [ "$YNH_APP_PURGE" -eq 1 ]; then + ynh_script_progression --message="Removing logs..." + ynh_secure_remove --file=/var/log/"$app" +fi #================================================= # END OF SCRIPT From 8f9aea80fb6192f8f6928c4b7ec290584a58e3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 26 Apr 2024 22:03:05 +0200 Subject: [PATCH 02/10] Use = intead of space for helper args to avoid issue with parameter --- scripts/change_url | 2 +- scripts/install | 6 +++--- scripts/remove | 2 +- scripts/restore | 4 ++-- scripts/upgrade | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index c46db0e..3940ef6 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -41,7 +41,7 @@ set_permission ynh_script_progression --message="Starting a systemd service..." --weight=3 # Start a systemd service -ynh_systemd_action --service_name="$app.service" --action="restart" --line_match "Listening at: unix:/run/$app/app.socket" --log_path systemd +ynh_systemd_action --service_name="$app.service" --action="restart" --line_match="Listening at: unix:/run/$app/app.socket" --log_path=systemd #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 5827001..748f600 100644 --- a/scripts/install +++ b/scripts/install @@ -13,9 +13,9 @@ source /usr/share/yunohost/helpers #================================================= # Postgresql superuser #================================================= -ynh_script_progression --message="Configuring Postgresql superuser..." --weight 1 +ynh_script_progression --message="Configuring Postgresql superuser..." --weight=1 -ynh_psql_execute_as_root --sql "ALTER USER $db_user WITH SUPERUSER CREATEDB CREATEROLE REPLICATION" +ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH SUPERUSER CREATEDB CREATEROLE REPLICATION" ynh_script_progression --message='Creating base directory...' @@ -69,7 +69,7 @@ set_permission #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name "$app.service" --action="restart" --line_match "Listening at: unix:/run/$app/app.socket" --log_path systemd +ynh_systemd_action --service_name="$app.service" --action="restart" --line_match="Listening at: unix:/run/$app/app.socket" --log_path=systemd #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index 8d8c063..92c4162 100644 --- a/scripts/remove +++ b/scripts/remove @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Stop service -ynh_systemd_action --service_name "$app.service" --action stop +ynh_systemd_action --service_name="$app.service" --action=stop ynh_remove_systemd_config --service=$app yunohost service remove $app diff --git a/scripts/restore b/scripts/restore index eb87410..627ef08 100644 --- a/scripts/restore +++ b/scripts/restore @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Restoring the Postgresql superuser..." --weight=1 -ynh_psql_execute_as_root --sql "ALTER USER $app WITH SUPERUSER CREATEDB CREATEROLE REPLICATION" +ynh_psql_execute_as_root --sql="ALTER USER $app WITH SUPERUSER CREATEDB CREATEROLE REPLICATION" #================================================= # RESTORE ALL CONFIG AND DATA @@ -50,7 +50,7 @@ set_permission #================================================= ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -ynh_systemd_action --service_name "$app.service" --action="restart" --line_match "Listening at: unix:/run/$app/app.socket" --log_path systemd +ynh_systemd_action --service_name="$app.service" --action="restart" --line_match="Listening at: unix:/run/$app/app.socket" --log_path=systemd ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index b47c095..417dfd4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,14 +18,14 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Stopping a systemd service..." --weight=1 if [ -f "/etc/uwsgi/apps-available/$app.ini" ]; then - ynh_systemd_action --service_name "uwsgi-app@$app.service" --action stop + ynh_systemd_action --service_name="uwsgi-app@$app.service" --action=stop systemctl disable "uwsgi-app@$app.service" --quiet yunohost service remove "uwsgi-app@$app" || true ynh_secure_remove --file="/etc/uwsgi/apps-available/$app.ini" ynh_secure_remove --file="/etc/systemd/system/uwsgi-app@$app.service.d" else - ynh_systemd_action --service_name "$app.service" --action stop + ynh_systemd_action --service_name="$app.service" --action=stop fi #================================================= @@ -59,7 +59,7 @@ fi ynh_script_progression --message="Configuring Postgresql superuser..." --weight=1 # Re-set the db_pwd just in case… -ynh_psql_execute_as_root --sql "ALTER USER $app WITH PASSWORD '$db_pwd' SUPERUSER CREATEDB CREATEROLE REPLICATION" +ynh_psql_execute_as_root --sql="ALTER USER $app WITH PASSWORD '$db_pwd' SUPERUSER CREATEDB CREATEROLE REPLICATION" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -90,7 +90,7 @@ ynh_add_systemd_config --service=$app --template=pgadmin.service yunohost service add $app --log "/var/log/$app/$app.log" --description 'PgAdmin application' # Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate --logfile /var/log/$app --nonappend +ynh_use_logrotate --logfile=/var/log/$app --nonappend set_permission @@ -99,7 +99,7 @@ set_permission #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name "$app.service" --action="restart" --line_match "Listening at: unix:/run/$app/app.socket" --log_path systemd +ynh_systemd_action --service_name="$app.service" --action="restart" --line_match="Listening at: unix:/run/$app/app.socket" --log_path=systemd #================================================= # END OF SCRIPT From 676f12fac8abbb1257cc2f4ba187d790062c5857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 27 Apr 2024 01:08:10 +0200 Subject: [PATCH 03/10] Fix shell check --- scripts/_common.sh | 62 +++++++++++++++++++++++----------------------- scripts/install | 6 ++--- scripts/remove | 4 +-- scripts/restore | 4 +-- scripts/upgrade | 10 ++++---- 5 files changed, 43 insertions(+), 43 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index bec851d..2c9a529 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -13,47 +13,47 @@ postgresql_version="$(psql -V | cut -d' ' -f3 | cut -d. -f1)" install_source() { # Clean venv is it was on python with an old version in case major upgrade of debian - if [ ! -e $install_dir/venv/lib/python$python_version ] || ! grep -qF "$install_dir/venv/bin/python" "$install_dir"/venv/bin/pip; then - ynh_secure_remove --file=$install_dir/venv/bin - ynh_secure_remove --file=$install_dir/venv/lib - ynh_secure_remove --file=$install_dir/venv/lib64 - ynh_secure_remove --file=$install_dir/venv/include - ynh_secure_remove --file=$install_dir/venv/share - ynh_secure_remove --file=$install_dir/venv/pyvenv.cfg + if [ ! -e "$install_dir/venv/lib/python$python_version" ] || ! grep -qF "$install_dir/venv/bin/python" "$install_dir"/venv/bin/pip; then + ynh_secure_remove --file="$install_dir"/venv/bin + ynh_secure_remove --file="$install_dir"/venv/lib + ynh_secure_remove --file="$install_dir"/venv/lib64 + ynh_secure_remove --file="$install_dir"/venv/include + ynh_secure_remove --file="$install_dir"/venv/share + ynh_secure_remove --file="$install_dir"/venv/pyvenv.cfg fi if uname -m | grep -q arm then # Clean old file, sometime it could make some big issues if we don't do this !! - ynh_secure_remove --file=$install_dir/venv/bin - ynh_secure_remove --file=$install_dir/venv/lib - ynh_secure_remove --file=$install_dir/venv/include - ynh_secure_remove --file=$install_dir/venv/share - ynh_setup_source --dest_dir $install_dir/venv/ --source_id "pgadmin_prebuilt_armv7_$(lsb_release --codename --short)" + ynh_secure_remove --file="$install_dir"/venv/bin + ynh_secure_remove --file="$install_dir"/venv/lib + ynh_secure_remove --file="$install_dir"/venv/include + ynh_secure_remove --file="$install_dir"/venv/share + ynh_setup_source --dest_dir "$install_dir"/venv/ --source_id "pgadmin_prebuilt_armv7_$(lsb_release --codename --short)" else # Install virtualenv if it don't exist - test -e $install_dir/venv/bin/python3 || python3 -m venv $install_dir/venv + test -e "$install_dir"/venv/bin/python3 || python3 -m venv "$install_dir"/venv # Install pgadmin in virtualenv - pip=$install_dir/venv/bin/pip + pip="$install_dir"/venv/bin/pip $pip install --upgrade pip wheel - $pip install --upgrade -r "$YNH_APP_BASEDIR"/conf/requirement_$(lsb_release --codename --short).txt + $pip install --upgrade -r "$YNH_APP_BASEDIR/conf/requirement_$(lsb_release --codename --short).txt" fi # Apply patchs if needed # Note that we put patch into scripts dir because /source are not stored and can't be used on restore - if ! grep -F -q '# BEGIN Yunohost Patch' $install_dir/venv/lib/python$python_version/site-packages/pgadmin4/migrations/versions/fdc58d9bd449_.py; then - pushd $install_dir/venv/lib/python$python_version/site-packages/pgadmin4 + if ! grep -F -q '# BEGIN Yunohost Patch' "$install_dir/venv/lib/python$python_version/site-packages/pgadmin4/migrations/versions/fdc58d9bd449_.py"; then + pushd "$install_dir/venv/lib/python$python_version/site-packages/pgadmin4" patch -p1 < "$YNH_APP_BASEDIR"/scripts/patch/avoid_create_user_on_setup_db.patch popd fi - if ! grep -F -q '# BEGIN Yunohost Patch' $install_dir/venv/lib/python$python_version/site-packages/pgadmin4/pgadmin/__init__.py; then - pushd $install_dir/venv/lib/python$python_version/site-packages/pgadmin4 + if ! grep -F -q '# BEGIN Yunohost Patch' "$install_dir/venv/lib/python$python_version/site-packages/pgadmin4/pgadmin/__init__.py"; then + pushd "$install_dir/venv/lib/python$python_version/site-packages/pgadmin4" patch -p1 < "$YNH_APP_BASEDIR"/scripts/patch/fix_add_local_db.patch popd fi - if ! grep -F -q '# BEGIN Yunohost Patch' $install_dir/venv/lib/python$python_version/site-packages/pgadmin4/pgadmin/authenticate/webserver.py; then - pushd $install_dir/venv/lib/python$python_version/site-packages/pgadmin4 + if ! grep -F -q '# BEGIN Yunohost Patch' "$install_dir/venv/lib/python$python_version/site-packages/pgadmin4/pgadmin/authenticate/webserver.py"; then + pushd "$install_dir/venv/lib/python$python_version/site-packages/pgadmin4" patch -p1 < "$YNH_APP_BASEDIR"/scripts/patch/change_default_webserver_new_user_role_to_admin.patch popd fi @@ -61,16 +61,16 @@ install_source() { set_permission() { # Set permission - chown $app:$app -R $install_dir - chmod u+rw,o= -R $install_dir - chown $app:$app -R $data_dir - chmod u+rw,o= -R $data_dir - chown $app:$app -R /var/log/$app - chmod u=rwX,g=rX,o= -R /var/log/$app + chown "$app:$app" -R "$install_dir" + chmod u+rw,o= -R "$install_dir" + chown "$app:$app" -R "$data_dir" + chmod u+rw,o= -R "$data_dir" + chown "$app:$app" -R /var/log/"$app" + chmod u=rwX,g=rX,o= -R /var/log/"$app" # Criticals files - chown $app:root $data_dir/master_pwd - chmod u=r,g=,o= $data_dir/master_pwd - chown $app:root $install_dir/postgres-reg.ini - chmod u=r,g=,o= $install_dir/postgres-reg.ini + chown "$app":root "$data_dir"/master_pwd + chmod u=r,g=,o= "$data_dir"/master_pwd + chown "$app":root "$install_dir"/postgres-reg.ini + chmod u=r,g=,o= "$install_dir"/postgres-reg.ini } diff --git a/scripts/install b/scripts/install index 748f600..5ab0f21 100644 --- a/scripts/install +++ b/scripts/install @@ -20,13 +20,13 @@ ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH SUPERUSER CREATEDB CREA ynh_script_progression --message='Creating base directory...' -if [ -n "$(ls -A $data_dir)" ]; then +if [ -n "$(ls -A "$data_dir")" ]; then old_data_dir_path="${data_dir}_$(date '+%Y%m%d.%H%M%S')" ynh_print_warn "Data directory was not empty. Data was moved to $old_data_dir_path" - mkdir -p $old_data_dir_path + mkdir -p "$old_data_dir_path" mv -t "$old_data_dir_path" "$data_dir"/* fi -mkdir -p /var/log/$app +mkdir -p /var/log/"$app" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE diff --git a/scripts/remove b/scripts/remove index 92c4162..63ead8c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -17,8 +17,8 @@ ynh_script_progression --message="Removing system configurations related to $app # Stop service ynh_systemd_action --service_name="$app.service" --action=stop -ynh_remove_systemd_config --service=$app -yunohost service remove $app +ynh_remove_systemd_config --service="$app" +yunohost service remove "$app" # Remove the app-specific logrotate config ynh_remove_logrotate diff --git a/scripts/restore b/scripts/restore index 627ef08..fa7e905 100644 --- a/scripts/restore +++ b/scripts/restore @@ -38,8 +38,8 @@ install_source ynh_script_progression --message="Enable systemd services" --weight=2 # systemctl daemon-reload -systemctl enable $app.service --quiet -yunohost service add $app --log "/var/log/$app/$app.log" --description 'PgAdmin application' +systemctl enable "$app".service --quiet +yunohost service add "$app" --log "/var/log/$app/$app.log" --description 'PgAdmin application' set_permission diff --git a/scripts/upgrade b/scripts/upgrade index 417dfd4..2bb0f87 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,8 +49,8 @@ if [ -d "$install_dir/data" ]; then fi ynh_secure_remove "$install_dir/data" fi -if [ ! -e $data_dir/master_pwd ]; then - ynh_string_random --length=60 > $data_dir/master_pwd +if [ ! -e "$data_dir"/master_pwd ]; then + ynh_string_random --length=60 > "$data_dir"/master_pwd fi #================================================= @@ -85,12 +85,12 @@ ynh_script_progression --message="Upgrading system configurations related to $ap ynh_add_nginx_config # Add systemd config -ynh_add_systemd_config --service=$app --template=pgadmin.service +ynh_add_systemd_config --service="$app" --template=pgadmin.service -yunohost service add $app --log "/var/log/$app/$app.log" --description 'PgAdmin application' +yunohost service add "$app" --log "/var/log/$app/$app.log" --description 'PgAdmin application' # Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate --logfile=/var/log/$app --nonappend +ynh_use_logrotate --logfile=/var/log/"$app" --nonappend set_permission From e064d62f52bd74a1622a8d4cf981d847c9becd0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 3 May 2024 01:13:17 +0200 Subject: [PATCH 04/10] Upgrade pgadmin to 8.6 --- conf/requirement_bookworm.txt | 40 +++++++++++++++++------------------ conf/requirement_bullseye.txt | 40 +++++++++++++++++------------------ manifest.toml | 10 ++++----- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/conf/requirement_bookworm.txt b/conf/requirement_bookworm.txt index f422fdb..c47bdd3 100644 --- a/conf/requirement_bookworm.txt +++ b/conf/requirement_bookworm.txt @@ -1,5 +1,5 @@ alembic==1.13.1 -Authlib==1.2.1 +Authlib==1.3.0 azure-common==1.1.28 azure-core==1.30.1 azure-identity==1.15.0 @@ -10,7 +10,7 @@ azure-mgmt-subscription==3.1.1 Babel==2.14.0 bcrypt==4.0.1 bidict==0.23.1 -blinker==1.7.0 +blinker==1.8.1 boto3==1.33.13 botocore==1.33.13 Brotli==1.1.0 @@ -19,40 +19,38 @@ certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 -colorama==0.4.6 cryptography==42.0.5 dnspython==2.6.1 email_validator==2.1.1 eventlet==0.34.2 -Flask==2.3.3 +Flask==3.0.3 flask-babel==4.0.0 -Flask-Compress==1.14 -Flask-Gravatar==0.5.0 +Flask-Compress==1.15 Flask-Login==0.6.3 Flask-Mail==0.9.1 Flask-Migrate==4.0.7 Flask-Paranoid==0.3.0 Flask-Principal==0.4.0 -Flask-Security-Too==5.3.3 +Flask-Security-Too==5.4.3 Flask-SocketIO==5.3.6 Flask-SQLAlchemy==3.1.1 Flask-WTF==1.2.1 -google-api-core==2.18.0 -google-api-python-client==2.125.0 +google-api-core==2.19.0 +google-api-python-client==2.127.0 google-auth==2.29.0 google-auth-httplib2==0.2.0 -google-auth-oauthlib==1.1.0 +google-auth-oauthlib==1.2.0 googleapis-common-protos==1.63.0 greenlet==3.0.3 -gunicorn==21.2.0 +gunicorn==22.0.0 h11==0.14.0 httpagentparser==1.9.5 httplib2==0.22.0 -idna==3.6 +idna==3.7 importlib_metadata==7.1.0 importlib_resources==6.4.0 isodate==0.6.1 -itsdangerous==2.1.2 +itsdangerous==2.2.0 jaraco.classes==3.4.0 jeepney==0.8.0 Jinja2==3.1.3 @@ -60,7 +58,8 @@ jmespath==1.0.1 jsonformatter==0.3.2 keyring==24.3.1 ldap3==2.9.1 -Mako==1.3.2 +libgravatar==1.0.4 +Mako==1.3.3 markdown-it-py==3.0.0 MarkupSafe==2.1.5 mdurl==0.1.2 @@ -72,7 +71,7 @@ oauthlib==3.2.2 packaging==24.0 paramiko==3.4.0 passlib==1.7.4 -pgadmin4==8.5 +pgadmin4==8.6 portalocker==2.8.2 proto-plus==1.23.0 protobuf==4.25.3 @@ -91,7 +90,7 @@ pypng==0.20220715.0 python-dateutil==2.9.0.post0 python-engineio==4.9.0 python-socketio==5.11.2 -pytz==2023.4 +pytz==2024.1 qrcode==7.4.2 requests==2.31.0 requests-oauthlib==2.0.0 @@ -104,15 +103,16 @@ simple-websocket==1.0.0 six==1.16.0 speaklater3==1.4 SQLAlchemy==2.0.29 -sqlparse==0.4.4 +sqlparse==0.5.0 sshtunnel==0.4.0 -typer==0.9.4 -typing_extensions==4.10.0 +typer==0.12.3 +typing_extensions==4.11.0 ua-parser==0.18.0 uritemplate==4.1.1 urllib3==1.26.18 user-agents==2.2.0 -Werkzeug==2.3.8 +Werkzeug==3.0.2 wsproto==1.2.0 WTForms==3.1.2 zipp==3.18.1 +zstandard==0.22.0 diff --git a/conf/requirement_bullseye.txt b/conf/requirement_bullseye.txt index 8622b1a..297e5bb 100644 --- a/conf/requirement_bullseye.txt +++ b/conf/requirement_bullseye.txt @@ -1,5 +1,5 @@ alembic==1.13.1 -Authlib==1.2.1 +Authlib==1.3.0 azure-common==1.1.28 azure-core==1.30.1 azure-identity==1.15.0 @@ -10,7 +10,7 @@ azure-mgmt-subscription==3.1.1 Babel==2.14.0 bcrypt==4.0.1 bidict==0.23.1 -blinker==1.7.0 +blinker==1.8.1 boto3==1.33.13 botocore==1.33.13 Brotli==1.1.0 @@ -19,40 +19,38 @@ certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 -colorama==0.4.6 cryptography==42.0.5 dnspython==2.6.1 email_validator==2.1.1 eventlet==0.34.2 -Flask==2.3.3 +Flask==3.0.3 flask-babel==4.0.0 -Flask-Compress==1.14 -Flask-Gravatar==0.5.0 +Flask-Compress==1.15 Flask-Login==0.6.3 Flask-Mail==0.9.1 Flask-Migrate==4.0.7 Flask-Paranoid==0.3.0 Flask-Principal==0.4.0 -Flask-Security-Too==5.3.3 +Flask-Security-Too==5.4.3 Flask-SocketIO==5.3.6 Flask-SQLAlchemy==3.1.1 Flask-WTF==1.2.1 -google-api-core==2.18.0 -google-api-python-client==2.125.0 +google-api-core==2.19.0 +google-api-python-client==2.127.0 google-auth==2.29.0 google-auth-httplib2==0.2.0 -google-auth-oauthlib==1.1.0 +google-auth-oauthlib==1.2.0 googleapis-common-protos==1.63.0 greenlet==1.1.2 -gunicorn==21.2.0 +gunicorn==22.0.0 h11==0.14.0 httpagentparser==1.9.5 httplib2==0.22.0 -idna==3.6 +idna==3.7 importlib_metadata==7.1.0 importlib_resources==6.4.0 isodate==0.6.1 -itsdangerous==2.1.2 +itsdangerous==2.2.0 jaraco.classes==3.4.0 jeepney==0.8.0 Jinja2==3.1.3 @@ -60,7 +58,8 @@ jmespath==1.0.1 jsonformatter==0.3.2 keyring==24.3.1 ldap3==2.9.1 -Mako==1.3.2 +libgravatar==1.0.4 +Mako==1.3.3 markdown-it-py==3.0.0 MarkupSafe==2.1.5 mdurl==0.1.2 @@ -72,7 +71,7 @@ oauthlib==3.2.2 packaging==24.0 paramiko==3.4.0 passlib==1.7.4 -pgadmin4==8.5 +pgadmin4==8.6 portalocker==2.8.2 proto-plus==1.23.0 protobuf==4.25.3 @@ -91,7 +90,7 @@ pypng==0.20220715.0 python-dateutil==2.9.0.post0 python-engineio==4.9.0 python-socketio==5.11.2 -pytz==2023.4 +pytz==2024.1 qrcode==7.4.2 requests==2.31.0 requests-oauthlib==2.0.0 @@ -104,15 +103,16 @@ simple-websocket==1.0.0 six==1.16.0 speaklater3==1.4 SQLAlchemy==2.0.29 -sqlparse==0.4.4 +sqlparse==0.5.0 sshtunnel==0.4.0 -typer==0.9.4 -typing_extensions==4.10.0 +typer==0.12.3 +typing_extensions==4.11.0 ua-parser==0.18.0 uritemplate==4.1.1 urllib3==1.26.18 user-agents==2.2.0 -Werkzeug==2.3.8 +Werkzeug==3.0.2 wsproto==1.2.0 WTForms==3.1.2 zipp==3.18.1 +zstandard==0.22.0 diff --git a/manifest.toml b/manifest.toml index 00afa43..9059d3e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "pgAdmin4" description.en = "Manage PostgreSQL databases over the web" description.fr = "Application web de gestion des bases de données PostgreSQL" -version = "8.5~ynh1" +version = "8.6~ynh1" maintainers = ["Josué Tille"] @@ -42,13 +42,13 @@ ram.runtime = "200M" [resources] [resources.sources.pgadmin_prebuilt_armv7_bookworm] prefetch = false - armhf.url = "https://github.com/YunoHost-Apps/pgadmin_python_build/releases/download/v8.5/pgadmin_8.5-bookworm-bin1_armv7l.tar.gz" - armhf.sha256 = "55bce68b2dca172311acc9f9d1c8837d53af72b69a2e37dc9da9c374129b2fe8" + armhf.url = "https://github.com/YunoHost-Apps/pgadmin_python_build/releases/download/v8.6/pgadmin_8.6-bookworm-bin1_armv7l.tar.gz" + armhf.sha256 = "316c76f2d2ac1543b9f8c0a07339a0fbe504bb3da1c931bd41e2445e0e268f8e" [resources.sources.pgadmin_prebuilt_armv7_bullseye] prefetch = false - armhf.url = "https://github.com/YunoHost-Apps/pgadmin_python_build/releases/download/v8.5/pgadmin_8.5-bullseye-bin1_armv7l.tar.gz" - armhf.sha256 = "4f67b54a306220621f76a488e18b5c1a04379ee3914fbd91830378bcf8896363" + armhf.url = "https://github.com/YunoHost-Apps/pgadmin_python_build/releases/download/v8.6/pgadmin_8.6-bullseye-bin1_armv7l.tar.gz" + armhf.sha256 = "9dc6effbedd21ef50ab10f0f428db293016bd27482029ec69641371d314be5e5" [resources.system_user] allow_email = true From 0d8e727754a8e8623f050b9c3af15a6e03e12288 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 7 May 2024 06:16:17 +0000 Subject: [PATCH 05/10] Auto-update READMEs --- ALL_README.md | 1 + README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 README_zh_Hans.md diff --git a/ALL_README.md b/ALL_README.md index 77b7509..a01b345 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -4,3 +4,4 @@ - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index e70ac7c..83377d0 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Shipped version:** 8.5~ynh1 +**Shipped version:** 8.6~ynh1 ## Screenshots diff --git a/README_eu.md b/README_eu.md index 769ff0b..aeb17a3 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Paketatutako bertsioa:** 8.5~ynh1 +**Paketatutako bertsioa:** 8.6~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 6764f87..e30f619 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Version incluse :** 8.5~ynh1 +**Version incluse :** 8.6~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index bad56a7..5698a1a 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Versión proporcionada:** 8.5~ynh1 +**Versión proporcionada:** 8.6~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..b6a7790 --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,47 @@ + + +# YunoHost 上的 pgAdmin4 + +[![集成程度](https://dash.yunohost.org/integration/pgadmin.svg)](https://dash.yunohost.org/appci/app/pgadmin) ![工作状态](https://ci-apps.yunohost.org/ci/badges/pgadmin.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/pgadmin.maintain.svg) + +[![使用 YunoHost 安装 pgAdmin4](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pgadmin) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 pgAdmin4。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. + + +**分发版本:** 8.6~ynh1 + +## 截图 + +![pgAdmin4 的截图](./doc/screenshots/pgadmin4-welcome-light.png) + +## 文档与资源 + +- 官方应用网站: +- 官方管理文档: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/pgadmin_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/pgadmin_ynh/tree/testing --debug +或 +sudo yunohost app upgrade pgadmin -u https://github.com/YunoHost-Apps/pgadmin_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From ed897c27abeef91ab1cbd2ffae23838d9e14cd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 7 May 2024 12:01:54 +0200 Subject: [PATCH 06/10] fix setup source --- scripts/_common.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2c9a529..9aed657 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -12,6 +12,14 @@ postgresql_version="$(psql -V | cut -d' ' -f3 | cut -d. -f1)" #================================================= install_source() { + # Cleanup old venv files + ynh_secure_remove --file="$install_dir"/bin + ynh_secure_remove --file="$install_dir"/lib + ynh_secure_remove --file="$install_dir"/lib64 + ynh_secure_remove --file="$install_dir"/include + ynh_secure_remove --file="$install_dir"/share + ynh_secure_remove --file="$install_dir"/pyvenv.cfg + # Clean venv is it was on python with an old version in case major upgrade of debian if [ ! -e "$install_dir/venv/lib/python$python_version" ] || ! grep -qF "$install_dir/venv/bin/python" "$install_dir"/venv/bin/pip; then ynh_secure_remove --file="$install_dir"/venv/bin @@ -24,12 +32,14 @@ install_source() { if uname -m | grep -q arm then - # Clean old file, sometime it could make some big issues if we don't do this !! - ynh_secure_remove --file="$install_dir"/venv/bin - ynh_secure_remove --file="$install_dir"/venv/lib - ynh_secure_remove --file="$install_dir"/venv/include - ynh_secure_remove --file="$install_dir"/venv/share - ynh_setup_source --dest_dir "$install_dir"/venv/ --source_id "pgadmin_prebuilt_armv7_$(lsb_release --codename --short)" + ynh_setup_source --dest_dir "$install_dir"/venv/ --source_id "pgadmin_prebuilt_armv7_$(lsb_release --codename --short)" --full_replace + + # Fix multi-instance support + for f in "$install_dir"/venv/bin/*; do + if ! [[ $f =~ "__" ]]; then + ynh_replace_special_string --match_string='#!'/opt/yunohost/pgadmin/venv --replace_string='#!'"$code_dir"/venv --target_file="$f" + fi + done else # Install virtualenv if it don't exist test -e "$install_dir"/venv/bin/python3 || python3 -m venv "$install_dir"/venv From 7aefb6f5264d9e900aba550ceeec4c782e62c787 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 25 May 2024 06:13:06 +0000 Subject: [PATCH 07/10] Auto-update READMEs --- README_es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_es.md b/README_es.md index fa8c245..f2b9af8 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Versión actual:** 8.5~ynh2 +**Versión actual:** 8.6~ynh1 ## Capturas From 1eed96291fd414c07c251d3a58043e772bb2b76e Mon Sep 17 00:00:00 2001 From: App auto update Date: Thu, 30 May 2024 23:27:36 +0000 Subject: [PATCH 08/10] Upgrade pgadmin to 8.7 --- conf/requirement_bookworm.txt | 30 +++++++++++++++--------------- conf/requirement_bullseye.txt | 30 +++++++++++++++--------------- manifest.toml | 10 +++++----- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/conf/requirement_bookworm.txt b/conf/requirement_bookworm.txt index c47bdd3..3ab9db9 100644 --- a/conf/requirement_bookworm.txt +++ b/conf/requirement_bookworm.txt @@ -7,10 +7,10 @@ azure-mgmt-core==1.4.0 azure-mgmt-rdbms==10.1.0 azure-mgmt-resource==23.0.1 azure-mgmt-subscription==3.1.1 -Babel==2.14.0 +Babel==2.15.0 bcrypt==4.0.1 bidict==0.23.1 -blinker==1.8.1 +blinker==1.8.2 boto3==1.33.13 botocore==1.33.13 Brotli==1.1.0 @@ -19,7 +19,7 @@ certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 -cryptography==42.0.5 +cryptography==42.0.7 dnspython==2.6.1 email_validator==2.1.1 eventlet==0.34.2 @@ -27,7 +27,7 @@ Flask==3.0.3 flask-babel==4.0.0 Flask-Compress==1.15 Flask-Login==0.6.3 -Flask-Mail==0.9.1 +Flask-Mail==0.10.0 Flask-Migrate==4.0.7 Flask-Paranoid==0.3.0 Flask-Principal==0.4.0 @@ -36,7 +36,7 @@ Flask-SocketIO==5.3.6 Flask-SQLAlchemy==3.1.1 Flask-WTF==1.2.1 google-api-core==2.19.0 -google-api-python-client==2.127.0 +google-api-python-client==2.131.0 google-auth==2.29.0 google-auth-httplib2==0.2.0 google-auth-oauthlib==1.2.0 @@ -53,13 +53,13 @@ isodate==0.6.1 itsdangerous==2.2.0 jaraco.classes==3.4.0 jeepney==0.8.0 -Jinja2==3.1.3 +Jinja2==3.1.4 jmespath==1.0.1 jsonformatter==0.3.2 keyring==24.3.1 ldap3==2.9.1 libgravatar==1.0.4 -Mako==1.3.3 +Mako==1.3.5 markdown-it-py==3.0.0 MarkupSafe==2.1.5 mdurl==0.1.2 @@ -71,7 +71,7 @@ oauthlib==3.2.2 packaging==24.0 paramiko==3.4.0 passlib==1.7.4 -pgadmin4==8.6 +pgadmin4==8.7 portalocker==2.8.2 proto-plus==1.23.0 protobuf==4.25.3 @@ -81,18 +81,18 @@ psycopg-c==3.1.12 pyasn1==0.6.0 pyasn1_modules==0.4.0 pycparser==2.22 -Pygments==2.17.2 +Pygments==2.18.0 PyJWT==2.8.0 PyNaCl==1.5.0 pyotp==2.9.0 pyparsing==3.1.2 pypng==0.20220715.0 python-dateutil==2.9.0.post0 -python-engineio==4.9.0 +python-engineio==4.9.1 python-socketio==5.11.2 pytz==2024.1 qrcode==7.4.2 -requests==2.31.0 +requests==2.32.3 requests-oauthlib==2.0.0 rich==13.7.1 rsa==4.9 @@ -102,17 +102,17 @@ shellingham==1.5.4 simple-websocket==1.0.0 six==1.16.0 speaklater3==1.4 -SQLAlchemy==2.0.29 +SQLAlchemy==2.0.30 sqlparse==0.5.0 sshtunnel==0.4.0 typer==0.12.3 -typing_extensions==4.11.0 +typing_extensions==4.12.0 ua-parser==0.18.0 uritemplate==4.1.1 urllib3==1.26.18 user-agents==2.2.0 -Werkzeug==3.0.2 +Werkzeug==3.0.3 wsproto==1.2.0 WTForms==3.1.2 -zipp==3.18.1 +zipp==3.19.0 zstandard==0.22.0 diff --git a/conf/requirement_bullseye.txt b/conf/requirement_bullseye.txt index 297e5bb..a492e80 100644 --- a/conf/requirement_bullseye.txt +++ b/conf/requirement_bullseye.txt @@ -7,10 +7,10 @@ azure-mgmt-core==1.4.0 azure-mgmt-rdbms==10.1.0 azure-mgmt-resource==23.0.1 azure-mgmt-subscription==3.1.1 -Babel==2.14.0 +Babel==2.15.0 bcrypt==4.0.1 bidict==0.23.1 -blinker==1.8.1 +blinker==1.8.2 boto3==1.33.13 botocore==1.33.13 Brotli==1.1.0 @@ -19,7 +19,7 @@ certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 -cryptography==42.0.5 +cryptography==42.0.7 dnspython==2.6.1 email_validator==2.1.1 eventlet==0.34.2 @@ -27,7 +27,7 @@ Flask==3.0.3 flask-babel==4.0.0 Flask-Compress==1.15 Flask-Login==0.6.3 -Flask-Mail==0.9.1 +Flask-Mail==0.10.0 Flask-Migrate==4.0.7 Flask-Paranoid==0.3.0 Flask-Principal==0.4.0 @@ -36,7 +36,7 @@ Flask-SocketIO==5.3.6 Flask-SQLAlchemy==3.1.1 Flask-WTF==1.2.1 google-api-core==2.19.0 -google-api-python-client==2.127.0 +google-api-python-client==2.131.0 google-auth==2.29.0 google-auth-httplib2==0.2.0 google-auth-oauthlib==1.2.0 @@ -53,13 +53,13 @@ isodate==0.6.1 itsdangerous==2.2.0 jaraco.classes==3.4.0 jeepney==0.8.0 -Jinja2==3.1.3 +Jinja2==3.1.4 jmespath==1.0.1 jsonformatter==0.3.2 keyring==24.3.1 ldap3==2.9.1 libgravatar==1.0.4 -Mako==1.3.3 +Mako==1.3.5 markdown-it-py==3.0.0 MarkupSafe==2.1.5 mdurl==0.1.2 @@ -71,7 +71,7 @@ oauthlib==3.2.2 packaging==24.0 paramiko==3.4.0 passlib==1.7.4 -pgadmin4==8.6 +pgadmin4==8.7 portalocker==2.8.2 proto-plus==1.23.0 protobuf==4.25.3 @@ -81,18 +81,18 @@ psycopg-c==3.1.12 pyasn1==0.6.0 pyasn1_modules==0.4.0 pycparser==2.22 -Pygments==2.17.2 +Pygments==2.18.0 PyJWT==2.8.0 PyNaCl==1.5.0 pyotp==2.9.0 pyparsing==3.1.2 pypng==0.20220715.0 python-dateutil==2.9.0.post0 -python-engineio==4.9.0 +python-engineio==4.9.1 python-socketio==5.11.2 pytz==2024.1 qrcode==7.4.2 -requests==2.31.0 +requests==2.32.3 requests-oauthlib==2.0.0 rich==13.7.1 rsa==4.9 @@ -102,17 +102,17 @@ shellingham==1.5.4 simple-websocket==1.0.0 six==1.16.0 speaklater3==1.4 -SQLAlchemy==2.0.29 +SQLAlchemy==2.0.30 sqlparse==0.5.0 sshtunnel==0.4.0 typer==0.12.3 -typing_extensions==4.11.0 +typing_extensions==4.12.0 ua-parser==0.18.0 uritemplate==4.1.1 urllib3==1.26.18 user-agents==2.2.0 -Werkzeug==3.0.2 +Werkzeug==3.0.3 wsproto==1.2.0 WTForms==3.1.2 -zipp==3.18.1 +zipp==3.19.0 zstandard==0.22.0 diff --git a/manifest.toml b/manifest.toml index f0f5226..67a1f57 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "pgAdmin4" description.en = "Manage PostgreSQL databases over the web" description.fr = "Application web de gestion des bases de données PostgreSQL" -version = "8.6~ynh1" +version = "8.7~ynh1" maintainers = ["Josué Tille"] @@ -42,13 +42,13 @@ ram.runtime = "200M" [resources] [resources.sources.pgadmin_prebuilt_armv7_bookworm] prefetch = false - armhf.url = "https://github.com/YunoHost-Apps/pgadmin_python_build/releases/download/v8.6/pgadmin_8.6-bookworm-bin1_armv7l.tar.gz" - armhf.sha256 = "316c76f2d2ac1543b9f8c0a07339a0fbe504bb3da1c931bd41e2445e0e268f8e" + armhf.url = "https://github.com/YunoHost-Apps/pgadmin_python_build/releases/download/v8.7/pgadmin_8.7-bookworm-bin1_armv7l.tar.gz" + armhf.sha256 = "5aedef91672fd30022ba410cda919138ff18703b9839bbfc3bca4ea421102591" [resources.sources.pgadmin_prebuilt_armv7_bullseye] prefetch = false - armhf.url = "https://github.com/YunoHost-Apps/pgadmin_python_build/releases/download/v8.6/pgadmin_8.6-bullseye-bin1_armv7l.tar.gz" - armhf.sha256 = "9dc6effbedd21ef50ab10f0f428db293016bd27482029ec69641371d314be5e5" + armhf.url = "https://github.com/YunoHost-Apps/pgadmin_python_build/releases/download/v8.7/pgadmin_8.7-bullseye-bin1_armv7l.tar.gz" + armhf.sha256 = "9603492ca0fb2b258425b298705f0b2fa24e54d34182160d1854ce68c21f04a9" [resources.system_user] allow_email = true From d3e56921fa98466de5bcefa7f1cb51bbd62bfb73 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 31 May 2024 15:22:02 +0000 Subject: [PATCH 09/10] 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 83377d0..26efdae 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Shipped version:** 8.6~ynh1 +**Shipped version:** 8.7~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index f2b9af8..00b925f 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Versión actual:** 8.6~ynh1 +**Versión actual:** 8.7~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index aeb17a3..2805a77 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Paketatutako bertsioa:** 8.6~ynh1 +**Paketatutako bertsioa:** 8.7~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index e30f619..083c727 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Version incluse :** 8.6~ynh1 +**Version incluse :** 8.7~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 5698a1a..3e1b721 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**Versión proporcionada:** 8.6~ynh1 +**Versión proporcionada:** 8.7~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index b6a7790..c5a3b17 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ pgAdmin is a feature rich Open Source administration and development platform for PostgreSQL. -**分发版本:** 8.6~ynh1 +**分发版本:** 8.7~ynh1 ## 截图 From 29c8d51ad1300e2f156ae0a1bcc319bf637eddbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 31 May 2024 17:29:45 +0200 Subject: [PATCH 10/10] Fix typo on var --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 9aed657..aaeac80 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -37,7 +37,7 @@ install_source() { # Fix multi-instance support for f in "$install_dir"/venv/bin/*; do if ! [[ $f =~ "__" ]]; then - ynh_replace_special_string --match_string='#!'/opt/yunohost/pgadmin/venv --replace_string='#!'"$code_dir"/venv --target_file="$f" + ynh_replace_special_string --match_string='#!'/opt/yunohost/pgadmin/venv --replace_string='#!'"$install_dir"/venv --target_file="$f" fi done else