pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/caddy
Module Name: pkgsrc
Committed By: jperkin
Date: Wed Nov 23 10:07:30 UTC 2022
Modified Files:
pkgsrc/www/caddy: Makefile distinfo
Added Files:
pkgsrc/www/caddy/patches: patch-listen__illumos.go
patch-listen__unix.go
Log Message:
caddy: Fix build on SunOS.
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 pkgsrc/www/caddy/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/www/caddy/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/www/caddy/patches/patch-listen__illumos.go \
pkgsrc/www/caddy/patches/patch-listen__unix.go
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/www/caddy/Makefile
diff -u pkgsrc/www/caddy/Makefile:1.61 pkgsrc/www/caddy/Makefile:1.62
--- pkgsrc/www/caddy/Makefile:1.61 Wed Nov 2 19:39:50 2022
+++ pkgsrc/www/caddy/Makefile Wed Nov 23 10:07:30 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.61 2022/11/02 19:39:50 bsiegert Exp $
+# $NetBSD: Makefile,v 1.62 2022/11/23 10:07:30 jperkin Exp $
DISTNAME= caddy-2.6.2
PKGREVISION= 1
@@ -11,9 +11,15 @@ HOMEPAGE= https://caddyserver.com/
COMMENT= General-purpose web server
LICENSE= apache-2.0
-GO_BUILD_PATTERN= ./...
EXTRACT_USING= bsdtar
+# Work around go's lack of conditional compilation.
+pre-patch:
+ ${CP} ${WRKSRC}/listen_unix.go ${WRKSRC}/listen_illumos.go
+
+post-patch:
+ ${CP} ${WRKSRC}/listen_illumos.go ${WRKSRC}/listen_solaris.go
+
.include "go-modules.mk"
.include "../../lang/go/go-module.mk"
Index: pkgsrc/www/caddy/distinfo
diff -u pkgsrc/www/caddy/distinfo:1.15 pkgsrc/www/caddy/distinfo:1.16
--- pkgsrc/www/caddy/distinfo:1.15 Tue Oct 25 18:12:33 2022
+++ pkgsrc/www/caddy/distinfo Wed Nov 23 10:07:30 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2022/10/25 18:12:33 bsiegert Exp $
+$NetBSD: distinfo,v 1.16 2022/11/23 10:07:30 jperkin Exp $
BLAKE2s (caddy-2.6.2.tar.gz) = 38591c87355c19b11561051e09bd8c196087d6bcf30cbeff3664bbc7056f9af7
SHA512 (caddy-2.6.2.tar.gz) = 01761de707668d589af7eeecdd694c94e867d5710f0b72285b4d2e6fb26cf9e10baeed3920e9b9b292c75568c84ff79b400026e37d7dcc003cebb839469b6c1b
@@ -3330,3 +3330,5 @@ Size (sigs.k8s.io_yaml_@v_v1.1.0.mod) =
BLAKE2s (sourcegraph.com_sourcegraph_appdash_@v_v0.0.0-20190731080439-ebfcffb1b5c0.mod) = 540120cf9a874588188b78b9cb2cb50598bfffd4f144e5fb2315313375937a3c
SHA512 (sourcegraph.com_sourcegraph_appdash_@v_v0.0.0-20190731080439-ebfcffb1b5c0.mod) =
7d863e4af4e480a247bc767d1de96ff8050b12a13a182a9a8fa68c983c2f0b1a16b509d40de3cca552082535f876458034e1510f0f0feef383f16e1f84f81282
Size (sourcegraph.com_sourcegraph_appdash_@v_v0.0.0-20190731080439-ebfcffb1b5c0.mod) = 43 bytes
+SHA1 (patch-listen__illumos.go) = b809ece5d61c1a1fd1f7826e4bef9715d3d2ea4f
+SHA1 (patch-listen__unix.go) = f24cd2be693e32d318bb4cd94b118ee1717ff528
Added files:
Index: pkgsrc/www/caddy/patches/patch-listen__illumos.go
diff -u /dev/null pkgsrc/www/caddy/patches/patch-listen__illumos.go:1.1
--- /dev/null Wed Nov 23 10:07:30 2022
+++ pkgsrc/www/caddy/patches/patch-listen__illumos.go Wed Nov 23 10:07:30 2022
@@ -0,0 +1,50 @@
+$NetBSD: patch-listen__illumos.go,v 1.1 2022/11/23 10:07:30 jperkin Exp $
+
+SunOS platforms do not have SO_REUSEPORT.
+
+--- listen_illumos.go.orig 2022-11-23 09:48:44.378654914 +0000
++++ listen_illumos.go
+@@ -15,7 +15,7 @@
+ // TODO: Go 1.19 introduced the "unix" build tag. We have to support Go 1.18 until Go 1.20 is released.
+ // When Go 1.19 is our minimum, remove this build tag, since "_unix" in the filename will do this.
+ // (see also change needed in listen.go)
+-//go:build aix || android || darwin || dragonfly || freebsd || hurd || illumos || ios || linux || netbsd || openbsd || solaris
++//go:build illumos || solaris
+
+ package caddy
+
+@@ -26,9 +26,6 @@ import (
+ "net"
+ "sync/atomic"
+ "syscall"
+-
+- "go.uber.org/zap"
+- "golang.org/x/sys/unix"
+ )
+
+ // reuseUnixSocket copies and reuses the unix domain socket (UDS) if we already
+@@ -96,23 +93,7 @@ func listenTCPOrUnix(ctx context.Context
+ return err
+ }
+ }
+- return reusePort(network, address, c)
+- }
+- return config.Listen(ctx, network, address)
+-}
+-
+-// reusePort sets SO_REUSEPORT. Ineffective for unix sockets.
+-func reusePort(network, address string, conn syscall.RawConn) error {
+- if isUnixNetwork(network) {
+ return nil
+ }
+- return conn.Control(func(descriptor uintptr) {
+- if err := unix.SetsockoptInt(int(descriptor), unix.SOL_SOCKET, unix.SO_REUSEPORT, 1); err != nil {
+- Log().Error("setting SO_REUSEPORT",
+- zap.String("network", network),
+- zap.String("address", address),
+- zap.Uintptr("descriptor", descriptor),
+- zap.Error(err))
+- }
+- })
++ return config.Listen(ctx, network, address)
+ }
Index: pkgsrc/www/caddy/patches/patch-listen__unix.go
diff -u /dev/null pkgsrc/www/caddy/patches/patch-listen__unix.go:1.1
--- /dev/null Wed Nov 23 10:07:30 2022
+++ pkgsrc/www/caddy/patches/patch-listen__unix.go Wed Nov 23 10:07:30 2022
@@ -0,0 +1,15 @@
+$NetBSD: patch-listen__unix.go,v 1.1 2022/11/23 10:07:30 jperkin Exp $
+
+SunOS platforms do not have SO_REUSEPORT.
+
+--- listen_unix.go.orig 2022-10-13 17:30:57.000000000 +0000
++++ listen_unix.go
+@@ -15,7 +15,7 @@
+ // TODO: Go 1.19 introduced the "unix" build tag. We have to support Go 1.18 until Go 1.20 is released.
+ // When Go 1.19 is our minimum, remove this build tag, since "_unix" in the filename will do this.
+ // (see also change needed in listen.go)
+-//go:build aix || android || darwin || dragonfly || freebsd || hurd || illumos || ios || linux || netbsd || openbsd || solaris
++//go:build aix || android || darwin || dragonfly || freebsd || hurd || ios || linux || netbsd || openbsd
+
+ package caddy
+
Home |
Main Index |
Thread Index |
Old Index