summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* go-module.eclass: update dev-go/golicense -> dev-go/lichenSam James2024-02-271-1/+1
| | | | | | | | 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>
* go-module.eclass: fix whitespaceSam James2024-02-271-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* go-module.eclass: update go version in BDEPEND and add subslotWilliam Hubbs2024-01-111-2/+2
| | | | | Bug: https://bugs.gentoo.org/919751 Signed-off-by: William Hubbs <williamh@gentoo.org>
* eclass/go-module.eclass: export compile env in src_unpackThilo Fromm2023-11-201-1/+4
| | | | | | | | | | 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>
* go-module.eclass: inline _go-module_gomod_encode()Florian Schmaus2023-06-121-28/+16
| | | | | | | | | | | | | | | | 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>
* go-module.eclass: refine go-module_src_unpack eclassdocSam James2023-04-171-4/+5
| | | | | | | 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>
* eclass: standardize prologue/epilogueDavid Seifert2023-03-171-6/+7
| | | | | Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert <soap@gentoo.org>
* go-module.eclass: inherit toolchain-funcs for tc-endianSam James2023-03-131-1/+1
| | | | | | Closes: https://bugs.gentoo.org/901017 Fixes: d4ff29b30952ca957b58b5878550f5d23f908dbf Signed-off-by: Sam James <sam@gentoo.org>
* go-module.eclass: use tc-endian from toolchain-funcs.eclassSam James2023-02-191-1/+1
| | | | | | | | 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>
* go-module.eclass: typoWilliam Hubbs2023-02-161-1/+1
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* go-module.eclass: fix -buildmode=pie, support makeoptsWilliam Hubbs2023-02-161-1/+8
| | | | | Closes: https://bugs.gentoo.org/893316 Signed-off-by: William Hubbs <williamh@gentoo.org>
* go-module.eclass: fix typo in buildmodeSam James2023-01-201-1/+1
| | | | | | Fixes: f4dade77c0882aab06f35f8db1154d0a52f0ba1b Bug: https://bugs.gentoo.org/702598 Signed-off-by: Sam James <sam@gentoo.org>
* go-module.eclass: add -buildmode=pieWilliam Hubbs2023-01-201-2/+3
| | | | | Bug: https://bugs.gentoo.org/702598 Signed-off-by: William Hubbs <williamh@gentoo.org>
* go-module.eclass: add a way to allow go mod verify to be nonfatalWilliam Hubbs2022-11-181-1/+3
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* go-module.eclass: run "go mod verify" on modules from dependency tarballWilliam Hubbs2022-10-211-0/+4
| | | | | | | 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>
* go-module.eclass: suggest XZ options and preferences for compressionSam James2022-09-251-2/+4
| | | | | | | | | | | | | | - 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>
* go-module.eclass: add build flag to ignore version control informationWilliam Hubbs2022-09-031-2/+3
| | | | | | | | 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>
* go-module.eclass: fix eclassdoc @DEPRECATION tagsSam James2022-04-151-9/+9
| | | | | Thanks-to: Ionen Wolkens <ionen@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* *.eclass: @ECLASS-VARIABLE renamed to @ECLASS_VARIABLEUlrich Müller2022-03-241-4/+4
| | | | | Bug: https://bugs.gentoo.org/835396 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* go-module.eclass: fix EclassDocError for @DEPRECATEDSam James2022-03-181-9/+9
| | | | | | No trailing colon (:). Signed-off-by: Sam James <sam@gentoo.org>
* go-module.eclass: invoke "ego mod tidy" with nonfatalFlorian Schmaus2022-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* go-module.eclass: deprecate EGO_SUMWilliam Hubbs2022-03-061-12/+33
| | | | | | | | | 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>
* go-module.eclass: clarify the instructions around GO_OPTIONALWilliam Hubbs2022-03-041-5/+3
| | | | | | | 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>
* go-module.eclass: put the go module cache under the work directoryWilliam Hubbs2022-03-041-3/+1
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* go-module.eclass: use ego helper functionWilliam Hubbs2022-03-041-2/+2
| | | | | | | 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>
* go-module.eclass: add helper function to call goWilliam Hubbs2022-02-251-0/+13
| | | | | | | | 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>
* go-module.eclass: set a default for GOMODCACHEWilliam Hubbs2022-02-181-0/+6
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* go-module.eclass: add a manual example of how to extract the content of EGO_SUMWilliam Hubbs2022-02-171-0/+8
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* go-module.eclass: update documentationWilliam Hubbs2022-02-161-6/+14
| | | | | | - 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>
* eclass/go-module.eclass: documentation and bdepend adjustmentWilliam Hubbs2022-02-131-6/+8
| | | | | | | | 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>
* go-module.eclass fixed referenced packageDennis Lamm2022-01-211-1/+1
| | | | | | | | | 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>
* go-module.eclass: Add GO_OPTIONAL flagFlorian Schmaus2021-12-111-9/+22
| | | | | | | | | | 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>
* go-modules.eclass: allow the module cache to be read/writeWilliam Hubbs2021-09-231-1/+1
| | | | | | | | | | | | | | | 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>
* Revert "go-module.eclass: Set @PROVIDES"Sam James2021-09-111-2/+1
| | | | | | | | This reverts commit 9f41c938a745479414544fa9c03aaa1b6d9b989b. Doesn't inherit it! Signed-off-by: Sam James <sam@gentoo.org>
* go-module.eclass: Set @PROVIDESMichał Górny2021-09-111-1/+2
| | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* go-module.eclass: drop the go-module_pkg_postinst functionWilliam Hubbs2021-09-011-16/+1
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* go-module.eclass: drop --mod=readonly from GOFLAGSWilliam Hubbs2021-09-011-3/+1
| | | | | | | | | 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>
* go-module.eclass: add eapi 8 supportWilliam Hubbs2021-07-061-4/+4
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* go-module.eclass: add go-module_setup_proxy functionWilliam Hubbs2021-05-251-0/+41
| | | | | | | 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>
* go-module.eclass: fix GOPROXY exportWilliam Hubbs2021-05-251-2/+4
| | | | | | | 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>
* eclass/go-module.eclass: add a missing die callWilliam Hubbs2020-09-141-1/+1
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* eclass/go-module.eclass: remove EGO_VENDOR supportWilliam Hubbs2020-06-121-75/+6
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* eclass/go-module: remove go-get for corner case of unneeded deep build ↵Robin H. Johnson2020-03-101-11/+6
| | | | | | | | | | | | | | 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>
* go-module.eclass: replace GOFLAGS if EGO_VENDOR is being usedWilliam Hubbs2020-03-101-1/+3
| | | | | | | | | 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>
* go-module.eclass: fix regression with -mod=vendor settingWilliam Hubbs2020-03-101-1/+1
| | | | | | | | 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>
* go-module.eclass: fix strip restrictionWilliam Hubbs2020-03-081-1/+1
| | | | Signed-off-by: William Hubbs <williamh@gentoo.org>
* eclass/go-module: clarify that h1: should be omitted from EGO_SUMRobin H. Johnson2020-03-071-4/+22
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* go-module: workaround MissingUnpackerDep QA false positiveRobin H. Johnson2020-03-071-0/+6
| | | | | | | | | | | | | | | | | 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>
* go-module.eclass: remove the -mod readonly switch from go getWilliam Hubbs2020-03-061-2/+0
| | | | | | | 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>
* go-module.eclass: add support for EGO_SUMWilliam Hubbs2020-03-041-40/+326
| | | | | | The EGO_SUM variable replaces EGO_VENDOR for go modules. Signed-off-by: William Hubbs <williamh@gentoo.org>