"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Mikhail <mp39590@gmail.com>
Subject:
"got fetch" fails on PROFILE=1 build
To:
gameoftrees@openbsd.org
Date:
Mon, 11 Apr 2022 18:01:16 +0300

Download raw body.

Thread
If got is compiled with PROFILE=1, "got fetch" and "got clone" don't
work with git:// repositories, it fails with this error:

Connecting to "origin" git.gameoftrees.org
got: git.gameoftrees.org: no address associated with name

After applying inlined patch it starts to work fine. Not sure if
"/etc/resolv.conf" should have gone in its own #define, because the path
is pretty standard.

diff 20e420c8b1505de5032e4c2672147483bd15d616 /home/misha/work/got
blob - 096f0320a2c1debb9a1de9ac9c0a8e2bbab704cd
file + lib/dial.c
--- lib/dial.c
+++ lib/dial.c
@@ -62,6 +62,12 @@ got_dial_apply_unveil(const char *proto)
 		}
 	}
 
+	if (strcmp(proto, "git") == 0) {
+		if (unveil("/etc/resolv.conf", "r") != 0) {
+			return got_error_from_errno("unveil /etc/resolv.conf");
+		}
+	}
+
 	return NULL;
 }