From 4f48e8ac05796ddf3a2a9e32586142091e8feff6 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sun, 8 Sep 2019 02:08:21 +0200 Subject: [PATCH 1/5] Upgrade to 0.6.0 --- README.md | 2 +- conf/app.src | 4 ++-- conf/config.system.php | 2 +- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a587c66..b29635e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to [Baïkal](http://baikal-server.com/) is a CalDAV and CardDAV server, based on sabre/dav, that includes an administration interface for easy management. -**Shipped version:** 0.5.3 +**Shipped version:** 0.6.0 ## Screenshots diff --git a/conf/app.src b/conf/app.src index f07f48a..58ec45d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/sabre-io/Baikal/releases/download/0.5.3/baikal-0.5.3.zip -SOURCE_SUM=11e6971a3cdc4c0cfc36e82498809162b5a6cfb67545f0dbc5b9d9e0c28c93c0 +SOURCE_URL=https://github.com/sabre-io/Baikal/releases/download/0.6.0/baikal-0.6.0.zip +SOURCE_SUM=eeb5f43edf6b79b08c43274dbe38c29c076eb4a92300be3a20b02929c13088e8 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/config.system.php b/conf/config.system.php index 2399d76..64e7bb2 100644 --- a/conf/config.system.php +++ b/conf/config.system.php @@ -69,4 +69,4 @@ define("PROJECT_DB_MYSQL_PASSWORD", '__DBPASS__'); define("BAIKAL_ENCRYPTION_KEY", '__DESKEY__'); # The currently configured Baïkal version -define("BAIKAL_CONFIGURED_VERSION", '0.5.3'); +define("BAIKAL_CONFIGURED_VERSION", '0.6.0'); diff --git a/manifest.json b/manifest.json index 1e5856c..c4bc55a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Lightweight CalDAV+CardDAV server", "fr": "Serveur CalDAV+CardDAV léger" }, - "version": "0.5.3~ynh1", + "version": "0.6.0~ynh1", "url": "http://baikal-server.com/", "license": "GPL-3.0", "maintainer": { From 192e9f2439a4b4ae92c415403c0e69c5ca09d209 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 13 Mar 2020 23:47:28 +0100 Subject: [PATCH 2/5] avoid false modification detecion --- conf/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.php b/conf/config.php index 960773b..06495d5 100644 --- a/conf/config.php +++ b/conf/config.php @@ -59,4 +59,4 @@ define("BAIKAL_DAV_LDAP_DISPLAYNAME_ATTR", 'cn'); define("BAIKAL_DAV_LDAP_EMAIL_ATTR", 'mail'); # Baïkal Web admin password hash; Set via Baïkal Web Admin -define("BAIKAL_ADMIN_PASSWORDHASH", '__PASSWORDHASH__'); +define("BAIKAL_ADMIN_PASSWORDHASH", '__PASSWORDHASH__'); \ No newline at end of file From 42432469ddf8c1b56b4726074a39f95c779988d0 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 13 Mar 2020 23:48:46 +0100 Subject: [PATCH 3/5] fix encrypt_key --- scripts/upgrade | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2386a0a..559facb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,7 +141,7 @@ then ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$(cat /etc/timezone)" --target_file="$bk_conf" - password_hash=$(ynh_app_setting_get $app password_hash) + password_hash=$(ynh_app_setting_get --app=$app --key=password_hash) # If the password_hash is not in the app's config, recreate it from the password. if [ -z "$password_hash" ]; then password=$(ynh_app_setting_get --app=$app --key=password) @@ -163,10 +163,11 @@ then ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$bk_conf" ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$bk_conf" ynh_replace_string --match_string="__DBUSER__" --replace_string="$db_name" --target_file="$bk_conf" - db_pwd=$(ynh_app_setting_get $app mysqlpwd) + db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_replace_string --match_string="__DBPASS__" --replace_string="$db_pwd" --target_file="$bk_conf" - deskey=$(ynh_app_setting_get $app deskey) + + deskey=$(ynh_app_setting_get --app=$app --key=encrypt_key) ynh_replace_string --match_string="__DESKEY__" --replace_string="$deskey" --target_file="$bk_conf" # Store the config file checksum into the app settings From 64bd8a117f4b574de614b0c6b6dafb54c0de9909 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 13 Mar 2020 23:51:18 +0100 Subject: [PATCH 4/5] Keep Specific directory intact --- scripts/upgrade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 559facb..c598971 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -75,8 +75,16 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=3 + # Keep the Specific folder intact: https://sabre.io/baikal/upgrade/ + temp_folder=$(mktemp -d) + mv "$final_path/Specific" "$temp_folder" # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" + + ynh_secure_remove --file="$final_path/Specific" + + mv "$temp_folder/Specific" "$final_path" + ynh_secure_remove --file="$temp_folder" fi #================================================= From 8daaaaa01c9cd446d5e09bf11ca05fd0f5bf6625 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 13 Mar 2020 23:52:56 +0100 Subject: [PATCH 5/5] 0.6.1 --- README.md | 2 +- conf/app.src | 4 ++-- conf/config.system.php | 2 +- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b29635e..11cbf39 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to [Baïkal](http://baikal-server.com/) is a CalDAV and CardDAV server, based on sabre/dav, that includes an administration interface for easy management. -**Shipped version:** 0.6.0 +**Shipped version:** 0.6.1 ## Screenshots diff --git a/conf/app.src b/conf/app.src index 58ec45d..dc0f4b6 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/sabre-io/Baikal/releases/download/0.6.0/baikal-0.6.0.zip -SOURCE_SUM=eeb5f43edf6b79b08c43274dbe38c29c076eb4a92300be3a20b02929c13088e8 +SOURCE_URL=https://github.com/sabre-io/Baikal/releases/download/0.6.1/baikal-0.6.1.zip +SOURCE_SUM=b3a553591a84f4262a6333cf79a1624e5d424d52c4071c77934b7191f714d757 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/config.system.php b/conf/config.system.php index 64e7bb2..b1ca4bb 100644 --- a/conf/config.system.php +++ b/conf/config.system.php @@ -69,4 +69,4 @@ define("PROJECT_DB_MYSQL_PASSWORD", '__DBPASS__'); define("BAIKAL_ENCRYPTION_KEY", '__DESKEY__'); # The currently configured Baïkal version -define("BAIKAL_CONFIGURED_VERSION", '0.6.0'); +define("BAIKAL_CONFIGURED_VERSION", '0.6.1'); diff --git a/manifest.json b/manifest.json index c4bc55a..49f43ef 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Lightweight CalDAV+CardDAV server", "fr": "Serveur CalDAV+CardDAV léger" }, - "version": "0.6.0~ynh1", + "version": "0.6.1~ynh1", "url": "http://baikal-server.com/", "license": "GPL-3.0", "maintainer": {