YunoHost-Apps / friendica_ynh

Friendica package for YunoHost
http://friendi.ca/
Other
11 stars 13 forks source link

Update to friendica stable 2023.05 #93

Closed EntropyEngineer closed 1 year ago

Tagadda commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Alrighty! Test Badge

tio-trom commented 1 year ago

140397 INFO WARNING - ERROR 1146 (42S02) at line 1: Table 'friendica.addon' doesn't exist

I see that in the testing. Anyone able to figure what's about?

MrPetovan commented 1 year ago

This is the part of the full log related to the command that should create the addon database table that is not found later:

60859 DEBUG  ynh_mysql_connect_as --user=friendica --password=QhcoXP8I13G3syRBR4rUs1Li --database=friendica
60859 DEBUG  local legacy_args=upd
60859 DEBUG  args_array=(['u']='user=' ['p']='password=' ['d']='database=')
60860 DEBUG  local -A args_array
60860 DEBUG  local user
60860 DEBUG  local password
60860 DEBUG  local database
60860 DEBUG  ynh_handle_getopts_args --user=friendica --password=QhcoXP8I13G3syRBR4rUs1Li --database=friendica
60860 DEBUG  set +o xtrace
60907 DEBUG  database=friendica
60907 DEBUG  mysql --user=friendica --password=QhcoXP8I13G3syRBR4rUs1Li --batch friendica

There's no reference to the expected database.sql file that include database table creation statements as per the related YunoHost statement: https://github.com/YunoHost-Apps/friendica_ynh/blob/dc7cd3eabe212708375c0dcd4ee994a1373a8122/scripts/install#L126-L127

Has the ynh_mysql_connect_as syntax changed recently?

MrPetovan commented 1 year ago

In the current develop version the addon table has been removed. The correct way to enable the ldapauth addon which would also work in version 2023.05 is the following CLI command:

bin/console addon enable ldapauth

I'm not sure how it should be written in the YunoHost script.

MrPetovan commented 1 year ago

I've created a separate PR that should fix the MySQL error. I'm not able to test my changes however.

MrPetovan commented 1 year ago

This should be rebased on the latest testing including the removal of explicit database calls and tested again.

tio-trom commented 1 year ago

I tried to update from Testing and it failed. Here are the logs https://paste.yunohost.org/raw/ejicinipof

2023-08-21 00:14:45,012: WARNING - rm: cannot remove '/var/www/friendica/view/smarty3/compiled': Directory not empty

Maybe is just a simple thing that needs to be fixed!?

MrPetovan commented 1 year ago

It looks like your existing Yunohost installation didn't use Git initially which prompts the upgrade to go the alternate upgrade route: https://github.com/YunoHost-Apps/friendica_ynh/blob/dc7cd3eabe212708375c0dcd4ee994a1373a8122/scripts/upgrade#L127-L154

I'm not sure why the smarty3 folder is saved in the temp folder and restored later but the safe delete should work: https://github.com/YunoHost-Apps/friendica_ynh/blob/dc7cd3eabe212708375c0dcd4ee994a1373a8122/scripts/upgrade#L135

Would you be able to log in your Yunohost server and figure out what's in the smarty3/compiled folder that can't be deleted?

tio-trom commented 1 year ago

Interesting....

This is what I have in that folder: 2023-08-21_00-38

2023-08-21_00-38_1

Many folders named 00 01 02...

tio-trom commented 1 year ago

I could delete the folder like you suggested and try again. Just waiting for a backup now to make sure I won't nuke my instance. Already restored from a snapshot because of the above failed attempt :D

EDIT: Eh sorry I misunderstood. Of course not to delete that folder.

Would you be able to log in your Yunohost server and figure out what's in the smarty3/compiled folder that can't be deleted?

I am unsure how that can be achieved. I will have a look. Thanks a lot.

tio-trom commented 1 year ago

Maybe I should wait until all Merge Requests land in the Testing like https://github.com/YunoHost-Apps/friendica_ynh/pull/102 ones. Then I can properly test on my own instance.

ericgaspar commented 1 year ago

Closing in favor of #99