YunoHost / issues

General issue tracker for the YunoHost project
72 stars 8 forks source link

Packaging v3 wishlist #2136

Open alexAubin opened 1 year ago

alexAubin commented 1 year ago
zamentur commented 1 year ago
Salamandar commented 11 months ago
Josue-T commented 11 months ago

Hello,

Some others good thing would be:

Would be good to have more standard filesystem hierarchy for app. Except the big discussion about where we should store app code there are also some directories whish are currently completely not standardized like logs and config file.

By example for log should be really good to be able as same as for data to have a standard directory for each app and to have logrotate automatically managed.

On config side for me where are also some more standardization which could be done. Firtly as same as for logs would be good to have a standard dir like /etc/yunohost.app/$app or /srv/yunohost/$app/config. And secondly actually we have 2 different way to manage configuration on yunohost. We have one specific system for the core and an other one for app. For me (and for users) it would be really good if we are able to have one standard configuration system which apply for the core and for the app with the same comportment. And finally it would be really nice to have jinja as the template system for app to have a more standardized and flexible template system.

Salamandar commented 11 months ago

By example for log should be really good to be able as same as for data to have a standard directory for each app and to have logrotate automatically managed.

I fully agree. TBH I would love to see removed [resource.install_dir] and [resource.data_dir] and see, instead some more generic form:

[resources.dirs.install_dir]
# sane defaults for well-known install_dir
[resources.dirs.data_dir]
# sane defaults for well-known data_dir
[resources.dirs.log_dir]
# sane defaults for well-known log_dir
[resources.dirs.downloads_dir]
path = "{{install_dir}}/downloads"
owner = "www-data:rwx"

Firtly as same as for logs would be good to have a standard dir like /etc/yunohost.app/$app or /srv/yunohost/$app/config

Unfortunately, every software comes with its own way configuration "paradigm". gitea uses custom/conf/app.ini, mediawiki uses LocalSettings.php, etc… It's kinda impossible to standardize (or we would need to patch apps… don't want that)

it would be really good if we are able to have one standard configuration system which apply for the core and for the app with the same comportment

Agreed. What could be done though, would be to edit files in /etc/yunohost.app/$app and then call "yunohost app reconfigure $app" or something related.

orhtej2 commented 11 months ago
Josue-T commented 11 months ago

Unfortunately, every software comes with its own way configuration "paradigm". gitea uses custom/conf/app.ini, mediawiki uses LocalSettings.php, etc… It's kinda impossible to standardize (or we would need to patch apps… don't want that)

Patching app is not a great solution. But sometime we juste use symbolic link to fix this. And for app which don't have any working solutions this is not mandatory. It could also be managed as currently if needed. But I think most of app should have a solution I think.

Josue-T commented 11 months ago
  • Make way for 'helper' apps - stuff like mongodb could be installed as dedicated app with all the necessary hacks required to make it work. Another helper would be bridge helpers to allow mautrix_* to be installed with all of Matrix servers (currently crucial script is a part of Synapse_ynh and bridges are hardwired to use Synapse)

Yes adding a solution to link apps and to manage app dependancy would be really useful but I think a features like this need reflexion beaucaue there are a lot of use cases and there are also a lot of different features that we can add in this context.

orhtej2 commented 11 months ago

Yes adding a solution to link apps and to manage app dependancy would be really useful but I think a features like this need reflexion beaucaue there are a lot of use cases and there are also a lot of different features that we can add in this context.

Oh, that was exactly my point :) Make sure dex is uninstalled when outline gets deleted and prevent it from being uninstalled (or at least warn) if doing so would brick another app.

Josue-T commented 11 months ago

Oh, that was exactly my point :) Make sure dex is uninstalled when outline gets deleted and prevent it from being uninstalled (or at least warn) if doing so would brick another app.

But about Dex for me OIDC whoud be added on the core beaucause more and more app will need it.

Josue-T commented 11 months ago

I was also tempted to add in the which list the OIDC support but it's a bit out of scoops. But yes for me more and more app will need this for authentication (synapse by example will soon need it) and it might be good to have it natively. There are by example this library which could do it https://github.com/IdentityPython/pyop

Salamandar commented 10 months ago

Tracked ownership of files installed outside of $install_dir, kinda like real packages from package managers.

Like a replacement of ynh_add_config with ynh_install_file that will save the path of this file in some database, just like apt dependencies. This way, backup/restore/remove can be automatically handled.

ynh_install_file could have several arguments:

selfhoster1312 commented 6 months ago

Should we switch to full jinja for templates x_x ... Or conditional / dynamic properties ?

It's not clear what you mean with "dynamic properties", but jinja is a very good idea. Jinja-like templates are very easy to understand for non-programmers, very well documented, and have several implementations (with minor differences) in many programming languages.

Salamandar commented 5 months ago

Have a "under maintenance" 503 page during upgrade / change_url like some apps do (discourse wordpress etherpad lutim acropolis pihole my_webapp).

selfhoster1312 commented 5 months ago

Have a "under maintenance" 503 page during upgrade / change_url like some apps do (discourse wordpress etherpad lutim acropolis pihole my_webapp).

In the same vein, maybe add a setting to define what to do when the app backend is unreachable. Right now i think somehow we end up back on SSOWat homepage which is really confusing. Maybe some app just get a generic 503, maybe some have an integrated maintenance/status page, etc...

Salamandar commented 4 months ago

A suggestion of an $install_dir topology, considering what we learned:

$install_dir/
├── bin/
│   ├── corepack binaries
│   ├── composer
│   └── what else?
├── sources/ (ynh_setup_source)
├── www/ or dist/
├── cache/
│   ├── things that wont be backed up
│   ├── and can be deleted automatically by yunohost 
│   └── (nodejs cache, composer cache, cargo cache, etc)
└── garbage files because it's a $HOME so .bashrc etc

Also directories could be created automatically. For example ynh_use_node creates cache/npm etc.

The bin directory could also contain things to run yunohost like aliases for yunohost app shell