/snap/bin not in default PATH for units, snapd should ship system-environment-generators to inject /snap/bin into $PATH
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd (Ubuntu) |
Fix Released
|
Critical
|
Michael Vogt | ||
Xenial |
Won't Fix
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Critical
|
Michael Vogt | ||
systemd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* This means that software installed via snap isn't transparently available for units to use. As snaps are first-class citizens in Ubuntu, we should update the PATH.
* When a generator started to be provided by systemd, it was recognized that $PATH is not correctly set, nonetheless, due to an environment bug that systemd generators run in.
[Testcase]
# make snapd-env-generator executable if it is not
$ sudo chmod +x /usr/lib/
# reboot, then test the effect of the fix
$ systemd-run /usr/bin/env
$ journalctl -e | grep PATH
Output should contain /snap/bin
Output should contain a complete and a valid PATH, i.e.
PATH="/
[Regression Potential]
* snapd generator was already fixed separately to cause no harm, when running under a broken systemd. With the corrected environment, generators will now run with a correct PATH out of the box. A slight change of PATH will be observed by all generators, when running in containers/
Related branches
- Ubuntu Stable Release Updates Team: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedubuntu-sru (+1/-1)
- Dimitri John Ledkov: Pending requested
-
Diff: 109 lines (+51/-7)4 files modifieddebian/changelog (+15/-0)
debian/control (+4/-2)
debian/patches/Append-snap-bin-to-default-PATH.patch (+31/-0)
debian/patches/series (+1/-5)
description: | updated |
description: | updated |
Changed in systemd (Ubuntu Cosmic): | |
status: | New → Won't Fix |
Changed in systemd (Ubuntu Bionic): | |
status: | New → Won't Fix |
Changed in systemd (Ubuntu Xenial): | |
status: | New → Confirmed |
description: | updated |
summary: |
- /snap/bin not in default PATH for units + /snap/bin not in default PATH for units, snapd should ship system- + environment-generators to inject /snap/bin into $PATH |
description: | updated |
Changed in systemd (Ubuntu Bionic): | |
status: | Confirmed → In Progress |
description: | updated |
tags: | added: id-5d0bec28939a024305398e2a |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done verification-done-xenial removed: verification-needed verification-needed-xenial |
Changed in snapd (Ubuntu Xenial): | |
status: | Invalid → Won't Fix |
Changed in snapd (Ubuntu Bionic): | |
status: | Fix Committed → Fix Released |
snapd ships a snippet in /etc/profile.d that sets the PATH to /snap/bin and should theoretically work for all login shells (except for zsh which doesn't respect the profile.d standard) ... bug 1640514 and bug 1659719 are related.