Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 594358 - =sys-apps/portage-2.3.1: egencache creates metadata files with 0600 permission.
Summary: =sys-apps/portage-2.3.1: egencache creates metadata files with 0600 permission.
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, REGRESSION
Depends on:
Blocks: 604854
  Show dependency tree
 
Reported: 2016-09-19 12:37 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2017-02-10 18:50 UTC (History)
3 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 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-09-19 12:37:40 UTC
egencache from portage-2.3.1 creates metadata files with 0600 permission instead of 0644 like previous versions did.
I stumbled upon this when I tried to create metadata files for my overlay:

  egencache --repo=poly-c --update --rsync --write-timestamp
Comment 1 Zac Medico gentoo-dev 2016-09-19 16:01:52 UTC
This commit is suspect:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=5652bc88514bdb36b36b544f7fc7e623cf25caae

However, the self._ensure_access(fp) call (which is visible the context of the patch) is supposed to set the permissions, so I'll have to investigate some more.
Comment 2 Zac Medico gentoo-dev 2016-09-19 16:44:18 UTC
There's a fix here:

https://github.com/gentoo/portage/pull/51

I'll merge it after the tests pass.
Comment 3 Zac Medico gentoo-dev 2016-09-19 16:44:18 UTC
There's a fix here:

https://github.com/gentoo/portage/pull/51

I'll merge it after the tests pass.
Comment 5 Mike Gilbert gentoo-dev 2016-09-19 17:01:57 UTC
I wonder if it would make more sense to set mode = 0664 with gid = portage? Idea being that anyone in the portage group could update the cache.
Comment 6 Zac Medico gentoo-dev 2016-09-19 17:13:34 UTC
(In reply to Mike Gilbert from comment #5)
> I wonder if it would make more sense to set mode = 0664 with gid = portage?
> Idea being that anyone in the portage group could update the cache.

Yes, sort of. There are a couple of different permission models supported by the portdbapi class (see the depcachedir_unshared variable in the portdbapi constructor), but currently those permission models are not applied to the cache instances returned from the RepoConfig.get_pregenerated_cache method, which is what egencache is using in the case that triggered this bug.
Comment 7 Zac Medico gentoo-dev 2017-02-10 18:50:25 UTC
Fixed in portage-2.3.3.