Saturday, April 27, 2024
apps@conference.yunohost.org
April
Mon Tue Wed Thu Fri Sat Sun
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
         
             

[03:49:53] <Yunohost Git/Infra notifications> App cjdns failed all tests in job [#25953](https://ci-apps.yunohost.org/ci/job/25953) :(
[05:54:59] <Longbowman> /usr/bin/git push --force-with-lease origin actions/toml:refs/heads/actions/toml
remote: Permission to YunoHost/apps.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/YunoHost/apps/': The requested URL returned error: 403
Error: The process '/usr/bin/git' failed with exit code 128


this is an error in checks of pull request in https://github.com/YunoHost/apps/pull/2263
What can I do to address this shortcoming?

[07:45:12] <Yunohost Git/Infra notifications> App vore rises from level 0 to 7 in job [#25959](https://ci-apps.yunohost.org/ci/job/25959) !
[08:01:20] <Yunohost Git/Infra notifications> [apps] tituspijean [commented](https://github.com/YunoHost/apps/pull/2263#issuecomment-2080407956) on [issue #2263](https://github.com/YunoHost/apps/pull/2263) Update apps.toml - add jump_ynh: Downloaded source for the app are for release 1.3.2, though the version in the manifest is 1.0~ynh1. Can you change that...
[08:01:39] <Yunohost Git/Infra notifications> [apps] tituspijean [commented](https://github.com/YunoHost/apps/pull/2263#issuecomment-2080407956) on [issue #2263](https://github.com/YunoHost/apps/pull/2263) Update apps.toml - add jump_ynh: Downloaded source for the app are for release 1.3.2, though the version in the manifest is 1.0~ynh1. Can you change th...
[11:22:42] <ChriChri> Émy - OniriCorpe: As a workflow for the disturbing codeberg/github situation I came up with this: https://codeberg.org/flohmarkt/flohmarkt_ynh/src/branch/main/doc/DEVELOPMENT.md :)
[13:35:15] <Aleks (he/him/il/lui)> 500 apps using packaging v2 👀
[13:38:59] <orhtej2> Ia Ia Salamandar @Salamandar:matrix.org fhtagn!
[13:47:59] <Yunohost Git/Infra notifications> [nextcloud_ynh] zamentur [commented](https://github.com/YunoHost-Apps/nextcloud_ynh/pull/684#issuecomment-2080702819) on [issue #684](https://github.com/YunoHost-Apps/nextcloud_ynh/pull/684) 29.0.0: Note for now nextcloud tasks apps is not compatible with 29.0.0.
[14:59:54] <thatoo> Hello, Could you help me creating the yunohost package for dokos from my bash script install (https://github.com/Thatoo/Dokos_ynh/blob/Thatoo-bash-script-install/bash-script-install/dokos_install.sh) ?
[15:00:20] <thatoo> Here is the beginning of my bash script :

```
#Install NVM, Node, npm and yarn
echo -e ${YELLOW}"Now to install NVM, Node, npm and yarn${NC}"
sleep 2
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
nvm install 18
node_version="18"
sudo apt-get -qq install npm -y
sudo npm install -g yarn

```

and here is what I wrote as equivalent for yunohost packaging based on what I found on jellyseerr and mastodon packages :

```
ynh_script_progression --message="Installing NodeJS..." --weight=10

# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version

# Upgrade NPM
ynh_npm install --global npm@latest

# Install Yarn
ynh_npm install --global yarn

# Install yarn
ynh_script_progression --message="Installing yarn..." --weight=5

chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"

pushd $install_dir
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --network-timeout=100000
popd

chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"

```

It seems to be working or at least I don't get any error till there.

The following of the script is :

```
# Add environment variables to .profile
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.profile
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.profile
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.profile

# Source .profile to load the new environment variables in the current session
source ~/.profile

# Now let's reactivate virtual environment if needed and install bench
echo -e "${YELLOW}Now let's reactivate virtual environment if needed and install bench${NC}"
sleep 4
python3 -m venv $USER && \
source $USER/bin/activate
nvm use $node_version
pip3 install --upgrade --quiet dokos-cli
```

and I don't know how to adapt it to yunohost package

```
pushd $install_dir
ynh_use_nodejs
ynh_exec_as $app nvm use $nodejs_version
# or ynh_exec_as $app env $ynh_node_load_PATH nvm use $nodejs_version
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pip3 install --upgrade --quiet dokos-cli
popd
```

gives me the following error : 2024-04-27 14:48:07,914: WARNING - ./install: ligne 120: nvm : commande introuvable
https://paste.yunohost.org/raw/podocurici
https://paste.yunohost.org/raw/ginaqafuva

Could you help me with this part for me trying to move forward on creating the yunohost package for dokos from my bash script install (https://github.com/Thatoo/Dokos\_ynh/blob/Thatoo-bash-script-install/bash-script-install/dokos\_install.sh)
[15:00:55] <thatoo> the manifest.toml is here https://github.com/Thatoo/Dokos_ynh/blob/test/manifest.toml
[15:16:26] <orhtej2> > <@thatoo:defis.info> Hello, Could you help me creating the yunohost package for dokos from my bash script install (https://github.com/Thatoo/Dokos_ynh/blob/Thatoo-bash-script-install/bash-script-install/dokos_install.sh) ?

you want to follow [kresus's](https://github.com/YunoHost-Apps/kresus_ynh/blob/2016f08263ee6b4b0a7331bf843f84ff77c92ede/manifest.toml#L63) steps, install Yarn via apt, don't use `nvm` (YNH uses `n` for that, `ynh_install_nodejs --nodejs_version=$nodejs_version` is enough), as a rule of thumb don't use `npm install -g whatever`
[15:33:42] <thatoo> ok, I'll have a look at it, thank you
[15:45:26] <thatoo> Well, I was installing yarn both way 🙂
I was doing it the same way than kresus's and also using apt... my bad. I removed apt.
[15:45:31] <thatoo> I'm trying it
[16:38:36] <orhtej2> > <@thatoo:defis.info> Well, I was installing yarn both way 🙂
> I was doing it the same way than kresus's and also using apt... my bad. I removed apt.

`npm` install of `yarn` will pull 4.x line, you need 1.x and `apt` is actually correct in this context
[16:39:30] <thatoo> you lost me
[16:40:16] <orhtej2> if you call `npm install -g yarn` it will pull the wrong version of `yarn`
[16:41:41] <orhtej2> you want https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable not https://yarnpkg.com/getting-started/install
[17:23:04] <Émy - OniriCorpe> i think it would be much simpler to put your codeberg repo on the catalog, it removes any possible confusion and it's much robust
and you can set up your own ynh CI and readme generator and run it on your codeberg repo
[17:24:20] <Émy - OniriCorpe> unnecessarily annoying friction like that tends to demotivate to dev on something in the long run 😅
[19:03:01] <ChriChri> > <@oniricorpe:im.emelyne.eu> i think it would be much simpler to put your codeberg repo on the catalog, it removes any possible confusion and it's much robust
> and you can set up your own ynh CI and readme generator and run it on your codeberg repo

Yes, thought about that already, too. When integration is really good I'll look into that.
[19:11:01] <Émy - OniriCorpe> i think it would be much simpler to put your codeberg repo on the catalog, it removes any possible confusion and it's much more robust
and you can set up your own ynh CI and readme generator and run it on your codeberg repo
[19:39:59] <Yunohost Git/Infra notifications> Job [#25759](https://ci-apps.yunohost.org/ci/job/25759) for crabfit failed miserably :(
[19:40:31] <Yunohost Git/Infra notifications> Job [#25414](https://ci-apps.yunohost.org/ci/job/25414) for sharkey failed miserably :(
[19:43:24] <Yunohost Git/Infra notifications> Job [#25364](https://ci-apps.yunohost.org/ci/job/25364) for iceshrimp failed miserably :(
[19:45:45] <Yunohost Git/Infra notifications> Job [#25756](https://ci-apps.yunohost.org/ci/job/25756) for firefish failed miserably :(
[19:48:10] <Yunohost Git/Infra notifications> Job [#25962](https://ci-apps.yunohost.org/ci/job/25962) for searxng failed miserably :(
[19:50:32] <Yunohost Git/Infra notifications> Job [#25963](https://ci-apps.yunohost.org/ci/job/25963) for vpnclient failed miserably :(
[19:51:40] <orhtej2> the sky is falling
[19:52:55] <Yunohost Git/Infra notifications> Job [#25964](https://ci-apps.yunohost.org/ci/job/25964) for wikijs failed miserably :(
[19:55:28] <Yunohost Git/Infra notifications> Job [#25965](https://ci-apps.yunohost.org/ci/job/25965) for jackett failed miserably :(
[19:57:24] <Émy - OniriCorpe> Job #1312 for oniricorpe failed miserably :(
[19:57:58] <Yunohost Git/Infra notifications> Job [#25966](https://ci-apps.yunohost.org/ci/job/25966) for ghost failed miserably :(
[20:00:19] <Yunohost Git/Infra notifications> Job [#25967](https://ci-apps.yunohost.org/ci/job/25967) for jellyfin-vue failed miserably :(
[20:12:00] <Yunohost Git/Infra notifications> Job [#25968](https://ci-apps.yunohost.org/ci/job/25968) for mattermost failed miserably :(
[21:00:30] <thatoo> Hello,

In manifest.toml, I wrote
```
[resources.system_user]
# This will provision/deprovision a unix system user
allow_email = true
```

to get a dedicated user for this app.
In the install script, I wrote
```
admin_pwd=$YNH_APP_ARG_PASSWORD
user=$app
```

if I write the command

`$install_dir/bin/bench get-app --branch v4 dokos`

then I get an error saying that this command should not be launched as root so I change the command into

`sudo -u $user $install_dir/bin/bench`

then I get the problem that it asks for the $user password.

How can I solve this issue?
[21:03:18] <orhtej2> > <@thatoo:defis.info> Hello,
>
> In manifest.toml, I wrote
> ```
> [resources.system_user]
> # This will provision/deprovision a unix system user
> allow_email = true
> ```
>
> to get a dedicated user for this app.
> In the install script, I wrote
> ```
> admin_pwd=$YNH_APP_ARG_PASSWORD
> user=$app
> ```
>
> if I write the command
>
> `$install_dir/bin/bench get-app --branch v4 dokos`
>
> then I get an error saying that this command should not be launched as root so I change the command into
>
> `sudo -u $user $install_dir/bin/bench`
>
> then I get the problem that it asks for the $user password.
>
> How can I solve this issue?

[`ynh_exec_as`](https://yunohost.org/en/packaging_apps_helpers#ynh-exec-as)
[21:29:58] <thatoo> well it asks also for $user's password
[21:45:18] <tituspijean> Use $app instead? That's the variable automagically set by YunoHost.
[21:46:16] <orhtej2> > <@thatoo:defis.info> well it asks also for $user's password

```
ERROR: Package 'frappe' requires a different Python: 3.9.2 not in '<3.13,>=3.10'
```
GG RIP I guess?
I think it's `bench` having opinions on 'user that runs this needs to not be `root` BUT be able to `sudo`'
[21:46:43] <tituspijean> Oh wait. Check what the bench thing does. Once upon a time I tried to package a what'sitsname app with that binary. And it was trying to do some funky stuff.
[21:46:55] <tituspijean> What'sitsname=Frappe
[21:47:19] <orhtej2> > <@titus:pijean.ovh> Oh wait. Check what the bench thing does. Once upon a time I tried to package a what'sitsname app with that binary. And it was trying to do some funky stuff.

that's what sources `bench`, yes
[21:47:49] <thatoo> > ```
> ERROR: Package 'frappe' requires a different Python: 3.9.2 not in '<3.13,>=3.10'
> ```
> GG RIP I guess?
> I think it's `bench` having opinions on 'user that runs this needs to not be `root` BUT be able to `sudo`'

did you try with yunohost 12 ? It can't work on yunohost 11
[21:48:09] <orhtej2> I have not, you never told me it was a prerequisite ;)
[21:48:28] <orhtej2> do you have any logs of the failed install? I'm curious what it was needing the password for exactly
[21:49:30] <thatoo> https://paste.yunohost.org/raw/icunolibuz
[21:49:33] <orhtej2> btw and by btw I mean in unrelated news can we merge `testing` to `master` in Gitea? It's lacking security fixes rn
[21:49:52] <orhtej2> Josué IIRC ^
[21:51:02] <tituspijean> (In my case, it was the ERP app built with Frappe, and it was trying to setup its own Nginx configuration)
[21:51:05] <orhtej2> > <@thatoo:defis.info> https://paste.yunohost.org/raw/icunolibuz

```
supervisor_status = get_cmd_output("sudo supervisorctl status", cwd=bench_path)
```
yeeeah that's not gonna fly without patching or working around `bench` :/
[21:52:00] <orhtej2> you two should talk as I think thatoo is curiously packaging Dokos ERP built with Frappe framework ;)
[21:53:08] <tituspijean> I'm not at home though, so I can only write from memory, which is notoriously bad whenever it's about me coding. 😅
[21:56:54] <orhtej2> this is not happening with YNH packaging I'm afraid: https://github.com/frappe/bench/blob/5a0922d9918ecf37fb5bede93f5921d45f3334cb/bench/utils/bench.py#L319
[22:00:09] <thatoo> Juste to be sure, here is the script I'm working on https://github.com/Thatoo/Dokos_ynh/blob/test/scripts/install based on my bach script https://github.com/Thatoo/Dokos_ynh/blob/Thatoo-bash-script-install/bash-script-install/dokos_install.sh which is working smoothly except it requires password time to time
[22:02:06] <thatoo> > this is not happening with YNH packaging I'm afraid: https://github.com/frappe/bench/blob/5a0922d9918ecf37fb5bede93f5921d45f3334cb/bench/utils/bench.py#L319

you mean that it won't be possible to make a Dokos package?
[22:02:36] <thatoo> because of this line in bench command
`supervisor_status = get_cmd_output("sudo supervisorctl status", cwd=bench_path)`
?
[22:04:41] <orhtej2> > <@thatoo:defis.info> because of this line in bench command
> `supervisor_status = get_cmd_output("sudo supervisorctl status", cwd=bench_path)`
> ?

Yes, it needs to run as user in `sudoers` group
[22:07:09] <thatoo> and the $app system user could not be added to the `sudoers` group at the beginning of the install script and removed at the end?
[22:12:51] <orhtej2> > <@thatoo:defis.info> and the $app system user could not be added to the `sudoers` group at the beginning of the install script and removed at the end?

It uses sudo for funky stuff indeed
[22:15:51] <thatoo> 🥴
[22:16:11] <thatoo> I'm working on it since january, https://github.com/Thatoo/Dokos_ynh/discussions/2
[22:17:32] <thatoo> I've requested a PR on frappe to solve an issue with the way it was handling mysql db before I could manage to have a full bash script
[22:18:53] <thatoo> and now I have this bash script, I understand it was useless because of the way it uses `sudo` 😵‍💫
[22:21:39] <Émy - OniriCorpe> does anybody can test this https://github.com/YunoHost-Apps/forgejo_ynh/pull/95 pretty please, so i can merge? 🥺
[22:25:04] <orhtej2> > <@thatoo:defis.info> and now I have this bash script, I understand it was useless because of the way it uses `sudo` 😵‍💫

it beats me, perhaps there's a way around that by adding `$app` to `sudoers` temporarily, perhaps it's a matter of eliminating `bench` alltogether
[23:02:32] <Yunohost Git/Infra notifications> Job [#25969](https://ci-apps.yunohost.org/ci/job/25969) for cubiks-2048 failed miserably :(
[23:04:52] <Yunohost Git/Infra notifications> Job [#25970](https://ci-apps.yunohost.org/ci/job/25970) for ghost failed miserably :(
[23:06:43] <thatoo> I tried adding
`adduser $app sudo`
at the beginning os install script but it didn't help...
So making a Dokos package would require eliminating `bench` alltogether and I'm afraid it would be a huge task.
[23:07:15] <Yunohost Git/Infra notifications> Job [#25971](https://ci-apps.yunohost.org/ci/job/25971) for nitter failed miserably :(
[23:09:37] <Yunohost Git/Infra notifications> Job [#25972](https://ci-apps.yunohost.org/ci/job/25972) for archivebox failed miserably :(
[23:11:59] <Yunohost Git/Infra notifications> Job [#25973](https://ci-apps.yunohost.org/ci/job/25973) for domoticz failed miserably :(
[23:12:06] <Yunohost Git/Infra notifications> [apps] Longbowman [commented](https://github.com/YunoHost/apps/pull/2263#issuecomment-2081231073) on [issue #2263](https://github.com/YunoHost/apps/pull/2263) Update apps.toml - add jump_ynh: > Downloaded source for the app are for release 1.3.2, though the version in the manifest is 1.0~ynh1. Can you change ...
[23:14:21] <Yunohost Git/Infra notifications> Job [#25974](https://ci-apps.yunohost.org/ci/job/25974) for excalidraw failed miserably :(
[23:16:42] <Yunohost Git/Infra notifications> Job [#25975](https://ci-apps.yunohost.org/ci/job/25975) for headphones failed miserably :(
[23:19:04] <Yunohost Git/Infra notifications> Job [#25976](https://ci-apps.yunohost.org/ci/job/25976) for luckysheet failed miserably :(
[23:23:50] <Yunohost Git/Infra notifications> Job [#25978](https://ci-apps.yunohost.org/ci/job/25978) for mosquitto failed miserably :(
[23:24:02] <Émy - OniriCorpe> i have a huge bug to report to an upstream but i can't because sh.ht is trash lol
[23:24:54] <Émy - OniriCorpe> basically i have a .txt file on my server, both served on web and gemini
but the gemini serveur refuses to serve it if it's encoded in UTF16, but serves it if it's encoded in UTF8
[23:25:38] <Émy - OniriCorpe> turns out, i have encoding issues with the `≥` character in UTF8, so i HAVE to use UTF16
[23:25:58] <Émy - OniriCorpe> the faulty gemini server: https://git.sr.ht/~int80h/gemserv
[23:26:11] <Yunohost Git/Infra notifications> Job [#25979](https://ci-apps.yunohost.org/ci/job/25979) for peertube failed miserably :(
[23:28:33] <Yunohost Git/Infra notifications> Job [#25980](https://ci-apps.yunohost.org/ci/job/25980) for phpldapadmin failed miserably :(
[23:30:55] <Yunohost Git/Infra notifications> Job [#25981](https://ci-apps.yunohost.org/ci/job/25981) for pyload failed miserably :(
[23:33:19] <Yunohost Git/Infra notifications> Job [#25982](https://ci-apps.yunohost.org/ci/job/25982) for rocketchat failed miserably :(
[23:35:40] <Yunohost Git/Infra notifications> Job [#25983](https://ci-apps.yunohost.org/ci/job/25983) for shiori failed miserably :(
[23:38:02] <Yunohost Git/Infra notifications> Job [#25984](https://ci-apps.yunohost.org/ci/job/25984) for sonarr failed miserably :(
[23:40:24] <Yunohost Git/Infra notifications> Job [#25985](https://ci-apps.yunohost.org/ci/job/25985) for transfersh failed miserably :(
[23:42:51] <Yunohost Git/Infra notifications> Job [#25986](https://ci-apps.yunohost.org/ci/job/25986) for umami failed miserably :(
[23:45:07] <Yunohost Git/Infra notifications> Job [#25987](https://ci-apps.yunohost.org/ci/job/25987) for yunomonitor failed miserably :(
[23:47:29] <Yunohost Git/Infra notifications> Job [#25988](https://ci-apps.yunohost.org/ci/job/25988) for autobrr failed miserably :(
[23:49:50] <Yunohost Git/Infra notifications> Job [#25989](https://ci-apps.yunohost.org/ci/job/25989) for rsshub failed miserably :(
[23:52:11] <Yunohost Git/Infra notifications> Job [#25990](https://ci-apps.yunohost.org/ci/job/25990) for reiverr failed miserably :(
[23:57:57] <Yunohost Git/Infra notifications> Job [#25962](https://ci-apps.yunohost.org/ci/job/25962) for searxng failed miserably :(