Hi, I got a portage traceback while updating a system. The setup is particular, but it works fine like that since years. PORTDIR is mounted readonly over NFS from local network. DISTDIR and PKGDIR are also mounted in the same way, except that they are mounted readwrite. /usr/src/linux is also mounted readonly from NFS. The system where I got the traceback is using some pre-built packages, the build farm and the target system are sharing 99.99 % of the same configuration. Both systems also share the same pre-built kernel. Here is the traceback : > Traceback (most recent call last): > File "/usr/lib/portage/python3.6/socks5-server.py", line 231, in <module> > asyncio.start_unix_server(s.handle_proxy_conn, sys.argv[1], loop=loop)) > File "/usr/lib64/python3.6/asyncio/base_events.py", line 468, in run_until_complete > return future.result() > File "/usr/lib64/python3.6/asyncio/streams.py", line 151, in start_unix_server > return (yield from loop.create_unix_server(factory, path, **kwds)) > File "/usr/lib64/python3.6/asyncio/coroutines.py", line 212, in coro > res = func(*args, **kw) > File "/usr/lib64/python3.6/asyncio/unix_events.py", line 290, in create_unix_server > sock.bind(path) > PermissionError: [Errno 13] Permission denied I will attach full emerge output below. Reproducible: Always
Created attachment 572384 [details] emerge output
Created attachment 572386 [details] emerge --info
This traceback is in the code for FEATURES=network-sandbox-proxy (also for FEATURES=distcc). It's trying to bind a socket in ${PORTAGE_TMPDIR}. It looks like we need to move this socket into ${PORTAGE_TMPDIR}/portage since that's were all portage tempfiles are normally stored and permission problems in the parent ${PORTAGE_TMPDIR} directory are very common.
The fix will be similar to the fix for bug 671808: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8ddc902ba8cb4712a2a8b49f46951c8ec326a678
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/e04624f6ec7a69fd91e727430c352cdd https://github.com/gentoo/portage/pull/416
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=63b509e6d2c0db4343b255455fda1aa3b666bd9c commit 63b509e6d2c0db4343b255455fda1aa3b666bd9c Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-04-11 03:07:09 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-04-15 23:03:54 +0000 socks5: use ${PORTAGE_TMPDIR}/portage (bug 683040) Write temporary socket files in ${PORTAGE_TMPDIR}/portage, since writing files directly in ${PORTAGE_TMPDIR} is generally unexpected. Bug: https://bugs.gentoo.org/683040 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/util/socks5.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)