[Bug 295182] www/caddy-custom: doesn't build in poudriere

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 10 May 2026 22:39:49 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295182

            Bug ID: 295182
           Summary: www/caddy-custom: doesn't build in poudriere
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: adamw@FreeBSD.org
          Reporter: brad@facefault.org
             Flags: maintainer-feedback?(adamw@FreeBSD.org)
          Assignee: adamw@FreeBSD.org

Created attachment 270576
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=270576&action=edit
full build log

Using the head of the main ports branch and poudriere-devel-3.4.99.20260425,
building caddy-custom fails with an error that indicates it's using the build
user's home directory for the GOPATH and thus (because said directory is
/nonexistent) failing.

I've allowed network access for this port and am building with close to the
pkg-descr example in make.conf:

.if ${.CURDIR:M*/www/caddy-custom*}
       CADDY_CUSTOM_PLUGINS= github.com/greenpau/caddy-security
.endif

I'm not entirely sure what the best option here is; at least GOMODCACHE if not
GOPATH needs to be set, but just adding "modules" to the USES=go declaration
and including GO_ENV in the xcaddy command line fails with a recursive symlink.

The build phase log:

=======================<phase: build          >============================
===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=nobody UID=65534
GID=65534
===>  Building for caddy-custom-2.11.2.2.0.4.5.12_17
/bin/mkdir -p
/wrkdirs/usr/ports/www/caddy-custom/work/caddy-custom-2.11.2.2.0.4.5.12
cd /wrkdirs/usr/ports/www/caddy-custom/work/caddy-custom-2.11.2.2.0.4.5.12 &&
XCADDY_WHICH_GO="/usr/local/bin/go125"  XCADDY_GO_BUILD_FLAGS="-buildmode=exe
-v -trimpath -ldflags=-s -bui
ldvcs=false" /usr/local/bin/xcaddy build v2.11.2 --with
github.com/greenpau/caddy-security
2026/05/10 22:30:07 [INFO] absolute output file path:
/wrkdirs/usr/ports/www/caddy-custom/work/caddy-custom-2.11.2.2.0.4.5.12/caddy
2026/05/10 22:30:07 [INFO] Temporary folder:
/tmp/buildenv_2026-05-10-2230.141536883
2026/05/10 22:30:07 [INFO] Writing main module:
/tmp/buildenv_2026-05-10-2230.141536883/main.go
package main

import (
        caddycmd "github.com/caddyserver/caddy/v2/cmd"

        // plug in Caddy modules here
        _ "github.com/caddyserver/caddy/v2/modules/standard"
        _ "github.com/greenpau/caddy-security"
)

func main() {
        caddycmd.Main()
}
2026/05/10 22:30:07 [INFO] Initializing Go module
2026/05/10 22:30:07 [INFO] exec (timeout=0s): /usr/local/bin/go125 mod init
caddy
go: creating new go.mod: module caddy
go: to add module requirements and sums:
        go mod tidy
2026/05/10 22:30:07 [INFO] Pinning versions
2026/05/10 22:30:07 [INFO] exec (timeout=0s): /usr/local/bin/go125 get
-buildmode=exe -v -trimpath -ldflags=-s -buildvcs=false -v
github.com/caddyserver/caddy/v2@v2.11.2
go: could not create module cache: mkdir /nonexistent: permission denied
2026/05/10 22:30:07 [FATAL] exit status 1
*** Error code 1

-- 
You are receiving this mail because:
You are the assignee for the bug.