Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 830187

Summary: go lang ebuild: SRC_URI too long that it causes "Argument list too long" error
Product: Portage Development Reporter: pva <peter.volkov>
Component: CoreAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: anton.bugs, flow, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=720180
https://github.com/gentoo/portage/pull/963
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 721088    
Bug Blocks:    
Attachments: minio-2021.11.24.23.19.33.ebuild
ebuild minio-2021.11.24.23.19.33.ebuild digest output

Description pva 2021-12-28 20:34:26 UTC
Created attachment 760684 [details]
minio-2021.11.24.23.19.33.ebuild

I'm trying to create ebuild for new version of minio. To generate dependencies I need to paste go.sum file into ebuild. But in the latest version this file is so large https://github.com/minio/minio/blob/master/go.sum that resulting SRC_URI causes Argument list too long error and I'm unable to create Manifest:

net-fs/minio # ebuild minio-2021.11.24.23.19.33.ebuild digest
[Errno 7] Argument list too long: b'/bin/bash':
   /bin/bash -c >> /var/cache/distfiles/.__portage_test_write__ 2>/dev/null ; rval=$? ; rm -f  /var/cache/distfiles/.__portage_test_write__ ; exit $rval
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/portage/process.py", line 421, in spawn
    _exec(
  File "/usr/lib/python3.9/site-packages/portage/process.py", line 865, in _exec
    os.execve(binary, myargs, env)
  File "/usr/lib/python3.9/site-packages/portage/__init__.py", line 282, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 7] Argument list too long: b'/bin/bash'

ebuild that I'm trying to use is in attachment.
Comment 1 pva 2021-12-28 20:35:02 UTC
Created attachment 760685 [details]
ebuild minio-2021.11.24.23.19.33.ebuild digest output
Comment 2 Zac Medico gentoo-dev 2021-12-28 20:41:45 UTC
We're currently limited by a PMS requirement with says that the A variable must be exported (bug 721088). I currently workaround the issue in vault and nerdctl ebuilds by forking the relevant projects on github, and create tags that bundle all of the vendor dependencies. That way the ebuild can link a github tarball which bundles all of the vendor dependencies.
Comment 3 Anton Bolshakov 2022-01-03 02:25:55 UTC
I'm having a similar issue with https://github.com/future-architect/vuls
(deps generated by dev-go/get-ego-vendor)

ebuild vuls-0.19.0.ebuild digest 
>>> Downloading 'https://proxy.golang.org//github.com/!burnt!sushi/toml/@v/v0.3.1.mod'
[Errno 7] Argument list too long: b'/usr/bin/wget':
   wget -t 3 -T 60 --passive-ftp -O /var/cache/distfiles/github.com%2F!burnt!sushi%2Ftoml%2F@v%2Fv0.3.1.mod.__download__ https://proxy.golang.org//github.com/!burnt!sushi/toml/@v/v0.3.1.mod
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/portage/process.py", line 421, in spawn
    _exec(
  File "/usr/lib/python3.9/site-packages/portage/process.py", line 865, in _exec
    os.execve(binary, myargs, env)
  File "/usr/lib/python3.9/site-packages/portage/__init__.py", line 282, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 7] Argument list too long: b'/usr/bin/wget'
No digest file available and download failed.