Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935575 - sys-power/upower-1.90.4-r1 test fail : fails 67 tests out of 68 : PermissionError: [Errno 13] Permission denied: '/root/.local/share/flatpak/exports/share/python-dbusmock/templates/logind.py'
Summary: sys-power/upower-1.90.4-r1 test fail : fails 67 tests out of 68 : PermissionE...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-05 22:15 UTC by Arniii
Modified: 2024-07-17 16:10 UTC (History)
2 users (show)

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


Attachments
/var/tmp/portage/sys-power/upower-1.90.4/work/upower-1.90.4-build/meson-logs/testlog.txt (file_935575.txt,246.84 KB, text/plain)
2024-07-05 22:15 UTC, Arniii
Details
build.log: (file_935575.txt,255.43 KB, text/plain)
2024-07-05 22:15 UTC, Arniii
Details
environment // profile default/linux/amd64/23.0/split-usr/desktop/plasma gcc-13.2.1_p20240210 O3 pipe march=native(verbose) lto graphite ggdb3 (file_935575.txt,134.99 KB, text/plain)
2024-07-05 22:16 UTC, Arniii
Details
emerge --info (file_935575.txt,13.49 KB, text/plain)
2024-07-05 22:16 UTC, Arniii
Details
/etc/portage/* in `zip -9` (portage.zip,375.82 KB, application/zip)
2024-07-05 22:17 UTC, Arniii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arniii 2024-07-05 22:15:26 UTC
Created attachment 897105 [details]
/var/tmp/portage/sys-power/upower-1.90.4/work/upower-1.90.4-build/meson-logs/testlog.txt

PermissionError: [Errno 13] Permission denied: '/root/.local/share/flatpak/exports/share/python-dbusmock/templates/logind.py'
Comment 1 Arniii 2024-07-05 22:15:57 UTC
Created attachment 897106 [details]
build.log:
Comment 2 Arniii 2024-07-05 22:16:26 UTC
Created attachment 897107 [details]
environment // profile default/linux/amd64/23.0/split-usr/desktop/plasma gcc-13.2.1_p20240210 O3 pipe march=native(verbose) lto graphite ggdb3
Comment 3 Arniii 2024-07-05 22:16:52 UTC
Created attachment 897108 [details]
emerge --info
Comment 4 Arniii 2024-07-05 22:17:47 UTC
Created attachment 897109 [details]
/etc/portage/* in `zip -9`
Comment 5 Arniii 2024-07-15 22:54:31 UTC
Reproducible with sys-power/upower-1.90.4-r1
Comment 6 Mike Gilbert gentoo-dev 2024-07-16 14:54:02 UTC
Seems like you probably have some flatpak stuff stuff polluting your environment. I don't see anything obvious in your environment file, but I don't really know how flatpak works.

Also, please do NOT update the bug for every version/revision for which you encounter the issue.
Comment 7 Mike Gilbert gentoo-dev 2024-07-16 14:55:27 UTC
Oh, I see it's in XDG_DATA_DIRS.
Comment 8 Larry the Git Cow gentoo-dev 2024-07-16 15:15:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1899cf52d63af9a6213be707536e0f3ffdda41ab

commit 1899cf52d63af9a6213be707536e0f3ffdda41ab
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2024-07-16 15:13:17 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2024-07-16 15:15:11 +0000

    sys-power/upower: unset XDG_CONFIG_DIRS and XDG_DATA_DIRS
    
    Closes: https://bugs.gentoo.org/935575
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-power/upower/upower-1.90.4-r1.ebuild | 2 ++
 1 file changed, 2 insertions(+)
Comment 9 Pacho Ramos gentoo-dev 2024-07-16 15:23:27 UTC
That makes me wonder about why there is this note at profiles/base/make.defaults:
# XDG_* since the values coming from user environment can collide with
# ebuild-set ${HOME} (e.g. by referring to user's home directory).
# We exclude XDG_DATA_DIRS & XDG_CONFIG_DIRS as those are set in env.d.

It looks more logical to also unset them instead of relying on random values from env.d, but I don't know the reasons for explicitly excluding them from the list of ENV_UNSET
Comment 10 Mike Gilbert gentoo-dev 2024-07-16 16:04:17 UTC
(In reply to Pacho Ramos from comment #9)
> It looks more logical to also unset them instead of relying on random values
> from env.d, but I don't know the reasons for explicitly excluding them from
> the list of ENV_UNSET

Yeah, I was wondering about that myself. Probably worth looking into.
Comment 11 Pacho Ramos gentoo-dev 2024-07-16 19:24:18 UTC
I found that they are excluded from the beginning:
https://gitweb.gentoo.org/repo/gentoo.git/commit/profiles/base/make.defaults?id=c54e5e702dbf2ade6cba311101fcc08f2cc4c6eb

But I am still unsure about the real reasons:
https://bugs.gentoo.org/499288

I have grepped in the tree and it seems that packages interact with those variables only to set them to their needed values or unsetting them to avoid issues like this one.
Comment 12 Pacho Ramos gentoo-dev 2024-07-16 19:27:52 UTC
I think it is because of this bug:
https://bugs.gentoo.org/635040

as explained at:
https://archives.gentoo.org/gentoo-dev/message/bf36c4c50f9c15db222faa6a66b0c6c9

But, I think, that packages needing the variable to be set should simply set it at build time to the desired values
Comment 13 Mike Gilbert gentoo-dev 2024-07-17 16:10:08 UTC
(In reply to Pacho Ramos from comment #12)
> But, I think, that packages needing the variable to be set should simply set
> it at build time to the desired values

That seems reasonable to me.