FS#61420 - [flatpak] flatpak 1.1.3 causes GNOME on Xorg to fail

Attached to Project: Arch Linux
Opened by Britt Yazel (brittyazel) - Tuesday, 15 January 2019, 23:32 GMT
Last edited by Jan Alexander Steffens (heftig) - Wednesday, 16 January 2019, 05:41 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Upon updating to flatpak 1.1.3, I was unable to log into GNOME through GDM. I usually use the GNOME Xorg session, and upon typing in my password and the screen going black it would just kick me back to the login screen. The GNOME Wayland session did not have this issue.

That being said, someone on reddit suggested that I downgrade flatpak to 1.1.2 to solve the issue, and indeed it worked. Something about flatpak 1.1.3 is causing GNOME to fail to load
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Wednesday, 16 January 2019, 05:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  flatpak 1.1.3-2
Comment by Britt Yazel (brittyazel) - Tuesday, 15 January 2019, 23:43 GMT
https://github.com/flatpak/flatpak/issues/2600

I got an answer from upstream, this is a known issue. A patch has been submitted here:

https://github.com/flatpak/flatpak/pull/2597
Comment by Eli Forman (elimpfor) - Tuesday, 15 January 2019, 23:55 GMT
Fails due to:

/usr/lib/gdm-x-session[1468]: /etc/profile.d/flatpak.sh: line 12: `done < <(echo "${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak"; flatpak --installations)'
/usr/lib/gdm-x-session[1468]: /etc/profile.d/flatpak.sh: line 12: syntax error near unexpected token `<'

(Duplicate PR #61421)
Comment by loqs (loqs) - Wednesday, 16 January 2019, 00:25 GMT
/etc/gdm/Xsession uses #!/bin/sh /bin/sh is a sym link to /bin/bash. Calling bash as sh places it in posix compatibility mode which does not support process substitution.
Comment by Eli Schwartz (eschwartz) - Wednesday, 16 January 2019, 03:11 GMT
This should be a problem for all systems (as loqs indicated) no matter what /bin/sh is:

$ ln -s /bin/bash sh
$ ./sh
sh-5.0$ cat < <(printf '%s\n' foo bar)
sh: syntax error near unexpected token `<'


EDIT:
But apparently bash would like to rescue you:
> When invoked as sh, bash enters posix mode after the startup files are read.

$ sh -l
foo
bar
$ . /etc/profile
sh: /etc/profile.d/fail.sh: line 1: syntax error near unexpected token `<'
sh: /etc/profile.d/fail.sh: line 1: `cat < <(printf '%s\n' foo bar)'
Comment by Jon Irving (j0ni) - Wednesday, 16 January 2019, 03:55 GMT
FYI this appears to be fixed upstream.

https://github.com/flatpak/flatpak/issues/2600
Comment by Britt Yazel (brittyazel) - Wednesday, 16 January 2019, 04:10 GMT
I can confirm the fix works perfectly

Loading...