mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
commit
fe2e459982
12 changed files with 30 additions and 23 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
Online storage, file sharing platform and various other applications
|
Online storage, file sharing platform and various other applications
|
||||||
|
|
||||||
**Shipped version:** 23.0.8~ynh1
|
**Shipped version:** 24.0.4~ynh1
|
||||||
|
|
||||||
|
|
||||||
**Demo:** https://demo.nextcloud.com/
|
**Demo:** https://demo.nextcloud.com/
|
||||||
|
|
|
@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
Stockage en ligne, plateforme de partage de fichiers et diverses autres applications
|
Stockage en ligne, plateforme de partage de fichiers et diverses autres applications
|
||||||
|
|
||||||
**Version incluse :** 23.0.8~ynh1
|
**Version incluse :** 24.0.4~ynh1
|
||||||
|
|
||||||
|
|
||||||
**Démo :** https://demo.nextcloud.com/
|
**Démo :** https://demo.nextcloud.com/
|
||||||
|
|
|
@ -13,10 +13,8 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
#21.0.2
|
#22.2.9
|
||||||
upgrade=1 from_commit=e249cced99423d8e6743312361f140c1fbdc3a1d
|
upgrade=1 from_commit=f565b6d216f5340f752e6d6a21a14abc3811e0e7
|
||||||
#22.2.3
|
|
||||||
upgrade=1 from_commit=892f02888f31b6a0da850a5f8b2e66a151f84750
|
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
change_url=1
|
change_url=1
|
||||||
|
@ -24,8 +22,6 @@
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=e249cced99423d8e6743312361f140c1fbdc3a1d
|
; commit=f565b6d216f5340f752e6d6a21a14abc3811e0e7
|
||||||
name=Merge pull request #446 from YunoHost-Apps/22.2.0
|
name=Merge pull request #495 from YunoHost-Apps/22.2.9
|
||||||
; commit=892f02888f31b6a0da850a5f8b2e66a151f84750
|
|
||||||
name=Merge pull request #457 from YunoHost-Apps/testing
|
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Online storage, file sharing platform and various other applications",
|
"en": "Online storage, file sharing platform and various other applications",
|
||||||
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
||||||
},
|
},
|
||||||
"version": "23.0.8~ynh1",
|
"version": "24.0.4~ynh1",
|
||||||
"url": "https://nextcloud.com",
|
"url": "https://nextcloud.com",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
YNH_PHP_VERSION="8.0"
|
YNH_PHP_VERSION="8.0"
|
||||||
pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath"
|
pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
|
|
|
@ -65,8 +65,9 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_script_progression --message="Creating a MySQL database..." --weight=2
|
ynh_script_progression --message="Creating a MySQL database..." --weight=2
|
||||||
|
|
||||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||||
|
db_user=$db_name
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
|
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -160,7 +161,7 @@ admin_password="$(ynh_string_random --length=6)"
|
||||||
# Install Nextcloud using a temporary admin user
|
# Install Nextcloud using a temporary admin user
|
||||||
exec_occ maintenance:install \
|
exec_occ maintenance:install \
|
||||||
--database "mysql" --database-name $db_name \
|
--database "mysql" --database-name $db_name \
|
||||||
--database-user $db_name --database-pass "$db_pwd" \
|
--database-user $db_user --database-pass "$db_pwd" \
|
||||||
--admin-user "admin" --admin-pass "$admin_password" \
|
--admin-user "admin" --admin-pass "$admin_password" \
|
||||||
--data-dir "$datadir" \
|
--data-dir "$datadir" \
|
||||||
|| ynh_die --message="Unable to install Nextcloud"
|
|| ynh_die --message="Unable to install Nextcloud"
|
||||||
|
@ -255,7 +256,7 @@ exec_occ config:system:set overwrite.cli.url --value="https://${domain}"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set the user as admin
|
# Set the user as admin
|
||||||
ynh_mysql_connect_as --user=$db_name --password="$db_pwd" --database=$db_name \
|
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
|
||||||
<<< "INSERT INTO oc_group_user VALUES ('admin','$admin');"
|
<<< "INSERT INTO oc_group_user VALUES ('admin','$admin');"
|
||||||
# And delete admin user
|
# And delete admin user
|
||||||
exec_occ user:delete admin
|
exec_occ user:delete admin
|
||||||
|
|
|
@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
db_user=$db_name
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ ynh_remove_app_dependencies
|
||||||
ynh_script_progression --message="Removing the MySQL database..." --weight=5
|
ynh_script_progression --message="Removing the MySQL database..." --weight=5
|
||||||
|
|
||||||
# Remove a database if it exists, along with the associated user
|
# Remove a database if it exists, along with the associated user
|
||||||
ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name
|
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
|
|
|
@ -27,6 +27,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
db_user=$db_name
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
|
|
||||||
|
@ -71,8 +72,8 @@ ynh_restore_file --origin_path="$final_path"
|
||||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=9
|
ynh_script_progression --message="Restoring the MySQL database..." --weight=9
|
||||||
|
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd
|
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||||
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql
|
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
|
|
|
@ -21,6 +21,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
db_user=$db_name
|
||||||
user_home=$(ynh_app_setting_get --app=$app --key=user_home)
|
user_home=$(ynh_app_setting_get --app=$app --key=user_home)
|
||||||
|
|
||||||
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
||||||
|
|
7
scripts/upgrade.d/upgrade.23.sh
Normal file
7
scripts/upgrade.d/upgrade.23.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Last available Nextcloud version
|
||||||
|
next_version="24.0.0"
|
||||||
|
|
||||||
|
# Nextcloud tarball checksum sha256
|
||||||
|
nextcloud_source_sha256="176cb5620f20465fb4759bdf3caaebeb7acff39d6c8630351af9f8738c173780"
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Last available Nextcloud version
|
# Last available Nextcloud version
|
||||||
next_version="23.0.8"
|
next_version="24.0.4"
|
||||||
|
|
||||||
# Nextcloud tarball checksum sha256
|
# Nextcloud tarball checksum sha256
|
||||||
nextcloud_source_sha256="ac3d042253399be25a2aa01c799dec75a1459b6ae453874414f6528cc2ee5061"
|
nextcloud_source_sha256="d107426f8e1c193db882a04c844f9bc7e7eeb7c21e46c46197e5154d6d6ac28e"
|
||||||
|
|
|
@ -12,6 +12,6 @@ index e9ecf00036..8e69c8d2dc 100644
|
||||||
- protected $evalScriptAllowed = false;
|
- protected $evalScriptAllowed = false;
|
||||||
+ // YunoHost patch: allow for eval in JS scripts for YunoHost tile
|
+ // YunoHost patch: allow for eval in JS scripts for YunoHost tile
|
||||||
+ protected $evalScriptAllowed = true;
|
+ protected $evalScriptAllowed = true;
|
||||||
/** @var array Domains from which scripts can get loaded */
|
/** @var bool Whether strict-dynamic should be set */
|
||||||
protected $allowedScriptDomains = [
|
protected $strictDynamicAllowed = null;
|
||||||
'\'self\'',
|
/** @var array Domains from which scripts can get loaded */
|
||||||
|
|
Loading…
Add table
Reference in a new issue