Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 673738 - PORTAGE_TMPDIR not respecting /
Summary: PORTAGE_TMPDIR not respecting /
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 378403
Blocks: 671498
  Show dependency tree
 
Reported: 2018-12-26 03:51 UTC by cryptopsy
Modified: 2019-04-10 04:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cryptopsy 2018-12-26 03:51:09 UTC
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.
Comment 1 Zac Medico gentoo-dev 2019-01-01 20:31:20 UTC
The message was intended to reference bug 378403.
Comment 2 Zac Medico gentoo-dev 2019-01-01 20:51:22 UTC
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.
Comment 4 Larry the Git Cow gentoo-dev 2019-01-04 03:03:35 UTC
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(-)
Comment 5 Larry the Git Cow gentoo-dev 2019-01-04 06:03:52 UTC
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(+)
Comment 6 Zac Medico gentoo-dev 2019-04-10 04:31:39 UTC
Fixed in portage-2.3.62.