Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909038 - net-im/telegram-desktop-4.8.3 filesystem error: status: Permission denied [/root/.local/share/flatpak/exports/share/gir-1.0]
Summary: net-im/telegram-desktop-4.8.3 filesystem error: status: Permission denied [/r...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PullRequest
: 909170 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-06-23 16:55 UTC by orion_cygnus
Modified: 2023-07-15 16:25 UTC (History)
5 users (show)

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


Attachments
emerge --info (emerge_info.txt,6.68 KB, text/plain)
2023-06-23 16:56 UTC, orion_cygnus
Details
emerge -pqv '=net-im/telegram-desktop-4.8.3::gentoo' (emerge_pqv.txt,142 bytes, text/plain)
2023-06-23 16:56 UTC, orion_cygnus
Details
ebuild environment file (environment,129.18 KB, text/plain)
2023-06-23 16:57 UTC, orion_cygnus
Details
build.log (build.log.txt,22.93 KB, text/plain)
2023-06-23 16:57 UTC, orion_cygnus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description orion_cygnus 2023-06-23 16:55:44 UTC
Hello, telegram-desktop 4.8.3 fails to build on my system. I'm building against qt6, but haven't had any problems with failed builds on previous versions of telegram. Not sure where to start debugging this.
Comment 1 orion_cygnus 2023-06-23 16:56:00 UTC
Created attachment 864480 [details]
emerge --info
Comment 2 orion_cygnus 2023-06-23 16:56:25 UTC
Created attachment 864481 [details]
emerge -pqv '=net-im/telegram-desktop-4.8.3::gentoo'
Comment 3 orion_cygnus 2023-06-23 16:57:08 UTC
Created attachment 864482 [details]
ebuild environment file
Comment 4 orion_cygnus 2023-06-23 16:57:43 UTC
Created attachment 864483 [details]
build.log
Comment 5 Esteve Varela Colominas 2023-06-24 10:29:01 UTC
    ERROR filesystem error: status: Permission denied [/root/.local/share/flatpak/exports/share/gir-1.0]

Interesting. Does the flatpak package export any variable that contains this path? Or has this variable/path been set by you? Check the output of the "env" command. Alternatively, it's some configuration file somewhere that has this path, I'm not sure how cppgir determines its search path.
Comment 6 orion_cygnus 2023-06-26 00:28:33 UTC
root# env
SHELL=/bin/bash
XDG_CONFIG_DIRS=/etc/xdg
LESS=-R -M --shift 5
CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/terminfo /etc/dconf /etc/ca-certificates.conf /etc/revdep-rebuild
EDITOR=/bin/nano
PWD=/root
CONFIG_PROTECT=/usr/share/gnupg/qualified.txt /usr/share/config /usr/lib64/libreoffice/program/sofficerc
LOGNAME=root
MANPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/13/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.40/man:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man:/usr/lib/llvm/16/share/man:/usr/lib/llvm/15/share/man
XAUTHORITY=/root/.xauthtBMlEV
HOME=/root
LANG=en_US.utf8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
INFOPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/13/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.40/info:/usr/share/autoconf-2.71/info:/usr/share/autoconf-2.13/info:/usr/share/automake-1.16.5/info:/usr/share/info:/usr/share/info/emacs-28
MOZ_GMP_PATH=/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed
TERM=xterm-256color
LESSOPEN=|lesspipe %s
USER=root
MANPAGER=manpager
NPM_CONFIG_GLOBALCONFIG=/etc/npm/npmrc
DISPLAY=:1
SHLVL=1
PAGER=/usr/bin/less
LEX=flex
SBCL_HOME=/usr/lib64/sbcl
GCC_SPECS=
GSETTINGS_BACKEND=dconf
XDG_DATA_DIRS=/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/16/bin:/usr/lib/llvm/15/bin
VBOX_APP_HOME=/usr/lib64/virtualbox
LV2_PATH=/usr/lib64/lv2
SBCL_SOURCE_ROOT=/usr/lib64/sbcl/src
LADSPA_PATH=/usr/lib64/ladspa
_=/usr/bin/env
Comment 7 orion_cygnus 2023-06-26 00:29:02 UTC
root# flatpak list
Name                        Application ID                             Version          Branch            Installation
Freedesktop Platform        org.freedesktop.Platform                   22.08.12.1       22.08             system
Mesa                        org.freedesktop.Platform.GL.default        23.1.1           22.08             system
Mesa (Extra)                org.freedesktop.Platform.GL.default        23.1.1           22.08-extra       system
Intel                       org.freedesktop.Platform.VAAPI.Intel                        22.08             system
openh264                    org.freedesktop.Platform.openh264          2.1.0            2.2.0             system
Signal Desktop              org.signal.Signal                          6.22.0           stable            system
Comment 8 orion_cygnus 2023-06-26 00:30:28 UTC
(In reply to Esteve Varela Colominas from comment #5)
>     ERROR filesystem error: status: Permission denied
> [/root/.local/share/flatpak/exports/share/gir-1.0]
> 
> Interesting. Does the flatpak package export any variable that contains this
> path? Or has this variable/path been set by you? Check the output of the
> "env" command. Alternatively, it's some configuration file somewhere that
> has this path, I'm not sure how cppgir determines its search path.

I've attached my env and all installed flatpak packages. I don't appear to have that package installed. Is that a requirement for telegram? Seems odd to have a flatpak requirement for an ebuild from the gentoo package repo.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-26 01:05:29 UTC
XDG_DATA_DIRS=/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share

It's almost certainly confused by this being in the environment. See https://archives.gentoo.org/gentoo-dev/message/bf36c4c50f9c15db222faa6a66b0c6c9.
Comment 10 orion_cygnus 2023-06-26 12:34:12 UTC
(In reply to Sam James from comment #9)
> XDG_DATA_DIRS=/root/.local/share/flatpak/exports/share:/var/lib/flatpak/
> exports/share:/usr/local/share:/usr/share
> 
> It's almost certainly confused by this being in the environment. See
> https://archives.gentoo.org/gentoo-dev/message/
> bf36c4c50f9c15db222faa6a66b0c6c9.

I should clarify that I have had no issues building all versions of telegram-desktop prior to 4.8.3 with flatpak present (and presumably adding flatpak dirs to XDG_DATA_DIRS). This build error started with 4.8.3.
Comment 11 Esteve Varela Colominas 2023-06-26 14:51:58 UTC
Yes, that's the version that added cppgir. Can you try unsetting XDG_DATA_DIRS from your environment or /etc/env.d (and running env-update), to see if that workaround works?
Comment 12 Esteve Varela Colominas 2023-06-26 19:43:34 UTC
*** Bug 909170 has been marked as a duplicate of this bug. ***
Comment 13 Tamas Jantvik 2023-06-27 17:57:35 UTC
I stumbled here as well.
XDG_DATA_DIRS is modified by /etc/profile.d/flatpak.sh.
By changing that file so that it only does something for, say uid >= 1000, net-im/telegram-desktop-4.8.3 should be able to merge successfully.
Comment 14 orion_cygnus 2023-06-27 19:44:52 UTC
(In reply to Esteve Varela Colominas from comment #11)
> Yes, that's the version that added cppgir. Can you try unsetting
> XDG_DATA_DIRS from your environment or /etc/env.d (and running env-update),
> to see if that workaround works?

Unsetting XDG_DATA_DIRS resulted in telegram building successfully, thanks. Anything we can change on the ebuild to prevent this from happening in the future? This feels like a telegram build system issue. My understanding is the correct paths are listed in XDG_DATA_DIRS, just out of the order telegram is expecting. Unless I'm mistaken?
Comment 15 Esteve Varela Colominas 2023-06-28 00:40:44 UTC
No, this is an issue with the ebuild environment. cppgir does the right thing of using the XDG_DATA_DIRS variable to find data files, and it isn't expected to contain paths the running user can't read (the portage user can't read /root/.local/share/flatpak). Most tools skip directories they can't open, but that doesn't make it right.
Either cppgir needs to be updated to skip innaccessible directories, or portage needs to strip this variable to prevent it from infecting the ebuild environment. In the interim, I can unset it within the ebuild.
Comment 16 Esteve Varela Colominas 2023-07-11 11:13:26 UTC
bumping this issue to get someone to please notice and merge the PR
Comment 17 Larry the Git Cow gentoo-dev 2023-07-15 16:25:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4283d28a7c19e4139e4de82bc0220a46d0ea1a55

commit 4283d28a7c19e4139e4de82bc0220a46d0ea1a55
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2023-06-29 13:22:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-07-15 16:24:56 +0000

    net-im/telegram-desktop: Drop old
    
    Closes: https://bugs.gentoo.org/909038
    Thanks-to: orion_cygnus@protonmail.com <orion_cygnus@protonmail.com>
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 net-im/telegram-desktop/Manifest                   |   1 -
 .../files/tdesktop-4.8.3-system-cppgir.patch       |  50 -----
 .../telegram-desktop/telegram-desktop-4.8.3.ebuild | 210 ---------------------
 3 files changed, 261 deletions(-)