From 252f1959d5af034fd576deac452fb248a7030604 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 25 Mar 2019 22:52:57 +0100 Subject: [PATCH] Fix repo --- README.md | 14 +------------- scripts/install | 5 ++--- scripts/remove | 3 ++- scripts/restore | 5 ++--- scripts/upgrade | 5 ++--- scripts/ynh_add_secure_repos__2 | 9 ++++++++- 6 files changed, 17 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index b86aec7..f974ab1 100644 --- a/README.md +++ b/README.md @@ -26,18 +26,6 @@ Quick description of this app. - [x] The sources are based on http://download.z-push.org/final/ - [x] Use of version 2.4.5 final -## Screenshots - -![](Link to an screenshot for this app) - -## Demo - -* [Official demo](Link to a demo site for this app) - -## Licence - -* LICENSE: AGPL-3.0 - ## Configuration How to configure this app: by an admin panel, a plain file with SSH, or any other way. @@ -74,7 +62,7 @@ https://yunohost.org/packaging_apps ## Links * Report a bug: https://github.com/YunoHost-Apps/z-push_ynh/issues - * App website: Link to the official website of this app + * App website: http://z-push.org/ * YunoHost website: https://yunohost.org/ --- diff --git a/scripts/install b/scripts/install index c251cba..fa6e8ac 100755 --- a/scripts/install +++ b/scripts/install @@ -71,9 +71,8 @@ ynh_app_setting_set $app log_path $log_path #================================================= ynh_print_info "Installing dependencies..." -echo "deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" | tee /etc/apt/sources.list.d/z-push.list -wget -qO - http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key | sudo apt-key add - -ynh_package_update +ynh_install_extra_repo --repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" --key="http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key" + ynh_install_app_dependencies z-push-common z-push-backend-caldav z-push-backend-carddav z-push-backend-combined z-push-backend-imap z-push-backend-ldap z-push-backend-galsearch-ldap z-push-autodiscover php-memcached php-cli php-soap #================================================= diff --git a/scripts/remove b/scripts/remove index fabed57..5c9e505 100755 --- a/scripts/remove +++ b/scripts/remove @@ -8,6 +8,7 @@ source _common.sh source /usr/share/yunohost/helpers +source ynh_add_secure_repos__2 #================================================= # LOAD SETTINGS @@ -32,7 +33,7 @@ ynh_print_info "Removing dependencies" # Remove metapackage and its dependencies ynh_remove_app_dependencies -ynh_remove_extra_repo --name=z-push +ynh_remove_extra_repo #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/restore b/scripts/restore index afd7f52..dc219a2 100755 --- a/scripts/restore +++ b/scripts/restore @@ -74,9 +74,8 @@ ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf" # REINSTALL DEPENDENCIES #================================================= -echo "deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" | tee /etc/apt/sources.list.d/z-push.list -wget -qO - http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key | sudo apt-key add - -ynh_package_update +ynh_install_extra_repo --repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" --key="http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key" + ynh_install_app_dependencies z-push-common z-push-backend-caldav z-push-backend-carddav z-push-backend-combined z-push-backend-imap z-push-backend-ldap z-push-backend-galsearch-ldap z-push-autodiscover php-memcached php-cli php-soap #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6f46aa4..ee4ce3a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -97,9 +97,8 @@ ynh_add_nginx_config #================================================= ynh_print_info "Upgrading dependencies..." -echo "deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" | tee /etc/apt/sources.list.d/z-push.list -wget -qO - http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key | sudo apt-key add - -ynh_package_update +ynh_install_extra_repo --repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" --key="http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key" + ynh_install_app_dependencies z-push-common z-push-backend-caldav z-push-backend-carddav z-push-backend-combined z-push-backend-imap z-push-backend-ldap z-push-backend-galsearch-ldap z-push-autodiscover php-memcached php-cli php-soap #================================================= diff --git a/scripts/ynh_add_secure_repos__2 b/scripts/ynh_add_secure_repos__2 index 51a9f1b..22185f4 100644 --- a/scripts/ynh_add_secure_repos__2 +++ b/scripts/ynh_add_secure_repos__2 @@ -137,7 +137,13 @@ ynh_install_extra_repo () { if [ -n "$key" ] then mkdir -p "/etc/apt/trusted.gpg.d" - wget -q "$key" -O - | $wget_append /etc/apt/trusted.gpg.d/$name.gpg + if [[ "$(basename "$key")" =~ ".asc" ]] + then + local key_ext=asc + else + local key_ext=gpg + fi + wget -q "$key" -O - | $wget_append /etc/apt/trusted.gpg.d/$name.$key_ext fi # Update the list of package with the new repo @@ -160,6 +166,7 @@ ynh_remove_extra_repo () { ynh_secure_remove "/etc/apt/sources.list.d/$name.list" ynh_secure_remove "/etc/apt/preferences.d/$name" ynh_secure_remove "/etc/apt/trusted.gpg.d/$name.gpg" + ynh_secure_remove "/etc/apt/trusted.gpg.d/$name.asc" # Update the list of package to exclude the old repo ynh_package_update