[Packageur en herbe] packaging application YesWiki

I reformatted text

1 Like

For your point 1, well, I’ll give you a quick answer and then have a proper look to their repo.

As you use a specific repo that’s unfortunately something that happens…
The best would be to find the package somewhere else, I know of a package concerned by that kind of problem which modify its app.src according to whether the file was where expected or not.
I’ll have a proper look to their repo, see if the package has been moved someplace else.

For you point 2, that’s completely subjective…
What I usually do is to put the time given +1s, even if my device was on a lazy day.
Because, finally, that’s not the time on its own which is considered but the ratio for each part.
But, yep, for sure it can be different for each run. But never mind, that’s just to give an idea of the progression of the script. It doesn’t have to be exact. It couldn’t be anyway.

1 Like

Indeed, they just removed it for their repo…

But as I see that they have their code on github, I see 2 different solutions, for which you would have to ask them though.

Either they have a release on github for each version, so you can use the github release.
Or they keep the old version on their repo, but on a sub directory Archives, or whatever else.

The problem is especially that if you’re not always looking for new release, users may not install the app anymore. Which would really be too bad.

1 Like

[Bad News] Le problème évoquer ici dans le message #23 est revenu. Dès que je fais une installation cela me renvoi à la page de configuration. J’ai donc décidé de réviser l’ensemble du code. Ce qui m’amène à une question :

Est il possible de faire une installation dans un serveur virtuel sans commit sur mon dépot github ?

Yep, of course, you can install from a directory instead of a repository.
sudo yunohost app install directory/with/your/app -f

1 Like

Merci de vos réponses, je penses comprendre ce qu’il faut faire. Je viens de faire des test et j’ai donné les droit à yeswiki et je peux modifier et ajouter des pages. (Mais pour le moment l’ajout des extensions ne fonctionne pas). Si je ne me trompe pas il faut que dans le script d’installation (et les autres) à la place de :

chown -R root: $final_path

je redige ça :

chown -R yeswiki: $final_path

ou plutot

chown -R $app: $final_path

Qu’en dit vous ?

Généralement lorsque la seule façon que tu trouves est de chmod 777, c’est que le problème n’est pas au niveau des permissions (r, w, x) mais au niveau du propriétaire ou groupe propriétaire du fichier (les noms d’utilisateur/groupe que tu vois dans ls -l)

Par exemple si tu as

ls -l /var/www/wordpress
drwxrwx--- 1 root root 12345 Apr 10 wordpress

et que PHP se plaint de ne pas pouvoir écrire dans un fichier dans /var/www/wordpress, la solution n’est PAS de faire chmod 777

La solution, c’est de changer le proprio pour que l’utilisateur qui fait tourner le processus PHP (typiquement www-data, ou bien $nomdelapp…) soit proprio / dans le groupe proprio du dossier /var/www/wordpress de sorte à avoir par exemple :

ls -l /var/www/wordpress
drwxrwx--- 1 www-data root 12345 Apr 10 wordpress

(bien sur il faut tout de même que le flag d’écriture w soit activé pour www-data…)

A very good explanation from Aleks.
To not give too much permission is a good habit. For your situation, and considering the doc was suggesting 777, I doubt you would find any info on which directory need a permission to write…
Best to do is to manually give permission to the user of the app on the whole directory into your dev environment, and then to use the app.

A ls -l will show you then which files have been recently added or modified.
Once you know in which directory the app is writing, you can update your package to give the correct permission on those directories.

Petite erreur…
Merci de vos réponses, je penses comprendre ce qu’il faut faire. Je viens de faire des test et j’ai donné les droit à yeswiki et je peux modifier et ajouter des pages. (Mais pour le moment l’ajout des extensions ne fonctionne pas). Si je ne me trompe pas il faut que dans le script d’installation (et les autres) à la place de :

chown -R root: $final_path

je redige ça :

chown -R yeswiki: $final_path

ou plutot

chown -R $app: $final_path

Qu’en dit vous ?

As I explained, better to try to use the app and see where the app did actually write.
So you will know which directory need to have a write permission.

Bon après enquête et observation je vois deux dossiers qui ont besoin des autorisations cache et file (cf. capture ci-dessous)

Mais meme en donnant les droits à yeswiki je n’arrive pas à télécharger d’extensions ni de themes …

Huh what’s the date on your server ?

Considering the app can write in all directory, the error is something else.
Have you had a look to the log ?
Also, what’s happen when you try to add an extension ?

Les dates de créations de la machine virtuelle. Et le 18 avril la date de la derniere version de YesWiki. Pour le serveur YesWiki a été installé à 12h29/12h30.

Heu je maitrise pas trop … Quels logs regarder et comment le faire ?

Je lance le téléchargement et il s’arrete sur une page blanche sans l’avoir chargé ni quoi que ce soit.

You should find some useful info in the nginx log

var/log/nginx/domain.tld-error.log

Je partage une capture de la fin des logs :

ziparchive not found sounds like a missing php package

Forgot the doc of this app :woozy_face:

Indeed you need php7.0-zip as a dependency.
But it’s not in the doc, you couldn’t have guess that…

1 Like

Great, thank for your help. I work on package and add dependency.
:rofl: It’s a good thing you saw it. I’m still not able to read all of this yet.

Tu l’as identifié

Uncaught error: class `ZipArchive not found`

???

Après modification des dépendances, le téléchargement des extensions et thèmes fonctionne parfaitement. Merci beaucoup !

1 Like