[Packageur en herbe] packaging application YesWiki

If you install your app with --debug, you can see that the form page is returned by curl. I seems it ignored the data you passed…

So Curl’s configuration is correct? I’m trying it without debugging.

Hi, j’ai tenté une installation sans --debug et après avoir remis mon serveur virtuel à un snapshot précédent l’installation de toute application et malheureusement le problème reste le meme. Yeswiki me ramene sur la page d’installation en mode formulaire web…

ynh_local_curl "/?PagePrincipale&installAction=install" "config[default_language]=$language" "config[wakka_name]=MyYunoHostWiki" \
        "config[root_page]=PagePrincipale" "config[mysql_host]=localhost" \
        "config[mysql_database]=$app" "config[mysql_user]=$db_user" "config[mysql_password]=$db_pwd" "config[table_prefix]=yeswiki_" \
        "admin_name=$admin" "admin_password=$password" "admin_password_conf=$password" \
        "admin_email=$admin@$domain" "submit=Continue"

submit=Continue instead of submit=Continuer
And a lot of post requests are on config[name] instead of name

I used the Inspector of Firefox (Web developer tool) to see the exact name of the fields.

1 Like

Yet what I observe with firefox tools is “Continuer”. (Cf. Snapshot) or I’m looking at the wrong tool.
Edit : With new test by changing Continuer with Continue → it’s the same error…

This is the solution :

config[name]

How determinate config[name] and why not at admin_name or admin_email ?

Thanks for all @Maniack_Crudelis & @tituspijean

If the value for submit depend of the locale, it’s going to be a problem…
Hope it works anyway

If you speak to submit it’s not a probleme for installation I copied your works and it’s good for my french system.

Next step
I add user groupe configuration and despite this in log there this WARNING :

 DEBUG - + yunohost user permission update yeswiki.main --add visitors
2020-04-19 12:17:09,393: DEBUG - allowed:
2020-04-19 12:17:09,398: WARNING - Le groupe 'visitors' a déjà l'autorisation 'yeswiki.main' activée
2020-04-19 12:17:09,409: DEBUG -   - visitors
2020-04-19 12:17:09,411: WARNING - Cette autorisation est actuellement accordée à tous les utilisateurs en plus des autres groupes. Vous voudrez probablement soit supprimer l'autorisation 'all_users', soit supprimer les autres groupes auxquels il est actuellement autorisé.
2020-04-19 12:17:09,413: DEBUG -   - all_users
2020-04-19 12:17:09,418: WARNING - L'autorisation n'a pas été mise à jour car les demandes d'ajout/suppression correspondent déjà à l'état actuel.
2020-04-19 12:17:09,422: DEBUG - corresponding_users:
2020-04-19 12:17:09,423: DEBUG -   - serveruser
2020-04-19 12:17:09,424: DEBUG -   - serveradmin

(ref : log)
It’s a problems or not ?

Secondo
I tried to activate fail2ban with the new users configuration and I have a problem who stop installation. And I don’t understand this … (line 1669 log)

Thanks for your help

Line 338: You left ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" as is, so fail2ban tries to check Regex to match into the log for a failed login as a regex in the log.

These lines are there by default (at least in the application example repository). I’m sorry but I don’t know what it’s for and what to do with it. Should I delete it entirely ?

All sections are not useful to all apps. Fail2ban is useful if the apps write in the logs when someone on some IP fails to log in. It is a nice addenda to ensure app safety, but it is not mandatory.

1 Like

In the same order is what I need systemed and how do I know that?

systemd manages services, if your app deploys its own service (like its own server to serve a website, or a daemon, …). Here Yeswiki only needs a PHP service (already included with the PHP-FPM configuration), so systemd configuration is not needed.

1 Like

I guess YesWiki doesn’t need to be integrated as a service or logrotate anymore?

That’s my feeling indeed.

To find out exactly, I have to finemetn read the YesWiki documentation? Either a test of whether it works or not is enough? I don’t particularly think about this application, but for afterwards

Yes indeed, reading the apps’ documentation can inform you on how they are built and what they require. In the case of Yeswiki, they state:

YesWiki can be installed in about ten minutes on a server which supports PHP >= 5.3 and a MySQL database. Once installed, the YesWiki site is working immediately, and can be managed online from a web browser.

It is a good giveaway that you only need to setup PHP and the DB with YunoHost. :wink:
But trial-and-error is also another way to build the scripts step-by-step.

1 Like

Après quelques efforts et un grand coup de main de votre part l’application semble fonctionner correctement. J’ai éliminé les morceaux de codes qui ne servait à rien. J’ai effectué plusieurs tests manuels et ça semble bien fonctionner. Demain j’essayerais package_check pour controler avant publication d’un premier package. :smile:

Merci encore des coups de mains, relectures et conseils @Maniack_Crudelis & @tituspijean

4 Likes

Bonjour à tous & toutes, deux petit problemes identifiés suite au packaging de YesWiki :

  1. Durant mon travail de packaging, les développeurs de YesWiki ont sorti une nouvelle version. Dans leur dépot le précédent dossier compresser à été supprimé et remplacé par le nouveau. Ce qui a eu pour conséquence de rendre le téléchargement de l’apps non fonctionnel. Quel solution à cela ? Avez des conseils ?
    Pour le moment je penses à deux solutions :

    • Prendre contacte avec les développeurs de YesWiki et voir ce qu’ils peuvent faire (comme laisser le fichier zip quelques temps)
    • Mettre le dossier compressé disponible à un autre endroit.
  2. Lors du “cleanage” du code du paquet en supprimant les --time j’ai tenté de me fier à l’installation sur mon serveur virtuel pour déterminer le --weight mais à chaque installations des différences sont présentes. Avez vous une solution ou une méthode pour juger au mieux ? Et qu’elle est l’importance de ce paramètre ?

I do not read inclusive writing…

2 Likes