-
Notifications
You must be signed in to change notification settings - Fork 9
Use new helpers, add backup/restore and uwsgi #6
Conversation
this work is now ready for testing, please come and try, but use it carefully, everything is in your database, to be safe, just dump it! |
Since I don't use YunoHost anymore in production, I can't test it fully right now. Look very nice though! I will be testing it and doing a proper review in the upcoming days if I manage to free some time for a proper test. |
I see time is hard to find! |
@maniackcrudelis I can't figure out the reason why upgrade from fd63504 and 267ccc2 fails as it works fine in my VM... I would appreciate it you may have a look. @rigelk it also includes a maintainer change, (btw, |
conf/nginx.conf
Outdated
uwsgi_read_timeout 3600; | ||
uwsgi_param SCRIPT_NAME __PATH__; | ||
uwsgi_modifier1 30; | ||
uwsgi_pass unix:///tmp/__NAME__.socket; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you store a socket in /tmp
, is it not better in something like /run/uwsgi/app/searx
as same as in searx ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, I'll improve that someday
manifest.json
Outdated
@@ -1,25 +1,25 @@ | |||
{ | |||
"name": "Firefox Sync Server", | |||
"id": "ffsync", | |||
"url": "https://github.com/abeudin/ffsync_ynh", | |||
"version": "1.6.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, could you use the new syntax for versioning (1.6.0~ynh1
) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, fixed.
scripts/_common.sh
Outdated
# usage: ynh_setup_source dest_dir [source_id] | ||
# | arg: dest_dir - Directory where to setup sources | ||
# | arg: source_id - Name of the app, if the package contains more than one app | ||
ynh_setup_source_local () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this helper is in the core so, we don't really need it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, let's fix this
"packaging_format": 1, | ||
"description": { | ||
"en": "Mozilla’s Sync-Server to host your Firefox account data", | ||
"fr": "Le serveur de synchronisation de Mozilla, pour héberger vos données Firefox" | ||
}, | ||
"maintainer": { | ||
"name": "beudbeud", | ||
"email": "beudbeud@beudibox.fr", | ||
"url": "https://github.com/balu-/FSyncMS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mybe you could add the previous_maintainers
key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
scripts/install
Outdated
# Use 'FSyncMS' as database name and user | ||
db_user=ffsync | ||
# Check destination directory | ||
final_path="/var/www/$app" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you use /var/www
as final_path for an app which use python and wsgi. I think most the common for that is /opt/yunohost/$app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless this changed recently, this looks wrong: https://github.com/YunoHost/example_ynh/blob/master/scripts/install#L45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no,
Many app (by example searx, or synapse) which use python use /opt/yunohost/$app
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, ok, I won't change it if there it isn't mandatory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I don't really understand why you change that because before it was on the right place (see here). So why do you change that ?
I really think that /var/www/$app
is more for php / web apps but not for uwsgi / python app and many app apply this concept.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the discussion here, I think that it could be good to change that. I could also do it if you don't have time to do it.
scripts/install
Outdated
|
||
# TODO: fix this css patch | ||
# ynh_replace_string "media\/img@$path_url\/media\/img@g" $final_path/syncserver/page/sync_files/firefox_sync-bundle.css | ||
# ynh_replace_string "media\/img@$path_url\/media\/img@g" $final_path/syncserver/page/sync_files/responsive-bundle.css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no idea, I did not understood either
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me neither.
#================================================= | ||
|
||
# Backup the current version of the app | ||
ynh_backup_before_upgrade |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we really able to do a backup if we upgrade the old installation style ?
Thanks for your comments.
I won't work on this package anymore until I'm sure it can be merged.
Please let me know if you can get approval from rigelk or YunoHost Apps
team.
|
@Jibec I can approve and merge the request when you deem it ready. |
oh, good to know you answers :)
Then I'll read and answer questions, but I expect you to give feedback
from times to time if you're merging requests ;)
|
It now looks like to works fine from old install and every basic scenario. Please test upgrade: yunohost app install https://github.com/YunoHost-Apps/ffsync_ynh/ && yunohost app upgrade ffsync -u https://github.com/jibec/ffsync_ynh/ |
Works for me! |
Thanks for the test. Can you confirm you did test with real data?
I have to say I don't have time yet to make a real end user test.
I assume using a dedicated Firefox profile would do the job (create the profile, sync data, remove the profile, upgrade app, create a new profile, sync data: should bring back previous data). Is it a good way to test or do you know other?
|
Well, f6b79fe will certainly help with one of the 3 issues I've raised, but not the 2 other ones. Reminder:
|
I see this topic is closed, but I don't think it's working, are you tracking (1) and (3) independently? |
Hello, I have pushed some fix, so it might be better now. I have also tested the migration from the old package with my prod instance (on ARM) and it was good. I think it should be ready for some other tests. |
If nobody mind I purpose to merge this in 10 days |
I'm against this merge as you can't add me as maintainer (I canceled my pull request).
I'm fine with the idea this apps is taken over by you, and that my work may help this app to move forward!
I'm sorry I couldn't say yes to all requests and decided to stop my contribution (for multiple good and bad reasons, mostly unrelated to this package).
Keep the hard work!
|
Ok, I you want I can give you the access to this repos. It's you want. |
Hello, I discovered some issue (when I restart the server) with uwsgi. @Jibec what is the reason to not use the main uwsgi service (which automatically start all service in |
Hello, If somebody can try this it could be good. And if it's ok for everybody I purpose to merge this in 10 days if I don't find some new issues. About the maintainer who will be the maintainer of this app ? |
Let's merge this. I'll be the maintainer of this app (if nobody mind). |
I'm explicitly OK for you being maintainer of this app.
--
Jean-Baptiste Holcroft
|
Same for me. |
Hi, I wanted to add backup and restore, and I finally rewrote this package.
Some part I did not understood where removed (like swap) or I didn't like the easy_install ran as root.
Using gunicorn looked like to require a port, I decided to use uwsgi to have a socket instead.
I'm unsure it works, package_check gives weird results (upgrade doesn't work with package_check, but works fine on my VM). Please have a looks and play with it :)
Do not install this in production if you are not ready to loose your data.