If PORTAGE_TMPDIR="/" , it will create /portage folder, but emerge --resume will not accept it the second time it is run. emerge --resume Calculating dependencies... done! *** Resuming merge... >>> Verifying ebuild manifests >>> Emerging (1 of 1) dev-qt/qtwebengine-5.11.3::gentoo >>> Jobs: 0 of 1 complete, 1 running Load avg: 1.39, 0.98, 0.88 !!! The 'portage' subdirectory of the directory referenced by the !!! PORTAGE_TMPDIR variable appears to be a symlink. In order to avoid !!! sandbox violations (see bug #378379), you must adjust PORTAGE_TMPDIR !!! instead of using the symlink located at '/portage'. A suitable !!! PORTAGE_TMPDIR setting would be '/portage'. If PORTAGE_TMPDIR="/portage" it will create /portage/portage and not give this error.
The message was intended to reference bug 378403.
It's not enough to change path comparison logic in https://gitweb.gentoo.org/proj/portage.git/commit/?id=8a85160f4833e3f02470961fc2e05ec93f466566, because with PORTAGE_TMPDIR=/ the sandbox configuration actually allows unrestricted write access to all paths.
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/5a41894608ea26793a4037442add9329 https://github.com/gentoo/portage/pull/393
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=be2312f4f9bf854897431440734a765f5279c7d1 commit be2312f4f9bf854897431440734a765f5279c7d1 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-01-02 23:40:57 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-01-03 08:24:40 +0000 ebuild.sh: sandbox write to ${PORTAGE_TMPDIR}/portage (bug 673738) In ebuild.sh, grant sandbox write access directly to ${PORTAGE_TMPDIR}/portage, since write access to ${PORTAGE_TMPDIR} itself is not needed. Also, remove the _check_temp_dir symlink check from bug 378403, since a symlink is permissible if write access is granted directly to ${PORTAGE_TMPDIR}/portage. Bug: https://bugs.gentoo.org/673738 Bug: https://bugs.gentoo.org/378403 Signed-off-by: Zac Medico <zmedico@gentoo.org> bin/ebuild.sh | 4 ++-- lib/portage/package/ebuild/doebuild.py | 27 ++------------------------- 2 files changed, 4 insertions(+), 27 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=549e77312735f9f19863daafaef0382ab1a2157f commit 549e77312735f9f19863daafaef0382ab1a2157f Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-01-04 04:01:57 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-01-04 06:03:28 +0000 sys-apps/portage: version bump to 2.3.54 #671808 rsync: fix usersync timestamp file permission issue #673738 fix PORTAGE_TMPDIR=/ edge case #673900 validate unshare calls Bug: https://bugs.gentoo.org/671808 Bug: https://bugs.gentoo.org/673738 Bug: https://bugs.gentoo.org/673900 Package-Manager: Portage-2.3.54, Repoman-2.3.12 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-2.3.54.ebuild | 270 +++++++++++++++++++++++++++++++++ 2 files changed, 271 insertions(+)
Fixed in portage-2.3.62.