App packaging tutorial?

en

#1

Hello :slight_smile:

I have gotten a lot of use out of yunohost, and would really like to contribute somehow. I have about 10 years of casual/desktop linux use, and have lately been trying to deepen my knowledge and skills with linux. I feel like learning to package apps for yunohost would fit well into both of these desires. Unfortunately, I am still not to the point where I can understand exactly what I need to do to package apps for yunohost. What would help me (and hopefully some others as well), is a step by step tutorial. A youtube video of someone working through a typical app-packaging process would be amazing. If this is just a bad idea, hearing why might also help me understand app packaging a little better.


#2

Hi

Have you seen this page? There is also the example_ynh dummy app that offers skeleton scripts with (almost?) all the features and functions you could use to integrate an app. You can also follow these formal guidelines (WIP).

As a newbie app maintainer, I would suggest not to hesitate to have a look to other package to see and understand how they are made, and how some app-specific features have been implemented in the scripts.

Have a development environment made specifically to test your package. Do not use your own server with your own data, you may pollute your system with remainders of failed installations and removals, and at worst lose your data.

Start off the example_ynh app. Rename it. Prepare the manifest.json while asking yourself “what my app needs to know from the admin to be correctly installed?” Then follow its install script while asking yourself "does it need a specific port, a database, a service, etc? If no, remove the functions. If yes, RTFM of the app to know how to proceed and what to write.

Do not hesitate to run the install scripts on your development server with --verbose option as often as necessary. I personally find easier to advance one error at a time than getting everything to work blindly.

Do not try to completely integrate it into YNH from scratch. Start by making it work with the install script, and make its removal clean. Then implement backup and restore, then upgrade. Then you can try do interface it with SSOwat or the LDAP server.

I will stop here, I am sure more experienced packagers can share their wisdom. :slight_smile:


#3

Thanks for the reply! I have seen the first two pages, but hadn’t seen the formal guidelines page (which doesn’t make much sense to me haha). I did download the dummy app, as well as another one (owncloud, I think), and started plugging in fields from a wishlist app into the dummy one… but at some point, I just got stuck :stuck_out_tongue: I have a vbox machine to do this work on --definitely not looking to mess up my personal server (just reinstalled it!).

I think I may be underestimating the difficulty of this process in relation to my current understanding/abilities. I have a pretty firm grasp of the linux file system and command line, some very basic bash scripting, and I know how to search log files (and the internet!) --but I often don’t know what to look for. I will take another shot with the example packages, but I still feel like a video would be helpful for my understanding, but maybe video is not an appropriate medium for this issue.


#4

Hi yunolearning

As TitusPiJean told you, the best start is probably the main documentation page about the packaging.
There also another page, for real beginners, but only in French (maybe a problem for you ?).

Anyway, I would say if you’re using Linux for 10 years, I’m sure you’d be able to make a package for YunoHost.

Just in case, we have a xmpp room, even if we usually speak in French in this room, don’t hesitate to come and ask in English any question you have. We would be really happy to help you and (at least try) to answer to your questions.

If you want to take a application as exemple, prefer a recently updated official app like ampache, wordpress or piwigo for example.


#5

Thank you for your encouragement. Unfortunately, I do not speak French, but I have joined the channel, and will ask once I have more specific questions :slight_smile: I will download one of the apps you suggested as an example.


#6

Hello,

vous penser qu il y aurais moyens de faire une emmision sur yunohost

une video presentant ynohohst et surtout expliquant comment dev avec ??


#7

Je suis désolé, je ne parle pas français. J’ai essayé google translate, mais je ne comprends toujours pas.


#8

i m just thinking about a creaate some video to explain how yunohost works and make some video to help any one to adding a app on yunohost


#9

That would be great!