From: Nam Nguyen Subject: unbreak net/dnscrypt-proxy 2.1.5pl20240118 [Was:Re: dnscrypt-proxy: Unable to set the close on exec flag: [function not implemented]] To: ports@openbsd.org Cc: Florian Obser , Theo Buehler Date: Wed, 24 Jan 2024 02:53:19 -0800 Theo Buehler writes: > On Wed, Jan 17, 2024 at 01:11:54PM +0100, Florian Obser wrote: >> On 2024-01-03 17:14 +01, Florian Obser wrote: >> > Hi there, >> > >> > dnscrypt-proxy fails thusly on -current: >> > >> > Jan 3 17:07:29 x395 dnscrypt-proxy[54029]: dnscrypt-proxy 2.1.5 >> > Jan 3 17:07:29 x395 dnscrypt-proxy[54029]: Network connectivity detected >> > Jan 3 17:07:29 x395 dnscrypt-proxy[54029]: Dropping privileges >> > Jan 3 17:07:29 x395 dnscrypt-proxy[54029]: Unable to set the close on exec flag: [function not implemented] > > The port uses golang.org/x/sys v0.11.0 whose fnctl() implementation does > > valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) > > It would need to use at least v0.15.0 to include jrick's > > https://go-review.googlesource.com/c/sys/+/538995 > > which is what DNSCrypt/dnscrypt-proxy's master branch seems to be using. > > So someone would need to update the port to use said branch, or build > from source. Here is an update to a more recent commit to unbreak dnscrypt-proxy with the removal of syscall in libc. It is better than having dnscrypt-proxy being broken. I took the commit that updated the go.mod to have golang.org/x/sys v0.16.0 (which is not the latest commit). see: https://github.com/DNSCrypt/dnscrypt-proxy/commit/63f8d9b30d41eac7cfa2668f2bf4a3da104ed9f0 The update - moves to DIST_TUPLE - defines PKGNAME to ensure an upgrade path - defines WRKDIST so that go-module(5) defines MODGO_SUBDIR = WRKDIST properly: "During execution of pre-configure target module moves source code from ${MODGO_SUBDIR} to ${WRKSRC}" It works in testing. OK? Index: Makefile =================================================================== RCS file: /cvs/ports/net/dnscrypt-proxy/Makefile,v retrieving revision 1.65 diff -u -p -r1.65 Makefile --- Makefile 12 Aug 2023 08:55:43 -0000 1.65 +++ Makefile 24 Jan 2024 10:38:07 -0000 @@ -1,8 +1,8 @@ COMMENT = flexible DNS proxy with support for encrypted DNS protocols -GH_ACCOUNT = jedisct1 -GH_PROJECT = dnscrypt-proxy -GH_TAGNAME = 2.1.5 +PKGNAME = dnscrypt-proxy-2.1.5pl20240118 +C = 63f8d9b30d41eac7cfa2668f2bf4a3da104ed9f0 +DIST_TUPLE += github jedisct1 dnscrypt-proxy ${C} . CATEGORIES = net @@ -18,6 +18,8 @@ MODULES = lang/go MODGO_TYPE = bin INSTDIR = ${PREFIX}/share/examples/dnscrypt-proxy + +WRKDIST = ${WRKDIR}/dnscrypt-proxy-${C} pre-configure: sed -i "s;cache_file = '\(.*\)\.md';cache_file =\ Index: distinfo =================================================================== RCS file: /cvs/ports/net/dnscrypt-proxy/distinfo,v retrieving revision 1.37 diff -u -p -r1.37 distinfo --- distinfo 12 Aug 2023 08:55:43 -0000 1.37 +++ distinfo 24 Jan 2024 10:38:07 -0000 @@ -1,2 +1,2 @@ -SHA256 (dnscrypt-proxy-2.1.5.tar.gz) = BExNuaPHvc+Ib/j4PEsTfS/TemVHepK/6Gv2lYfqc1U= -SIZE (dnscrypt-proxy-2.1.5.tar.gz) = 4065395 +SHA256 (jedisct1-dnscrypt-proxy-63f8d9b30d41eac7cfa2668f2bf4a3da104ed9f0.tar.gz) = 3xnf2ezSLYJVu8oXaswZWMN7VZ7EZ3dYYSMDLCzNFbc= +SIZE (jedisct1-dnscrypt-proxy-63f8d9b30d41eac7cfa2668f2bf4a3da104ed9f0.tar.gz) = 3983365