build: skip proxy verification when GOPRIVATE is set ai:claude-sonnet-4-6 #69

Manually merged
heiko merged 10 commits from dev into master 2026-05-24 15:58:31 +02:00
Owner

When GOPRIVATE is configured (in .gogogo.conf env: or the process environment), the Go module proxy is either not consulted or may return a stale cached hash. The existing verifyLocalTag() already ensures the local and remote tags agree, so the extra proxy/cache round-trip is redundant for private modules and causes false hash mismatches (observed with xr-invoiced, GOPRIVATE: "*").

Wire hasPrivateEnv() -- which already existed -- into the skipVerify decision in executeFromClone(). Also apply the same logic in runDryRunVerification() so --dry-run --verify gives a useful result instead of a spurious proxy error.

The in-code hint at release.go:758 said "set GOPRIVATE to fix private repo issues" but hasPrivateEnv() was never actually used to make that happen. This commit closes that gap.

(co)authored by ai:claude-sonnet-4-6

When GOPRIVATE is configured (in .gogogo.conf env: or the process environment), the Go module proxy is either not consulted or may return a stale cached hash. The existing verifyLocalTag() already ensures the local and remote tags agree, so the extra proxy/cache round-trip is redundant for private modules and causes false hash mismatches (observed with xr-invoiced, GOPRIVATE: "*"). Wire hasPrivateEnv() -- which already existed -- into the skipVerify decision in executeFromClone(). Also apply the same logic in runDryRunVerification() so --dry-run --verify gives a useful result instead of a spurious proxy error. The in-code hint at release.go:758 said "set GOPRIVATE to fix private repo issues" but hasPrivateEnv() was never actually used to make that happen. This commit closes that gap. (co)authored by ai:claude-sonnet-4-6
When GOPRIVATE is configured (in .gogogo.conf env: or the process
environment), the Go module proxy is either not consulted or may return
a stale cached hash.  The existing verifyLocalTag() already ensures
the local and remote tags agree, so the extra proxy/cache round-trip
is redundant for private modules and can cause false hash mismatches.

Wire hasPrivateEnv() — which already existed — into the skipVerify
decision in executeFromClone().  Also apply the same logic in
runDryRunVerification() so --dry-run --verify gives a useful result
instead of a spurious proxy error.

(co)authored by ai:claude-sonnet-4-6
Author
Owner

During testing: probably the change isn't required: I confused some tags and assigned it a 2nd time to an other commit which probably made the mod proxy inconsistent. While it should not build, the error message should be more readable

During testing: probably the change isn't required: I confused some tags and assigned it a 2nd time to an other commit which probably made the mod proxy inconsistent. While it should not build, the error message should be more readable
Config.Dir is now set at load time to the directory containing .gogogo.conf.
expandDebFileEntries, expandDebConffileEntries, and resolveDebScripts use
configDir (from Config.Dir) for user-specified paths; the VCS clone sourceDir
is only used for the debian/ overlay. A fallback to sourceDir when Dir is empty
keeps existing tests and non-file-based callers working unchanged.

Packaging errors (binary and source) now propagate as fatal errors instead of
being swallowed as verbose-only warnings. runPackaging returns pkgDir even on
error so the caller's deferred cleanupTmpDir still fires for partial artifacts.
Tests that build binary-only packages now explicitly disable source packaging
via disableDebSource(); TestPackageBuilds_SourcePackagesNotProducedWhenDisabled
replaces the misleadingly-named "DisabledByDefault" test.
Strip trailing /vN path elements from Go module paths (e.g. once/v2 ->
once) so package names, .dsc Source:, and .changes filenames are derived
correctly for modules using major-version path suffixes.

Add artifacts.common.name to allow explicit override of the module-derived
source/package name when auto-detection is insufficient.
.changes Source: was derived from the binary package name; reprepro
requires it to match the .dsc Source:. The binary .deb control lacked a
Source: field, causing reprepro to infer source = binary name, which
mismatched .changes.

Both now use debianSourceName() to extract the source name from the .dsc
asset filename, falling back to the binary name when no .dsc is present.
Move the default dupload staging directory from ~/.dupload-uploads/<pkg>
to $XDG_CACHE_HOME/gogogo/dupload-uploads/<pkg> so it no longer litters
the home directory.

Before calling dupload, compute the SHA256 of the signed .changes file
and compare it against a .gogogo-sha256 sidecar written on the last
successful upload. If the content changed (the common case, since Date:
varies per run), the stale .upload record is removed so dupload
re-uploads cleanly without --force. On success the sidecar is updated and
payload files (.deb, .dsc, .changes, etc.) are purged from the staging
directory; the tiny sidecar is preserved for future dedup checks.

Tracking issue for reprepro verification polling: #70
Adds TestPackagesSpec_UnmarshalFullPathBinaryNormalized to verify that
cmd/foo-server in a YAML config becomes foo-server after unmarshal.
The existing TestValidatePackages_FullPathBinary only exercised the
validation path via explicitCfg (no YAML), leaving the unmarshal
normalization in packages.go untested.
copyAssetsToOutdir used a hardcoded 0o666 mode, stripping the execute
bit from Linux binaries. Replacing the manual open/copy/close with
fsutil.Copy preserves the source mode (same approach as the rest of the
codebase) and drops 22 lines of boilerplate.
* fix/67-packages-binaries-accept-full-path:
  fix(release): preserve source permissions when copying blobs to outdir ai:claude-sonnet-4-6
  test(config): cover YAML unmarshal normalization of full binary paths ai:claude-sonnet-4-6
Fix Debian package description
All checks were successful
nagonag (Push) / nagonag (push) Successful in 1m47s
1d0e150a6d
heiko manually merged commit 1d0e150a6d into master 2026-05-24 15:58:31 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
heiko/gogogo!69
No description provided.