I upgraded from portage-2.1.8.3 to 2.1.9 (same with 2.1.9.2), and now `emerge --sync` gives me the following fatal error message: rsync: ERROR: cannot stat destination "/tmp/.private/root/tmpa6NzON": Permission denied (13) rsync error: errors selecting input/output files, dirs (code 3) at main.c(554) [receiver=3.0.6] I use FEATURES="usersync", so Emerge has Rsync use the "portage" user for syncing. However, I also use pam_mktemp, so my root temporary directory (/tmp/.private/root) is not accessible to any other user, and Rsync cannot access it. I tried downgrading to 2.1.8.3, and I can sync without problem. Keeping 2.1.9 and deactivating FEATURES="usersync" also works without problem. I don't have enough time to check precisely what changed, but Emerge should have Rsync use PORTAGE_TMPDIR for temporary files which do not go directly into PORTDIR. Thanks in advance to anyone who will work on this.
We'll have to review all of the tempfile code in various places, to make sure it all uses PORTAGE_TMPDIR.
This is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3f7f72cf339da70b13b8c8c92e6b674ad394c5aa
This is fixed in 2.1.9.3 and 2.2_rc79.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=8ddc902ba8cb4712a2a8b49f46951c8ec326a678 commit 8ddc902ba8cb4712a2a8b49f46951c8ec326a678 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-01-03 02:48:32 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-01-03 06:21:42 +0000 rsync: use ${PORTAGE_TMPDIR}/portage (bug 671808) Write temporary timestamp files in ${PORTAGE_TMPDIR}/portage, since writing files directly in ${PORTAGE_TMPDIR} is generally unexpected. Also, use the rsync --inplace option, since it's writing to a temp file created in advance and the usersync user does not necessarily have write access to the parent directory. Bug: https://bugs.gentoo.org/671808 Bug: https://bugs.gentoo.org/336503 Fixes: 3f7f72cf339d ("Bug #336503 - Use PORTAGE_TMPDIR for the emerge --sync server timestamp") Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/sync/modules/rsync/rsync.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)