From a0672d9a6fd70f594a149ada70ce5362e85c8390 Mon Sep 17 00:00:00 2001 From: squeak Date: Mon, 8 Mar 2021 00:06:55 +0100 Subject: [PATCH 1/5] typo --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index 45287a8..46ef5f3 100755 --- a/scripts/install +++ b/scripts/install @@ -104,7 +104,6 @@ DEBIAN_FRONTEND=noninteractive # apt-get install -y --force-yes couchdb sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61 -# ynh_add_app_dependencies --package="ca-certificates" # done before, when installing dependencies ynh_install_extra_app_dependencies --repo="https://apache.bintray.com/couchdb-deb buster main" --package="couchdb" # ynh_install_extra_app_dependencies --repo="https://apache.bintray.com/couchdb-deb buster main" --package="couchdb" --key="https://apache.bintray.com/couchdb-deb/dists/buster/Release.gpg" From f25e701984c4acd332f89306b8180c8fff84e6fb Mon Sep 17 00:00:00 2001 From: squeak Date: Mon, 8 Mar 2021 00:23:02 +0100 Subject: [PATCH 2/5] Setup check_process --- check_process.default => check_process | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) rename check_process.default => check_process (55%) diff --git a/check_process.default b/check_process similarity index 55% rename from check_process.default rename to check_process index 41888cb..6e5b833 100644 --- a/check_process.default +++ b/check_process @@ -5,31 +5,25 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - language="fr" - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + is_public=1 password="pass" - port="666" (PORT) ; Checks pkg_linter=1 setup_sub_dir=1 setup_root=1 setup_nourl=0 - setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=CommitHash + upgrade=1 from_commit=a0672d9a6fd70f594a149ada70ce5362e85c8390 backup_restore=1 multi_instance=1 port_already_use=0 change_url=1 ;;; Options -Email= +Email=squeak@eauchat.org Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& - + ; commit=a0672d9a6fd70f594a149ada70ce5362e85c8390 + manifest_arg=domain=DOMAIN&path=PATH&is_public=1&password=pass& From 77e387c4c4a17fbd14b7efc99960f591c075b438 Mon Sep 17 00:00:00 2001 From: squeak Date: Mon, 8 Mar 2021 01:32:00 +0100 Subject: [PATCH 3/5] Fixed incompatibility between SSO and couch authentication. --- README.md | 2 -- README_fr.md | 2 -- scripts/install | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index b5ada3d..402119a 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,6 @@ Couchdb has it's own users management system, so LDAP is not supported. By default this package installs couchdb as single node, if you need a different setup, please contribute with pull requests to improve the package :) -It seems that there are some conflicts between yunohost SSO cookies and couchdb authentication cookies, this results in users not being able to access couchdb if they are logged in the SSO. To avoid having this issue, it is recommended to install couchdb on a different domain than the main yunohost one. - ## Links diff --git a/README_fr.md b/README_fr.md index 7c77152..c3f0ba3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -50,8 +50,6 @@ Couchdb a sa propre gestion d'utilisateurs, donc LDAP n'est pas supporté. Par défaut, ce paquet install couchdb comme nœud simple. Si vous souhaitez permettre des installations plus avancées les contributions sont bienvenues :) -Il semble qu'il y'ai un conflit entre le cookie du SSO yunohost et celui d'autentification à couchdb, dont le résultat est que couchdb n'est pas accessible pour les utilisateurs s'ils sont loggé dans le SSO. La façon la plus simple d'éviter ce problème est d'installer couchdb sur un domaine différent que le domaine principale de yunohost. - ## Liens diff --git a/scripts/install b/scripts/install index 46ef5f3..d07021f 100755 --- a/scripts/install +++ b/scripts/install @@ -147,7 +147,7 @@ ynh_add_fail2ban_config --logpath="/var/log/couchdb/couchdb.log" --failregex="[w ynh_script_progression --message="Configuring permissions..." --weight=3 # Setup that clicking SSO tile opens fauxton UI -ynh_permission_url --permission="main" --url="/_utils/index.html" --add_url="/" +ynh_permission_url --permission="main" --url="/_utils/index.html" --add_url="/" --auth_header=false # Make app public if necessary if [ $is_public -eq 1 ] From 5a46725a1a300e8b22fb0d43208f7442c4961e4d Mon Sep 17 00:00:00 2001 From: squeak Date: Mon, 8 Mar 2021 01:32:17 +0100 Subject: [PATCH 4/5] Remove app main dir in remove script. --- scripts/remove | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/remove b/scripts/remove index 6c7133f..2665849 100755 --- a/scripts/remove +++ b/scripts/remove @@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) port=$(ynh_app_setting_get --app=$app --key=port) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # STANDARD REMOVE @@ -40,6 +41,14 @@ ynh_script_progression --message="Removing dependencies..." --weight=16 # Remove metapackage and its dependencies ynh_remove_app_dependencies +#================================================= +# REMOVE APP MAIN DIR +#================================================= +ynh_script_progression --message="Removing app main directory..." --weight=4 + +# Remove the app directory securely +ynh_secure_remove --file="$final_path" + #================================================= # REMOVE NGINX CONFIGURATION #================================================= From 7f9c58e98bca568d1341cc02a4bf812b1d17d291 Mon Sep 17 00:00:00 2001 From: squeak Date: Mon, 8 Mar 2021 09:07:20 +0100 Subject: [PATCH 5/5] Applied corrections proposed by first automated CI test. --- check_process | 3 ++- issue_template.md | 4 ++-- manifest.json | 4 ++++ scripts/install | 2 +- scripts/restore | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/check_process b/check_process index 6e5b833..fd29bf2 100644 --- a/check_process +++ b/check_process @@ -14,11 +14,12 @@ setup_sub_dir=1 setup_root=1 setup_nourl=0 + setup_private=1 setup_public=1 upgrade=1 upgrade=1 from_commit=a0672d9a6fd70f594a149ada70ce5362e85c8390 backup_restore=1 - multi_instance=1 + multi_instance=0 port_already_use=0 change_url=1 ;;; Options diff --git a/issue_template.md b/issue_template.md index 9270168..6e85715 100644 --- a/issue_template.md +++ b/issue_template.md @@ -8,7 +8,7 @@ about: When creating a bug report, please use the following template to provide 1. *Read this whole template first.* 2. *Determine if you are on the right place:* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* - - *Otherwise, the issue may be due to dato itself. Refer to [its documentation](https://squeak.eauchat.org/dato) or [repository](https://framagit.org/squeak/dato/issues) for help.* + - *Otherwise, the issue may be due to dato itself. Refer to [its documentation](https://docs.couchdb.org/en/stable/index.html) or [repository](https://github.com/apache/couchdb/issues/) for help.* - *When in doubt, post here and we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* --- @@ -31,7 +31,7 @@ about: When creating a bug report, please use the following template to provide - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh - sudo yunohost app install REPLACEBYYOURAPP + sudo yunohost app install couchdb ``` - *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If the error occurs in your browser, explain what you did:* diff --git a/manifest.json b/manifest.json index 8cba529..7d3b4f0 100644 --- a/manifest.json +++ b/manifest.json @@ -49,6 +49,10 @@ "en": "Is it a public application?", "fr": "Est-ce une application publique ?" }, + "help": { + "en": "If enabled, couchdb will be accessible without yunohost account on your server, but couchdb contains it's own user authentication system.", + "fr": "Si cette case est cochée, couchdb sera accessible aux personnes n’ayant pas de compte yunohost sur votre serveur, mais couchdb a son propre système d'autentification des utilisateurs." + }, "default": true }, { diff --git a/scripts/install b/scripts/install index d07021f..6481707 100755 --- a/scripts/install +++ b/scripts/install @@ -102,7 +102,7 @@ couchdb couchdb/adminpass_again password ${COUCHDB_PASSWORD} couchdb couchdb/adminpass_again seen true" | debconf-set-selections DEBIAN_FRONTEND=noninteractive # apt-get install -y --force-yes couchdb -sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61 +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61 ynh_install_extra_app_dependencies --repo="https://apache.bintray.com/couchdb-deb buster main" --package="couchdb" # ynh_install_extra_app_dependencies --repo="https://apache.bintray.com/couchdb-deb buster main" --package="couchdb" --key="https://apache.bintray.com/couchdb-deb/dists/buster/Release.gpg" diff --git a/scripts/restore b/scripts/restore index f7468c4..cb458e4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -94,7 +94,7 @@ couchdb couchdb/adminpass_again password ${COUCHDB_PASSWORD} couchdb couchdb/adminpass_again seen true" | debconf-set-selections DEBIAN_FRONTEND=noninteractive # apt-get install -y --force-yes couchdb -sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61 +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61 # ynh_add_app_dependencies --package="ca-certificates" # done before, when installing dependencies ynh_install_extra_app_dependencies --repo="https://apache.bintray.com/couchdb-deb buster main" --package="couchdb"