Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 707980 - =sys-apps/portage-2.3.84-r1: emerge-webrsync synced files owned by root
Summary: =sys-apps/portage-2.3.84-r1: emerge-webrsync synced files owned by root
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 939444
Blocks: 941607
  Show dependency tree
 
Reported: 2020-02-03 02:43 UTC by Chris Slycord
Modified: 2025-01-24 00:11 UTC (History)
1 user (show)

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


Attachments
emerge --info sys-apps/portage (emerge_info,6.06 KB, text/plain)
2020-02-03 02:44 UTC, Chris Slycord
Details
emerge --info and emerge-webrsync (emerge-info_and_webrsync.txt,7.06 KB, text/plain)
2024-10-16 06:46 UTC, David Sardari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Slycord 2020-02-03 02:43:16 UTC
Similar to https://bugs.gentoo.org/661834

If /var/db/repos/gentoo doesn't exist,
running FEATURES='usersync' emerge-webrsync
creates /var/db/repos/gentoo owned by "root:root" and every subdirectory and file underneath it is owned by the same.

Reproducible: Always

Steps to Reproduce:
1. set FEATURES='usersync'
2. run "emerge-webrsync"
3.
Actual Results:  
/var/db/repos/gentoo and everything underneath it owned by root:root

Expected Results:  
/var/db/repos/gentoo owned by portage:portage
Comment 1 Chris Slycord 2020-02-03 02:44:24 UTC
Created attachment 611158 [details]
emerge --info sys-apps/portage
Comment 2 David Sardari 2024-10-16 06:46:42 UTC
Created attachment 905994 [details]
emerge --info and emerge-webrsync

I can reproduce this behaviour with =sys-apps/portage-3.0.65-r1.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-16 07:36:17 UTC
While we should look at fixing this, I do worry about making emerge-webrsync even more complex (see the commentary in bug 905356).
Comment 4 David Sardari 2024-10-16 19:28:46 UTC
A lot of people could be easily helped with stage3 tarballs shipping with an empty "/var/db/repos/gentoo" owned by portage:portage. People not covered are those who have "/var/db/repos/gentoo" as a mountpoint, but I expect them to take the necessary measures.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-17 04:34:55 UTC
(In reply to David Sardari from comment #4)
> A lot of people could be easily helped with stage3 tarballs shipping with an
> empty "/var/db/repos/gentoo" owned by portage:portage. People not covered
> are those who have "/var/db/repos/gentoo" as a mountpoint, but I expect them
> to take the necessary measures.

Can you file a separate bug for that please (for releng)?
Comment 6 David Sardari 2024-10-17 08:29:07 UTC
(In reply to Sam James from comment #5)
> Can you file a separate bug for that please (for releng)?

done :) bug 941685
Comment 7 David Sardari 2024-10-22 14:19:33 UTC
fyi, I submitted a PR that fixes the issue with emerge-webrsync:
https://github.com/gentoo/portage/pull/1390
Comment 8 Larry the Git Cow gentoo-dev 2025-01-21 21:02:40 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=2ccc67364d5ba5626356342a5d390dd4e65b63e0

commit 2ccc67364d5ba5626356342a5d390dd4e65b63e0
Author:     David Sardari <d@duxsco.de>
AuthorDate: 2025-01-21 20:28:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-21 21:02:35 +0000

    emerge-webrsync: Change repo folder ownership if FEATURES=usersync
    
    Bug: https://bugs.gentoo.org/707980
    Signed-off-by: David Sardari <d@duxsco.de>
    Closes: https://github.com/gentoo/portage/pull/1390
    Signed-off-by: Sam James <sam@gentoo.org>

 bin/emerge-webrsync | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=04c5358b8b4b38a3c73cfd743a205bb7b40c0a21

commit 04c5358b8b4b38a3c73cfd743a205bb7b40c0a21
Author:     David Sardari <d@duxsco.de>
AuthorDate: 2025-01-21 20:27:16 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-21 21:02:34 +0000

    emerge-webrsync: Use variables PORTAGE_USERNAME and PORTAGE_GRPNAME
    
    Both variables default to "portage" according to "man 5 make.conf"
    and should be used instead of hardcoding "portage" user.
    
    Bug: https://bugs.gentoo.org/707980
    Signed-off-by: David Sardari <d@duxsco.de>
    Signed-off-by: Sam James <sam@gentoo.org>

 bin/emerge-webrsync | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 9 Larry the Git Cow gentoo-dev 2025-01-22 00:30:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03f41049a0fe0632eabd8cddaaca898e45943201

commit 03f41049a0fe0632eabd8cddaaca898e45943201
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-22 00:29:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-22 00:30:02 +0000

    sys-apps/portage: add 3.0.67
    
    Closes: https://bugs.gentoo.org/703520
    Closes: https://bugs.gentoo.org/707980
    Closes: https://bugs.gentoo.org/904702
    Closes: https://bugs.gentoo.org/906044
    Closes: https://bugs.gentoo.org/923530
    Closes: https://bugs.gentoo.org/938164
    Closes: https://bugs.gentoo.org/939299
    Closes: https://bugs.gentoo.org/940120
    Closes: https://bugs.gentoo.org/942512
    Closes: https://bugs.gentoo.org/942760
    Closes: https://bugs.gentoo.org/945382
    Closes: https://bugs.gentoo.org/945861
    Closes: https://bugs.gentoo.org/946326
    Closes: https://bugs.gentoo.org/947822
    Closes: https://bugs.gentoo.org/948067
    Closes: https://bugs.gentoo.org/939444
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.67.ebuild | 231 +++++++++++++++++++++++++++++++++
 2 files changed, 232 insertions(+)