[09:13:59]
<Yunohost Git/Infra notifications> [issues] tituspijean reopened [issue #2421](https://github.com/YunoHost/issues/issues/2421): Can not view logs via YNH admin
[09:55:01]
<Yunohost Git/Infra notifications> [yunohost] yunohost-bot opened [pull request #1914](https://github.com/YunoHost/yunohost/pull/1914): Translations update from Weblate
[10:35:57]
<Yunohost Git/Infra notifications> ddoadm forked yunohost-admin to [ddoadm/yunohost-admin](https://github.com/ddoadm/yunohost-admin)
[15:34:53]
<Yunohost Git/Infra notifications> [yunohost] alexAubin merged [pull request #1914](https://github.com/YunoHost/yunohost/pull/1914): Translations update from Weblate
[15:34:54]
<Yunohost Git/Infra notifications> [yunohost] alexAubin pushed 3 commits to dev ([bfbc7035ddbd...7ee17342657e](https://github.com/YunoHost/yunohost/compare/bfbc7035ddbd...7ee17342657e))
[15:34:57]
<Yunohost Git/Infra notifications> [yunohost/dev] Translated using Weblate (Indonesian) Currently translated at 69.6% (561 of 805 strings) Translation: YunoHost/core Tr... - cjdw
[15:45:25]
<Yunohost Git/Infra notifications> 🏗️ Starting build for yunohost/11.2.22+202407201545 for bullseye/unstable/all ...
[15:46:53]
<Yunohost Git/Infra notifications> ✔️ Completed build for yunohost/11.2.22+202407201545 for bullseye/unstable/all.
[16:35:18]
<tituspijean> I've got a bug with helpers (?) while upgrading snappymail:
[16:36:13]
<tituspijean> mmh the logging is a bit ridiculous, I'm getting 4 suggestions to use yunopaste in the terminal.
[16:36:17]
<tituspijean> ```
yunohost app upgrade snappymail
Info: Now upgrading snappymail…
Info: Creating a safety backup prior to the upgrade
Info: Collecting files to be backed up for snappymail…
Info: Declaring files to be backed up...
Info: Backup script completed for snappymail. (YunoHost will then actually copy those files to the archive).
Info: Creating a backup archive from the collected files…
Info: The archive will contain about 49.0MB of data.
Success! Backup created: snappymail-pre-upgrade2
Success! Backup deleted: snappymail-pre-upgrade1
Info: Updating sources...
Info: Updating system_user...
Info: Updating install_dir...
Info: Updating permissions...
Info: Updating apt...
Warning: /usr/share/yunohost/helpers.v2.1.d/setting: line 34: ynh_handle_getopts_args: command not found
Error: provision_or_update failed for apt : An error occured inside the script snippet
Info: The operation 'Upgrade the 'snappymail' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20240720-163314-app_upgrade-snappymail' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: INFO - Updating permissions...
Info: DEBUG - Nothing to update in LDAP
Info: DEBUG - Permission 'snappymail.main' updated
Info: DEBUG - To view the log of the operation 'Update accesses for permission 'snappymail'', use the command 'yunohost log show 20240720-163315-user_permission_update-snappymail'
Info: DEBUG - Nothing to update in LDAP
Info: DEBUG - Permission 'snappymail.main' updated
Info: DEBUG - To view the log of the operation 'Update URL related to permission 'snappymail'', use the command 'yunohost log show 20240720-163316-permission_url-snappymail'
Info: DEBUG - The permission database has been resynchronized
Info: DEBUG - SSOwat configuration regenerated
Info: INFO - Updating apt...
Info: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./provision_or_update_apt" 7>&1']'
Info: DEBUG - + source /usr/share/yunohost/helpers
Info: DEBUG - ++++ dirname -- /usr/share/yunohost/helpers
Info: DEBUG - +++ cd -- /usr/share/yunohost
Info: DEBUG - +++ pwd
Info: DEBUG - ++ SCRIPT_DIR=/usr/share/yunohost
Info: DEBUG - ++ YNH_HELPERS_VERSION=2.1
Info: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
Info: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
Info: ERROR - provision_or_update failed for apt : An error occured inside the script snippet
Warning: Failed to update apt : The operation 'Upgrade the 'snappymail' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20240720-163314-app_upgrade-snappymail' to get help
Info: Reverting sources...
Info: Reverting system_user...
Info: Reverting install_dir...
Info: Reverting permissions...
Info: Reverting apt...
Warning: /usr/share/yunohost/helpers.v2.1.d/setting: line 34: ynh_handle_getopts_args: command not found
Error: provision_or_update failed for apt : An error occured inside the script snippet
Info: The operation 'Provisioning/deprovisioning/updating a resource' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20240720-163322-resource_snippet-snappymail' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./provision_or_update_apt" 7>&1']'
Info: DEBUG - + source /usr/share/yunohost/helpers
Info: DEBUG - ++++ dirname -- /usr/share/yunohost/helpers
Info: DEBUG - +++ cd -- /usr/share/yunohost
Info: DEBUG - +++ pwd
Info: DEBUG - ++ SCRIPT_DIR=/usr/share/yunohost
Info: DEBUG - ++ YNH_HELPERS_VERSION=2.1
Info: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
Info: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
Info: ERROR - provision_or_update failed for apt : An error occured inside the script snippet
Error: Failed to rollback apt : The operation 'Provisioning/deprovisioning/updating a resource' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20240720-163322-resource_snippet-snappymail' to get help
Error: Provisioning, deprovisioning, or updating resources for snappymail failed: The operation 'Upgrade the 'snappymail' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20240720-163314-app_upgrade-snappymail' to get help
Error: None
```
[16:37:29]
<Aleks (he/him/il/lui)> `/usr/share/yunohost/helpers.v2.1.d/setting: line 34: ynh_handle_getopts_args: command not found`
[16:37:30]
<tituspijean> and I'm also experiencing https://github.com/YunoHost/issues/issues/2421
[16:37:31]
<Aleks (he/him/il/lui)> wtf :|
[16:37:51]
<tituspijean> I'm on 11.2.22
[16:38:57]
<Aleks (he/him/il/lui)> `grep 'ynh_handle_getopts_args' /usr/share/yunohost/helpers/helpers.v2.1.d/getopts` shows the getopts declaration, right ?
[16:40:00]
<tituspijean> "not a directory" error :p
[16:40:22]
<Aleks (he/him/il/lui)> que
[16:40:45]
<Aleks (he/him/il/lui)> well can you ls the dir etc ?
[16:40:57]
<tituspijean> ```
helpers.v2.1.d# grep ynh_handle_getopts_args -rn .
[...]
./getopts:43:ynh_handle_getopts_args() {
```
[16:41:18]
<tituspijean> so the declaration is in there
[16:42:35]
<tituspijean> there's something funky
```
ls /usr/share/yunohost/helpers/helpers.v2.1.d/getopts
ls: cannot access '/usr/share/yunohost/helpers/helpers.v2.1.d/getopts': Not a directory
```
[16:43:03]
<tituspijean> but
```
ls /usr/share/yunohost/helpers.v2.d/getopts
/usr/share/yunohost/helpers.v2.d/getopts
```
[16:44:47]
<tituspijean> ah yeah it was the path you gave which had an extra "helpers/"
[16:44:51]
<tituspijean> ```
grep 'ynh_handle_getopts_args' /usr/share/yunohost/helpers.v2.1.d/getopts
# ynh_handle_getopts_args "$@"
# usage: ynh_handle_getopts_args "$@"
# that want to use ynh_handle_getopts_args
ynh_handle_getopts_args() {
```
[16:46:00]
<Aleks (he/him/il/lui)> meh, why would it says that it doesnt exist then T_T
[16:48:56]
<tituspijean> /shrug
[16:50:34]
<Aleks (he/him/il/lui)> can you try sourcing the helpers manually (after an `export YNH_HELPERS_VERSION=2.1`) and checking if the getopts func exists ? x_x
[16:53:30]
<tituspijean> looks good:
[16:53:36]
<tituspijean> ```
root@pijean:/home/titus# export YNH_HELPERS_VERSION=2.1
root@pijean:/home/titus# source /usr/share/yunohost/helpers
root@pijean:/home/titus# ynh_handle_getopts_args
```
(no error)
[16:53:50]
<Aleks (he/him/il/lui)> wtf
[16:54:11]
<Aleks (he/him/il/lui)> cosmic rays ?
[16:54:22]
<tituspijean> (trying again)
[16:54:28]
<tituspijean> no luck
[16:54:38]
<tituspijean> same error
[16:55:00]
<Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1381456754](https://gitlab.com/YunoHost/yunohost/-/pipelines/1381456754) failed on branch dev
[16:56:31]
<Aleks (he/him/il/lui)> are you able to `yunohost log share 20240720-163314-app_upgrade-snappymail` ? x_x
[16:56:54]
<tituspijean> https://paste.yunohost.org/raw/fahodikonu
[16:57:09]
<Aleks (he/him/il/lui)> :|
[17:00:46]
<Aleks (he/him/il/lui)> what if you manually source the helpers and run `ynh_app_setting_get --app="snappymail" --key="install_dir"` for example
[17:05:56]
<tituspijean> that works:
[17:06:02]
<tituspijean> ```
root@pijean:/home/titus# export YNH_HELPERS_VERSION=2.1
root@pijean:/home/titus# source /usr/share/yunohost/helpers
root@pijean:/home/titus# ynh_app_setting_get --app="snappymail" --key="install_dir"
/var/www/snappymail
```
[17:06:32]
<Aleks (he/him/il/lui)> (╯°□°)╯︵ ┻━┻
[17:08:12]
<Aleks (he/him/il/lui)> what about `app=snappymail` then `ynh_apt_install_dependencies mariadb-server php8.3-uuid php8.3-gmagick php8.3-sqlite3 php8.3-tidy php8.3-dom php8.3-intl php8.3-mysql php8.3-curl php8.3-gd php8.3-cli php8.3-xml php8.3-mbstring php8.3-ldap `
[17:08:59]
<tituspijean> interesting:
```
root@pijean:/home/titus# app=snappymail
root@pijean:/home/titus# ynh_apt_install_dependencies mariadb-server php8.3-uuid php8.3-gmagick php8.3-sqlite3 php8.3-tidy php8.3-dom php8.3-intl php8.3-mysql php8.3-curl php8.3-gd php8.3-cli php8.3-xml php8.3-mbstring php8.3-ldap
cat: /home/manifest.toml: No such file or directory
+ return 0
+ LC_ALL=C
+ DEBIAN_FRONTEND=noninteractive
+ apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://deb.debian.org/debian bullseye-backports InRelease
Hit:5 http://forge.yunohost.org/debian bullseye InRelease
Hit:6 https://packages.sury.org/php bullseye InRelease
Reading package lists...
+ _ynh_wait_dpkg_free
+ local try
+ set +o xtrace
+ return 0
+ cd /tmp/tmp.0dlXkmfAnG
+ LC_ALL=C
+ dpkg-deb --build snappymail-ynh-deps snappymail-ynh-deps.deb
+ cat ./dpkg_log
dpkg-deb: error: parsing file 'snappymail-ynh-deps/DEBIAN/control' near line 4 package 'snappymail-ynh-deps':
'Version' field value 'null': version number does not start with digit
+ false
+ ynh_exit_properly
+ local exit_code=1
+ [[ '' =~ ^install$|^upgrade$|^restore$ ]]
+ '[' 1 -eq 0 ']'
+ trap '' EXIT
+ set +o errexit
+ set +o nounset
+ sleep 0.5
+ exit 1
```
[17:09:15]
<Aleks (he/him/il/lui)> ah yes hmpf it needs a manifest
[17:09:37]
<tituspijean> ah my bad, should I be in `/etc/yunohost/app/snappymail` ?
[17:09:47]
<Aleks (he/him/il/lui)> ah yeah that could work
[17:10:26]
<tituspijean> still not working, same error
[17:10:52]
<tituspijean> ```
root@pijean:/etc/yunohost/apps/snappymail# ynh_apt_install_dependencies mariadb-server php8.3-uuid php8.3-gmagick php8.3-sqlite3 php8.3-tidy php8.3-dom php8.3-intl php8.3-mysql php8.3-curl php8.3-gd php8.3-cli php8.3-xml php8.3-mbstring php8.3-ldap
cat: /home/manifest.toml: No such file or directory
...
```
[17:11:18]
<Aleks (he/him/il/lui)> `YNH_APP_BASEDIR="/etc/yunohost/apps/snappymail/"` maybe
[17:11:58]
<tituspijean> getting there...
[17:12:11]
<tituspijean> ```
root@pijean:/home/titus# export YNH_HELPERS_VERSION=2.1
root@pijean:/home/titus# source /usr/share/yunohost/helpers
root@pijean:/home/titus# YNH_APP_BASEDIR="/etc/yunohost/apps/snappymail/"
root@pijean:/home/titus# app=snappymail
root@pijean:/home/titus# ynh_apt_install_dependencies mariadb-server php8.3-uuid php8.3-gmagick php8.3-sqlite3 php8.3-tidy php8.3-dom php8.3-intl php8.3-mysql php8.3-curl php8.3-gd php8.3-cli php8.3-xml php8.3-mbstring php8.3-ldap
+ return 0
+ LC_ALL=C
+ DEBIAN_FRONTEND=noninteractive
+ apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-updates InRelease
Hit:3 http://deb.debian.org/debian bullseye-backports InRelease
Hit:4 http://security.debian.org/debian-security bullseye-security InRelease
Hit:5 http://forge.yunohost.org/debian bullseye InRelease
Hit:6 https://packages.sury.org/php bullseye InRelease
Reading package lists...
+ _ynh_wait_dpkg_free
+ local try
+ set +o xtrace
+ return 0
+ cd /tmp/tmp.EFRSR6fCrg
+ LC_ALL=C
+ dpkg-deb --build snappymail-ynh-deps snappymail-ynh-deps.deb
+ LC_ALL=C
+ dpkg --force-depends --install ./snappymail-ynh-deps.deb
+ _ynh_apt_install --fix-broken
+ _ynh_apt --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install --fix-broken
+ _ynh_wait_dpkg_free
+ local try
+ set +o xtrace
+ return 0
+ LC_ALL=C
+ DEBIAN_FRONTEND=noninteractive
+ apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install --fix-broken
Reading package lists...
Building dependency tree...
Reading state information...
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libc-client2007e mlock php8.1 php8.1-curl php8.1-fpm php8.1-gd php8.1-intl php8.1-ldap php8.1-mysql php8.1-zip php8.2-apcu php8.2-bz2
php8.2-gmp php8.2-igbinary php8.2-imap php8.2-redis
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libgraphicsmagick-q16-3 php8.3-gmagick php8.3-uuid
Suggested packages:
graphicsmagick-dbg
Recommended packages:
ttf-dejavu-core
The following packages will be REMOVED:
nextcloud-ynh-deps php8.2-imagick
The following NEW packages will be installed:
libgraphicsmagick-q16-3 php8.3-gmagick php8.3-uuid
0 upgraded, 3 newly installed, 2 to remove and 0 not upgraded.
E: Packages need to be removed but remove is disabled.
+ cat /tmp/tmp.EFRSR6fCrg/dpkg_log
(Reading database ... 84546 files and directories currently installed.)
Preparing to unpack ./snappymail-ynh-deps.deb ...
Unpacking snappymail-ynh-deps (2.36.3~ynh1) over (2.36.1~ynh1) ...
dpkg: snappymail-ynh-deps: dependency problems, but configuring anyway as you requested:
snappymail-ynh-deps depends on php8.3-uuid; however:
Package php8.3-uuid is not installed.
snappymail-ynh-deps depends on php8.3-gmagick; however:
Package php8.3-gmagick is not installed.
Setting up snappymail-ynh-deps (2.36.3~ynh1) ...
++ tr '\n' ' '
++ grep -oP '(?<=-ynh-deps depends on ).*(?=; however)' /tmp/tmp.EFRSR6fCrg/dpkg_log
+ local 'problematic_dependencies=php8.3-uuid php8.3-gmagick '
+ [[ -n php8.3-uuid php8.3-gmagick ]]
+ grep -v 'fix-broken\|Reading state info'
+ sed --quiet '/Reading state info/,$p'
+ _ynh_apt_install php8.3-uuid php8.3-gmagick --dry-run
The following packages have unmet dependencies:
php8.3-gmagick : Depends: libgraphicsmagick-q16-3 (>= 1.3.20) but it is not going to be installed
Conflicts: php-imagick
Recommends: ttf-dejavu-core but it is not installable
+ ynh_die 'Unable to install apt dependencies'
+ set +o xtrace
Unable to install apt dependencies
exit
```
[17:12:57]
<Aleks (he/him/il/lui)> so yeah same bug as in support room, fixed by the testing PR, but that still doesn't explain why it fails when ran from the real workflow...
[17:13:27]
<Aleks (he/him/il/lui)> (you can retry by replacing gmagick with imagick if you want ...)
[17:15:03]
<tituspijean> maybe but...
```
yunohost app upgrade snappymail -u https://github.com/YunoHost-Apps/snappymail_ynh/tree/testing
Info: Now upgrading snappymail…
Info: Creating a safety backup prior to the upgrade
Info: Collecting files to be backed up for snappymail…
Info: Declaring files to be backed up...
Info: Backup script completed for snappymail. (YunoHost will then actually copy those files to the archive).
Info: Creating a backup archive from the collected files…
Info: The archive will contain about 49.0MB of data.
Success! Backup created: snappymail-pre-upgrade2
Success! Backup deleted: snappymail-pre-upgrade1
Info: Updating sources...
Info: Updating system_user...
Info: Updating install_dir...
Info: Updating permissions...
Info: Updating apt...
Warning: /usr/share/yunohost/helpers.v2.1.d/setting: line 85: ynh_handle_getopts_args: command not found
Error: provision_or_update failed for apt : An error occured inside the script snippet
Info: The operation 'Upgrade the 'snappymail' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20240720-171357-app_upgrade-snappymail' to get help
```
xD
[17:15:54]
<tituspijean> ah OK understood. that works with imagick indeed
[17:16:17]
<Aleks (he/him/il/lui)> have you tried burning your computers and trying on another one 😬
[17:16:49]
<Aleks (he/him/il/lui)> or ... `apt install tmate`, then `tmate`, then share the link to share your terminal x_x
[17:17:08]
<tituspijean> that's my VPS, last time I did that, Strasbourg burnt down :/
[17:17:35]
<tituspijean> > <@Alekswag:matrix.org> or ... `apt install tmate`, then `tmate`, then share the link to share your terminal x_x
I'll let you play with my VPS
[17:18:30]
<tituspijean> be careful, default shell is ZSH and helpers do not like it
[17:18:37]
<Aleks (he/him/il/lui)> ogod
[17:18:42]
<Aleks (he/him/il/lui)> dafuq
[17:19:10]
<tituspijean> I have to `bash` anytime I investigate them
[17:20:13]
<tituspijean> DM sent
[17:21:48]
<Aleks (he/him/il/lui)> i'm looking at how yunohost actually runs script ... could be very well that zsh is used by default
[17:25:41]
<Aleks (he/him/il/lui)> ogod it is zsh ...
[17:25:41]
<Aleks (he/him/il/lui)> but why
[17:25:47]
<tituspijean> yeah...
[17:25:54]
<Aleks (he/him/il/lui)> we're calling explicitly `bash -x script_snippet`
[17:26:14]
<tituspijean> I set it by default for root, so ... oh why indeed
[17:27:49]
<tituspijean> oh gosh what the hell
[17:29:42]
<tituspijean> ssh YWcajRPRMqWFtdCSEbne2j6eE@lon1.tmate.io
[17:30:56]
<tituspijean> https://stackoverflow.com/questions/54109341/bash-shebang-is-ignored-script-is-still-executed-with-zsh
[17:31:53]
<tituspijean> I'm fine with setting root's default shell back to bash
[17:32:07]
<Aleks (he/him/il/lui)> yeah i'm wondering if that's really the issue tho
[17:32:14]
<Aleks (he/him/il/lui)> but yeah idk let's do this to try to confirm
[17:32:41]
<Aleks (he/him/il/lui)> i mean `$SHELL` is zsh but that might just be because it's inherited from the parent somehow ?
[17:33:27]
<Aleks (he/him/il/lui)> though on my machines when i open a subprocess that is a shell, $SHELL does change...
[17:34:29]
<tituspijean> 👻 *zsh* 👻
[17:34:37]
<Aleks (he/him/il/lui)> who was phone?!
[17:35:36]
<tituspijean> let's restart the terminal
[17:36:16]
<Aleks (he/him/il/lui)> could it be that you also tweaked something like /etc/profile or something
[17:37:31]
<tituspijean> looks like I did not, but who knows
[20:10:21]
<Yunohost Git/Infra notifications> [yunohost] yunohost-bot opened [pull request #1915](https://github.com/YunoHost/yunohost/pull/1915): Translations update from Weblate
[20:49:03]
<Yunohost Git/Infra notifications> [yunohost] alexAubin pushed 1 commit to dev: helpers: force sourcing getopts before the other helpers to prevent stupid issues (in particular when renaming phpversio... ([3d53cf04](https://github.com/YunoHost/yunohost/commit/3d53cf046741ef7c8202b056fa77bab92077d799))
[20:49:04]
<Aleks (he/him/il/lui)> tituspijean: ^
[20:53:47]
<Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1381567330](https://gitlab.com/YunoHost/yunohost/-/pipelines/1381567330) failed on branch dev
[21:00:38]
<Yunohost Git/Infra notifications> 🏗️ Starting build for yunohost/11.2.22+202407202100 for bullseye/unstable/all ...
[21:01:55]
<Yunohost Git/Infra notifications> ✔️ Completed build for yunohost/11.2.22+202407202100 for bullseye/unstable/all.