| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
As mentioned in the bug, the eclassdoc was stale and mentioned the old
and now-removed dev-go/golicense. Suggest dev-go/lichen instead.
Bug: https://bugs.gentoo.org/913755
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/919751
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This change calls go-env_set_compile_environment in go-module's
src_unpack to set up a sane compile environment early in the go build
process. This un-breaks cross compiling of all golang ebuilds that
inherit go-module.
Signed-off-by: Thilo Fromm <thilo.alexander@gmail.com>
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only call site of _go-module_gomod_encode() was using $() in a loop
over EGO_SUM. This caused bash to fork() for every loop iteration, which
significantly affected the time it takes to "source" an ebuild using
EGO_SUM.
For example, "pkg pkg source =sys-cluster/k3s-1.23.3_p1" previously took
2.4 seconds. Inlining _go-module_gomod_encode() reduces this to
236 milliseconds.
This also adds missing 'local' declarations for some variables.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
| |
Rephrase to make clear that go-module_src_unpack itself isn't actually
deprecated, just one of its modes of operation (the one with EGO_SUM).
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Closes: https://github.com/gentoo/gentoo/pull/30061
Signed-off-by: David Seifert <soap@gentoo.org>
|
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/901017
Fixes: d4ff29b30952ca957b58b5878550f5d23f908dbf
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
matoro reports that any Go packages fail on ppc64 right now as
USE=big-endian is not an implicit USE flag. Switch to tc-endian
from toolchain-funcs.eclass instead.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/893316
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
| |
Fixes: f4dade77c0882aab06f35f8db1154d0a52f0ba1b
Bug: https://bugs.gentoo.org/702598
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/702598
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
| |
It appears that go build does not completely detect whether a module has
been modified since it was downloaded, so we need this step.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Set XZ_OPT='-T0 -9' in the example tar call which:
* uses threads to compress (and this will, with newer xz
(>= 5.3.3 alpha), allow parallel decompression)
* sets a higher compression level (default is -6)
- Mention preferences for choice of compression method:
developers should choose a method which supports parallel
decompression if possible, and also choose a higher compression
level given the size of these tarballs.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
This adds -buildvcs=false to the default build flags and bumps the
minimum version of go to 1.18.
Bug: https://bugs.gentoo.org/836261
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
| |
Thanks-to: Ionen Wolkens <ionen@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/835396
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
| |
No trailing colon (:).
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We previously invoked "mod tidy" without the ego helper function in a
non-fatal way. This was switched to using the ego helper in
f9ee55e698f8 ("go-module.eclass: use ego helper function") but without
prefixing the call with nonfatal. Hence the semantic of the eclass
changes: a previously non-fatal invocation became fatal, causing e.g.,
bug #834695.
[sam: fixes semantic change which wasn't advertised/seemingly intentional,
so let's get this in now to avoid a significant number of ebuilds being broken.
We can introduce this change if desired at a later point.
Fixes: f9ee55e698f8 ("go-module.eclass: use ego helper function")
Closes: https://bugs.gentoo.org/834758
Closes: https://bugs.gentoo.org/834762
Closes: https://bugs.gentoo.org/834607
Closes: https://bugs.gentoo.org/834608
Closes: https://bugs.gentoo.org/834625
Closes: https://bugs.gentoo.org/834626
Closes: https://bugs.gentoo.org/834630
Closes: https://bugs.gentoo.org/834669
Closes: https://bugs.gentoo.org/834603
Closes: https://bugs.gentoo.org/834610
Closes: https://bugs.gentoo.org/834711
Closes: https://bugs.gentoo.org/834763
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/24437
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
EGO_SUM can be thousands of lines long in ebuilds, and it leads to
creating Manifest files that are thousands of lines long.
It has been determined that dependency tarballs are a better solution if
upstream doesn't vendor their dependencies.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
| |
remove the version of dev-lang/go since we do not know which version the
ebuild author will need to depend on.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
| |
All direct calls to go in eclasses or ebuilds should be done via the ego
helper function.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
| |
This function will cause the ebuild to die if Go fails.
Also, it outputs the go command that is being run.
Closes: https://bugs.gentoo.org/833497
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
| |
- document the minimum version of go that should be listed in go.mod.
- show how to generate the contents of EGO_SUM
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
| |
Update the documentation to not refer to golang* eclasses.
Bump the go dependency to 1.16 so the behavior for modules is
consistent.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
dev-util/golicense -> dev-go/golicense
Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Closes: https://github.com/gentoo/gentoo/pull/23890
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Following the pattern found in other eclasses, add GO_OPTIONAL to the
go-module eclass. This allows inheriting the eclass without pulling
its dependencies or exporting the unpack function.
See, e.g., bug #775779 for the motivation.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the modules to be cleaned up on prefix systems.
More information is available here:
https://github.com/golang/go/issues/27161
I would like to thank Raffaele Spinelli <rafspiny@gmail.com> for the
original patch this was based on.
Closes: https://bugs.gentoo.org/812977
Closes: https://github.com/gentoo/gentoo/pull/22365
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
| |
This reverts commit 9f41c938a745479414544fa9c03aaa1b6d9b989b.
Doesn't inherit it!
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
As of go 1.16, --mod=readonly is the default, so we don't need to
specify it.
https://golang.org/ref/mod#build-commands
https://golang.org/doc/go1.16
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
| |
This function is to be used in an ebuild that uses EGO_SUM and defines
src_unpack.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
| |
This variable should be exported in the go-module_set_globals function
since it is not needed unless EGO_SUM is used.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dependencies
The helper function used to call 'go get' to verify by fake-fetching everything
from the main go.mod. However 'go get' also turns out to recursively try to
fetch everything in dependencies, even materials that are used only for tests
of the dependencies, or code generation.
If EGO_SUM is missing an entry now, it will fail during the build process
rather than the helper function.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
We can't repeat the -mod flag, so we need to replace the GOFLAGS if
EGO_VENDOR is being used.
Closes: https://bugs.gentoo.org/7111640
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
|
|
| |
If EGO_VENDOR is tested in global scope, it needs to be set before the
eclass is inherited. Several ebuilds do not do this, so we need to
perform this test and set -mod=vendor in the appropriate phase function.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
| |
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
| |
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The go.sum behavior in this eclass triggers a false positive from
pkgcheck, specifically:
MissingUnpackerDep: version ...: missing BDEPEND="app-arch/unzip"
The eclass & package do NOT invoke any direct unpacking of the zipfiles,
and leave that entirely to Go's builtin code, making app-arch/unzip
completely unneeded.
Adding packages using the new eclass functionality will spam the above
MissingUnpackerDep warning, so workaround it for now, until pkgcheck/QA
can not give the false positive.
Reference: https://github.com/pkgcore/pkgcheck/issues/214
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
|
|
|
|
|
| |
This is not valid in go 1.14, and according to their release notes was
ignored or caused the build to fail.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|
|
|
|
|
|
| |
The EGO_SUM variable replaces EGO_VENDOR for go modules.
Signed-off-by: William Hubbs <williamh@gentoo.org>
|