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.
Created attachment 864480 [details] emerge --info
Created attachment 864481 [details] emerge -pqv '=net-im/telegram-desktop-4.8.3::gentoo'
Created attachment 864482 [details] ebuild environment file
Created attachment 864483 [details] build.log
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.
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
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
(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.
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.
(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.
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?
*** Bug 909170 has been marked as a duplicate of this bug. ***
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.
(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?
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.
bumping this issue to get someone to please notice and merge the PR
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(-)