Skip to content
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

Debug curl calls during a build #314364

Closed
jshort opened this issue May 24, 2024 · 2 comments
Closed

Debug curl calls during a build #314364

jshort opened this issue May 24, 2024 · 2 comments

Comments

@jshort
Copy link
Contributor

jshort commented May 24, 2024

Issue description

I'm working to get nix-build to work in a corporate environment through a proxy. It seems to be able to make http/curl GETs for things in some cases and in other cases not and I get:

curl: (5) Could not resolve proxy: myproxy

I'm setting the env vars http_proxy, https_proxy, and ftp_proxy though I have confirmed through debugging it is only looking at https_proxy.

The following command works fine:

https_proxy=http://myproxy:8080 /usr/bin/curl https://sources.debian.org/data/main/s/sharutils/1:4.15.2-2+deb9u1/debian/patches/01-fix-heap-buffer-overflow-cve-2018-1000097.patch

But for some reason when nix-build runs the package build, it can't resolve myproxy from /etc/hosts.

Is there a way to debug nix-build to see all the commands being invoked for fetchurl or fetchpatch?

@jshort
Copy link
Contributor Author

jshort commented May 24, 2024

Oh yuck:

https_proxy=myproxy:8080 /usr/bin/curl -4 https://sources.debian.org/data/main/s/sharutils/1:4.15.2-2+deb9u1/debian/patches/01-fix-heap-buffer-overflow-cve-2018-1000097.patch
curl: (5) Could not resolve proxy: myproxy

So it seems that nix-build is passing -4 to force ipv4. Is there a way to override this?

@jshort
Copy link
Contributor Author

jshort commented May 24, 2024

Issue was this: #277471

@jshort jshort closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant