[Solved] Newcomer for packaging

Hi, I would like to help in packaging apps for Yunohost.
In order to do so I’m setting up a dev environment.
I’m trying to follow this doc about ynh-dev. But I don’t get how to do it =/
I have actually some troubles:

  • I’ve installed Yunohost inside a VM through VirtualBox on LinuxMInt. I didn’t to the post-install yet. And I don’t understand what should I do :
  • run the post-install with the domain name yolo.test for example? And then how do I connect to the yunohost server with a webbrowser (outside of the VM).
  • install ynh-dev inside the VM or outside?
    And a final question, I installed a stable iso but should I use the testing one?

Cheers,

K.

Hello ! Welcome and thanks to be willing to contribute to app packaging :slight_smile:

On the mid/long-term, you might be interested in joining the apps chatroom (apps@conference.yunohost.org) either via your favorite XMPP client or via chat.yunohost.org

First, running ynh-dev for app packaging is not mandatory (it’s initially meant for core development) but I personnaly use it when packaging app because that easily gives me a fresh yunohost instance with a shared folder with the host. But some people work differently and might advise you .

To answer your questions :

Yes, in the context of app packaging, you might want to run the postinstall, and possibly create a dummy user, such that after that you can run

yunohost app install ./your_app_folder/

(and remove) until your app works as expected :slight_smile:. It might also be good to keep a snapshot of “right after the postinstall” in case you completely messed up your install

It’s a bit tricky because ynh-dev is actually a tool that does multiple thing :

  • it setups the VM for you (so in that sense, it runs on your host (i.e. the ‘outside’))
  • it kinda manage the shared folder (‘/vagrant’ inside the VM)
  • you can run some ynh-dev command inside the VM (e.g. /vagrant/ynh-dev use-git yunohost, in the context of core development)

I don’t think it really matters, except if you want special features (e.g. app helpers) which are only available in testing. However, be careful that the ‘stable’ and ‘testing’ ynh-dev boxes are really not up to date ! It’s safer to use the ‘unstable’ one (that’s a bit unexpected yes ;))


But basically, to summarize, what you need is :

  • A YunoHost VM
  • with which you can easily import thing from the host (your app being developped)
  • that you can recreate easily (via ynh-dev or snapshots)

You can setup it with ynh-dev, or with virtualbox and a debian ISO, or inside a LXC, or …

Hope that helps :wink:

Hi Kapu06

You’re welcome on the apps chatroom :slight_smile:
Even if we speak most of time in french, you can ask what you want in english.

So, for apps packaging, it’s recommended to use either ynh-dev or a VirtualBox, as you prefer, that’s all.
In case you’re not comfortable with VirtuaBox, there’s a how to, but only in french for now.

About testing, unstable or stable, all I can say is it’s hightly better to use a stable release to work because most of our users uses a stable release, and if it works on stable, it will works also on testing or unstable. But we can’t say so for the opposite.
So, we have to know if an app works on a stable release first.

And, in closing, I would recommend you to use Package check to test your package before publishing it to the community.

Super, merci à vous =)
Pas de problème pour le français, je pensais que c’était mieux d’échanger en anglais^^
Je vais partir sur une simple VM + Yunohost =)
J’irai sur le chat de temps à autres alors =)

Bonne journée

K.