Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559136 - sys-apps/portage : emerge --sync doesn't honor FEATURES="usersync" when using the git sync method
Summary: sys-apps/portage : emerge --sync doesn't honor FEATURES="usersync" when using...
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 240187 941607
  Show dependency tree
 
Reported: 2015-08-30 00:31 UTC by Raymond Jennings
Modified: 2024-10-16 07:34 UTC (History)
2 users (show)

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 Raymond Jennings 2015-08-30 00:31:39 UTC
Just tested, and the git process spawned to do a git sync is running as root, not as portage.

Reproducible: Always
Comment 1 ephemer0l 2015-08-30 03:56:06 UTC
Poking through the wiki, it looks like a workaround would be to set 

'sync-user = root:portage' in your /../../repos.conf/gentoo.conf.
Comment 2 ephemer0l 2015-08-30 03:58:30 UTC
err, maybe 'sync-user = portage' in your /../../repos.conf/gentoo.conf would be better...
Comment 3 Zac Medico gentoo-dev 2015-09-01 16:27:01 UTC
Looking at the code, the rsync module uses self.spawn_kwargs which is supposed to make it drop privileges, but it only if you first chown the repository to whatever user you want it to sync as:

https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/sync/controller.py?h=v2.2.20.1#n276

So, you should run chown -R on the repository for the user that you want it to drop privileges to.
Comment 4 Raymond Jennings 2016-08-26 02:42:01 UTC
pebcak.

I have a hunch this would be better if it were documented in a man page or something but it doesn't appear to be an actual bug in the code.