remove all file system paths from the resulting executable.
Instead of absolute file system paths, the recorded file names
will begin either a module path@version (when using modules),
or a plain import path (when using the standard library, or GOPATH).
By default, the Go module cache is read-only. This become a problem
when cleaning up the build directory from within abuild. For this
reason, many existing aports for Go software employ one of the following
solutions: (1) passing -modcacherw manually (2) setting the chmod-clean
option or (3) overwriting default_cleanup_srcdir. By solving this
problem globally we make it easier to create packages for Go software
and ensure consistency in regards to cleaning the module cache.
From `go help environment`:
GOFLAGS
A space-separated list of -flag=value settings to apply
to go commands by default, when the given flag is known by
the current command. Flags listed on the command-line
are applied after this list and therefore override it.
And from `go help build`:
-buildmode mode
build mode to use. See 'go help buildmode' for more.
Setting this environment variable in /etc/abuild.conf allows us to build
all go binaries on the builders as PIE without needing to patch the go
compiler itself.
This introduces basic support for ccache, during packaging builds.
If you are building many packages, it is recommended to manually
increase the maximum size of the ccache cache. This is typically
achieved by modifying `~/.ccache/ccache.conf` and adjusting the
`max_size` setting.
Signed-off-by: Joseph Benden <joe@benden.us>
allow user specify if they want uninstall deps, remove srcdir and/or
pkgdir on failure or success.
We introduce CLEANUP and ERROR_CLEANUP config options in
/etc/abuild.conf. Valid values are: pkgdir srcdir deps.