YunoHost-Apps / searx_ynh

Searx package for YunoHost
https://searx.github.io/searx/
GNU General Public License v3.0
20 stars 18 forks source link

upgrade searx to version v0.10 #4

Closed ozzmos closed 7 years ago

ozzmos commented 7 years ago

As discussed earlier, git submodule doesn't work with current yunohost/debian version. Moreover using an archive makes easier upgrades .

opi commented 7 years ago

Thanks for this PR; will take some times to test in today/tomorrw.

Did you test it, install and upgrade ?

ozzmos commented 7 years ago

I have tested a clean install with the admin interface and github link and it works. However I don't know to test upgrade. How can I test it ?

opi commented 7 years ago

With a devel environment (http://github.com/yunohost/ynh-dev) you can install the stable searx app (yunohost app install searx) and then clone your repository, and upgrade (yunohost app upgrade -f /path/to/your/repo searx);

I have quickly test your PR, and the upgrade seems to be broken; I'll try to have more test (and fixes) tonight.

opi commented 7 years ago

despite your last commit, update failed.

I think that the copy of new file is wrong, the v0.10 searx folder is copied inside the old one, so I end up with /opt/yunohost/searx/searx/searx !!

opi commented 7 years ago

I found a dirty solution, here is my diff. I let you decide how to integrate this properly

diff --git a/scripts/upgrade b/scripts/upgrade
index c35bf65..585444b 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -39,7 +39,8 @@ fi
 final_path=/opt/yunohost/$app
 wget https://github.com/asciimoo/searx/archive/v0.10.0.tar.gz
 tar xvf v0.10.0.tar.gz && mv searx-0.10.0 ../sources/searx
-sudo cp -rf ../sources/* $final_path
+sudo cp -rf ../sources/searx/* $final_path
+sudo cp -rf ../sources/requirements-ynh.txt $final_path
 sudo bash -c "source $final_path/bin/activate && pip install -r $final_path/requirements-ynh.txt --upgrade" 
ozzmos commented 7 years ago

Ok I just test with last commit and install and upgrade work.

opi commented 7 years ago

nice, I'll test it soon. (again, thank for working on that).

btw, it think the "sources" folder only needs to contains the requirements-ynh.txt file, now that we pull upstream sources from github. what do you think ?

ozzmos commented 7 years ago

indeed, it makes sense.

ozzmos commented 7 years ago

Cleaned and tested. Works well.

opi commented 7 years ago

Nice; My test seems ok this morning, but I got personnal issue with my Vagrant Network. I'll try to fix it this afternoon, during my child's nap ;)

bastinc commented 7 years ago

Ok ;-)

opi commented 7 years ago

looks good to me. merging, and releasing \o/

thanks @ozzmos & @bastinc