From 5b3a62851f18d61b734137a1ab9c9f71f999b267 Mon Sep 17 00:00:00 2001 From: Anmol Date: Thu, 20 Jul 2017 10:39:07 +0530 Subject: [PATCH 1/5] Added ldap support & changed the line for addding admin mail in .htconfig.php --- conf/ldap_conf.php | 7 +++++++ scripts/install | 4 +++- scripts/upgrade | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 conf/ldap_conf.php diff --git a/conf/ldap_conf.php b/conf/ldap_conf.php new file mode 100644 index 00000000..a4688d69 --- /dev/null +++ b/conf/ldap_conf.php @@ -0,0 +1,7 @@ +App::$config['system']['addon'] = 'ldapauth'; + +App::$config['ldapauth']['ldap_server'] = 'localhost'; +App::$config['ldapauth']['ldap_searchdn'] = 'ou=users,dc=yunohost,dc=org'; +App::$config['ldapauth']['ldap_userattr'] = 'uid'; +App::$config['ldapauth']['ldap_autocreateaccount_emailattribute'] = 'mail'; +App::$config['ldapauth']['create_account'] = '1'; diff --git a/scripts/install b/scripts/install index 51e430b0..143b5781 100755 --- a/scripts/install +++ b/scripts/install @@ -85,7 +85,9 @@ sudo sed -i "s/mysqlusername/$db_user/g" $final_path/.htconfig.php sudo sed -i "s/mysqldatabasename/$db_user/g" $final_path/.htconfig.php sudo sed -i "s/mysite.example/$domain/g" $final_path/.htconfig.php sudo sed -i "s/if the auto install failed, put a unique random string here/$(ynh_string_random)$(ynh_string_random)$(ynh_string_random)/g" $final_path/.htconfig.php -sudo sed -i "s/ADMIN_EMAIL_REPLACE/$email/g" $final_path/.htconfig.php +sudo sed -i "s/\['admin_email'\] = '';/\['admin_email'\] = '$email';/g" $final_path/.htconfig.php +# addon ldap config +sudo su -c "cat ../conf/ldap_conf.php >> $final_path/.htconfig.php" # Set www-data to owner sudo chown -R www-data:www-data $final_path diff --git a/scripts/upgrade b/scripts/upgrade index 94c299c8..41f3a1f9 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,7 +58,10 @@ sudo sed -i "s/mysqlusername/$db_user/g" $final_path/.htconfig.php sudo sed -i "s/mysqldatabasename/$db_user/g" $final_path/.htconfig.php sudo sed -i "s/mysite.example/$domain/g" $final_path/.htconfig.php sudo sed -i "s/if the auto install failed, put a unique random string here/$(ynh_string_random)$(ynh_string_random)$(ynh_string_random)/g" $final_path/.htconfig.php -sudo sed -i "s/ADMIN_EMAIL_REPLACE/$email/g" $final_path/.htconfig.php +sudo sed -i "s/\['admin_email'\] = '';/\['admin_email'\] = '$email';/g" $final_path/.htconfig.php + +# addon ldap config +sudo su -c "cat ../conf/ldap_conf.php >> $final_path/.htconfig.php" # Set www-data to owner sudo chown -R www-data:www-data $final_path From 6dd95f4b8a35f5f6e58c0357fae117a51661438b Mon Sep 17 00:00:00 2001 From: Anmol Date: Thu, 20 Jul 2017 11:17:42 +0530 Subject: [PATCH 2/5] Updated sources to 2.4.2 --- README.md | 4 ++-- sources/hubzilla-addons/source_file | 2 +- sources/hubzilla-addons/source_md5 | 2 +- sources/hubzilla-addons/source_url | 2 +- sources/hubzilla/source_file | 2 +- sources/hubzilla/source_md5 | 2 +- sources/hubzilla/source_url | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a0c30bcc..70594c13 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ Current snapshot in *sources*: -* https://github.com/redmatrix/hubzilla: 2.4.1 (commit 46e079beea8eb4cbcdd938681c702ef7481a3337) -* https://github.com/redmatrix/hubzilla-addons: 2.4.1 (commit 30f3104ebe2121a433d174bb3bcb703bb9787bd3) +* https://github.com/redmatrix/hubzilla: 2.4.2 (commit 8896ebf7cbf20c242399c3821be5881e6068175a) +* https://github.com/redmatrix/hubzilla-addons: 2.4.2 (commit 30f3104ebe2121a433d174bb3bcb703bb9787bd3) ## Important Notes diff --git a/sources/hubzilla-addons/source_file b/sources/hubzilla-addons/source_file index 30bf3a0c..23752f9f 100644 --- a/sources/hubzilla-addons/source_file +++ b/sources/hubzilla-addons/source_file @@ -1 +1 @@ -hubzilla-addons-2.4.1 +hubzilla-addons-2.4.2 diff --git a/sources/hubzilla-addons/source_md5 b/sources/hubzilla-addons/source_md5 index 52dc72f3..3e061f1b 100644 --- a/sources/hubzilla-addons/source_md5 +++ b/sources/hubzilla-addons/source_md5 @@ -1 +1 @@ -aff46da933e40b125c21946ec48220c5 hubzilla-addons-2.4.1.zip +24cde04ec71c61864e0ce904a27ad432 hubzilla-addons-2.4.1.zip diff --git a/sources/hubzilla-addons/source_url b/sources/hubzilla-addons/source_url index bd4e8e73..8b6bf9e7 100644 --- a/sources/hubzilla-addons/source_url +++ b/sources/hubzilla-addons/source_url @@ -1 +1 @@ -https://github.com/redmatrix/hubzilla-addons/archive/2.4.1.zip +https://github.com/redmatrix/hubzilla-addons/archive/2.4.2.zip diff --git a/sources/hubzilla/source_file b/sources/hubzilla/source_file index a8366792..5e314aa8 100644 --- a/sources/hubzilla/source_file +++ b/sources/hubzilla/source_file @@ -1 +1 @@ -hubzilla-2.4.1 +hubzilla-2.4.2 diff --git a/sources/hubzilla/source_md5 b/sources/hubzilla/source_md5 index d7ffed2e..e00d8623 100644 --- a/sources/hubzilla/source_md5 +++ b/sources/hubzilla/source_md5 @@ -1 +1 @@ -8c824159e5464d9d5cf312a41e50327c hubzilla-2.4.1.zip +779d29162c3e7635bc1c93707c3da67f hubzilla-2.4.2.zip diff --git a/sources/hubzilla/source_url b/sources/hubzilla/source_url index 14d614fb..26bf4c60 100644 --- a/sources/hubzilla/source_url +++ b/sources/hubzilla/source_url @@ -1 +1 @@ -https://github.com/redmatrix/hubzilla/archive/2.4.1.zip +https://github.com/redmatrix/hubzilla/archive/2.4.2.zip From c3f963f971920b7ab37d6af5a1a27f4c5a797cf8 Mon Sep 17 00:00:00 2001 From: Anmol Date: Thu, 20 Jul 2017 11:36:02 +0530 Subject: [PATCH 3/5] removed the recreation of .htconfig.php while update,instead copy it from previous install --- scripts/upgrade | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 41f3a1f9..9d7ab1d0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,6 +34,7 @@ sudo md5sum -c ../sources/hubzilla/source_md5 --status || (echo "Corrupt source" sudo unzip -q ${hubzilla_file}.zip -d ../sources/hubzilla/ sudo cp -r ../sources/hubzilla/${hubzilla_file}/. $final_path sudo cp -a ${final_path}.old/store ${final_path} +sudo cp -a ${final_path}.old/.htconfig.php ${final_path} sudo rm -Rf ${final_path}.old # 2 - Addons @@ -48,20 +49,7 @@ sudo cp -r ../sources/hubzilla-addons/${addons_file}/. $final_path/addon sudo mkdir -p "${final_path}/store/[data]/smarty3" sudo chmod -R 777 $final_path/store -# Copy the template install/htconfig.sample.php to .htconfig.php -sudo cp $final_path/install/htconfig.sample.php $final_path/.htconfig.php -# Use sed to add the database information to .htconfig.php -sudo sed -i "s/your.mysqlhost.com/localhost/g" $final_path/.htconfig.php -sudo sed -i "s/mysqlpassword/$db_pwd/g" $final_path/.htconfig.php -sudo sed -i "s/mysqlusername/$db_user/g" $final_path/.htconfig.php -sudo sed -i "s/mysqldatabasename/$db_user/g" $final_path/.htconfig.php -sudo sed -i "s/mysite.example/$domain/g" $final_path/.htconfig.php -sudo sed -i "s/if the auto install failed, put a unique random string here/$(ynh_string_random)$(ynh_string_random)$(ynh_string_random)/g" $final_path/.htconfig.php -sudo sed -i "s/\['admin_email'\] = '';/\['admin_email'\] = '$email';/g" $final_path/.htconfig.php - -# addon ldap config -sudo su -c "cat ../conf/ldap_conf.php >> $final_path/.htconfig.php" # Set www-data to owner sudo chown -R www-data:www-data $final_path From 2ab07e8080282edd1fa40b9695b7ed45ee52b9f7 Mon Sep 17 00:00:00 2001 From: Anmol Date: Thu, 20 Jul 2017 11:40:47 +0530 Subject: [PATCH 4/5] removed the line to recreation of the smarty folder --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9d7ab1d0..98a24899 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,7 +46,6 @@ sudo mkdir $final_path/addon sudo cp -r ../sources/hubzilla-addons/${addons_file}/. $final_path/addon # 3 - some extra folders -sudo mkdir -p "${final_path}/store/[data]/smarty3" sudo chmod -R 777 $final_path/store From a3bb4891343729fa5aacdf7e65d227d44c5f177f Mon Sep 17 00:00:00 2001 From: Anmol Date: Thu, 20 Jul 2017 11:53:19 +0530 Subject: [PATCH 5/5] Forgot to change the file name in checksum for addons --- sources/hubzilla-addons/source_md5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/hubzilla-addons/source_md5 b/sources/hubzilla-addons/source_md5 index 3e061f1b..0eb78dad 100644 --- a/sources/hubzilla-addons/source_md5 +++ b/sources/hubzilla-addons/source_md5 @@ -1 +1 @@ -24cde04ec71c61864e0ce904a27ad432 hubzilla-addons-2.4.1.zip +24cde04ec71c61864e0ce904a27ad432 hubzilla-addons-2.4.2.zip