New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-client-vpn: init at 1.0.0 #128262
base: master
Are you sure you want to change the base?
aws-client-vpn: init at 1.0.0 #128262
Conversation
Binary fails at startup with "Process terminated. Couldn't find a valid ICU package installed on the system."
ef73c4a
to
c52a522
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
ln -s "$out/awsvpnclient/AWS VPN Client" "$out/bin/AWS VPN Client" | ||
ln -s "$out/awsvpnclient/Service/ACVC.GTK.Service" "$out/bin/ACVC.GTK.Service" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot have $out/awsvpnclient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure what to do here - the package is meant to be installed in /opt
and all executables and libraries are under /opt/awsvpnclient
in the package. Would it be better to just copy opt
to $out/opt
? (I think the binaries hardcode the /opt/awsvpnclient
path, which is what made the redirects necessary, but it seems like we'd need to preserve the structure).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/opt/awsvpnclient
wont work anyway and if we change the path anyway we can also rewrite it to $out/lib etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I updated to put awsvpnclient
under lib/awsvpnclient
in 48375ff
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Thanks for the review @SuperSandro2000 ! |
I got a little further in debugging the segfault by running in
which results in
So it looks like the segfault is happening inside sqlite (but I'm thinking this is more likely to be a manifestation of the problem than a root cause?) |
followed your steps, no clue yet. you probably want to add yourself to maintainers list: https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix |
"''${gappsWrapperArgs[@]}" | ||
done | ||
''; | ||
|
||
dontStrip = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this I get
Failed to create CoreCLR, HRESULT: 0x80004005
when trying to run the binary (I found this workaround mentioned here). Admittedly I don't really understand the issue or why this fixes it; would be good to know if there's a better solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to happen with all dotnet applications, no idea why.
IMHO just slap a comment to explain setting this, as in https://github.com/NixOS/nixpkgs/pull/114162/files#diff-07dd1ac705a7596aa88012cb4ed0854081fcb79530bfd88b06b5510c7fe0c571R24-R26
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, added a note in baef5fe
Co-authored-by: Ivan Kovnatsky <75213+ivankovnatsky@users.noreply.github.com>
I don't have any specific advice but have a look at #114162 for reference - it's another dotnet application from AWS, also packaged as deb, so they probably have roughly the same dependencies, probably need similar workarounds, etc. |
@mausch Thanks for the review! I'm on vacation for another week but planning to come back to this when I return. The example dot net derivation you referenced looks useful. |
Any update on this? I am also looking for a nixpkg to run AWS VPN client. |
I see that 1.0.3 is now available. I tried upgrading in the hope that whatever issue was causing the segfault would be resolved, but no such luck. I did manage to simplify the method of getting to the same result as before by following #114162 and using @abhibansal530 have you given this project a try? It's been satisfactory for me in the meantime. Full disclosure, I'm actually not using AWS VPN at work anymore, so getting this working hasn't been a super high priority for me lately. If anyone is up for taking it over, feel free to. |
Thanks @mcwitt , for now I was able to use AWS VPN using project mentioned by you. |
I've created a flake for the updated wrapper from samm-git/aws-vpn-client#16 -> here |
I used, with a little bump this https://github.com/ymatsiuk/awsvpnclient based on samm-git It is working, even if I have to copy/paste the link (triggered link browser does result in a dummy page) I get authenticated. Could we move forward by including this/part of this as nixpkgs? |
Thank you so much for this, you saved me on NixOS. |
Motivation for this change
Closes #128022
Note: This is not yet working. I'm pretty new to contributing to nixpkgs, and this is my first attempt at packaging a binary, so I'd appreciate any advice on the approach. Below is a description of the issues I've worked around so far.
autoPatchelfHook
. The results in a broken binary that immediately fails at runtime withProcess terminated. Couldn't find a valid ICU package installed on the system.
patchelf
, add missingicu
andgtk3
libraries to rpath. Now we get a popup sayingThere was a problem. Please report the issue
(with grayed-out "Agree" button).wrapProgram
fromwrapGAppsHook
to add redirect from/opt/awsvpnclient
to$out/awsvpnclient
. Now the error popup is gone and we get a normal-looking license agreement popup. But after accepting the application exits with the following printed to the terminal:Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)