From e81116ecdfa2443e02b026ca774a1d56c848ae6f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 3 May 2024 03:38:30 +0200 Subject: [PATCH 01/41] Upgrade to v2024.05.02 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 52a324f..a2ca376 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.04.09~ynh1" +version = "2024.05.02~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/568044ee48a20bdb930f9f140f17227d19cb1219.tar.gz" - sha256 = "61e2602c76f8c8a635656d99db6725c802261e383411d71095cf9710149567f6" + url = "https://github.com/overleaf/overleaf/archive/fb05c0bb825fdcb37ed07d1c7f60ff0cf90ca9b0.tar.gz" + sha256 = "6364f975bcaea96895185c3f805c40ae1a1ddcbbbb2d87078adf59d6061731f4" autoupdate.strategy = "latest_github_commit" [resources.system_user] From dc1948adaceec017a496cfc16d6bd7aa404d4684 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 3 May 2024 01:38:33 +0000 Subject: [PATCH 02/41] Auto-update READMEs --- README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 63c9d8e..5ecdfd7 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.04.09~ynh1 +**Shipped version:** 2024.05.02~ynh1 ## Screenshots diff --git a/README_eu.md b/README_eu.md index c3c5dfe..89b0b1d 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.04.09~ynh1 +**Paketatutako bertsioa:** 2024.05.02~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 1757761..0267992 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.04.09~ynh1 +**Version incluse :** 2024.05.02~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index cef4184..3abff58 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.04.09~ynh1 +**Versión proporcionada:** 2024.05.02~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 6b40153..ac0f088 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.04.09~ynh1 +**分发版本:** 2024.05.02~ynh1 ## 截图 From e150ef6bca05f0302f5918ee80ad486aa7a18f62 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 4 May 2024 03:39:50 +0200 Subject: [PATCH 03/41] Upgrade to v2024.05.03 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index a2ca376..cc1b980 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.02~ynh1" +version = "2024.05.03~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/fb05c0bb825fdcb37ed07d1c7f60ff0cf90ca9b0.tar.gz" - sha256 = "6364f975bcaea96895185c3f805c40ae1a1ddcbbbb2d87078adf59d6061731f4" + url = "https://github.com/overleaf/overleaf/archive/9729befe594ce269e1ff94d891756beed1b199cf.tar.gz" + sha256 = "a7f061e6fd765c82e5cbeaf82575354a3405f5afd8357240772074bfd507211f" autoupdate.strategy = "latest_github_commit" [resources.system_user] From 68289e9758e20c8f46c09ead51600e7614ae7ce3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 4 May 2024 01:39:52 +0000 Subject: [PATCH 04/41] Auto-update READMEs --- README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5ecdfd7..beed235 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.02~ynh1 +**Shipped version:** 2024.05.03~ynh1 ## Screenshots diff --git a/README_eu.md b/README_eu.md index 89b0b1d..b89942e 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.02~ynh1 +**Paketatutako bertsioa:** 2024.05.03~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 0267992..c275bf8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.02~ynh1 +**Version incluse :** 2024.05.03~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 3abff58..982b338 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.02~ynh1 +**Versión proporcionada:** 2024.05.03~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index ac0f088..858f184 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.02~ynh1 +**分发版本:** 2024.05.03~ynh1 ## 截图 From cc6ee922efc907abe351cb36d54a77205e2f4687 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 5 May 2024 09:10:36 +0200 Subject: [PATCH 05/41] Update mongo to 7.0 to make it bookworm compatible --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 890562e..1580550 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -14,7 +14,7 @@ nodejs_version=18.20.2 # EXPERIMENTAL HELPERS #================================================= -readonly YNH_DEFAULT_MONGO_VERSION=5.0 +readonly YNH_DEFAULT_MONGO_VERSION=7.0 # Declare the actual MongoDB version to use: 4.4 ; 5.0 ; 6.0 # A packager willing to use another version of MongoDB can override the variable into its _common.sh. YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} From 408cb717cc2436d6af781c08cc6510421ff35ded Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 5 May 2024 09:11:41 +0200 Subject: [PATCH 06/41] Update tests.toml --- tests.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests.toml b/tests.toml index 86bb299..c592762 100644 --- a/tests.toml +++ b/tests.toml @@ -3,3 +3,4 @@ test_format = 1.0 [default] test_upgrade_from.c5e7ec1.name = "Overleaf 4.x" +test_upgrade_from.405228e.name = "2024-04-09" From 616cd4b291317f014ebbc508aada26d79ebdd8be Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 5 May 2024 09:16:20 +0200 Subject: [PATCH 07/41] make arm compabible --- scripts/_common.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1580550..4f0efd7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -333,12 +333,24 @@ ynh_install_mongo() { ynh_print_warn --message="Installing Mongo 4.4 as $mongo_version is not compatible with your CPU (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)." mongo_version="4.4" fi + if [[ "$mongo_version" == "4.4" && "$mongo_debian_release" != "buster" ]]; then ynh_print_warn --message="Switched to Buster install as Mongo 4.4 is not compatible with $mongo_debian_release." mongo_debian_release=buster fi + + if [ "$mongo_debian_release" == buster ] ; then + ubuntu_version="bionic" + elif [ "$mongo_debian_release" == bullseye ] ; then + ubuntu_version="focal" + elif [ "$mongo_debian_release" == bookworm ] ; then + ubuntu_version="jammy" + fi - ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="mongodb-org-server mongodb-org-shell mongodb-database-tools" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" + ynh_install_extra_app_dependencies \ + --repo="deb https://repo.mongodb.org/apt/ubuntu $ubuntu_version/mongodb-org/$mongo_version multiverse" \ + --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" \ + --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" mongodb_servicename=mongod # Make sure MongoDB is started and enabled @@ -376,4 +388,4 @@ ynh_remove_mongo() { #================================================= # FUTURE OFFICIAL HELPERS -#================================================= +#================================================= \ No newline at end of file From 3a6050bf9aaa573f2a50c00245cb84aabb5de50e Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 5 May 2024 09:32:21 +0200 Subject: [PATCH 08/41] fix mongo helper --- scripts/_common.sh | 414 ++++++++++++++++++++++----------------------- 1 file changed, 207 insertions(+), 207 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 4f0efd7..97417a8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -15,7 +15,7 @@ nodejs_version=18.20.2 #================================================= readonly YNH_DEFAULT_MONGO_VERSION=7.0 -# Declare the actual MongoDB version to use: 4.4 ; 5.0 ; 6.0 +# Declare the actual MongoDB version to use: 7.0 ; 8.0 # A packager willing to use another version of MongoDB can override the variable into its _common.sh. YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} @@ -25,100 +25,100 @@ YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} # example: ynh_mongo_exec --command="db.getMongo().getDBNames().indexOf(\"wekan\")" # # usage: ynh_mongo_exec [--user=user] [--password=password] [--authenticationdatabase=authenticationdatabase] [--database=database] [--host=host] [--port=port] --command="command" [--eval] -# | arg: -u, --user= - The user name to connect as -# | arg: -p, --password= - The user password -# | arg: -d, --authenticationdatabase= - The authenticationdatabase to connect to -# | arg: -d, --database= - The database to connect to -# | arg: -h, --host= - The host to connect to -# | arg: -P, --port= - The port to connect to -# | arg: -c, --command= - The command to evaluate -# | arg: -e, --eval - Evaluate instead of execute the command. +# | arg: -u, --user= - The user name to connect as +# | arg: -p, --password= - The user password +# | arg: -d, --authenticationdatabase= - The authenticationdatabase to connect to +# | arg: -d, --database= - The database to connect to +# | arg: -h, --host= - The host to connect to +# | arg: -P, --port= - The port to connect to +# | arg: -c, --command= - The command to evaluate +# | arg: -e, --eval - Evaluate instead of execute the command. # # ynh_mongo_exec() { - # Declare an array to define the options of this helper. - local legacy_args=upadhPce - local -A args_array=( [u]=user= [p]=password= [a]=authenticationdatabase= [d]=database= [h]=host= [P]=port= [c]=command= [e]=eval ) - local user - local password - local authenticationdatabase - local database - local host - local port - local command - local eval - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - user="${user:-}" - password="${password:-}" - authenticationdatabase="${authenticationdatabase:-}" - database="${database:-}" - host="${host:-}" - port="${port:-}" - eval=${eval:-0} + # Declare an array to define the options of this helper. + local legacy_args=upadhPce + local -A args_array=( [u]=user= [p]=password= [a]=authenticationdatabase= [d]=database= [h]=host= [P]=port= [c]=command= [e]=eval ) + local user + local password + local authenticationdatabase + local database + local host + local port + local command + local eval + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + user="${user:-}" + password="${password:-}" + authenticationdatabase="${authenticationdatabase:-}" + database="${database:-}" + host="${host:-}" + port="${port:-}" + eval=${eval:-0} - # If user is provided - if [ -n "$user" ] - then - user="--username=$user" + # If user is provided + if [ -n "$user" ] + then + user="--username=$user" + + # If password is provided + if [ -n "$password" ] + then + password="--password=$password" + fi - # If password is provided - if [ -n "$password" ] - then - password="--password=$password" - fi + # If authenticationdatabase is provided + if [ -n "$authenticationdatabase" ] + then + authenticationdatabase="--authenticationDatabase=$authenticationdatabase" + else + authenticationdatabase="--authenticationDatabase=admin" + fi + else + password="" + authenticationdatabase="" + fi - # If authenticationdatabase is provided - if [ -n "$authenticationdatabase" ] - then - authenticationdatabase="--authenticationDatabase=$authenticationdatabase" - else - authenticationdatabase="--authenticationDatabase=admin" - fi - else - password="" - authenticationdatabase="" - fi + # If host is provided + if [ -n "$host" ] + then + host="--host=$host" + fi - # If host is provided - if [ -n "$host" ] - then - host="--host=$host" - fi + # If port is provided + if [ -n "$port" ] + then + port="--port=$port" + fi - # If port is provided - if [ -n "$port" ] - then - port="--port=$port" - fi + # If eval is not provided + if [ $eval -eq 0 ] + then + # If database is provided + if [ -n "$database" ] + then + database="use $database" + else + database="" + fi - # If eval is not provided - if [ $eval -eq 0 ] - then - # If database is provided - if [ -n "$database" ] - then - database="use $database" - else - database="" - fi - - mongo --quiet $user $password $authenticationdatabase $host $port < ./dump.bson # # usage: ynh_mongo_dump_db --database=database -# | arg: -d, --database= - The database name to dump +# | arg: -d, --database= - The database name to dump # | ret: the mongodump output # # ynh_mongo_dump_db() { - # Declare an array to define the options of this helper. - local legacy_args=d - local -A args_array=( [d]=database= ) - local database - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=d + local -A args_array=( [d]=database= ) + local database + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - mongodump --quiet --db="$database" --archive + mongodump --quiet --db="$database" --archive } # Create a user @@ -168,49 +168,49 @@ ynh_mongo_dump_db() { # [internal] # # usage: ynh_mongo_create_user --db_user=user --db_pwd=pwd --db_name=name -# | arg: -u, --db_user= - The user name to create -# | arg: -p, --db_pwd= - The password to identify user by -# | arg: -n, --db_name= - Name of the database to grant privilegies +# | arg: -u, --db_user= - The user name to create +# | arg: -p, --db_pwd= - The password to identify user by +# | arg: -n, --db_name= - Name of the database to grant privilegies # # ynh_mongo_create_user() { - # Declare an array to define the options of this helper. - local legacy_args=unp - local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) - local db_user - local db_name - local db_pwd - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=unp + local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) + local db_user + local db_name + local db_pwd + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - # Create the user and set the user as admin of the db - ynh_mongo_exec --database="$db_name" --command='db.createUser( { user: "'${db_user}'", pwd: "'${db_pwd}'", roles: [ { role: "readWrite", db: "'${db_name}'" } ] } );' - - # Add clustermonitoring rights - ynh_mongo_exec --database="$db_name" --command='db.grantRolesToUser("'${db_user}'",[{ role: "clusterMonitor", db: "admin" }]);' + # Create the user and set the user as admin of the db + ynh_mongo_exec --database="$db_name" --command='db.createUser( { user: "'${db_user}'", pwd: "'${db_pwd}'", roles: [ { role: "readWrite", db: "'${db_name}'" } ] } );' + + # Add clustermonitoring rights + ynh_mongo_exec --database="$db_name" --command='db.grantRolesToUser("'${db_user}'",[{ role: "clusterMonitor", db: "admin" }]);' } # Check if a mongo database exists # # usage: ynh_mongo_database_exists --database=database -# | arg: -d, --database= - The database for which to check existence +# | arg: -d, --database= - The database for which to check existence # | exit: Return 1 if the database doesn't exist, 0 otherwise # # ynh_mongo_database_exists() { - # Declare an array to define the options of this helper. - local legacy_args=d - local -A args_array=([d]=database=) - local database - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=d + local -A args_array=([d]=database=) + local database + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - if [ $(ynh_mongo_exec --command='db.getMongo().getDBNames().indexOf("'${database}'")' --eval) -lt 0 ] - then - return 1 - else - return 0 - fi + if [ $(ynh_mongo_exec --command='db.getMongo().getDBNames().indexOf("'${database}'")' --eval) -lt 0 ] + then + return 1 + else + return 0 + fi } # Restore a database @@ -218,18 +218,18 @@ ynh_mongo_database_exists() { # example: ynh_mongo_restore_db --database=wekan < ./dump.bson # # usage: ynh_mongo_restore_db --database=database -# | arg: -d, --database= - The database name to restore +# | arg: -d, --database= - The database name to restore # # ynh_mongo_restore_db() { - # Declare an array to define the options of this helper. - local legacy_args=d - local -A args_array=( [d]=database= ) - local database - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=d + local -A args_array=( [d]=database= ) + local database + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - mongorestore --quiet --db="$database" --archive + mongorestore --quiet --db="$database" --archive } # Drop a user @@ -237,94 +237,94 @@ ynh_mongo_restore_db() { # [internal] # # usage: ynh_mongo_drop_user --db_user=user --db_name=name -# | arg: -u, --db_user= - The user to drop -# | arg: -n, --db_name= - Name of the database +# | arg: -u, --db_user= - The user to drop +# | arg: -n, --db_name= - Name of the database # # ynh_mongo_drop_user() { - # Declare an array to define the options of this helper. - local legacy_args=un - local -A args_array=( [u]=db_user= [n]=db_name= ) - local db_user - local db_name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=un + local -A args_array=( [u]=db_user= [n]=db_name= ) + local db_user + local db_name + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - ynh_mongo_exec --database="$db_name" --command='db.dropUser("'$db_user'", {w: "majority", wtimeout: 5000})' + ynh_mongo_exec --database="$db_name" --command='db.dropUser("'$db_user'", {w: "majority", wtimeout: 5000})' } # Create a database, an user and its password. Then store the password in the app's config # # usage: ynh_mongo_setup_db --db_user=user --db_name=name [--db_pwd=pwd] -# | arg: -u, --db_user= - Owner of the database -# | arg: -n, --db_name= - Name of the database -# | arg: -p, --db_pwd= - Password of the database. If not provided, a password will be generated +# | arg: -u, --db_user= - Owner of the database +# | arg: -n, --db_name= - Name of the database +# | arg: -p, --db_pwd= - Password of the database. If not provided, a password will be generated # # After executing this helper, the password of the created database will be available in $db_pwd # It will also be stored as "mongopwd" into the app settings. # # ynh_mongo_setup_db() { - # Declare an array to define the options of this helper. - local legacy_args=unp - local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) - local db_user - local db_name - db_pwd="" - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=unp + local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) + local db_user + local db_name + db_pwd="" + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - local new_db_pwd=$(ynh_string_random) # Generate a random password - # If $db_pwd is not provided, use new_db_pwd instead for db_pwd - db_pwd="${db_pwd:-$new_db_pwd}" + local new_db_pwd=$(ynh_string_random) # Generate a random password + # If $db_pwd is not provided, use new_db_pwd instead for db_pwd + db_pwd="${db_pwd:-$new_db_pwd}" + + # Create the user and grant access to the database + ynh_mongo_create_user --db_user="$db_user" --db_pwd="$db_pwd" --db_name="$db_name" - # Create the user and grant access to the database - ynh_mongo_create_user --db_user="$db_user" --db_pwd="$db_pwd" --db_name="$db_name" - - # Store the password in the app's config - ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd + # Store the password in the app's config + ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd } # Remove a database if it exists, and the associated user # # usage: ynh_mongo_remove_db --db_user=user --db_name=name -# | arg: -u, --db_user= - Owner of the database -# | arg: -n, --db_name= - Name of the database +# | arg: -u, --db_user= - Owner of the database +# | arg: -n, --db_name= - Name of the database # # ynh_mongo_remove_db() { - # Declare an array to define the options of this helper. - local legacy_args=un - local -A args_array=( [u]=db_user= [n]=db_name= ) - local db_user - local db_name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=un + local -A args_array=( [u]=db_user= [n]=db_name= ) + local db_user + local db_name + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - if ynh_mongo_database_exists --database=$db_name; then # Check if the database exists - ynh_mongo_drop_db --database=$db_name # Remove the database - else - ynh_print_warn --message="Database $db_name not found" - fi + if ynh_mongo_database_exists --database=$db_name; then # Check if the database exists + ynh_mongo_drop_db --database=$db_name # Remove the database + else + ynh_print_warn --message="Database $db_name not found" + fi - # Remove mongo user if it exists - ynh_mongo_drop_user --db_user=$db_user --db_name=$db_name + # Remove mongo user if it exists + ynh_mongo_drop_user --db_user=$db_user --db_name=$db_name } # Install MongoDB and integrate MongoDB service in YunoHost # # usage: ynh_install_mongo [--mongo_version=mongo_version] -# | arg: -m, --mongo_version= - Version of MongoDB to install +# | arg: -m, --mongo_version= - Version of MongoDB to install # # ynh_install_mongo() { - # Declare an array to define the options of this helper. - local legacy_args=m - local -A args_array=([m]=mongo_version=) - local mongo_version - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" + # Declare an array to define the options of this helper. + local legacy_args=m + local -A args_array=([m]=mongo_version=) + local mongo_version + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" ynh_print_info --message="Installing MongoDB Community Edition..." local mongo_debian_release=bullseye #$(ynh_get_debian_release) @@ -353,17 +353,16 @@ ynh_install_mongo() { --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" mongodb_servicename=mongod - # Make sure MongoDB is started and enabled - systemctl enable $mongodb_servicename --quiet - systemctl daemon-reload --quiet + # Make sure MongoDB is started and enabled + systemctl enable $mongodb_servicename --quiet + systemctl daemon-reload --quiet + ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log" - ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log" + # Integrate MongoDB service in YunoHost + yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log" - # Integrate MongoDB service in YunoHost - yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log" - - # Store mongo_version into the config of this app - ynh_app_setting_set --app=$app --key=mongo_version --value=$mongo_version + # Store mongo_version into the config of this app + ynh_app_setting_set --app=$app --key=mongo_version --value=$mongo_version } # Remove MongoDB @@ -374,18 +373,19 @@ ynh_install_mongo() { # # ynh_remove_mongo() { - # Only remove the mongodb service if it is not installed. - if ! ynh_package_is_installed --package="mongodb*" - then - ynh_print_info --message="Removing MongoDB service..." - mongodb_servicename=mongod - # Remove the mongodb service - yunohost service remove $mongodb_servicename - ynh_secure_remove --file="/var/lib/mongodb" - ynh_secure_remove --file="/var/log/mongodb" - fi + # Only remove the mongodb service if it is not installed. + if ! ynh_package_is_installed --package="mongodb*" + then + ynh_print_info --message="Removing MongoDB service..." + mongodb_servicename=mongod + # Remove the mongodb service + yunohost service remove $mongodb_servicename + ynh_secure_remove --file="/var/lib/mongodb" + ynh_secure_remove --file="/var/log/mongodb" + fi } + #================================================= # FUTURE OFFICIAL HELPERS #================================================= \ No newline at end of file From 5ece985195d6f11589141d36e83c806d3c54345a Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 5 May 2024 10:02:18 +0200 Subject: [PATCH 09/41] fix mongo --- scripts/_common.sh | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 97417a8..9cf9bfa 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -326,32 +326,9 @@ ynh_install_mongo() { ynh_handle_getopts_args "$@" mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" - ynh_print_info --message="Installing MongoDB Community Edition..." - local mongo_debian_release=bullseye #$(ynh_get_debian_release) - - if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then - ynh_print_warn --message="Installing Mongo 4.4 as $mongo_version is not compatible with your CPU (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)." - mongo_version="4.4" - fi - - if [[ "$mongo_version" == "4.4" && "$mongo_debian_release" != "buster" ]]; then - ynh_print_warn --message="Switched to Buster install as Mongo 4.4 is not compatible with $mongo_debian_release." - mongo_debian_release=buster - fi - - if [ "$mongo_debian_release" == buster ] ; then - ubuntu_version="bionic" - elif [ "$mongo_debian_release" == bullseye ] ; then - ubuntu_version="focal" - elif [ "$mongo_debian_release" == bookworm ] ; then - ubuntu_version="jammy" - fi - - ynh_install_extra_app_dependencies \ - --repo="deb https://repo.mongodb.org/apt/ubuntu $ubuntu_version/mongodb-org/$mongo_version multiverse" \ - --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" \ - --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" - mongodb_servicename=mongod + ynh_print_info --message="Installing MongoDB Community Edition..." + ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian buster/mongodb-org/$mongo_version main" --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" + mongodb_servicename=mongod # Make sure MongoDB is started and enabled systemctl enable $mongodb_servicename --quiet From dd18eaf1818c0d5a1596a6aad6ebabd697ea067c Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 5 May 2024 12:35:23 +0200 Subject: [PATCH 10/41] fix --- scripts/_common.sh | 50 ++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 9cf9bfa..578c43c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=18.20.2 +nodejs_version="14.21.3" #================================================= # PERSONAL HELPERS @@ -15,7 +15,7 @@ nodejs_version=18.20.2 #================================================= readonly YNH_DEFAULT_MONGO_VERSION=7.0 -# Declare the actual MongoDB version to use: 7.0 ; 8.0 +# Declare the actual MongoDB version to use: 4.4; 5.0; 6.0 # A packager willing to use another version of MongoDB can override the variable into its _common.sh. YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} @@ -61,7 +61,7 @@ ynh_mongo_exec() { if [ -n "$user" ] then user="--username=$user" - + # If password is provided if [ -n "$password" ] then @@ -116,7 +116,7 @@ EOF else database="" fi - + mongosh --quiet $database --username $user --password $password --authenticationDatabase $authenticationdatabase --host $host --port $port --eval="$command" fi } @@ -185,7 +185,7 @@ ynh_mongo_create_user() { # Create the user and set the user as admin of the db ynh_mongo_exec --database="$db_name" --command='db.createUser( { user: "'${db_user}'", pwd: "'${db_pwd}'", roles: [ { role: "readWrite", db: "'${db_name}'" } ] } );' - + # Add clustermonitoring rights ynh_mongo_exec --database="$db_name" --command='db.grantRolesToUser("'${db_user}'",[{ role: "clusterMonitor", db: "admin" }]);' } @@ -277,12 +277,12 @@ ynh_mongo_setup_db() { local new_db_pwd=$(ynh_string_random) # Generate a random password # If $db_pwd is not provided, use new_db_pwd instead for db_pwd db_pwd="${db_pwd:-$new_db_pwd}" - + # Create the user and grant access to the database ynh_mongo_create_user --db_user="$db_user" --db_pwd="$db_pwd" --db_name="$db_name" # Store the password in the app's config - ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd + ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd } # Remove a database if it exists, and the associated user @@ -326,20 +326,36 @@ ynh_install_mongo() { ynh_handle_getopts_args "$@" mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" + debian=$(lsb_release --codename --short) + ynh_print_info --message="Installing MongoDB Community Edition..." - ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian buster/mongodb-org/$mongo_version main" --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" - mongodb_servicename=mongod + local mongo_debian_release=bullseye #$(ynh_get_debian_release) + + if [ "$mongo_debian_release" == buster ] ; then + ubuntu_version="bionic" + elif [ "$mongo_debian_release" == bullseye ] ; then + ubuntu_version="focal" + elif [ "$mongo_debian_release" == bookworm ] ; then + ubuntu_version="jammy" + fi - # Make sure MongoDB is started and enabled - systemctl enable $mongodb_servicename --quiet - systemctl daemon-reload --quiet - ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log" + ynh_install_extra_app_dependencies \ + --repo="deb https://repo.mongodb.org/apt/ubuntu $ubuntu_version/mongodb-org/$mongo_version multiverse" \ + --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" \ + --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" + mongodb_servicename=mongod - # Integrate MongoDB service in YunoHost - yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log" + # Make sure MongoDB is started and enabled + systemctl enable $mongodb_servicename --quiet + systemctl daemon-reload --quiet - # Store mongo_version into the config of this app - ynh_app_setting_set --app=$app --key=mongo_version --value=$mongo_version + ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log" + + # Integrate MongoDB service in YunoHost + yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log" + + # Store mongo_version into the config of this app + ynh_app_setting_set --app=$app --key=mongo_version --value=$mongo_version } # Remove MongoDB From 6591118608f1c4a87a18cee2f2f1b678b5b82fcb Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 5 May 2024 12:47:38 +0200 Subject: [PATCH 11/41] Update _common.sh --- scripts/_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 578c43c..fd830c1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version="14.21.3" +nodejs_version="18.20.2" #================================================= # PERSONAL HELPERS @@ -329,7 +329,7 @@ ynh_install_mongo() { debian=$(lsb_release --codename --short) ynh_print_info --message="Installing MongoDB Community Edition..." - local mongo_debian_release=bullseye #$(ynh_get_debian_release) + local mongo_debian_release=$(ynh_get_debian_release) if [ "$mongo_debian_release" == buster ] ; then ubuntu_version="bionic" @@ -381,4 +381,4 @@ ynh_remove_mongo() { #================================================= # FUTURE OFFICIAL HELPERS -#================================================= \ No newline at end of file +#================================================= From a34f0a4ac541ceca2af9cc5b9811c09b8c5315c1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 7 May 2024 03:39:32 +0200 Subject: [PATCH 12/41] Upgrade to v2024.05.06 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index cc1b980..bd5b275 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.03~ynh1" +version = "2024.05.06~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/9729befe594ce269e1ff94d891756beed1b199cf.tar.gz" - sha256 = "a7f061e6fd765c82e5cbeaf82575354a3405f5afd8357240772074bfd507211f" + url = "https://github.com/overleaf/overleaf/archive/5da8662fa8b9880ba57e268ae2df7b6ca7fa6b36.tar.gz" + sha256 = "57e3ce5c160000afa5d70a8dcfb61cb610e58e3fc269d5a61ac002b407a61574" autoupdate.strategy = "latest_github_commit" [resources.system_user] From c9cd1758c03eeac4bac28d34ea627baccd100e1e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 7 May 2024 01:39:35 +0000 Subject: [PATCH 13/41] Auto-update READMEs --- README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index beed235..751790a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.03~ynh1 +**Shipped version:** 2024.05.06~ynh1 ## Screenshots diff --git a/README_eu.md b/README_eu.md index b89942e..54ffb0a 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.03~ynh1 +**Paketatutako bertsioa:** 2024.05.06~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index c275bf8..5037c45 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.03~ynh1 +**Version incluse :** 2024.05.06~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 982b338..58cf56e 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.03~ynh1 +**Versión proporcionada:** 2024.05.06~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 858f184..f441191 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,7 +3,7 @@ 请勿手动编辑。 --> -# YunoHost 的 Overleaf +# YunoHost 上的 Overleaf [![集成程度](https://dash.yunohost.org/integration/overleaf.svg)](https://dash.yunohost.org/appci/app/overleaf) ![工作状态](https://ci-apps.yunohost.org/ci/badges/overleaf.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/overleaf.maintain.svg) @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.03~ynh1 +**分发版本:** 2024.05.06~ynh1 ## 截图 From 7bec7a62d5dc29b1c02a5da98c9fa879006d2ab1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 May 2024 03:41:21 +0200 Subject: [PATCH 14/41] Upgrade to v2024.05.09 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index bd5b275..3f29b6d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.06~ynh1" +version = "2024.05.09~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/5da8662fa8b9880ba57e268ae2df7b6ca7fa6b36.tar.gz" - sha256 = "57e3ce5c160000afa5d70a8dcfb61cb610e58e3fc269d5a61ac002b407a61574" + url = "https://github.com/overleaf/overleaf/archive/89f1f7733f11a8d05ef86094346adf409558f019.tar.gz" + sha256 = "3bd081576ad342b875ea01e67d21e40a1d197e60b1dc0a0427df8f284d7eea80" autoupdate.strategy = "latest_github_commit" [resources.system_user] From 20296f0bccb08db7b7633895a893285bc64bb015 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 May 2024 01:41:24 +0000 Subject: [PATCH 15/41] Auto-update READMEs --- README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 751790a..23e03d8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.06~ynh1 +**Shipped version:** 2024.05.09~ynh1 ## Screenshots diff --git a/README_eu.md b/README_eu.md index 54ffb0a..93aaa5a 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.06~ynh1 +**Paketatutako bertsioa:** 2024.05.09~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 5037c45..fcd3377 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.06~ynh1 +**Version incluse :** 2024.05.09~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 58cf56e..aaf25c0 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.06~ynh1 +**Versión proporcionada:** 2024.05.09~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index f441191..9885f0a 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.06~ynh1 +**分发版本:** 2024.05.09~ynh1 ## 截图 From 7985ec867e9e86feb2585cf1bf42a75c4a182b1f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 11 May 2024 03:39:59 +0200 Subject: [PATCH 16/41] Upgrade to v2024.05.10 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 3f29b6d..6ebeaf6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.09~ynh1" +version = "2024.05.10~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/89f1f7733f11a8d05ef86094346adf409558f019.tar.gz" - sha256 = "3bd081576ad342b875ea01e67d21e40a1d197e60b1dc0a0427df8f284d7eea80" + url = "https://github.com/overleaf/overleaf/archive/b979ff8ad831bcfaae50fef667237cb8887d6fb7.tar.gz" + sha256 = "382d7a13642e80203f0c3120a10e12716cbe61efa338c14ad1d7b5f1a70c5102" autoupdate.strategy = "latest_github_commit" [resources.system_user] From 4ad14f1fcb4c347d3731180468fca3878e15df75 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 11 May 2024 01:40:04 +0000 Subject: [PATCH 17/41] Auto-update READMEs --- README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 23e03d8..75ece5e 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.09~ynh1 +**Shipped version:** 2024.05.10~ynh1 ## Screenshots diff --git a/README_eu.md b/README_eu.md index 93aaa5a..4cad1bf 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.09~ynh1 +**Paketatutako bertsioa:** 2024.05.10~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index fcd3377..9d87b74 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.09~ynh1 +**Version incluse :** 2024.05.10~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index aaf25c0..56ff06a 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.09~ynh1 +**Versión proporcionada:** 2024.05.10~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 9885f0a..244c381 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.09~ynh1 +**分发版本:** 2024.05.10~ynh1 ## 截图 From 1bbe343be2cc407bb5da59b9da3e77d8b183c52d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 16 May 2024 03:41:35 +0200 Subject: [PATCH 18/41] Upgrade to v2024.05.15 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 6ebeaf6..ef25575 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.10~ynh1" +version = "2024.05.15~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/b979ff8ad831bcfaae50fef667237cb8887d6fb7.tar.gz" - sha256 = "382d7a13642e80203f0c3120a10e12716cbe61efa338c14ad1d7b5f1a70c5102" + url = "https://github.com/overleaf/overleaf/archive/424348724dcebde87f01c2f0ea4f1c82fa43901c.tar.gz" + sha256 = "a695fea8caf5dcef08aa6468333d693def86af3cc00a6c800e712cecbe1558c8" autoupdate.strategy = "latest_github_commit" [resources.system_user] From d4a677e10253bfa511c3008c9223943393187790 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 16 May 2024 01:41:37 +0000 Subject: [PATCH 19/41] Auto-update READMEs --- ALL_README.md | 1 + README.md | 2 +- README_es.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++ README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 7 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 README_es.md diff --git a/ALL_README.md b/ALL_README.md index a01b345..8938aae 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Lee el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README.md b/README.md index 75ece5e..51a6792 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.10~ynh1 +**Shipped version:** 2024.05.15~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..2269143 --- /dev/null +++ b/README_es.md @@ -0,0 +1,48 @@ + + +# Overleaf para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/overleaf.svg)](https://dash.yunohost.org/appci/app/overleaf) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/overleaf.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/overleaf.maintain.svg) + +[![Instalar Overleaf con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=overleaf) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarOverleaf rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +Overleaf is an open-source online real-time collaborative LaTeX editor. + + +**Versión actual:** 2024.05.15~ynh1 + +## Capturas + +![Captura de Overleaf](./doc/screenshots/screenshot.png) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación usuario oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/overleaf_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/overleaf_ynh/tree/testing --debug +o +sudo yunohost app upgrade overleaf -u https://github.com/YunoHost-Apps/overleaf_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_eu.md b/README_eu.md index 4cad1bf..01d110f 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.10~ynh1 +**Paketatutako bertsioa:** 2024.05.15~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 9d87b74..54b118f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.10~ynh1 +**Version incluse :** 2024.05.15~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 56ff06a..c2f8ef2 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.10~ynh1 +**Versión proporcionada:** 2024.05.15~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 244c381..1dc0de6 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.10~ynh1 +**分发版本:** 2024.05.15~ynh1 ## 截图 From 9de63c972b03c01adf6c2b58658d78a5870d5668 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 16 May 2024 13:40:59 +0200 Subject: [PATCH 20/41] change mongo version --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index fd830c1..4585917 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -14,7 +14,7 @@ nodejs_version="18.20.2" # EXPERIMENTAL HELPERS #================================================= -readonly YNH_DEFAULT_MONGO_VERSION=7.0 +readonly YNH_DEFAULT_MONGO_VERSION=6.0 # Declare the actual MongoDB version to use: 4.4; 5.0; 6.0 # A packager willing to use another version of MongoDB can override the variable into its _common.sh. YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} From 3d76c3583f0c6dfc31404c8510936b3a02700551 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 16 May 2024 11:41:04 +0000 Subject: [PATCH 21/41] Auto-update READMEs --- ALL_README.md | 1 + README_es.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 README_es.md diff --git a/ALL_README.md b/ALL_README.md index a01b345..8938aae 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Lee el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..219b0ab --- /dev/null +++ b/README_es.md @@ -0,0 +1,48 @@ + + +# Overleaf para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/overleaf.svg)](https://dash.yunohost.org/appci/app/overleaf) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/overleaf.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/overleaf.maintain.svg) + +[![Instalar Overleaf con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=overleaf) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarOverleaf rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +Overleaf is an open-source online real-time collaborative LaTeX editor. + + +**Versión actual:** 2024.05.03~ynh1 + +## Capturas + +![Captura de Overleaf](./doc/screenshots/screenshot.png) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación usuario oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/overleaf_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/overleaf_ynh/tree/testing --debug +o +sudo yunohost app upgrade overleaf -u https://github.com/YunoHost-Apps/overleaf_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 858f184..fe29a08 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,7 +3,7 @@ 请勿手动编辑。 --> -# YunoHost 的 Overleaf +# YunoHost 上的 Overleaf [![集成程度](https://dash.yunohost.org/integration/overleaf.svg)](https://dash.yunohost.org/appci/app/overleaf) ![工作状态](https://ci-apps.yunohost.org/ci/badges/overleaf.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/overleaf.maintain.svg) From 627d345d113b160c70d162f1d33d32a31fbaad3c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 16 May 2024 11:41:25 +0000 Subject: [PATCH 22/41] 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 28c25ef..2269143 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Overleaf is an open-source online real-time collaborative LaTeX editor. - +**Versión actual:** 2024.05.15~ynh1 ## Capturas From 1b0bb70691a6ede4e03315f76cc8fd54ec32d4c1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 17 May 2024 03:47:10 +0200 Subject: [PATCH 23/41] Upgrade to v2024.05.16 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index ef25575..f5902a1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.15~ynh1" +version = "2024.05.16~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/424348724dcebde87f01c2f0ea4f1c82fa43901c.tar.gz" - sha256 = "a695fea8caf5dcef08aa6468333d693def86af3cc00a6c800e712cecbe1558c8" + url = "https://github.com/overleaf/overleaf/archive/97add912488d2c05e34a12c9354f8cba31bbe7cb.tar.gz" + sha256 = "817ea0bb1bacfa9aa959e62c54095b9a09ed6a8db54ee9a8c971974b44b36d6e" autoupdate.strategy = "latest_github_commit" [resources.system_user] From 05fd207d66643e9345a09d0c9411592616d204cc Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 17 May 2024 01:47:12 +0000 Subject: [PATCH 24/41] 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 51a6792..e8d972a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.15~ynh1 +**Shipped version:** 2024.05.16~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index 2269143..78b2b20 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión actual:** 2024.05.15~ynh1 +**Versión actual:** 2024.05.16~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index 01d110f..874311a 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.15~ynh1 +**Paketatutako bertsioa:** 2024.05.16~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 54b118f..c0b70c8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.15~ynh1 +**Version incluse :** 2024.05.16~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index c2f8ef2..02a7709 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.15~ynh1 +**Versión proporcionada:** 2024.05.16~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 1dc0de6..678ecce 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.15~ynh1 +**分发版本:** 2024.05.16~ynh1 ## 截图 From 5734c53d8ee93239ce44ad49ce5d69d0a2a92f9a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 18 May 2024 03:41:50 +0200 Subject: [PATCH 25/41] Upgrade to v2024.05.17 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index f5902a1..0679551 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.16~ynh1" +version = "2024.05.17~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/97add912488d2c05e34a12c9354f8cba31bbe7cb.tar.gz" - sha256 = "817ea0bb1bacfa9aa959e62c54095b9a09ed6a8db54ee9a8c971974b44b36d6e" + url = "https://github.com/overleaf/overleaf/archive/e8fe5abc8275dd8d2dbde10efb9ab6c59fcfc21d.tar.gz" + sha256 = "d0dd5c3ef84915739b9624ca5b37a466fb9af28eba387c430b61c73b26740555" autoupdate.strategy = "latest_github_commit" [resources.system_user] From 8e4db1196102cb22edb7b4d0d7178a724be4b3fb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 18 May 2024 01:41:52 +0000 Subject: [PATCH 26/41] 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 e8d972a..6ef011c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.16~ynh1 +**Shipped version:** 2024.05.17~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index 78b2b20..ee32e88 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión actual:** 2024.05.16~ynh1 +**Versión actual:** 2024.05.17~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index 874311a..cf026d9 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.16~ynh1 +**Paketatutako bertsioa:** 2024.05.17~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index c0b70c8..ab3aded 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.16~ynh1 +**Version incluse :** 2024.05.17~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 02a7709..8fd517d 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.16~ynh1 +**Versión proporcionada:** 2024.05.17~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 678ecce..209d8c9 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.16~ynh1 +**分发版本:** 2024.05.17~ynh1 ## 截图 From d6b55bcca504527ef05bc196993e11ff0e34b965 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 21 May 2024 03:40:51 +0200 Subject: [PATCH 27/41] Upgrade to v2024.05.19 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 0679551..f796583 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.17~ynh1" +version = "2024.05.19~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/e8fe5abc8275dd8d2dbde10efb9ab6c59fcfc21d.tar.gz" - sha256 = "d0dd5c3ef84915739b9624ca5b37a466fb9af28eba387c430b61c73b26740555" + url = "https://github.com/overleaf/overleaf/archive/e9d4d26fec1819d897d32ac805cd157dd4a06475.tar.gz" + sha256 = "660e3d0d3bff382559c2590d5f097d99819cdb4f4d35bf25d290b680d5bf3630" autoupdate.strategy = "latest_github_commit" [resources.system_user] From 0ac01c94e45b2483062866465228ebdeccd166c2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 21 May 2024 01:40:54 +0000 Subject: [PATCH 28/41] Auto-update READMEs --- ALL_README.md | 2 +- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ALL_README.md b/ALL_README.md index 8938aae..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,7 +1,7 @@ # All available README files by language - [Read the README in English](README.md) -- [Lee el README en español](README_es.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README.md b/README.md index 6ef011c..28c04a2 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.17~ynh1 +**Shipped version:** 2024.05.19~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index ee32e88..511a1a9 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión actual:** 2024.05.17~ynh1 +**Versión actual:** 2024.05.19~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index cf026d9..4319bbc 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.17~ynh1 +**Paketatutako bertsioa:** 2024.05.19~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index ab3aded..a3c82f1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.17~ynh1 +**Version incluse :** 2024.05.19~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 8fd517d..42165c2 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.17~ynh1 +**Versión proporcionada:** 2024.05.19~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 209d8c9..623f394 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.17~ynh1 +**分发版本:** 2024.05.19~ynh1 ## 截图 From c8905d9aca93fad2eb4c7ee59cb4af1c972cafb2 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 21 May 2024 22:12:10 +0200 Subject: [PATCH 29/41] fixes --- scripts/install | 4 +++- scripts/upgrade | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 88c32ef..2b98cf0 100755 --- a/scripts/install +++ b/scripts/install @@ -132,9 +132,11 @@ cp "$install_dir/build/server-ce/config/custom-environment-variables.json" "$ins ynh_secure_remove --file="$install_dir/build" -ynh_script_progression --message="Building app..." +ynh_script_progression --message="Building app... This may take a LOT of time depending of your CPU" --weight=25 pushd "$install_dir/live" ynh_use_nodejs + ynh_exec_warn_less npm cache clean --force + ynh_exec_warn_less npm install ynh_exec_warn_less npm ci popd diff --git a/scripts/upgrade b/scripts/upgrade index 38c9358..6ac7be2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -153,7 +153,8 @@ cp "$install_dir/build/server-ce/config/custom-environment-variables.json" "$ins ynh_script_progression --message="Building app... This may take a LOT of time depending of your CPU" --weight=25 pushd "$install_dir/live" ynh_use_nodejs - ynh_exec_warn_less npm install + ynh_exec_warn_less npm cache clean --force + ynh_exec_warn_less npm install ynh_exec_warn_less npm ci popd From ec4cdd1f261db2fab07691843c8b6823ab8f1d96 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 22 May 2024 03:41:40 +0200 Subject: [PATCH 30/41] Upgrade to v2024.05.20 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index f796583..d7f044c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.19~ynh1" +version = "2024.05.20~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/e9d4d26fec1819d897d32ac805cd157dd4a06475.tar.gz" - sha256 = "660e3d0d3bff382559c2590d5f097d99819cdb4f4d35bf25d290b680d5bf3630" + url = "https://github.com/overleaf/overleaf/archive/d56f5a303087f0ad44f23870de4a5fb455997fdb.tar.gz" + sha256 = "fd422cdba0124758bdf7162ed925536a53c423945e1336817a99a62a288faa50" autoupdate.strategy = "latest_github_commit" [resources.system_user] From a4d4912499eb5bc2cf15351fb6e5f611f4be908b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 22 May 2024 01:41:43 +0000 Subject: [PATCH 31/41] 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 28c04a2..dabcecf 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.19~ynh1 +**Shipped version:** 2024.05.20~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index 511a1a9..50713c6 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión actual:** 2024.05.19~ynh1 +**Versión actual:** 2024.05.20~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index 4319bbc..1f82936 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.19~ynh1 +**Paketatutako bertsioa:** 2024.05.20~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index a3c82f1..a279d1c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.19~ynh1 +**Version incluse :** 2024.05.20~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 42165c2..b07a407 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.19~ynh1 +**Versión proporcionada:** 2024.05.20~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 623f394..04fd709 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.19~ynh1 +**分发版本:** 2024.05.20~ynh1 ## 截图 From fe77aa3df36a25b5d9526799237dac7e5e75cfff Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 28 May 2024 03:41:17 +0200 Subject: [PATCH 32/41] Upgrade to v2024.05.27 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index d7f044c..aca722f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.20~ynh1" +version = "2024.05.27~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/d56f5a303087f0ad44f23870de4a5fb455997fdb.tar.gz" - sha256 = "fd422cdba0124758bdf7162ed925536a53c423945e1336817a99a62a288faa50" + url = "https://github.com/overleaf/overleaf/archive/485710538dd692dacff70cf14a61e03f6da0fe2a.tar.gz" + sha256 = "a5c89e5aaf22012d008a86319be104944391a6e6719bc94bea636f52ea4c5e53" autoupdate.strategy = "latest_github_commit" [resources.system_user] From 2b95fe83663c38d411bb4f4d07874dc70b7f1110 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 28 May 2024 01:41:19 +0000 Subject: [PATCH 33/41] 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 dabcecf..217235f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.20~ynh1 +**Shipped version:** 2024.05.27~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index 50713c6..d376a7c 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión actual:** 2024.05.20~ynh1 +**Versión actual:** 2024.05.27~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index 1f82936..f2153f4 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.20~ynh1 +**Paketatutako bertsioa:** 2024.05.27~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index a279d1c..90c6e35 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.20~ynh1 +**Version incluse :** 2024.05.27~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index b07a407..9381578 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.20~ynh1 +**Versión proporcionada:** 2024.05.27~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 04fd709..9b69311 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.20~ynh1 +**分发版本:** 2024.05.27~ynh1 ## 截图 From 74e998ddcf0340a617c3950928c2675777d5401e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 30 May 2024 03:42:34 +0200 Subject: [PATCH 34/41] Upgrade to v2024.05.28 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index aca722f..0cd8e92 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.27~ynh1" +version = "2024.05.28~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/485710538dd692dacff70cf14a61e03f6da0fe2a.tar.gz" - sha256 = "a5c89e5aaf22012d008a86319be104944391a6e6719bc94bea636f52ea4c5e53" + url = "https://github.com/overleaf/overleaf/archive/2fa002e7e9b46f3fc6b84e8c93f52dc57375883d.tar.gz" + sha256 = "2f9a2037a18ce93036ab203904e581cbe6b13f3a9e2ea721abfc402f883fd0c9" autoupdate.strategy = "latest_github_commit" [resources.system_user] From 4c5a85d7845ceae7da5872f1f541e7ce6176e515 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 30 May 2024 01:42:35 +0000 Subject: [PATCH 35/41] 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 217235f..2ee4ed1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.27~ynh1 +**Shipped version:** 2024.05.28~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index d376a7c..30d89f2 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión actual:** 2024.05.27~ynh1 +**Versión actual:** 2024.05.28~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index f2153f4..c8e5719 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.27~ynh1 +**Paketatutako bertsioa:** 2024.05.28~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 90c6e35..b6a47df 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.27~ynh1 +**Version incluse :** 2024.05.28~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 9381578..544b99d 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.27~ynh1 +**Versión proporcionada:** 2024.05.28~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 9b69311..2b70b74 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.27~ynh1 +**分发版本:** 2024.05.28~ynh1 ## 截图 From 8fcc4479b91256ea90c9a4ec6f13193c3dcd81b2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 1 Jun 2024 03:41:15 +0200 Subject: [PATCH 36/41] Upgrade to v2024.05.31 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 0cd8e92..45d049a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Overleaf" description.en = "Online real-time collaborative LaTeX editor" description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel" -version = "2024.05.28~ynh1" +version = "2024.05.31~ynh1" maintainers = [] @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/2fa002e7e9b46f3fc6b84e8c93f52dc57375883d.tar.gz" - sha256 = "2f9a2037a18ce93036ab203904e581cbe6b13f3a9e2ea721abfc402f883fd0c9" + url = "https://github.com/overleaf/overleaf/archive/f89ee54fdc96c9cef942d8963ed0949bce77a5d3.tar.gz" + sha256 = "8b98259048bd10790adff8e364f9916c84c45209db8ec0f745481a0cd2d7b367" autoupdate.strategy = "latest_github_commit" [resources.system_user] From 8ee293438e4f8e5e584bc8d3249806fd5ead2af5 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 1 Jun 2024 01:41:17 +0000 Subject: [PATCH 37/41] 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 2ee4ed1..4397c8a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Shipped version:** 2024.05.28~ynh1 +**Shipped version:** 2024.05.31~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index 30d89f2..8c0984e 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión actual:** 2024.05.28~ynh1 +**Versión actual:** 2024.05.31~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index c8e5719..ee595d9 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Paketatutako bertsioa:** 2024.05.28~ynh1 +**Paketatutako bertsioa:** 2024.05.31~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index b6a47df..5246a5b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Overleaf est un éditeur LaTeX collaboratif en ligne et en temps réel open source. -**Version incluse :** 2024.05.28~ynh1 +**Version incluse :** 2024.05.31~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 544b99d..447701f 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Overleaf is an open-source online real-time collaborative LaTeX editor. -**Versión proporcionada:** 2024.05.28~ynh1 +**Versión proporcionada:** 2024.05.31~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 2b70b74..ef0e005 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Overleaf is an open-source online real-time collaborative LaTeX editor. -**分发版本:** 2024.05.28~ynh1 +**分发版本:** 2024.05.31~ynh1 ## 截图 From 524c13f3b61b2dda3525bbcc17ef76239d2c00c8 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sat, 1 Jun 2024 18:09:47 +0200 Subject: [PATCH 38/41] mongo version compatible bookworm but for now let still install 4.0 for avx-less servers --- scripts/_common.sh | 417 ++++++++++++++++++++++----------------------- 1 file changed, 206 insertions(+), 211 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 4585917..4ecbc75 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version="18.20.2" +nodejs_version=18.20.2 #================================================= # PERSONAL HELPERS @@ -15,7 +15,7 @@ nodejs_version="18.20.2" #================================================= readonly YNH_DEFAULT_MONGO_VERSION=6.0 -# Declare the actual MongoDB version to use: 4.4; 5.0; 6.0 +# Declare the actual MongoDB version to use: 4.4 ; 5.0 ; 6.0 # A packager willing to use another version of MongoDB can override the variable into its _common.sh. YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} @@ -25,100 +25,100 @@ YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} # example: ynh_mongo_exec --command="db.getMongo().getDBNames().indexOf(\"wekan\")" # # usage: ynh_mongo_exec [--user=user] [--password=password] [--authenticationdatabase=authenticationdatabase] [--database=database] [--host=host] [--port=port] --command="command" [--eval] -# | arg: -u, --user= - The user name to connect as -# | arg: -p, --password= - The user password -# | arg: -d, --authenticationdatabase= - The authenticationdatabase to connect to -# | arg: -d, --database= - The database to connect to -# | arg: -h, --host= - The host to connect to -# | arg: -P, --port= - The port to connect to -# | arg: -c, --command= - The command to evaluate -# | arg: -e, --eval - Evaluate instead of execute the command. +# | arg: -u, --user= - The user name to connect as +# | arg: -p, --password= - The user password +# | arg: -d, --authenticationdatabase= - The authenticationdatabase to connect to +# | arg: -d, --database= - The database to connect to +# | arg: -h, --host= - The host to connect to +# | arg: -P, --port= - The port to connect to +# | arg: -c, --command= - The command to evaluate +# | arg: -e, --eval - Evaluate instead of execute the command. # # ynh_mongo_exec() { - # Declare an array to define the options of this helper. - local legacy_args=upadhPce - local -A args_array=( [u]=user= [p]=password= [a]=authenticationdatabase= [d]=database= [h]=host= [P]=port= [c]=command= [e]=eval ) - local user - local password - local authenticationdatabase - local database - local host - local port - local command - local eval - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - user="${user:-}" - password="${password:-}" - authenticationdatabase="${authenticationdatabase:-}" - database="${database:-}" - host="${host:-}" - port="${port:-}" - eval=${eval:-0} + # Declare an array to define the options of this helper. + local legacy_args=upadhPce + local -A args_array=( [u]=user= [p]=password= [a]=authenticationdatabase= [d]=database= [h]=host= [P]=port= [c]=command= [e]=eval ) + local user + local password + local authenticationdatabase + local database + local host + local port + local command + local eval + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + user="${user:-}" + password="${password:-}" + authenticationdatabase="${authenticationdatabase:-}" + database="${database:-}" + host="${host:-}" + port="${port:-}" + eval=${eval:-0} - # If user is provided - if [ -n "$user" ] - then - user="--username=$user" + # If user is provided + if [ -n "$user" ] + then + user="--username=$user" - # If password is provided - if [ -n "$password" ] - then - password="--password=$password" - fi + # If password is provided + if [ -n "$password" ] + then + password="--password=$password" + fi - # If authenticationdatabase is provided - if [ -n "$authenticationdatabase" ] - then - authenticationdatabase="--authenticationDatabase=$authenticationdatabase" - else - authenticationdatabase="--authenticationDatabase=admin" - fi - else - password="" - authenticationdatabase="" - fi + # If authenticationdatabase is provided + if [ -n "$authenticationdatabase" ] + then + authenticationdatabase="--authenticationDatabase=$authenticationdatabase" + else + authenticationdatabase="--authenticationDatabase=admin" + fi + else + password="" + authenticationdatabase="" + fi - # If host is provided - if [ -n "$host" ] - then - host="--host=$host" - fi + # If host is provided + if [ -n "$host" ] + then + host="--host=$host" + fi - # If port is provided - if [ -n "$port" ] - then - port="--port=$port" - fi + # If port is provided + if [ -n "$port" ] + then + port="--port=$port" + fi - # If eval is not provided - if [ $eval -eq 0 ] - then - # If database is provided - if [ -n "$database" ] - then - database="use $database" - else - database="" - fi + # If eval is not provided + if [ $eval -eq 0 ] + then + # If database is provided + if [ -n "$database" ] + then + database="use $database" + else + database="" + fi - mongosh --quiet --username $user --password $password --authenticationDatabase $authenticationdatabase --host $host --port $port < ./dump.bson # # usage: ynh_mongo_dump_db --database=database -# | arg: -d, --database= - The database name to dump +# | arg: -d, --database= - The database name to dump # | ret: the mongodump output # # ynh_mongo_dump_db() { - # Declare an array to define the options of this helper. - local legacy_args=d - local -A args_array=( [d]=database= ) - local database - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=d + local -A args_array=( [d]=database= ) + local database + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - mongodump --quiet --db="$database" --archive + mongodump --quiet --db="$database" --archive } # Create a user @@ -168,49 +168,49 @@ ynh_mongo_dump_db() { # [internal] # # usage: ynh_mongo_create_user --db_user=user --db_pwd=pwd --db_name=name -# | arg: -u, --db_user= - The user name to create -# | arg: -p, --db_pwd= - The password to identify user by -# | arg: -n, --db_name= - Name of the database to grant privilegies +# | arg: -u, --db_user= - The user name to create +# | arg: -p, --db_pwd= - The password to identify user by +# | arg: -n, --db_name= - Name of the database to grant privilegies # # ynh_mongo_create_user() { - # Declare an array to define the options of this helper. - local legacy_args=unp - local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) - local db_user - local db_name - local db_pwd - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=unp + local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) + local db_user + local db_name + local db_pwd + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - # Create the user and set the user as admin of the db - ynh_mongo_exec --database="$db_name" --command='db.createUser( { user: "'${db_user}'", pwd: "'${db_pwd}'", roles: [ { role: "readWrite", db: "'${db_name}'" } ] } );' + # Create the user and set the user as admin of the db + ynh_mongo_exec --database="$db_name" --command='db.createUser( { user: "'${db_user}'", pwd: "'${db_pwd}'", roles: [ { role: "readWrite", db: "'${db_name}'" } ] } );' - # Add clustermonitoring rights - ynh_mongo_exec --database="$db_name" --command='db.grantRolesToUser("'${db_user}'",[{ role: "clusterMonitor", db: "admin" }]);' + # Add clustermonitoring rights + ynh_mongo_exec --database="$db_name" --command='db.grantRolesToUser("'${db_user}'",[{ role: "clusterMonitor", db: "admin" }]);' } # Check if a mongo database exists # # usage: ynh_mongo_database_exists --database=database -# | arg: -d, --database= - The database for which to check existence +# | arg: -d, --database= - The database for which to check existence # | exit: Return 1 if the database doesn't exist, 0 otherwise # # ynh_mongo_database_exists() { - # Declare an array to define the options of this helper. - local legacy_args=d - local -A args_array=([d]=database=) - local database - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=d + local -A args_array=([d]=database=) + local database + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - if [ $(ynh_mongo_exec --command='db.getMongo().getDBNames().indexOf("'${database}'")' --eval) -lt 0 ] - then - return 1 - else - return 0 - fi + if [ $(ynh_mongo_exec --command='db.getMongo().getDBNames().indexOf("'${database}'")' --eval) -lt 0 ] + then + return 1 + else + return 0 + fi } # Restore a database @@ -218,18 +218,18 @@ ynh_mongo_database_exists() { # example: ynh_mongo_restore_db --database=wekan < ./dump.bson # # usage: ynh_mongo_restore_db --database=database -# | arg: -d, --database= - The database name to restore +# | arg: -d, --database= - The database name to restore # # ynh_mongo_restore_db() { - # Declare an array to define the options of this helper. - local legacy_args=d - local -A args_array=( [d]=database= ) - local database - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=d + local -A args_array=( [d]=database= ) + local database + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - mongorestore --quiet --db="$database" --archive + mongorestore --quiet --db="$database" --archive } # Drop a user @@ -237,112 +237,108 @@ ynh_mongo_restore_db() { # [internal] # # usage: ynh_mongo_drop_user --db_user=user --db_name=name -# | arg: -u, --db_user= - The user to drop -# | arg: -n, --db_name= - Name of the database +# | arg: -u, --db_user= - The user to drop +# | arg: -n, --db_name= - Name of the database # # ynh_mongo_drop_user() { - # Declare an array to define the options of this helper. - local legacy_args=un - local -A args_array=( [u]=db_user= [n]=db_name= ) - local db_user - local db_name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=un + local -A args_array=( [u]=db_user= [n]=db_name= ) + local db_user + local db_name + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - ynh_mongo_exec --database="$db_name" --command='db.dropUser("'$db_user'", {w: "majority", wtimeout: 5000})' + ynh_mongo_exec --database="$db_name" --command='db.dropUser("'$db_user'", {w: "majority", wtimeout: 5000})' } # Create a database, an user and its password. Then store the password in the app's config # # usage: ynh_mongo_setup_db --db_user=user --db_name=name [--db_pwd=pwd] -# | arg: -u, --db_user= - Owner of the database -# | arg: -n, --db_name= - Name of the database -# | arg: -p, --db_pwd= - Password of the database. If not provided, a password will be generated +# | arg: -u, --db_user= - Owner of the database +# | arg: -n, --db_name= - Name of the database +# | arg: -p, --db_pwd= - Password of the database. If not provided, a password will be generated # # After executing this helper, the password of the created database will be available in $db_pwd # It will also be stored as "mongopwd" into the app settings. # # ynh_mongo_setup_db() { - # Declare an array to define the options of this helper. - local legacy_args=unp - local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) - local db_user - local db_name - db_pwd="" - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=unp + local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) + local db_user + local db_name + db_pwd="" + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - local new_db_pwd=$(ynh_string_random) # Generate a random password - # If $db_pwd is not provided, use new_db_pwd instead for db_pwd - db_pwd="${db_pwd:-$new_db_pwd}" + local new_db_pwd=$(ynh_string_random) # Generate a random password + # If $db_pwd is not provided, use new_db_pwd instead for db_pwd + db_pwd="${db_pwd:-$new_db_pwd}" - # Create the user and grant access to the database - ynh_mongo_create_user --db_user="$db_user" --db_pwd="$db_pwd" --db_name="$db_name" + # Create the user and grant access to the database + ynh_mongo_create_user --db_user="$db_user" --db_pwd="$db_pwd" --db_name="$db_name" - # Store the password in the app's config - ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd + # Store the password in the app's config + ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd } # Remove a database if it exists, and the associated user # # usage: ynh_mongo_remove_db --db_user=user --db_name=name -# | arg: -u, --db_user= - Owner of the database -# | arg: -n, --db_name= - Name of the database +# | arg: -u, --db_user= - Owner of the database +# | arg: -n, --db_name= - Name of the database # # ynh_mongo_remove_db() { - # Declare an array to define the options of this helper. - local legacy_args=un - local -A args_array=( [u]=db_user= [n]=db_name= ) - local db_user - local db_name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=un + local -A args_array=( [u]=db_user= [n]=db_name= ) + local db_user + local db_name + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - if ynh_mongo_database_exists --database=$db_name; then # Check if the database exists - ynh_mongo_drop_db --database=$db_name # Remove the database - else - ynh_print_warn --message="Database $db_name not found" - fi + if ynh_mongo_database_exists --database=$db_name; then # Check if the database exists + ynh_mongo_drop_db --database=$db_name # Remove the database + else + ynh_print_warn --message="Database $db_name not found" + fi - # Remove mongo user if it exists - ynh_mongo_drop_user --db_user=$db_user --db_name=$db_name + # Remove mongo user if it exists + ynh_mongo_drop_user --db_user=$db_user --db_name=$db_name } # Install MongoDB and integrate MongoDB service in YunoHost # # usage: ynh_install_mongo [--mongo_version=mongo_version] -# | arg: -m, --mongo_version= - Version of MongoDB to install +# | arg: -m, --mongo_version= - Version of MongoDB to install # # ynh_install_mongo() { - # Declare an array to define the options of this helper. - local legacy_args=m - local -A args_array=([m]=mongo_version=) - local mongo_version - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" + # Declare an array to define the options of this helper. + local legacy_args=m + local -A args_array=([m]=mongo_version=) + local mongo_version + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" - debian=$(lsb_release --codename --short) + ynh_print_info --message="Installing MongoDB Community Edition..." + local mongo_debian_release=bullseye #$(ynh_get_debian_release) - ynh_print_info --message="Installing MongoDB Community Edition..." - local mongo_debian_release=$(ynh_get_debian_release) - - if [ "$mongo_debian_release" == buster ] ; then - ubuntu_version="bionic" - elif [ "$mongo_debian_release" == bullseye ] ; then - ubuntu_version="focal" - elif [ "$mongo_debian_release" == bookworm ] ; then - ubuntu_version="jammy" + if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then + ynh_print_warn --message="Installing Mongo 4.4 as $mongo_version is not compatible with your CPU (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)." + mongo_version="4.4" + fi + if [[ "$mongo_version" == "4.4" && "$mongo_debian_release" != "buster" ]]; then + ynh_print_warn --message="Switched to Buster install as Mongo 4.4 is not compatible with $mongo_debian_release." + mongo_debian_release=buster fi - ynh_install_extra_app_dependencies \ - --repo="deb https://repo.mongodb.org/apt/ubuntu $ubuntu_version/mongodb-org/$mongo_version multiverse" \ - --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" \ - --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" + ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="mongodb-org-server mongodb-org-shell mongodb-database-tools" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" mongodb_servicename=mongod # Make sure MongoDB is started and enabled @@ -366,19 +362,18 @@ ynh_install_mongo() { # # ynh_remove_mongo() { - # Only remove the mongodb service if it is not installed. - if ! ynh_package_is_installed --package="mongodb*" - then - ynh_print_info --message="Removing MongoDB service..." - mongodb_servicename=mongod - # Remove the mongodb service - yunohost service remove $mongodb_servicename - ynh_secure_remove --file="/var/lib/mongodb" - ynh_secure_remove --file="/var/log/mongodb" - fi + # Only remove the mongodb service if it is not installed. + if ! ynh_package_is_installed --package="mongodb*" + then + ynh_print_info --message="Removing MongoDB service..." + mongodb_servicename=mongod + # Remove the mongodb service + yunohost service remove $mongodb_servicename + ynh_secure_remove --file="/var/lib/mongodb" + ynh_secure_remove --file="/var/log/mongodb" + fi } - #================================================= # FUTURE OFFICIAL HELPERS -#================================================= +#================================================= \ No newline at end of file From 31083415703edbacba72af42015d7eaaf1aa2108 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sat, 1 Jun 2024 18:11:04 +0200 Subject: [PATCH 39/41] remove old test --- tests.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests.toml b/tests.toml index c592762..80fa961 100644 --- a/tests.toml +++ b/tests.toml @@ -2,5 +2,4 @@ test_format = 1.0 [default] -test_upgrade_from.c5e7ec1.name = "Overleaf 4.x" test_upgrade_from.405228e.name = "2024-04-09" From e8d5f35ad2a58a2e029afae315aecba7fb902ee3 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sat, 1 Jun 2024 20:07:13 +0200 Subject: [PATCH 40/41] fix mongo --- scripts/_common.sh | 432 +++++++++++++++++++++------------------------ 1 file changed, 204 insertions(+), 228 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 4ecbc75..95cffb0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,146 +1,135 @@ -#!/bin/bash - -#================================================= # COMMON VARIABLES #================================================= -nodejs_version=18.20.2 +nodejs_version="18.20.2" #================================================= # PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS +@@ -15,7 +15,7 @@ nodejs_version="18.20.2" #================================================= readonly YNH_DEFAULT_MONGO_VERSION=6.0 -# Declare the actual MongoDB version to use: 4.4 ; 5.0 ; 6.0 +# Declare the actual MongoDB version to use: 4.4; 5.0; 6.0 # A packager willing to use another version of MongoDB can override the variable into its _common.sh. YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} -# Execute a mongo command -# -# example: ynh_mongo_exec --command='db.getMongo().getDBNames().indexOf("wekan")' +@@ -25,100 +25,100 @@ YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} # example: ynh_mongo_exec --command="db.getMongo().getDBNames().indexOf(\"wekan\")" # # usage: ynh_mongo_exec [--user=user] [--password=password] [--authenticationdatabase=authenticationdatabase] [--database=database] [--host=host] [--port=port] --command="command" [--eval] -# | arg: -u, --user= - The user name to connect as -# | arg: -p, --password= - The user password -# | arg: -d, --authenticationdatabase= - The authenticationdatabase to connect to -# | arg: -d, --database= - The database to connect to -# | arg: -h, --host= - The host to connect to -# | arg: -P, --port= - The port to connect to -# | arg: -c, --command= - The command to evaluate -# | arg: -e, --eval - Evaluate instead of execute the command. +# | arg: -u, --user= - The user name to connect as +# | arg: -p, --password= - The user password +# | arg: -d, --authenticationdatabase= - The authenticationdatabase to connect to +# | arg: -d, --database= - The database to connect to +# | arg: -h, --host= - The host to connect to +# | arg: -P, --port= - The port to connect to +# | arg: -c, --command= - The command to evaluate +# | arg: -e, --eval - Evaluate instead of execute the command. # # ynh_mongo_exec() { - # Declare an array to define the options of this helper. - local legacy_args=upadhPce - local -A args_array=( [u]=user= [p]=password= [a]=authenticationdatabase= [d]=database= [h]=host= [P]=port= [c]=command= [e]=eval ) - local user - local password - local authenticationdatabase - local database - local host - local port - local command - local eval - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - user="${user:-}" - password="${password:-}" - authenticationdatabase="${authenticationdatabase:-}" - database="${database:-}" - host="${host:-}" - port="${port:-}" - eval=${eval:-0} + # Declare an array to define the options of this helper. + local legacy_args=upadhPce + local -A args_array=( [u]=user= [p]=password= [a]=authenticationdatabase= [d]=database= [h]=host= [P]=port= [c]=command= [e]=eval ) + local user + local password + local authenticationdatabase + local database + local host + local port + local command + local eval + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + user="${user:-}" + password="${password:-}" + authenticationdatabase="${authenticationdatabase:-}" + database="${database:-}" + host="${host:-}" + port="${port:-}" + eval=${eval:-0} - # If user is provided - if [ -n "$user" ] - then - user="--username=$user" + # If user is provided + if [ -n "$user" ] + then + user="--username=$user" - # If password is provided - if [ -n "$password" ] - then - password="--password=$password" - fi + # If password is provided + if [ -n "$password" ] + then + password="--password=$password" + fi - # If authenticationdatabase is provided - if [ -n "$authenticationdatabase" ] - then - authenticationdatabase="--authenticationDatabase=$authenticationdatabase" - else - authenticationdatabase="--authenticationDatabase=admin" - fi - else - password="" - authenticationdatabase="" - fi + # If authenticationdatabase is provided + if [ -n "$authenticationdatabase" ] + then + authenticationdatabase="--authenticationDatabase=$authenticationdatabase" + else + authenticationdatabase="--authenticationDatabase=admin" + fi + else + password="" + authenticationdatabase="" + fi - # If host is provided - if [ -n "$host" ] - then - host="--host=$host" - fi + # If host is provided + if [ -n "$host" ] + then + host="--host=$host" + fi - # If port is provided - if [ -n "$port" ] - then - port="--port=$port" - fi + # If port is provided + if [ -n "$port" ] + then + port="--port=$port" + fi - # If eval is not provided - if [ $eval -eq 0 ] - then - # If database is provided - if [ -n "$database" ] - then - database="use $database" - else - database="" - fi + # If eval is not provided + if [ $eval -eq 0 ] + then + # If database is provided + if [ -n "$database" ] + then + database="use $database" + else + database="" + fi - mongo --quiet $user $password $authenticationdatabase $host $port < ./dump.bson # # usage: ynh_mongo_dump_db --database=database -# | arg: -d, --database= - The database name to dump +# | arg: -d, --database= - The database name to dump # | ret: the mongodump output # # ynh_mongo_dump_db() { - # Declare an array to define the options of this helper. - local legacy_args=d - local -A args_array=( [d]=database= ) - local database - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=d + local -A args_array=( [d]=database= ) + local database + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - mongodump --quiet --db="$database" --archive + mongodump --quiet --db="$database" --archive } # Create a user @@ -168,49 +157,49 @@ ynh_mongo_dump_db() { # [internal] # # usage: ynh_mongo_create_user --db_user=user --db_pwd=pwd --db_name=name -# | arg: -u, --db_user= - The user name to create -# | arg: -p, --db_pwd= - The password to identify user by -# | arg: -n, --db_name= - Name of the database to grant privilegies +# | arg: -u, --db_user= - The user name to create +# | arg: -p, --db_pwd= - The password to identify user by +# | arg: -n, --db_name= - Name of the database to grant privilegies # # ynh_mongo_create_user() { - # Declare an array to define the options of this helper. - local legacy_args=unp - local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) - local db_user - local db_name - local db_pwd - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=unp + local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) + local db_user + local db_name + local db_pwd + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - # Create the user and set the user as admin of the db - ynh_mongo_exec --database="$db_name" --command='db.createUser( { user: "'${db_user}'", pwd: "'${db_pwd}'", roles: [ { role: "readWrite", db: "'${db_name}'" } ] } );' + # Create the user and set the user as admin of the db + ynh_mongo_exec --database="$db_name" --command='db.createUser( { user: "'${db_user}'", pwd: "'${db_pwd}'", roles: [ { role: "readWrite", db: "'${db_name}'" } ] } );' - # Add clustermonitoring rights - ynh_mongo_exec --database="$db_name" --command='db.grantRolesToUser("'${db_user}'",[{ role: "clusterMonitor", db: "admin" }]);' + # Add clustermonitoring rights + ynh_mongo_exec --database="$db_name" --command='db.grantRolesToUser("'${db_user}'",[{ role: "clusterMonitor", db: "admin" }]);' } # Check if a mongo database exists # # usage: ynh_mongo_database_exists --database=database -# | arg: -d, --database= - The database for which to check existence +# | arg: -d, --database= - The database for which to check existence # | exit: Return 1 if the database doesn't exist, 0 otherwise # # ynh_mongo_database_exists() { - # Declare an array to define the options of this helper. - local legacy_args=d - local -A args_array=([d]=database=) - local database - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=d + local -A args_array=([d]=database=) + local database + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - if [ $(ynh_mongo_exec --command='db.getMongo().getDBNames().indexOf("'${database}'")' --eval) -lt 0 ] - then - return 1 - else - return 0 - fi + if [ $(ynh_mongo_exec --command='db.getMongo().getDBNames().indexOf("'${database}'")' --eval) -lt 0 ] + then + return 1 + else + return 0 + fi } # Restore a database @@ -218,18 +207,18 @@ ynh_mongo_database_exists() { # example: ynh_mongo_restore_db --database=wekan < ./dump.bson # # usage: ynh_mongo_restore_db --database=database -# | arg: -d, --database= - The database name to restore +# | arg: -d, --database= - The database name to restore # # ynh_mongo_restore_db() { - # Declare an array to define the options of this helper. - local legacy_args=d - local -A args_array=( [d]=database= ) - local database - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=d + local -A args_array=( [d]=database= ) + local database + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - mongorestore --quiet --db="$database" --archive + mongorestore --quiet --db="$database" --archive } # Drop a user @@ -237,97 +226,99 @@ ynh_mongo_restore_db() { # [internal] # # usage: ynh_mongo_drop_user --db_user=user --db_name=name -# | arg: -u, --db_user= - The user to drop -# | arg: -n, --db_name= - Name of the database +# | arg: -u, --db_user= - The user to drop +# | arg: -n, --db_name= - Name of the database # # ynh_mongo_drop_user() { - # Declare an array to define the options of this helper. - local legacy_args=un - local -A args_array=( [u]=db_user= [n]=db_name= ) - local db_user - local db_name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=un + local -A args_array=( [u]=db_user= [n]=db_name= ) + local db_user + local db_name + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - ynh_mongo_exec --database="$db_name" --command='db.dropUser("'$db_user'", {w: "majority", wtimeout: 5000})' + ynh_mongo_exec --database="$db_name" --command='db.dropUser("'$db_user'", {w: "majority", wtimeout: 5000})' } # Create a database, an user and its password. Then store the password in the app's config # # usage: ynh_mongo_setup_db --db_user=user --db_name=name [--db_pwd=pwd] -# | arg: -u, --db_user= - Owner of the database -# | arg: -n, --db_name= - Name of the database -# | arg: -p, --db_pwd= - Password of the database. If not provided, a password will be generated +# | arg: -u, --db_user= - Owner of the database +# | arg: -n, --db_name= - Name of the database +# | arg: -p, --db_pwd= - Password of the database. If not provided, a password will be generated # # After executing this helper, the password of the created database will be available in $db_pwd # It will also be stored as "mongopwd" into the app settings. # # ynh_mongo_setup_db() { - # Declare an array to define the options of this helper. - local legacy_args=unp - local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) - local db_user - local db_name - db_pwd="" - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=unp + local -A args_array=( [u]=db_user= [n]=db_name= [p]=db_pwd= ) + local db_user + local db_name + db_pwd="" + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - local new_db_pwd=$(ynh_string_random) # Generate a random password - # If $db_pwd is not provided, use new_db_pwd instead for db_pwd - db_pwd="${db_pwd:-$new_db_pwd}" + local new_db_pwd=$(ynh_string_random) # Generate a random password + # If $db_pwd is not provided, use new_db_pwd instead for db_pwd + db_pwd="${db_pwd:-$new_db_pwd}" - # Create the user and grant access to the database - ynh_mongo_create_user --db_user="$db_user" --db_pwd="$db_pwd" --db_name="$db_name" + # Create the user and grant access to the database + ynh_mongo_create_user --db_user="$db_user" --db_pwd="$db_pwd" --db_name="$db_name" - # Store the password in the app's config - ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd + # Store the password in the app's config + ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd } # Remove a database if it exists, and the associated user # # usage: ynh_mongo_remove_db --db_user=user --db_name=name -# | arg: -u, --db_user= - Owner of the database -# | arg: -n, --db_name= - Name of the database +# | arg: -u, --db_user= - Owner of the database +# | arg: -n, --db_name= - Name of the database # # ynh_mongo_remove_db() { - # Declare an array to define the options of this helper. - local legacy_args=un - local -A args_array=( [u]=db_user= [n]=db_name= ) - local db_user - local db_name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" + # Declare an array to define the options of this helper. + local legacy_args=un + local -A args_array=( [u]=db_user= [n]=db_name= ) + local db_user + local db_name + # Manage arguments with getopts + ynh_handle_getopts_args "$@" - if ynh_mongo_database_exists --database=$db_name; then # Check if the database exists - ynh_mongo_drop_db --database=$db_name # Remove the database - else - ynh_print_warn --message="Database $db_name not found" - fi + if ynh_mongo_database_exists --database=$db_name; then # Check if the database exists + ynh_mongo_drop_db --database=$db_name # Remove the database + else + ynh_print_warn --message="Database $db_name not found" + fi - # Remove mongo user if it exists - ynh_mongo_drop_user --db_user=$db_user --db_name=$db_name + # Remove mongo user if it exists + ynh_mongo_drop_user --db_user=$db_user --db_name=$db_name } # Install MongoDB and integrate MongoDB service in YunoHost # # usage: ynh_install_mongo [--mongo_version=mongo_version] -# | arg: -m, --mongo_version= - Version of MongoDB to install +# | arg: -m, --mongo_version= - Version of MongoDB to install # # ynh_install_mongo() { - # Declare an array to define the options of this helper. - local legacy_args=m - local -A args_array=([m]=mongo_version=) - local mongo_version - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" + # Declare an array to define the options of this helper. + local legacy_args=m + local -A args_array=([m]=mongo_version=) + local mongo_version + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" - ynh_print_info --message="Installing MongoDB Community Edition..." - local mongo_debian_release=bullseye #$(ynh_get_debian_release) + debian=$(lsb_release --codename --short) + + ynh_print_info --message="Installing MongoDB Community Edition..." + local mongo_debian_release=$(ynh_get_debian_release) if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then ynh_print_warn --message="Installing Mongo 4.4 as $mongo_version is not compatible with your CPU (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)." @@ -342,38 +333,23 @@ ynh_install_mongo() { mongodb_servicename=mongod # Make sure MongoDB is started and enabled - systemctl enable $mongodb_servicename --quiet - systemctl daemon-reload --quiet - - ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log" - - # Integrate MongoDB service in YunoHost - yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log" - - # Store mongo_version into the config of this app - ynh_app_setting_set --app=$app --key=mongo_version --value=$mongo_version -} - -# Remove MongoDB -# Only remove the MongoDB service integration in YunoHost for now -# if MongoDB package as been removed -# -# usage: ynh_remove_mongo +@@ -366,19 +362,18 @@ ynh_install_mongo() { # # ynh_remove_mongo() { - # Only remove the mongodb service if it is not installed. - if ! ynh_package_is_installed --package="mongodb*" - then - ynh_print_info --message="Removing MongoDB service..." - mongodb_servicename=mongod - # Remove the mongodb service - yunohost service remove $mongodb_servicename - ynh_secure_remove --file="/var/lib/mongodb" - ynh_secure_remove --file="/var/log/mongodb" - fi + # Only remove the mongodb service if it is not installed. + if ! ynh_package_is_installed --package="mongodb*" + then + ynh_print_info --message="Removing MongoDB service..." + mongodb_servicename=mongod + # Remove the mongodb service + yunohost service remove $mongodb_servicename + ynh_secure_remove --file="/var/lib/mongodb" + ynh_secure_remove --file="/var/log/mongodb" + fi } + #================================================= # FUTURE OFFICIAL HELPERS #================================================= \ No newline at end of file From 049b4e832e2a92f1bd5d9331419d3d79842c90bb Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sat, 1 Jun 2024 20:29:54 +0200 Subject: [PATCH 41/41] fix mongo --- scripts/_common.sh | 48 +++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 95cffb0..4d7f5aa 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -2,18 +2,23 @@ #================================================= nodejs_version="18.20.2" +YNH_DEFAULT_MONGO_VERSION=6.0 #================================================= # PERSONAL HELPERS -@@ -15,7 +15,7 @@ nodejs_version="18.20.2" #================================================= -readonly YNH_DEFAULT_MONGO_VERSION=6.0 +#================================================= +# FUTURE OFFICIAL HELPERS +#================================================= + # Declare the actual MongoDB version to use: 4.4; 5.0; 6.0 # A packager willing to use another version of MongoDB can override the variable into its _common.sh. YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} -@@ -25,100 +25,100 @@ YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} +# Execute a mongo command +# +# example: ynh_mongo_exec --command='db.getMongo().getDBNames().indexOf("wekan")' # example: ynh_mongo_exec --command="db.getMongo().getDBNames().indexOf(\"wekan\")" # # usage: ynh_mongo_exec [--user=user] [--password=password] [--authenticationdatabase=authenticationdatabase] [--database=database] [--host=host] [--port=port] --command="command" [--eval] @@ -114,7 +119,10 @@ EOF } # Drop a database -@@ -129,220 +129,216 @@ EOF +# +# [internal] +# +# If you intend to drop the database *and* the associated user, # consider using ynh_mongo_remove_db instead. # # usage: ynh_mongo_drop_db --database=database @@ -318,8 +326,6 @@ ynh_install_mongo() { debian=$(lsb_release --codename --short) ynh_print_info --message="Installing MongoDB Community Edition..." - local mongo_debian_release=$(ynh_get_debian_release) - if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then ynh_print_warn --message="Installing Mongo 4.4 as $mongo_version is not compatible with your CPU (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)." mongo_version="4.4" @@ -328,12 +334,29 @@ ynh_install_mongo() { ynh_print_warn --message="Switched to Buster install as Mongo 4.4 is not compatible with $mongo_debian_release." mongo_debian_release=buster fi + ynh_install_extra_app_dependencies \ + --repo="deb http://repo.mongodb.org/apt/debian $debian/mongodb-org/$mongo_version main" \ + --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" \ + --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" + mongodb_servicename=mongod - ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="mongodb-org-server mongodb-org-shell mongodb-database-tools" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" - mongodb_servicename=mongod + # Make sure MongoDB is started and enabled + systemctl enable $mongodb_servicename --quiet + systemctl daemon-reload --quiet + ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log" - # Make sure MongoDB is started and enabled -@@ -366,19 +362,18 @@ ynh_install_mongo() { + # Integrate MongoDB service in YunoHost + yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log" + + # Store mongo_version into the config of this app + ynh_app_setting_set --app=$app --key=mongo_version --value=$mongo_version +} + +# Remove MongoDB +# Only remove the MongoDB service integration in YunoHost for now +# if MongoDB package as been removed +# +# usage: ynh_remove_mongo # # ynh_remove_mongo() { @@ -348,8 +371,3 @@ ynh_remove_mongo() { ynh_secure_remove --file="/var/log/mongodb" fi } - - -#================================================= -# FUTURE OFFICIAL HELPERS -#================================================= \ No newline at end of file