Limezy
March 25, 2022, 2:23pm
1
Hi everybody !
I’m currently trying to package Dex software (https://dexidp.io ).
That software is based on Go, so I have decided to use the experimental go helper .
I am facing a crazy problem and have tried to solve it for days without success…
When I install my dex app from the command line, everything works smoothly and perfectly
Same from the CI server
But when I install my dex app from the web UI, I get a Missing $GOPATH
error which makes the build fail
Anybody would have some guidance about what could be my issue and how to solve it ?
Many thanks in advance !
(You can try using my testing branch here : GitHub - YunoHost-Apps/dex_ynh at testing )
In the install script
source /usr/share/yunohost/helpers
?
Limezy
March 25, 2022, 3:51pm
3
Sorry I didn’t understand your reply ?
That line is pretty standard and required for all Yunohost packages I guess ?
I’m just learning packaging
I searched some apps based on go and noticed that line.
Sorry.
Can you provide the install log?
Limezy
March 25, 2022, 4:34pm
5
Nice ! Which package are you building ?
Sure, here you are (I think it was with the current testing branch)
I tried x-prober but failed. It doesn’t work in private mode. And I helped a little in joomla. Nothing great till now.
That’s indeed very weird. Can you try force-loading the path?
# $PATH contains the path of the requested version of Go.
# However, $PATH is duplicated into $go_path to outlast any manipulation of $PATH
# You can use the variable `$ynh_go_load_path` to quickly load your Go version
# in $PATH for an usage into a separate script.
# Exemple: $ynh_go_load_path $final_path/script_that_use_gem.sh`
So make build 2>&1
would become $ynh_go_load_path make build 2>&1
I tried it and didn’t work
https://paste.yunohost.org/raw/eguceqesep
2022-03-25 22:42:43,956: DEBUG - /opt/yunohost/dex /var/cache/yunohost/**********_tmp_work_dirs/**********_1aww56bn/scripts
2022-03-25 22:42:43,957: DEBUG - + PATH=/opt/goenv/versions/1.18.0/bin:/opt/goenv/shims:/opt/goenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin make build
2022-03-25 22:42:43,979: DEBUG - ./install: ligne 121: PATH=/opt/goenv/versions/1.18.0/bin:/opt/goenv/shims:/opt/goenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: Aucun fichier ou dossier de ce type
2022-03-25 22:42:43,981: DEBUG - + ynh_exit_properly
2022-03-25 22:42:43,982: DEBUG - + local exit_code=127
Limezy
March 26, 2022, 11:15am
9
Yes I confirm !
I have tried and got the exact same error
Limezy
April 1, 2022, 2:56pm
10
Any idea from an experienced Go user on how to solve that problem ?
I have no idea about go, but I read this last time we talked about it
linux, ubuntu, go
The “new way” link says that gopath is not needed anymore since 1.11. I don’t understand but it may help you
Limezy
April 2, 2022, 3:11pm
12
Yes I’ve read that too.
But to do as they propose, the “new way”, would require some big changes since I would have to download the source, and then move it to the “go” location before building. Probably not ideal for a Yunohost app.
https://ci-apps-bullseye.yunohost.org/ci/job/1656
Bad news is that the Missing $GOPATH error also happens on Bullseye, and even worse : it happens in command line, which is not the case for Buster
Limezy
April 3, 2022, 3:41pm
13
My problem has just been fixed by @yalh76
YunoHost-Apps:testing
← YunoHost-Apps:bullseye
opened 02:39AM - 03 Apr 22 UTC
## Problem
- *Bullseye Level0*
## Solution
- *Fix bullseye*
## PR St… atus
- [ ] Code finished and ready to be reviewed/tested
- [ ] The fix/enhancement were manually tested (if applicable)
## Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)
Thank you so much !
1 Like