Skip to content

Fix issues with XDG_RUNTIME_DIR being /var/run which is a symlink - #2710

Closed
alexlarsson wants to merge 1 commit into
flatpak:masterfrom
alexlarsson:fix-var-run-symlinks
Closed

alexlarsson wants to merge 1 commit into
flatpak:masterfrom
alexlarsson:fix-var-run-symlinks

Conversation

@alexlarsson

Copy link
Copy Markdown
Member

Whenever we use $XDG_RUNTIME_DIR and expose it somehow in the sandbox
we fully resolve the path, because if (as happens on gentoo for instance)
it contains /var/run -> ../run, then flatpak thinks we need to
add the /var/run symlink in the runtime even though we already
exposed that.

Whenever we use $XDG_RUNTIME_DIR and expose it somehow in the sandbox
we fully resolve the path, because if (as happens on gentoo for instance)
it contains /var/run -> ../run, then flatpak thinks we need to
add the /var/run symlink in the runtime even though we already
exposed that.
@alexlarsson

Copy link
Copy Markdown
Member Author

This should fix #2200

@matthiasclasen

Copy link
Copy Markdown
Collaborator

@rh-atomic-bot r+

@rh-atomic-bot

Copy link
Copy Markdown

📌 Commit 6aa4777 has been approved by matthiasclasen

@rh-atomic-bot

Copy link
Copy Markdown

⚡ Test exempted: pull fully rebased and already tested.

alexlarsson added a commit that referenced this pull request Mar 26, 2019
Whenever we use $XDG_RUNTIME_DIR and expose it somehow in the sandbox
we fully resolve the path, because if (as happens on gentoo for instance)
it contains /var/run -> ../run, then flatpak thinks we need to
add the /var/run symlink in the runtime even though we already
exposed that.

Closes: #2710
Approved by: matthiasclasen

(cherry picked from commit 28e9628)
@probonopd

Copy link
Copy Markdown

I am still getting bwrap: Can't make symlink at /var/run: File exists: #2200 (comment)

@tallero

tallero commented Mar 2, 2020 •

Copy link
Copy Markdown

Me too.

Reported on GNOME Builder and Archlinux bugtrackers.

@aaronw2

aaronw2 commented Jan 12, 2023 •

Copy link
Copy Markdown

I am seeing this in OpenSUSE with the FreeCAD and Steam flatpaks. I suspect this somehow broke again. On OpenSUSE, /var/run is a symlink to /run.
I.e:
flatpak run org.freecadweb.FreeCAD
bwrap: Can't make symlink at /var/run: File exists

In my case, XDG_RUNTIME_DIR=/var/run/user/500
On OpenSUSE 15.4 /var/run is a symlink to /run.
I see the same failure if I set XDG_RUNTIME_DIR=/run/user/500

@smcv

smcv commented Jan 12, 2023

Copy link
Copy Markdown
Collaborator

To make this more likely to be solvable, please open a new issue with full details (flatpak -vv output is likely to be helpful), instead of commenting on a closed issue with minimal detail.

@smcv

smcv commented Jan 12, 2023

Copy link
Copy Markdown
Collaborator

I am still getting bwrap: Can't make symlink at /var/run: File exists: #2200 (comment)

The same error message can happen for multiple reasons; this pull request fixed one of those reasons. The fact that you still see the same error message is a bug, but it is probably not the same bug that this PR fixed.

If this is still the case, please check for similar issues like #3477, and if none match, open a new issue with full details, including flatpak -vv output. Please do not reply to a closed PR or a closed issue unless you are completely confident that you are seeing the same root cause, not just the same symptom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants