Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675184 - sys-apps/opentmpfiles: cannot specify user/group on Prefix
Summary: sys-apps/opentmpfiles: cannot specify user/group on Prefix
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-11 15:23 UTC by Horea Christian
Modified: 2021-08-29 14:36 UTC (History)
1 user (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 Horea Christian 2019-01-11 15:23:41 UTC
I have to manually run `${EPREFIX}/gentoo/var/cache/eix/` to get eix working on my prefix system. Elsewise I get:

hioanas@servetus ~ $ eix-update
Reading Portage settings...
Building database (/home/hioanas/gentoo/var/cache/eix/portage.eix)...                                   
[0] "gentoo" /home/hioanas/gentoo/usr/portage/ (cache: metadata-md5-or-flat)                            
     Reading category 165|165 (100) Finished                                                            
[1] "science" /home/hioanas/gentoo/var/lib/overlays/science (cache: parse|ebuild*#metadata-md5#metadata-flat#assign)
     Reading category 165|165 (100) Finished                                                            
Applying masks...
Calculating hash tables...
Writing database file /home/hioanas/gentoo/var/cache/eix/portage.eix...                                 
cannot open database file /home/hioanas/gentoo/var/cache/eix/portage.eix for writing (mode = 'wb')      
hioanas@servetus ~ $ ls -lah /home/hioanas/gentoo/var/cache/eix/portage.eix
ls: cannot access '/home/hioanas/gentoo/var/cache/eix/portage.eix': No such file or directory
hioanas@servetus ~ $ ls -lah /home/hioanas/gentoo/var/cache/eix
ls: cannot access '/home/hioanas/gentoo/var/cache/eix': No such file or directory
hioanas@servetus ~ $ ls -lah /home/hioanas/gentoo/var/cache
total 12K
drwxr-xr-x 3 hioanas hioanas 4.0K Jan 10 16:39 .
drwxrwxr-x 9 hioanas hioanas 4.0K Jan 10 21:41 ..
drwxr-xr-x 3 hioanas hioanas 4.0K Jan 11 09:11 edb
Comment 1 Benda Xu gentoo-dev 2019-01-12 06:13:35 UTC
I have met the same bug.  Is this problem Prefix specific?
Comment 2 Benda Xu gentoo-dev 2019-01-30 01:31:56 UTC
Hi OpenRC Team,

Here is an example of tmpfiles.d/eix.conf:

d EPREFIX/var/cache/eix 0775 portage portage -

It fails at the `chown` step if no root privilege is granted, such as on normal user Prefix:

$ tmpfiles --create eix.conf
chown: invalid user: 'portage'
chgrp: invalid group: 'portage'

As a result, EPREFIX/var/cache/eix is not created during emerge.


I can think of 2 ways to solve this bug:

1. In the tmpfiles.eclass, chop off the extra user/group setting from eix.conf during `dotmpfiles()` if without root privilege.
2. In opentmpfiles, allow the chown setup to fail if without root privilege.

Which one is recommended?

Yours,
Benda
Comment 3 Fabian Groffen gentoo-dev 2021-01-14 12:10:54 UTC
can't we pull the portage user/group from Portage in the ebuild and hardcode it in the installed tmpfile conf?
Comment 4 Benda Xu gentoo-dev 2021-01-20 01:54:59 UTC
(In reply to Fabian Groffen from comment #3)
> can't we pull the portage user/group from Portage in the ebuild and hardcode
> it in the installed tmpfile conf?

I think that's at least a solution.
Comment 5 Fabian Groffen gentoo-dev 2021-08-29 14:36:24 UTC
opentmpfiles is no longer an option